Bug 1312630

Summary: pkgconfig doesn't find libparted
Product: [Fedora] Fedora Reporter: Mattia Verga <mattia.verga>
Component: partedAssignee: Brian Lane <bcl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: bcl, cfergeau, mclasen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: parted-3.2-16 parted-3.2-16.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-05 06:21:13 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:

Description Mattia Verga 2016-02-28 08:54:53 UTC
I'm trying to use pkgconfig for BuildRequires in a .spec file.
Trying to add
BuildRequires:  pkgconfig(libparted)
returns
errore: Dipendenze di build fallite:
        pkgconfig(libparted) necessario a kpmcore-2.0.1-1.fc23.x86_64

But I have parted-devel installed and libparted.pc is in /usr/lib64/pkgconfig/. In fact I can find it from CLI:
# pkg-config --modversion libparted
3.2

Comment 1 Christophe Fergeau 2016-02-29 14:22:16 UTC
BuildRequires:  pkgconfig(libparted)
works thanks to some magic tags added by rpmbuild when the rpm is built.
For example:

$ rpm -q --provides glib2-devel |grep pkgconfig
pkgconfig(gio-2.0) = 2.46.2
pkgconfig(gio-unix-2.0) = 2.46.2
pkgconfig(glib-2.0) = 2.46.2
pkgconfig(gmodule-2.0) = 2.46.2
pkgconfig(gmodule-export-2.0) = 2.46.2
pkgconfig(gmodule-no-export-2.0) = 2.46.2
pkgconfig(gobject-2.0) = 2.46.2
pkgconfig(gthread-2.0) = 2.46.2

$ rpm -q --provides parted-devel
parted-devel = 3.2-11.fc23
parted-devel(x86-64) = 3.2-11.fc23

This most likely indicates an issue with parted spec file, this is probably not related to pkgconfig.

Comment 2 Brian Lane 2016-02-29 17:49:00 UTC
I don't see anything obviously wrong with parted. The .spec has:

%{_exec_prefix}/%{_lib}/pkgconfig/libparted.pc

which puts it into /usr/lib64/pkgconfig/

Comment 3 Matthias Clasen 2016-02-29 19:02:56 UTC
I think you may need a buildrequires against pkgconfig to make the magic dependency extraction work ?

Comment 4 Brian Lane 2016-03-01 00:10:59 UTC
It ends up that switching from using %{_exec_prefix}/%{_lib} to %{_libdir} handles it.

Comment 5 Fedora Update System 2016-03-03 00:01:46 UTC
parted-3.2-16.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-94ecac6295

Comment 6 Fedora Update System 2016-03-03 21:58:09 UTC
parted-3.2-16.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-94ecac6295

Comment 7 Fedora Update System 2016-03-05 06:21:10 UTC
parted-3.2-16.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.