Bug 2135719 - python3-rpm ships two (slightly different) _rpm extension modules
Summary: python3-rpm ships two (slightly different) _rpm extension modules
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-18 09:06 UTC by Miro Hrončok
Modified: 2023-01-10 11:15 UTC (History)
6 users (show)

Fixed In Version: rpm-4.18.0-9.fc38
Clone Of:
Environment:
Last Closed: 2023-01-10 11:15:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources rpm pull-request 33 0 None None None 2023-01-09 12:09:24 UTC

Description Miro Hrončok 2022-10-18 09:06:44 UTC
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.



Version-Release number of selected component: 4.18.0-3.fc38

Comment 1 Panu Matilainen 2022-10-18 09:10:49 UTC
Ugh. Yeah, _rpm.so is indeed an autotools artifact. This must be an old, old thing. Thanks for spotting and reporting!
(and the timing with the double lua-libs discovery is quite amusing)

Comment 2 Panu Matilainen 2023-01-10 11:15:56 UTC
Fixed in rpm-4.18.0-9.fc38


Note You need to log in before you can comment on or make changes to this bug.