clean up various dist conditionals
Remove all conditionals for EL-6; it is EOL as of November 2020. Replace a number of `EL > 7` with `EL >= 8` to make the intention clearer. The next version of RHEL is no longer shrouded in mystery. Drop conditionals which apply only to long-obsolete Fedora releases.
This commit is contained in:
parent
d6f2c616bc
commit
b1bd88b45b
120
git.spec
120
git.spec
@ -28,8 +28,8 @@
|
||||
%bcond_with asciidoctor
|
||||
%endif
|
||||
|
||||
# Settings for Fedora and EL > 7
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
# Settings for Fedora and EL >= 8
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
%bcond_with python2
|
||||
%bcond_without python3
|
||||
%global gitweb_httpd_conf gitweb.conf
|
||||
@ -47,32 +47,21 @@
|
||||
|
||||
# Settings for Fedora and EL >= 7
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
%bcond_without libsecret
|
||||
%global bashcomp_pkgconfig 1
|
||||
%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null)
|
||||
%global bashcomproot %(dirname %{bashcompdir} 2>/dev/null)
|
||||
%global emacs_filesystem 1
|
||||
%global use_new_rpm_filters 1
|
||||
%global use_systemd 1
|
||||
%else
|
||||
%bcond_with libsecret
|
||||
%global bashcomp_pkgconfig 0
|
||||
%global bashcompdir %{_sysconfdir}/bash_completion.d
|
||||
%global bashcomproot %{bashcompdir}
|
||||
%global emacs_filesystem 0
|
||||
%global use_new_rpm_filters 0
|
||||
%global use_systemd 0
|
||||
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
%endif
|
||||
|
||||
# Allow cvs subpackage to be toggled via --with/--without
|
||||
# Disable cvs subpackage by default on EL > 7
|
||||
%if 0%{?rhel} > 7
|
||||
# Disable cvs subpackage by default on EL >= 8
|
||||
%if 0%{?rhel} >= 8
|
||||
%bcond_with cvs
|
||||
%else
|
||||
%bcond_without cvs
|
||||
%endif
|
||||
|
||||
# Allow credential-libsecret subpackage to be toggled via --with/--without
|
||||
%bcond_without libsecret
|
||||
|
||||
# Allow p4 subpackage to be toggled via --with/--without
|
||||
# Disable by default if we lack python2 support
|
||||
%if %{without python2}
|
||||
@ -86,12 +75,6 @@
|
||||
%global _hardened_build 1
|
||||
%endif
|
||||
|
||||
# Hardening flags for EL-6
|
||||
%if 0%{?rhel} == 6
|
||||
%global build_cflags %{build_cflags} -fPIC -pie
|
||||
%global build_ldflags -Wl,-z,relro -Wl,-z,now
|
||||
%endif
|
||||
|
||||
# Define for release candidates
|
||||
#global rcrev .rc0
|
||||
|
||||
@ -186,16 +169,10 @@ BuildRequires: perl-interpreter
|
||||
BuildRequires: perl
|
||||
%endif
|
||||
# endif use_perl_interpreter
|
||||
%if %{bashcomp_pkgconfig}
|
||||
BuildRequires: pkgconfig(bash-completion)
|
||||
%endif
|
||||
# endif bashcomp_pkgconfig
|
||||
BuildRequires: sed
|
||||
%if %{use_systemd}
|
||||
# For macros
|
||||
BuildRequires: systemd
|
||||
%endif
|
||||
# endif use_systemd
|
||||
BuildRequires: tcl
|
||||
BuildRequires: tk
|
||||
BuildRequires: xz
|
||||
@ -204,7 +181,7 @@ BuildRequires: zlib-devel >= 1.2
|
||||
%if %{with tests}
|
||||
# Test suite requirements
|
||||
BuildRequires: acl
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} > 7
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
# Needed by t5540-http-push-webdav.sh
|
||||
BuildRequires: apr-util-bdb
|
||||
%endif
|
||||
@ -223,18 +200,14 @@ BuildRequires: glibc-langpack-en
|
||||
BuildRequires: glibc-langpack-is
|
||||
%endif
|
||||
# endif use_glibc_langpacks
|
||||
%if 0%{?fedora} && 0%{?fedora} < 30
|
||||
BuildRequires: gnupg
|
||||
%endif
|
||||
# endif fedora < 30
|
||||
%if 0%{?fedora} || 0%{?rhel} > 8
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 9
|
||||
BuildRequires: gnupg2-smime
|
||||
%endif
|
||||
# endif fedora or el > 8
|
||||
%if 0%{?fedora} || 0%{?rhel} == 6 || ( 0%{?rhel} >= 7 && ( "%{_arch}" == "ppc64le" || "%{_arch}" == "x86_64" ) )
|
||||
# endif fedora or el >= 9
|
||||
%if 0%{?fedora} || ( 0%{?rhel} >= 7 && ( "%{_arch}" == "ppc64le" || "%{_arch}" == "x86_64" ) )
|
||||
BuildRequires: highlight
|
||||
%endif
|
||||
# endif fedora, el-6, or el7+ (ppc64le/x86_64)
|
||||
# endif fedora or el7+ (ppc64le/x86_64)
|
||||
BuildRequires: httpd
|
||||
%if 0%{?fedora} && ! ( "%{_arch}" == "i386" || "%{_arch}" == "s390x" )
|
||||
BuildRequires: jgit
|
||||
@ -286,10 +259,10 @@ Requires: perl(Term::ReadKey)
|
||||
# endif ! defined perl_bootstrap
|
||||
Requires: perl-Git = %{version}-%{release}
|
||||
|
||||
%if %{with emacs} && %{emacs_filesystem} && %{defined _emacs_version}
|
||||
%if %{with emacs} && %{defined _emacs_version}
|
||||
Requires: emacs-filesystem >= %{_emacs_version}
|
||||
%endif
|
||||
# endif with emacs && emacs_filesystem
|
||||
# endif with emacs && defined _emacs_version
|
||||
|
||||
# Obsolete emacs-git if it's disabled
|
||||
%if %{without emacs}
|
||||
@ -346,10 +319,6 @@ Requires: perl-Git = %{version}-%{release}
|
||||
Requires: perl(Term::ReadKey)
|
||||
%endif
|
||||
# endif ! defined perl_bootstrap
|
||||
%if %{with emacs} && ! %{emacs_filesystem}
|
||||
Requires: emacs-git = %{version}-%{release}
|
||||
%endif
|
||||
# endif with emacs && ! emacs_filesystem
|
||||
%description all
|
||||
Git is a fast, scalable, distributed revision control system with an
|
||||
unusually rich command set that provides both high-level operations
|
||||
@ -405,15 +374,10 @@ Requires: perl(DBD::SQLite)
|
||||
%package daemon
|
||||
Summary: Git protocol daemon
|
||||
Requires: git-core = %{version}-%{release}
|
||||
%if %{use_systemd}
|
||||
Requires: systemd
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
Requires(postun): systemd
|
||||
%else
|
||||
Requires: xinetd
|
||||
%endif
|
||||
# endif use_systemd
|
||||
%description daemon
|
||||
The git daemon for supporting git:// access to git repositories
|
||||
|
||||
@ -426,19 +390,6 @@ Requires: perl(Net::SMTP::SSL)
|
||||
%description email
|
||||
%{summary}.
|
||||
|
||||
%if %{with emacs} && ! %{emacs_filesystem}
|
||||
%package -n emacs-git
|
||||
Summary: Git version control system support for Emacs
|
||||
Requires: git = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
Requires: emacs(bin) >= %{_emacs_version}
|
||||
Obsoletes: emacs-git-el < 2.18.0-0.0
|
||||
Provides: emacs-git-el = %{version}-%{release}
|
||||
%description -n emacs-git
|
||||
%{summary}.
|
||||
%endif
|
||||
# endif with emacs && ! emacs_filesystem
|
||||
|
||||
%package -n gitk
|
||||
Summary: Git repository browser
|
||||
BuildArch: noarch
|
||||
@ -587,24 +538,12 @@ EOF
|
||||
|
||||
# Filter bogus perl requires
|
||||
# packed-refs comes from a comment in contrib/hooks/update-paranoid
|
||||
%if %{use_new_rpm_filters}
|
||||
%{?perl_default_filter}
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(packed-refs\\)
|
||||
%if ! %{defined perl_bootstrap}
|
||||
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(Term::ReadKey\\)
|
||||
%endif
|
||||
# endif ! defined perl_bootstrap
|
||||
%else
|
||||
cat << \EOF > %{name}-req
|
||||
#!/bin/sh
|
||||
%{__perl_requires} $* |\
|
||||
sed -e '/perl(packed-refs)/d'
|
||||
EOF
|
||||
|
||||
%global __perl_requires %{_builddir}/%{name}-%{version}%{?rcrev}/%{name}-req
|
||||
chmod +x %{__perl_requires}
|
||||
%endif
|
||||
# endif use_new_rpm_filters
|
||||
|
||||
# Remove Git::LoadCPAN to ensure we use only system perl modules. This also
|
||||
# allows the dependencies to be automatically processed by rpm.
|
||||
@ -744,20 +683,11 @@ rm -rf %{buildroot}%{_mandir}
|
||||
# endif with docs
|
||||
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/git
|
||||
%if %{use_systemd}
|
||||
install -Dp -m 0644 %{SOURCE16} %{buildroot}%{_unitdir}/git.socket
|
||||
perl -p \
|
||||
-e "s|\@GITEXECDIR\@|%{gitexecdir}|g;" \
|
||||
-e "s|\@BASE_PATH\@|%{_localstatedir}/lib/git|g;" \
|
||||
%{SOURCE15} > %{buildroot}%{_unitdir}/git@.service
|
||||
%else
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/xinetd.d
|
||||
perl -p \
|
||||
-e "s|\@GITEXECDIR\@|%{gitexecdir}|g;" \
|
||||
-e "s|\@BASE_PATH\@|%{_localstatedir}/lib/git|g;" \
|
||||
%{SOURCE11} > %{buildroot}%{_sysconfdir}/xinetd.d/git
|
||||
%endif
|
||||
# endif use_systemd
|
||||
|
||||
# Setup bash completion
|
||||
install -Dpm 644 contrib/completion/git-completion.bash %{buildroot}%{bashcompdir}/git
|
||||
@ -915,7 +845,6 @@ mv netrc contrib/credential/
|
||||
# Clean up test dir
|
||||
rmdir --ignore-fail-on-non-empty "$testdir"
|
||||
|
||||
%if %{use_systemd}
|
||||
%post daemon
|
||||
%systemd_post git.socket
|
||||
|
||||
@ -924,14 +853,12 @@ rmdir --ignore-fail-on-non-empty "$testdir"
|
||||
|
||||
%postun daemon
|
||||
%systemd_postun_with_restart git.socket
|
||||
%endif
|
||||
# endif use_systemd
|
||||
|
||||
%files -f bin-man-doc-git-files
|
||||
%if %{with emacs} && %{emacs_filesystem}
|
||||
%if %{with emacs}
|
||||
%{elispdir}
|
||||
%endif
|
||||
# endif with emacs && emacs_filesystem
|
||||
# endif with emacs
|
||||
%{_datadir}/git-core/contrib/diff-highlight
|
||||
%{_datadir}/git-core/contrib/hooks/multimail
|
||||
%{_datadir}/git-core/contrib/hooks/update-paranoid
|
||||
@ -985,25 +912,13 @@ rmdir --ignore-fail-on-non-empty "$testdir"
|
||||
|
||||
%files daemon
|
||||
%{_pkgdocdir}/git-daemon*.txt
|
||||
%if %{use_systemd}
|
||||
%{_unitdir}/git.socket
|
||||
%{_unitdir}/git@.service
|
||||
%else
|
||||
%config(noreplace)%{_sysconfdir}/xinetd.d/git
|
||||
%endif
|
||||
# endif use_systemd
|
||||
%{gitexecdir}/git-daemon
|
||||
%{_localstatedir}/lib/git
|
||||
%{?with_docs:%{_mandir}/man1/git-daemon*.1*}
|
||||
%{?with_docs:%{_pkgdocdir}/git-daemon*.html}
|
||||
|
||||
%if %{with emacs} && ! %{emacs_filesystem}
|
||||
%files -n emacs-git
|
||||
%{_pkgdocdir}/contrib/emacs/README
|
||||
%{elispdir}
|
||||
%endif
|
||||
# endif with emacs && ! emacs_filesystem
|
||||
|
||||
%files email
|
||||
%{_pkgdocdir}/*email*.txt
|
||||
%{gitexecdir}/*email*
|
||||
@ -1076,6 +991,9 @@ rmdir --ignore-fail-on-non-empty "$testdir"
|
||||
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.31.1-3.1
|
||||
- Perl 5.34 rebuild
|
||||
|
||||
* Sun May 16 2021 Todd Zullinger <tmz@pobox.com>
|
||||
- clean up various dist conditionals
|
||||
|
||||
* Wed Apr 21 2021 Todd Zullinger <tmz@pobox.com> - 2.31.1-3
|
||||
- apply upstream patch to fix clone --bare segfault
|
||||
Resolves: rhbz#1952030
|
||||
|
Loading…
Reference in New Issue
Block a user