#3 Gate perl-FileHandle dependency to f33 onwards
Merged 5 months ago by jskarvad. Opened 2 years ago by dcavalca.
rpms/ dcavalca/grep perl-FileHandle  into  rawhide

file modified
+5 -2
@@ -1,7 +1,7 @@ 

  Summary: Pattern matching utilities

  Name: grep

  Version: 3.7

- Release: 2%{?dist}

+ Release: 3%{?dist}

  License: GPLv3+

  URL: https://www.gnu.org/software/grep/

@@ -20,7 +20,7 @@ 

  BuildRequires: autoconf

  BuildRequires: automake

  Buildrequires: glibc-all-langpacks

- BuildRequires: perl-FileHandle

+ BuildRequires: perl(FileHandle)

  BuildRequires: make

  BuildRequires: libsigsegv-devel

  # https://fedorahosted.org/fpc/ticket/174
@@ -83,6 +83,9 @@ 




+ * Fri Apr  8 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 3.7-3

+ - Gate perl-FileHandle dependency to f33 onwards


  * Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild


As far as I can tell, this dependency was originally added due to the filename-lineno.pl test, but it doesn't seem to be actually needed. Dropping it allows grep to build as-is on el8 as well, which we'd like to do as part of the Hyperscale SIG in CentOS Stream (see https://pagure.io/centos-sig-hyperscale/sig/issue/20).

Uh, clearly, I'm wrong here:

FAIL: filename-lineno
Can't locate FileHandle.pm in @INC (you may need to install the FileHandle 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 Coreutils.pm line 22.
BEGIN failed--compilation aborted at Coreutils.pm line 22.
Compilation failed in require.
BEGIN failed--compilation aborted.
FAIL filename-lineno.pl (exit status: 2)

Interestingly, this doesn't repro for a local el8 build, nor for one in f32, but it does for rawhide.

Yep, looks like perl-FileHandle is needed from f33 onwards. I'll update the PR.

rebased onto 18363e0

2 years ago

Ok, the test is passing now:

PASS: filename-lineno.pl

Other tests are still failing on rawhide, but they seem to be unrelated.

Checked with Jim Meyering (grep upstream): the stack-overflow test failure is unrelated to this change. It's caused by an side effect of the build environment and should be fixed in the next grep upstream release, but grep itself is fine even with this test failing here.

Sorry for delay, I missed this PR. LGTM could you please rebase it to apply?

rebased onto a7dc5ed

5 months ago

If you are targeting rpm-4.13 or newer (RHEL-8 has rpm-4.14.3) you could use RPM Boolean Dependencies, which I think could be more flexible and should work on other distros than Fedora/RHEL, e.g.:

BuildRequires: (perl-FileHandle if perl-interpreter >= 4:5.30.1-451)

And maybe the perl-interpreter should be also explicitly noted in the BuildRequires.

Or even better, just:

BuildRequires: perl(FileHandle)

rebased onto 862175c

5 months ago

Pull-Request has been merged by jskarvad

5 months ago