Add comments to %endif statements

Make it easier to tell what %if conditions are being ended.  This is
particularly useful with nested conditions since we lack any indentation
to visually denote the conditional blocks.
This commit is contained in:
Todd Zullinger 2018-10-11 13:00:10 -04:00
parent ba93b90998
commit ac594c4ca5

107
git.spec
View File

@ -130,8 +130,8 @@ BuildRequires: asciidoc >= 8.4.1
BuildRequires: xmlto
%if %{with linkcheck}
BuildRequires: linkchecker
%endif
%endif
%endif # with linkcheck
%endif # with docs
BuildRequires: desktop-file-utils
BuildRequires: emacs
BuildRequires: expat-devel
@ -143,7 +143,7 @@ BuildRequires: gnupg2
BuildRequires: libcurl-devel
%if %{libsecret}
BuildRequires: libsecret-devel
%endif
%endif # libsecret
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: pcre2-devel
@ -151,20 +151,20 @@ BuildRequires: perl(Error)
BuildRequires: perl(Test)
%if %{use_perl_generators}
BuildRequires: perl-generators
%endif
%endif # use_perl_generators
%if %{use_perl_interpreter}
BuildRequires: perl-interpreter
%else
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: zlib-devel >= 1.2
@ -175,20 +175,20 @@ BuildRequires: acl
%if 0%{?fedora} >= 27 || 0%{?rhel} > 7
# Needed by t5540-http-push-webdav.sh
BuildRequires: apr-util-bdb
%endif
%endif # fedora >= 27
BuildRequires: bash
%if %{with cvs}
BuildRequires: cvs
BuildRequires: cvsps
%endif
%endif # with cvs
BuildRequires: gnupg
%if 0%{?fedora} || ( 0%{?rhel} && ( 0%{?rhel} == 6 || 0%{?rhel} >= 7 && %{_arch} != ppc64 ))
BuildRequires: highlight
%endif
%endif # fedora, el-6, or el7-ppc64
BuildRequires: httpd
%if 0%{?fedora} && %{_arch} != s390x
BuildRequires: jgit
%endif
%endif # fedora (except s390x)
BuildRequires: mod_dav_svn
BuildRequires: pcre
BuildRequires: perl(App::Prove)
@ -205,10 +205,10 @@ BuildRequires: perl(Test::More)
BuildRequires: perl(Time::HiRes)
%if %{with python2}
BuildRequires: python2-devel
%endif
%endif # with python2
%if %{with python3}
BuildRequires: python3-devel
%endif
%endif # with python3
BuildRequires: subversion
BuildRequires: subversion-perl
BuildRequires: time
@ -218,27 +218,27 @@ Requires: git-core = %{version}-%{release}
Requires: git-core-doc = %{version}-%{release}
%if ! %{defined perl_bootstrap}
Requires: perl(Term::ReadKey)
%endif
%endif # ! defined perl_bootstrap
Requires: perl-Git = %{version}-%{release}
%if %{emacs_filesystem}
Requires: emacs-filesystem >= %{_emacs_version}
%endif
%endif # emacs_filesystem
# Obsolete git-cvs if it's disabled
%if %{without cvs}
Obsoletes: git-cvs < %{?epoch:%{epoch}:}%{version}-%{release}
%endif
%endif # without cvs
# Obsolete gnome-keyring credential helper (remove after Fedora 29)
%if 0%{?fedora} && 0%{?fedora} < 30
Obsoletes: git-gnome-keyring < 2.11.1-4
%endif
%endif # fedora < 30
# Obsolete git-p4 if it's disabled
%if %{without p4}
Obsoletes: git-p4 < %{?epoch:%{epoch}:}%{version}-%{release}
%endif
%endif # without p4
%description
Git is a fast, scalable, distributed revision control system with an
@ -255,12 +255,12 @@ BuildArch: noarch
Requires: git = %{version}-%{release}
%if %{with cvs}
Requires: git-cvs = %{version}-%{release}
%endif
%endif # with cvs
Requires: git-email = %{version}-%{release}
Requires: git-gui = %{version}-%{release}
%if %{with p4}
Requires: git-p4 = %{version}-%{release}
%endif
%endif # with p4
Requires: git-subtree = %{version}-%{release}
Requires: git-svn = %{version}-%{release}
Requires: git-instaweb = %{version}-%{release}
@ -268,10 +268,10 @@ Requires: gitk = %{version}-%{release}
Requires: perl-Git = %{version}-%{release}
%if ! %{defined perl_bootstrap}
Requires: perl(Term::ReadKey)
%endif
%endif # ! defined perl_bootstrap
%if ! %{emacs_filesystem}
Requires: emacs-git = %{version}-%{release}
%endif
%endif # ! 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
@ -311,7 +311,7 @@ Requires: cvsps
Requires: perl(DBD::SQLite)
%description cvs
%{summary}.
%endif
%endif # with cvs
%package daemon
Summary: Git protocol daemon
@ -323,7 +323,7 @@ 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
@ -346,7 +346,7 @@ Obsoletes: emacs-git-el < 2.18.0-0.0
Provides: emacs-git-el = %{version}-%{release}
%description -n emacs-git
%{summary}.
%endif
%endif # ! emacs_filesystem
%package -n gitk
Summary: Git repository browser
@ -390,7 +390,7 @@ BuildRequires: python2-devel
Requires: git = %{version}-%{release}
%description p4
%{summary}.
%endif
%endif # with p4
%package -n perl-Git
Summary: Perl interface to Git
@ -423,7 +423,7 @@ Requires: git = %{version}-%{release}
Requires: perl(Digest::MD5)
%if ! %{defined perl_bootstrap}
Requires: perl(Term::ReadKey)
%endif
%endif # ! defined perl_bootstrap
Requires: subversion
%description svn
%{summary}.
@ -451,12 +451,12 @@ sed -i '/^git-archimport/d' command-list.txt
%if %{without cvs}
# Remove git-cvs* from command list
sed -i '/^git-cvs/d' command-list.txt
%endif
%endif # without cvs
%if %{without p4}
# Remove git-p4 from command list
sed -i '/^git-p4/d' command-list.txt
%endif
%endif # without p4
# Use these same options for every invocation of 'make'.
# Otherwise it will rebuild in %%install due to flags changes.
@ -475,7 +475,7 @@ NO_PERL_CPAN_FALLBACKS = 1
PYTHON_PATH = %{__python2}
%else
NO_PYTHON = 1
%endif
%endif # with python2
htmldir = %{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}}
prefix = %{_prefix}
perllibdir = %{perl_vendorlib}
@ -495,7 +495,7 @@ EOF
%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
@ -505,7 +505,7 @@ 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.
@ -519,7 +519,7 @@ grep -rlZ '^use Git::LoadCPAN::' | xargs -r0 sed -i 's/Git::LoadCPAN:://g'
%if %{libsecret}
%make_build -C contrib/credential/libsecret/
%endif
%endif # libsecret
%make_build -C contrib/diff-highlight/
@ -538,7 +538,7 @@ sed -i -e '1s@#! */usr/bin/env python$@#!%{__python2}@' \
# Remove contrib/fast-import/import-zips.py, contrib/hg-to-git, and
# contrib/svn-fe which all require python2.
rm -rf contrib/fast-import/import-zips.py contrib/hg-to-git contrib/svn-fe
%endif
%endif # with python2
# The multimail hook is installed with git. Use python3 to avoid an
# unnecessary python2 dependency, if possible.
@ -547,7 +547,7 @@ sed -i -e '1s@#!\( */usr/bin/env python\|%{__python2}\)$@#!%{__python3}@' \
contrib/hooks/multimail/git_multimail.py \
contrib/hooks/multimail/migrate-mailhook-config \
contrib/hooks/multimail/post-receive.example
%endif
%endif # with python3
%install
%make_install %{?with_docs:install-doc}
@ -567,7 +567,7 @@ popd >/dev/null
%if %{libsecret}
install -pm 755 contrib/credential/libsecret/git-credential-libsecret \
%{buildroot}%{gitexecdir}
%endif
%endif # libsecret
install -pm 755 contrib/credential/netrc/git-credential-netrc \
%{buildroot}%{gitexecdir}
# temporarily move contrib/credential/netrc aside to prevent it from being
@ -598,13 +598,13 @@ find %{buildroot} Documentation -type f -name 'git-archimport*' -exec rm -f {} '
# Remove git-cvs* and gitcvs*
find %{buildroot} Documentation \( -type f -o -type l \) \
\( -name 'git-cvs*' -o -name 'gitcvs*' \) -exec rm -f {} ';'
%endif
%endif # without cvs
%if %{without p4}
# Remove git-p4* and mergetools/p4merge
find %{buildroot} Documentation -type f -name 'git-p4*' -exec rm -f {} ';'
rm -f %{buildroot}%{gitexecdir}/mergetools/p4merge
%endif
%endif # without p4
# Remove unneeded git-remote-testsvn so git-svn can be noarch
rm -f %{buildroot}%{gitexecdir}/git-remote-testsvn
@ -621,7 +621,7 @@ sed -i "/Git\/SVN/ d" perl-git-files
(find %{buildroot}%{_mandir} -type f | grep -vE "$exclude_re|Git" | sed -e s@^%{buildroot}@@ -e 's/$/*/' ) >> bin-man-doc-files
%else
rm -rf %{buildroot}%{_mandir}
%endif
%endif # with docs
mkdir -p %{buildroot}%{_localstatedir}/lib/git
%if %{use_systemd}
@ -636,7 +636,7 @@ 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
@ -683,7 +683,7 @@ grep -vE "$not_core_re|%{_mandir}" bin-man-doc-files > bin-files-core
touch man-doc-files-core
%if %{with docs}
grep -vE "$not_core_re" bin-man-doc-files | grep "%{_mandir}" > man-doc-files-core
%endif
%endif # with docs
grep -E "$not_core_re" bin-man-doc-files > bin-man-doc-git-files
##### DOC
@ -702,7 +702,7 @@ cp -pr Documentation/*.html Documentation/docbook-xsl.css %{buildroot}%{_pkgdocd
cp -pr Documentation/{howto,technical} %{buildroot}%{_pkgdocdir}/
find %{buildroot}%{_pkgdocdir}/{howto,technical} -type f \
|grep -o "%{_pkgdocdir}.*$" >> man-doc-files-core
%endif
%endif # with docs
{
find %{buildroot}%{_pkgdocdir} -type f -maxdepth 1 \
@ -719,12 +719,12 @@ find %{buildroot}%{_pkgdocdir}/{howto,technical} -type f \
%if %{without tests}
echo "*** Skipping tests"
exit 0
%endif
%endif # without tests
%if %{with docs} && %{with linkcheck}
# Test links in HTML documentation
find %{buildroot}%{_pkgdocdir} -name "*.html" -print0 | xargs -r0 linkchecker
%endif
%endif # with docs && with linkcheck
# Tests to skip on all releases and architectures
GIT_SKIP_TESTS=""
@ -737,7 +737,7 @@ GIT_SKIP_TESTS=""
# t5541.33 'push 2000 tags over http'
# t5551.25 'clone the 2,000 tag repo to check OS command line overflow'
GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5541.33 t5551.25"
%endif
%endif # aarch64 %%{arm} %%{power64}
%ifarch %{power64}
# Skip tests which fail on ppc
@ -747,7 +747,7 @@ GIT_SKIP_TESTS="$GIT_SKIP_TESTS t5541.33 t5551.25"
# due to an issue in the test suite or a conflict with some other process on
# the build host. It only appears to occur on ppc-arches.
GIT_SKIP_TESTS="$GIT_SKIP_TESTS t9115"
%endif
%endif # %%{power64}
export GIT_SKIP_TESTS
@ -779,12 +779,12 @@ make -C contrib/credential/netrc/ testverbose
%postun daemon
%systemd_postun_with_restart git@.service
%endif
%endif # use_systemd
%files -f bin-man-doc-git-files
%if %{emacs_filesystem}
%{elispdir}
%endif
%endif # emacs_filesystem
%{_datadir}/git-core/contrib/diff-highlight
%{_datadir}/git-core/contrib/hooks/multimail
%{_datadir}/git-core/contrib/hooks/update-paranoid
@ -816,7 +816,7 @@ make -C contrib/credential/netrc/ testverbose
%if 0%{?rhel} && 0%{?rhel} <= 7
# .py files are only bytecompiled on EL <= 7
%exclude %{_pkgdocdir}/contrib/*/*.py[co]
%endif
%endif # rhel <= 7
%{_pkgdocdir}/contrib/hooks
%if %{with cvs}
@ -826,7 +826,7 @@ make -C contrib/credential/netrc/ testverbose
%{gitexecdir}/*cvs*
%{?with_docs:%{_mandir}/man1/*cvs*.1*}
%{?with_docs:%{_pkgdocdir}/*git-cvs*.html}
%endif
%endif # with cvs
%files daemon
%{_pkgdocdir}/git-daemon*.txt
@ -835,7 +835,7 @@ make -C contrib/credential/netrc/ testverbose
%{_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*}
@ -845,7 +845,7 @@ make -C contrib/credential/netrc/ testverbose
%files -n emacs-git
%{_pkgdocdir}/contrib/emacs/README
%{elispdir}
%endif
%endif # ! emacs_filesystem
%files email
%{_pkgdocdir}/*email*.txt
@ -894,7 +894,7 @@ make -C contrib/credential/netrc/ testverbose
%{_pkgdocdir}/*p4*.txt
%{?with_docs:%{_mandir}/man1/*p4*.1*}
%{?with_docs:%{_pkgdocdir}/*p4*.html}
%endif
%endif # with p4
%files -n perl-Git -f perl-git-files
%{?with_docs:%{_mandir}/man3/Git.3pm*}
@ -918,6 +918,7 @@ make -C contrib/credential/netrc/ testverbose
- Skip test BuildRequires when --without tests is used
- Simplify gpg verification of Source0
- Use %%{without ...} macro consistently
- Add comments to %%endif statements
* Mon Oct 22 2018 Pavel Cahyna <pcahyna@redhat.com> - 2.19.1-2
- Update condition for the t5540-http-push-webdav test for future RHEL