add perl(File::Compare) BuildRequires

The Documentation/cmd-list.perl script requires File::Compare to
generate various cmds-$area.txt file which are included in the main git
help.  This has been broken since File::Compare was split from the main
perl package in 3b63b8c (Subpackage File::Compare, 2020-01-06)¹.

The result is a broken git man/html page.  In git(1), the output is:

    HIGH-LEVEL COMMANDS (PORCELAIN)
	   We separate the porcelain commands into the main commands
	   and some ancillary user utilities.

       Main porcelain commands
	   Unresolved directive in git.txt -
	   include::cmds-mainporcelain.txt[]

       Ancillary Commands
	   Manipulators:

	   Unresolved directive in git.txt -
	   include::cmds-ancillarymanipulators.txt[]

	   Interrogators:

	   Unresolved directive in git.txt -
	   include::cmds-ancillaryinterrogators.txt[]

        ...

This is logged during the build:

    make[1]: Entering directory '/builddir/build/BUILD/git-2.32.0.rc3/Documentation'
    rm -f cmd-list.made && \
    /usr/bin/perl ./cmd-list.perl ../command-list.txt cmds-ancillaryinterrogators.txt cmds-ancillarymanipulators.txt cmds-mainporcelain.txt cmds-plumbinginterrogators.txt cmds-plumbingmanipulators.txt cmds-synchingrepositories.txt cmds-synchelpers.txt cmds-guide.txt cmds-purehelpers.txt cmds-foreignscminterface.txt  && \
    date >cmd-list.made
    Can't locate File/Compare.pm in @INC (you may need to install the File::Compare module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at ./cmd-list.perl line 3.
    BEGIN failed--compilation aborted at ./cmd-list.perl line 3.
    make[1]: Leaving directory '/builddir/build/BUILD/git-2.32.0.rc3/Documentation'

This should probably cause a make error rather than generating
incomplete documentation.  I'll try to report this upstream (ideally
with a patch to resolve it).  It's also worth remembering to search the
build logs for such failures.  "Can't locate .* in @INC" and "BEGIN
failed" are good strings to search.

¹ https://src.fedoraproject.org/rpms/perl/c/3b63b8c
This commit is contained in:
Todd Zullinger 2021-06-06 11:36:55 -04:00
parent c2eba54e84
commit 7099f641de

View File

@ -122,6 +122,7 @@ BuildRequires: rubygem-asciidoctor
BuildRequires: asciidoc >= 8.4.1
%endif
# endif with asciidoctor
BuildRequires: perl(File::Compare)
BuildRequires: xmlto
%if %{with linkcheck}
BuildRequires: linkchecker
@ -996,6 +997,7 @@ rmdir --ignore-fail-on-non-empty "$testdir"
%changelog
* Sun Jun 06 2021 Todd Zullinger <tmz@pobox.com> - 2.32.0-1
- update to 2.32.0
- add perl(File::Compare) BuildRequires
* Thu Jun 03 2021 Todd Zullinger <tmz@pobox.com> - 2.32.0-0.5.rc3
- drop jgit on Fedora >= 35