Bug 799121

Summary: pkgconfig autoreq/prov scripts don't check for pkg-config exit status errors
Product: Red Hat Enterprise Linux 6 Reporter: Daniel Berrangé <berrange>
Component: redhat-rpm-configAssignee: Florian Festi <ffesti>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: low Docs Contact:
Priority: low    
Version: 6.3CC: berrange, cfergeau, ksrot
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-10-10 14:24:09 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: 1499211    

Description Daniel Berrangé 2012-03-01 20:01:19 UTC
Description of problem:
In spice-gtk a recent bug caused the installation of a pkg-config data file which contained a 'Requires: spice-protocol' line, but this pkg-config data file did not exist.

As a result, 'pkg-config --print-require' returns an non-zero exit status. 
The scripts:

/usr/lib/rpm/redhat/find-{provides,requires}.pkgconfig

do not correctly handle the exit status, so the binary RPMS completed their build, silently dropping all pkg config dependencies. This in turn prevents any app building against them.

If pkg-config returns non-zero status, RPM should exit with an error and require the packager to fix the pkg-config data files in the RPM, and *not* silently drop all pkg-config deps.

For more info see

  https://bugzilla.redhat.com/show_bug.cgi?id=799112

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


How reproducible:
Always

Steps to Reproduce:
# echo /usr/lib64/pkgconfig/spice-client-glib-2.0.pc  | /usr/lib/rpm/redhat/find-requires.pkgconfig
pkgconfig(pixman-1) >= 0.17.7
pkgconfig(celt051) >= 0.5.1.1
pkgconfig(openssl)  
pkgconfig(spice-protocol)  

# echo $?
0

# rm /usr/share/pkgconfig/spice-protocol.pc
[root@t500wlan pkgconfig]# echo /usr/lib64/pkgconfig/spice-client-glib-2.0.pc  | /usr/lib/rpm/redhat/find-requires.pkgconfig
# echo $?
0

This last status should be '1' due to the missing spice-protocol.pc file

Comment 2 RHEL Program Management 2012-05-03 05:17:23 UTC
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Karel Srot 2015-10-12 09:02:21 UTC
Is this still valid?

Comment 4 Daniel Berrangé 2015-10-12 09:48:31 UTC
I've no idea - I don't have a suitable RHEL6 machine to test it again right now. There are steps to reproduce in the initial bug description though, so suggest trying them.

Comment 5 Karel Srot 2015-10-12 10:33:08 UTC
It is.

# rpm -qa | grep spice
spice-glib-devel-0.26-4.el6.x86_64
spice-glib-0.26-4.el6.x86_64
spice-client-0.8.2-15.el6.x86_64
spice-protocol-0.12.6-1.el6.noarch
# ls /usr/lib64/pkgconfig/spice-client-glib-2.0.pc /usr/share/pkgconfig/spice-protocol.pc
/usr/lib64/pkgconfig/spice-client-glib-2.0.pc  /usr/share/pkgconfig/spice-protocol.pc
# rpm -q redhat-rpm-config
redhat-rpm-config-9.0.3-44.el6.noarch
# 
# echo /usr/lib64/pkgconfig/spice-client-glib-2.0.pc  | /usr/lib/rpm/redhat/find-requires.pkgconfig
pkgconfig(spice-protocol)  
pkgconfig(pixman-1) >= 0.17.7
pkgconfig(openssl)  
pkgconfig(spice-protocol)  
# echo $?
0
# mv /usr/share/pkgconfig/spice-protocol.pc /usr/share/pkgconfig/spice-protocol.pc.backup
# echo /usr/lib64/pkgconfig/spice-client-glib-2.0.pc  | /usr/lib/rpm/redhat/find-requires.pkgconfig
# echo $?
0

Comment 8 Florian Festi 2017-10-10 14:24:03 UTC
Red Hat Enterprise Linux 6 is in the Production 3 Phase. During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

This issue does not meet the inclusion criteria for the Production 3 Phase and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification. Note that a strong business justification will be required for re-evaluation. Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL: https://access.redhat.com/

Comment 9 Red Hat Bugzilla Rules Engine 2017-10-10 14:24:09 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.