Bug 1191121 - perl.req returns wrong set of required modules due parsing bug
Summary: perl.req returns wrong set of required modules due parsing bug
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rpm
Version: 7.1
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Florian Festi
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-10 13:46 UTC by Marek Marusic
Modified: 2015-11-19 11:58 UTC (History)
2 users (show)

Fixed In Version: rpm-4.11.3-10.el7
Doc Type: Bug Fix
Doc Text:
If a Perl script in a package contained a string declared as a here-document that included the "use" or "require" words, or a multiline string with these words, the package in some cases had incorrect dependencies when it was created using the "rpmbuild" command. Now, the "use" and "require" strings are ignored as keywords in here-documents and multiline strings, which prevents the problem from occurring.
Clone Of: 1024517
Environment:
Last Closed: 2015-11-19 11:58:30 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2138 normal SHIPPED_LIVE rpm bug fix and enhancement update 2015-11-19 10:39:52 UTC

Description Marek Marusic 2015-02-10 13:46:46 UTC
Present also on RHEL7

Version-Release number of selected component:
4.11.1-25.el7

+++ This bug was initially created as a clone of Bug #1024517 +++

Description of problem:
/usr/lib/rpm/perl.req returns wrong set of required modules for rpm-build spec files, since it has a parsing bug when a comment in perl module starts with "use something etc" (perl.req returns depencency on perl(something).

Version-Release number of selected component (if applicable):
rpm-build-4.8.0-32.el6.x86_64

How reproducible:
- the bug is reproducable with certain version of some SpamAssassin module, which was later fixed to prevent such bugs with rpm-builds perl.req scripts


Steps to Reproduce:
1. curl -o /tmp/DependencyInfo.pm "http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Util/DependencyInfo.pm?revision=1531991&view=co"
2. /usr/lib/rpm/perl.req /tmp/DependencyInfo.pm

Actual results:
perl(bytes)
perl(re)
perl(strict)
perl(these)
perl(vars)
perl(warnings)

Expected results:
perl(bytes)
perl(re)
perl(strict)
perl(vars)
perl(warnings)

Additional info:
The script is parsing also through comments section of perl module, so it wrongly parses out comments starting with "use XXXX asdfasd" in the beginning of the line.

--- Additional comment from Florian Festi on 2014-12-15 07:27:53 EST ---

Patch available upstream.
http://rpm.org/gitweb?p=rpm.git;a=commit;h=4c621e97776a47c2b4e7f17c1cd2a7961453babf

Comment 4 errata-xmlrpc 2015-11-19 11:58:30 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2138.html


Note You need to log in before you can comment on or make changes to this bug.