Bug 569773

Summary: rpmbuild should leave PKG_CONFIG_PATH alone
Product: Red Hat Enterprise Linux 5 Reporter: Paul van der Linden <paul>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED DEFERRED QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: ffesti, jherrman, josh.davidson, paul
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 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.
Story Points: ---
Clone Of:
: 921969 921973 (view as bug list) Environment:
Last Closed: 2013-03-15 10:57:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 921969, 921973    

Description Paul van der Linden 2010-03-02 11:19:26 UTC
Description of problem:
If you want to build a package which is depended on another package, and detects it with pkgconfig it won't get detected if this other package is in a non standard path (which was set in PKG_CONFIG_PATH)
The patch from bug 212522 creates this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=212522

Version-Release number of selected component (if applicable):
4.4.2.3-18

How reproducible:

Steps to Reproduce:
1. install/build something with another prefix path (for example /usr/broken), with a pkgconfig file, like eventlog: http://www.balabit.com/downloads/files/eventlog/0.2/
2. set PKG_CONFIG_PATH to the prefix path from step 1
3. build something with rpmbuild which detects in it's configure where the package from step 1 is located, like syslog-ng: http://www.balabit.com/downloads/files/syslog-ng/
  
Actual results:
pkgconfig reports the package is not found, this works when building from commandline, or with all rpm(build) packages before 4.4.2.3-18

Expected results:
pkgconfig should find the package.

Additional info:
The PKG_CONFIG_PATH is actually set by another package we build.

Proposed fix:
Modify the patch form the other the bug mentioned above so it does not overwrite the PKG_CONFIG_PATH but extends it.

Comment 1 Florian Festi 2013-03-15 10:57:29 UTC
RHEL5 is in development phase 2 now. This limits updates to critical issues only - basically ruling out rpmbuild improvements.

Still this issue was fixed upstream and the fix will be considered for newer releases. Thanks for reporting!

Comment 2 Josh 2013-06-10 15:49:50 UTC
> Still this issue was fixed upstream and the fix will be considered for newer releases. Thanks for reporting!

What's your reference for this statement?  This appears to still be an issue.  Basically rpmbuild breaks PKG_CONFIG_PATH and the only way to workaround it is to hack each and every spec file to undo the damage caused by bug 212522.