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