From a91c5fdb8a1a6d4ae1eaa3a0326265be876aaa5e Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Thu, 11 Oct 2018 12:10:37 -0400 Subject: [PATCH] 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. --- git.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/git.spec b/git.spec index b548a27..b70b034 100644 --- a/git.spec +++ b/git.spec @@ -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 +- Skip test BuildRequires when --without tests is used + * Mon Oct 22 2018 Pavel Cahyna - 2.19.1-2 - Update condition for the t5540-http-push-webdav test for future RHEL