Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2135731

Summary: python3-rpm ships two (slightly different) _rpm extension modules
Product: Red Hat Enterprise Linux 9 Reporter: Panu Matilainen <pmatilai>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: low Docs Contact:
Priority: unspecified    
Version: 9.2CC: ffesti, mbanas, sbueno
Target Milestone: rcKeywords: AutoVerified, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rpm-4.16.1.3-21.el9 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 08:23:27 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 Panu Matilainen 2022-10-18 10:02:08 UTC
This bug was initially created as a copy of Bug #2135719

The same issue exists on rhel-9, although the exact versions differ:

python3-rpm ships two (slightly different) _rpm extension modules:

$ repoquery -q --repo=rawhide -l python3-rpm | grep .so$
/usr/lib64/python3.11/site-packages/rpm/_rpm.cpython-311-x86_64-linux-gnu.so
/usr/lib64/python3.11/site-packages/rpm/_rpm.so

$ file /usr/lib64/python3.11/site-packages/rpm/_rpm.cpython-311-x86_64-linux-gnu.so
/usr/lib64/python3.11/site-packages/rpm/_rpm.cpython-311-x86_64-linux-gnu.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=18a6d567fa41eeab9d3c3b6e2cce41bb5ef5e745, stripped

$ file /usr/lib64/python3.11/site-packages/rpm/_rpm.so
/usr/lib64/python3.11/site-packages/rpm/_rpm.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=ca48b947b062a7c8aef8d80fb3279440ff1ab433, stripped

When I run Python, I can only import one of them:

>>> import rpm
>>> rpm._rpm
<module 'rpm._rpm' from '/usr/lib64/python3.11/site-packages/rpm/_rpm.cpython-311-x86_64-linux-gnu.so'>


I suspect that _rpm.so is some autotools artefact while _rpm.cpython-311-x86_64-linux-gnu.so is from setup.py.


I belive the _rpm.so file should be removed from the package for two reasons:

1) _rpm.cpython-311-x86_64-linux-gnu.so is the one that is being imported now, so removing the other one is "safer".
2) _rpm.cpython-311-x86_64-linux-gnu.so is a more standardized filename for a Python extension module.

Comment 9 errata-xmlrpc 2023-05-09 08:23:27 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 (rpm bug fix and enhancement update), 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-2023:2538