Bug 662057

Summary: pkgconfig file should not list augeas, libxml or libxslt
Product: Red Hat Enterprise Linux 6 Reporter: Daniel Berrangé <berrange>
Component: netcfAssignee: Laine Stump <laine>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: dallan, dyuan, laine, lutter, vbian
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: netcf-0.1.9-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 662056 Environment:
Last Closed: 2011-12-06 15:18:51 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:

Description Daniel Berrangé 2010-12-10 13:15:44 UTC
+++ This bug was initially created as a clone of Bug #662056 +++

Description of problem:
While netcf does use augeas, libxml and libxslt, this usage is a private internal implementation detail which does not leak out into the public API. There is no need for applications to have augeas, libxml or libxslt header files present to build against netcf. Thus these libraries should not be listed in the 'Requires' of the pkg-config file for netcf. Doing so causes unnecessary '-laugeas' etc lines to be added to apps/libraries building against netcf.

Version-Release number of selected component (if applicable):
netcf-0.1.7-1.fc13.x86_64


How reproducible:
Always

Steps to Reproduce:
1. Build an app against netcf
2.
3.
  
Actual results:
Observe that the compile & link line includes

  -I/usr/include/libxml2   -lnetcf -laugeas -lxslt -lz -lm -lxml2  


Expected results:

Only contains

  -lnetcf



Additional info:

Comment 2 RHEL Program Management 2011-04-04 01:53:04 UTC
Since RHEL 6.1 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 Laine Stump 2011-05-18 17:37:53 UTC
A fix has been committed to upstream netcf, and will be included when RHEL
netcf is rebased (see Bug 705061):

commit 500a075d939c06849bdfea372ff94f4e133c1f27
Author: Laine Stump <laine>
Date:   Thu May 12 09:20:08 2011 -0400

    Remove unnecessary Requires: from netcf's pkgconfig file
    
    This is in response to:
    
       https://bugzilla.redhat.com/show_bug.cgi?id=662056 (Fedora)
       https://bugzilla.redhat.com/show_bug.cgi?id=662057 (RHEL)
    
    netcf.pc.in previously contained Requires for augeas, libxml, and
    libxslt, but this was unnecessary - the pkgconfig file lists things
    required to build an application that uses the netcf library, but
    since netcf's use of those packages is purely internal/private, none
    of those packages are actually required in order to build.
    
    The solution is to remove everything from the Requires: line.

Comment 4 Laine Stump 2011-06-14 21:37:11 UTC
A fix for this bug is included in netcf-0.1.8-1.el6. A build is available here:

https://brewweb.devel.redhat.com/buildinfo?buildID=167451

Comment 6 Vivian Bian 2011-08-04 07:22:37 UTC
tested with 
netcf-0.1.0-2.fc12.src.rpm
netcf-0.1.9-1.el6.src.rpm

[FC12]
#cat /usr/lib64/pkgconfig/netcf.pc
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@

Name: netcf
Version: @VERSION@
Description: Network configuration library
Requires: augeas >= 0.5.0 libxml-2.0 libxslt    (augeas, libxml and libxslt are 
                                                 required)
Libs: -L${libdir} -lnetcf
Cflags: -I${includedir}


[RHEL6 0.1.9-1]
# cat /usr/lib64/pkgconfig/netcf.pc
prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
includedir=/usr/include

Name: netcf
Version: 0.1.9
Description: Network configuration library
Requires:
Libs: -L${libdir} -lnetcf    (augeas ,libxml and libxslt are not listed here)
Cflags: -I${includedir}


According to this result , set bug status to VERIFIED

Comment 7 errata-xmlrpc 2011-12-06 15:18:51 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.

http://rhn.redhat.com/errata/RHBA-2011-1631.html