Skip test BuildRequires when --without tests is used

The chroot is a bit quicker to create and slightly smaller when building
'--without tests' if the BuildRequires needed to run the tests are
skipped.

Add pod2man dependency when documentation is enabled (the default).
Since git-2.17.0, pod2man is needed to build Git.3pm.  The pod2man
command is in perl-podlators on Fedora and EL >= 7, but in perl on EL-6.
Use %{_bindir}/pod2man to ensure the dependency is found regardless of
what package provides it.

The dependency is only missed when building without the test deps, as
the many perl requirements pulled in for the test suite bring in
pod2man.
This commit is contained in:
Todd Zullinger 2018-10-11 12:10:37 -04:00
parent 79dbcc83dc
commit a91c5fdb8a

View File

@ -124,6 +124,8 @@ Patch1: git-cvsimport-Ignore-cvsps-2.2b1-Branches-output.patch
Patch2: 0001-t5551-http-fetch-smart.sh-sort-cookies-before-compar.patch
%if %{with docs}
# pod2man is needed to build Git.3pm
BuildRequires: %{_bindir}/pod2man
BuildRequires: asciidoc >= 8.4.1
BuildRequires: xmlto
%if %{with linkcheck}
@ -167,6 +169,7 @@ BuildRequires: tcl
BuildRequires: tk
BuildRequires: zlib-devel >= 1.2
%if %{with tests}
# Test suite requirements
BuildRequires: acl
%if 0%{?fedora} >= 27 || 0%{?rhel} > 7
@ -209,6 +212,7 @@ BuildRequires: python3-devel
BuildRequires: subversion
BuildRequires: subversion-perl
BuildRequires: time
%endif # with tests
Requires: git-core = %{version}-%{release}
Requires: git-core-doc = %{version}-%{release}
@ -914,6 +918,9 @@ make -C contrib/credential/netrc/ testverbose
%{?with_docs:%{_pkgdocdir}/git-svn.html}
%changelog
* Tue Oct 23 2018 Todd Zullinger <tmz@pobox.com>
- Skip test BuildRequires when --without tests is used
* 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