Created attachment 1106170 [details] failing source rpm Followup to the thread on devel@ list. A rebuild of a Fedora package ends up with no Perl dependencies. Not even a dep on /usr/bin/perl. Which component to assign to? rpm or perl-generators? Anyway, here's a test-case: * clawsker-0.7.11-1.fc23.FAILURE.src.rpm Rebuilding that package on F23, all Perl module dependencies are missing. Building on F22 or older, there is no such problem. The following line in rpmbuild output is missing: Requires: /usr/bin/perl perl(Digest::MD5) perl(Encode) perl(Glib) perl(Gtk2) perl(Locale::gettext) perl(POSIX) perl(constant) perl(strict) perl(utf8) * clawsker-0.7.11-1.fc23.WORKS.src.rpm The only change in this package is that the spec file installs the Perl script with three values not substituted. Apparently that change is enough to make the Perl dep generator work again. Diff: +++ clawsker 2014-05-28 11:02:50.000000000 +0200 @@ -21,9 +21,9 @@ use Digest::MD5 qw(md5_hex); my $NAME = 'clawsker'; -my $PREFIX = '/usr'; -my $LIBDIR = '/usr/lib/clawsker'; -my $VERSION = '0.7.11'; +my $PREFIX = '@PREFIX@'; +my $LIBDIR = '@LIBDIR@'; +my $VERSION = '@VERSION@'; my $VERBOSE = FALSE; my $CLAWSV = undef; my $main_window = undef; * clawsker-0.7.11-1.fc23.WORKSTOO.src.rpm The only change in this package is that the spec file patches the Perl script's shebang to drop the trailing "-w" in "/usr/bin/perl -w". Apparently that change is enough to make the Perl dep generator work again, too. Conclusion: /usr/lib/rpm/perl.req is broken somehow. Further info: in koji, the first failure appeared during mass-rebuild on 2015-06-17.
Created attachment 1106171 [details] working source rpm 1
Created attachment 1106172 [details] working source rpm 2
Running perl.req manually works, so which tool searches the buildroot for Perl executables and the /usr/bin/perl shebangs? $ ls clawsker | /usr/lib/rpm/perl.req perl(Digest::MD5) perl(Encode) perl(Getopt::Long) perl(Glib) perl(Gtk2) perl(Locale::gettext) perl(POSIX) perl(constant) perl(strict) perl(utf8)
rpm-build uses libmagic to determine file types - Perl generators are ran for Perl source files only. In your case file libmagic doesn't recognise clawsker as Perl source. You can try adding some whitespace (eg. empty line after shebang) to workaround this. You can test them with file utility (/usr/bin/file).
Not helpful. A Perl script is detected for the test-cases: #!/usr/bin/perl -w $ file clawsker clawsker: Perl script, ASCII text executable #!/usr/bin/perl $ file clawsker clawsker: Perl script, ASCII text executable And yet the rpmbuild works fine for the case of the deleted " -w". There must also be a second bug, because the /usr/bin/perl shebang itself is not detected by rpmbuild either. See this mass-rebuild from 2015-06-17: http://koji.fedoraproject.org/koji/rpminfo?rpmID=6387828
I get different result. `file' reports on the clawsker this: $ file build/clawsker build/clawsker: , init=0x4c45, stat=0x3b5d, dev=0x200a, bas=0x2020 I get this result consistently across Fedoras 24--22. What `file' package do you have? I have file-5.22-4.fc22.x86_64.
This is regression between file 5.14-22.fc21 and 5.19-2.fc22. The former reports expected value "Perl script, ASCII text executable", the later the broken one ", init=0x4c45, stat=0x3b5d, dev=0x200a, bas=0x2020".
$ file build/clawsker build/clawsker: Perl script, ASCII text executable $ rpm -q file file-5.22-5.fc23.x86_64 $ file /usr/bin/clawsker /usr/bin/clawsker: Perl script, ASCII text executable $ rpm -q clawsker clawsker-0.7.13-1.fc23.noarch
Created attachment 1111803 [details] Reproducer This the affected clawsker file.
(In reply to Michael Schwendt from comment #8) > $ file build/clawsker > build/clawsker: Perl script, ASCII text executable > $ rpm -q file > file-5.22-5.fc23.x86_64 > > $ file /usr/bin/clawsker > /usr/bin/clawsker: Perl script, ASCII text executable > $ rpm -q clawsker > clawsker-0.7.13-1.fc23.noarch /usr/bin/clawsker from the lawsker-0.7.13-1.fc23.noarch is without the "-w" argument.
True, but file build/clawsker is with "-w". Whether there is a "-w" in the shebang is irrelevant. As shown before, while dropping the "-w" from clawsker 0.7.11 makes a difference, other (arbitrary?) changes to that file also influence the results of running "file" on it. See bottom of the original bug report. With unexpanded '@foo@' variables, "file" also detects a Perl script.
It's not surprising. The magic database have multiple rules with for matching "Perl script" that has different preference and there can be more regressions. I remember one of them checks for "@" character because this is how array variables are named in the Perl. I believe file maintainer will cover all the relevant ones.
Upstream bugreport with patch: http://bugs.gw.com/view.php?id=505 Fixed in rawhide. Other Fedora versions will follow.
file-5.22-6.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f2bca5dec7
file-5.22-5.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8cde92e12a
file-5.22-6.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f2bca5dec7
file-5.22-5.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-8cde92e12a
file-5.22-6.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
file-5.22-5.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.