Bug 1966693

Summary: incorrect pkgconfig virtual provides in devel packages
Product: Red Hat Enterprise Linux 8 Reporter: Carl George 🤠 <carl>
Component: elfutilsAssignee: Mark Wielaard <mjw>
elfutils sub component: gcc-toolset-11 QA Contact: Martin Cermak <mcermak>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ahajkova, bstinson, fche, jwboyer, mcermak, mjw, toneata
Version: CentOS StreamKeywords: Bugfix, Reopened, Triaged, ZStream
Target Milestone: betaFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-toolset-11-elfutils-0.185-3.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1967081 1968380 1989113 (view as bug list) Environment:
Last Closed: 2021-11-09 18:38:32 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: 1967081, 1968380, 1989113, 1989115    

Description Carl George 🤠 2021-06-01 17:04:56 UTC
Description of problem:
In the gcc-toolset-10 software collection, two devel packages have pkgconfig virtual provides.

- gcc-toolset-10-elfutils-devel provides pkgconfig(libdw)
- gcc-toolset-10-valgrind-devel provides pkgconfig(valgrind)

Based on the SCL guidelines [0], this appears to be incorrect.  I noticed this because mesa has a build requirement on pkgconfig(valgrind) that is resolving to gcc-toolset-10-valgrind-devel instead of valgrind-devel [1].  This is also the case in the equivalent gcc-toolset-9 packages.  I'm reporting this against gcc-toolset-10 because currently that is the only one which has a package NVR high enough to cause an issue, but this needs to be fixed in both collections.


Version-Release number of selected component (if applicable):
gcc-toolset-10-elfutils-devel-0.182-3.el8
gcc-toolset-10-valgrind-devel-3.16.0-4.el8
gcc-toolset-9-elfutils-devel-0.176-5.el8
gcc-toolset-9-valgrind-devel-3.15.0-9.el8


How reproducible:
always


Steps to Reproduce:
1. dnf install 'pkgconfig(valgrind)'


Actual results:
resolves to gcc-toolset-10-valgrind-devel


Expected results:
resolves to valgrind-devel


Additional info:
[0] https://www.softwarecollections.org/en/docs/guide/#sect-Software_Collection_Automatic_Provides_Requires_Filtering_Support
[1] https://koji.mbox.centos.org/pkgs/work/tasks/3443/253443/root.log

Comment 1 Mark Wielaard 2021-06-02 12:14:13 UTC
OK, if I understand correctly we don't want the automatic pkgconfig provides for gcc-toolset packages when those same pkgconfig provides are also in the base system.

So we need to add something like:

%{?scl:%filter_from_provides s|pkgconfig|%{?scl_prefix}pkgconfig|g}
​%{?scl:%filter_setup}

To the elfutils.spec and valgrind.spec.
I'll keep this bug for elfutils and clone this bug for valgrind to track both packages.

Comment 5 Frank Ch. Eigler 2021-06-12 23:20:20 UTC

*** This bug has been marked as a duplicate of bug 1968380 ***

Comment 6 Mark Wielaard 2021-06-22 12:08:55 UTC
We also need this fix in 8.5 for gcc-toolset-10 elfutils.

Comment 10 Martin Cermak 2021-07-29 09:51:19 UTC
Respin needed for issues similar to https://bugzilla.redhat.com/show_bug.cgi?id=1968380#c6

Comment 12 Mark Wielaard 2021-07-29 16:27:56 UTC
I think I have found the correct magic incantation to include in the spec:

%define __provides_exclude_from ^%{_libdir}/pkgconfig/.*.pc$

This works only with rpm from RHEL8+ but this is fine for GTS.

Comment 13 Martin Cermak 2021-08-11 13:28:21 UTC
Verified with gcc-toolset-11-elfutils-devel-0.185-3.el8.

Comment 15 errata-xmlrpc 2021-11-09 18:38:32 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 (new packages: gcc-toolset-11-elfutils), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4237