Bug 852828

Summary: excess dependencies due to pkg-config
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: systemdAssignee: systemd-maint
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: johannbg, lnykryn, lpoetter, metherid, msekleta, notting, plautrba, rvokal, systemd-maint, vpavlin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-13 13:55:53 UTC Type: Bug
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: 854355    

Description Bill Nottingham 2012-08-29 17:21:30 UTC
Description of problem:

The placement of pkg-config files in the main systemd package causes systemd to have a requirement on /usr/bin/pkg-config.

This brings into any minimal installation:
pkgconfig
glib2
gamin
eject
libxml2
libffi
shared-mime-info

Fixes:
1) Move pkgconfig files to systemd-devel
2) Filter the pkg-config requirement out

Tangentially, journalctl is now bringing in:
qrencode
libpng

which is a little odd.

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

189-2

How reproducible:

100%

Comment 1 Lennart Poettering 2012-09-12 03:05:07 UTC
Hmm, so we'd really like to keep that .pc file in the main package as that file encodes system info rather than development info. We have another set of .pc files for the devel packages which actually encodes information about the headers of the libs.

One simple solution would be to simply make the pkg-config dir owned by multiple packages and drop the explicit dep on pkg-config. Do you think that would be acceptable?

(At least the eject dep should go away now btw, given that eject has been moved into util-linux. And why does glib require eject anyway given that it makes use of udisks properly? And I really wonder if gamin isn't an obsolete dep these days.).

The qrencode stuff is pulled in to show the QR code for the sealing stuff. I thought about implementing my own QR code generator for that, but this turned out to be more complex than I thought and since the library was otherwise pretty OK I chose to simply make use of it. To deal with that we'd have a couple of options:

a) split out the qrencode lib into a separate package. Only the qrencode tool needs libpng, and we don't need that.

b) drop qrcode support in systemd, it's an optional dep

c) use a drop-in version of the relevant code from qrencode in systemd.

I'd vote for a) here.

Opinions?

Comment 2 Bill Nottingham 2012-09-12 19:44:00 UTC
(In reply to comment #1)
> One simple solution would be to simply make the pkg-config dir owned by
> multiple packages and drop the explicit dep on pkg-config. Do you think that
> would be acceptable?

It's not an explicit dependency - it's added by RPM any time a pkgconfig file is included in a package. It would need to be filtered out.

> The qrencode stuff is pulled in to show the QR code for the sealing stuff. I
> thought about implementing my own QR code generator for that, but this
> turned out to be more complex than I thought and since the library was
> otherwise pretty OK I chose to simply make use of it. To deal with that we'd
> have a couple of options:
> 
> a) split out the qrencode lib into a separate package. Only the qrencode
> tool needs libpng, and we don't need that.
> 
> b) drop qrcode support in systemd, it's an optional dep
> 
> c) use a drop-in version of the relevant code from qrencode in systemd.
> 
> I'd vote for a) here.
> 
> Opinions?

a) is simplest.

Comment 3 Lennart Poettering 2012-09-12 20:24:11 UTC
I filed https://bugzilla.redhat.com/show_bug.cgi?id=856808 for the second issue.

Comment 4 Lennart Poettering 2012-09-12 22:43:58 UTC
I tried filtering pkg-config from the deps, but couldn't get it to work.


Adding this didn't make the dep go away. It just moved it from the top of the dep list to the end... weird.

%filter_requires_in %{datadir}/pkgconfig
%filter_setup

This caused all .so deps to go away too...

%filter_from_requires /usr/bin/pkg-config
%filter_setup

Not sure what is going on here. It appears to me that filtering automatic deps is completely broken in RPM.

Comment 5 Lennart Poettering 2012-09-13 13:55:53 UTC
OK, seems the new way to do this is this:

%global __requires_exclude pkg-config

and that works well and is not broken like the %filter stuff. I have now added this to the RPM and the dep on pkg-config is gone, so I guess this bug can be closed now.