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 1916172 - The pythonX.Ydist() generator adds provides from dist-info/egg-info/egg dirs in nested directories of site-packages
Summary: The pythonX.Ydist() generator adds provides from dist-info/egg-info/egg dirs ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: python-rpm-generators
Version: 8.3
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: 8.4
Assignee: Tomas Orsava
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-14 11:53 UTC by Miro Hrončok
Modified: 2021-11-10 01:39 UTC (History)
3 users (show)

Fixed In Version: python-rpm-generators-5-7.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 18:50:38 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4309 0 None None None 2021-11-09 18:50:39 UTC

Description Miro Hrončok 2021-01-14 11:53:03 UTC
We have discovered that the Python dist generator generates provides from too many directories. E.g. with the following file list:


/usr/lib/python3.9/site-packages/py
/usr/lib/python3.9/site-packages/py-1.9.0-py3.9.egg-info
/usr/lib/python3.9/site-packages/py-1.9.0-py3.9.egg-info/PKG-INFO
/usr/lib/python3.9/site-packages/py-1.9.0-py3.9.egg-info/SOURCES.txt
/usr/lib/python3.9/site-packages/py-1.9.0-py3.9.egg-info/dependency_links.txt
/usr/lib/python3.9/site-packages/py-1.9.0-py3.9.egg-info/not-zip-safe
/usr/lib/python3.9/site-packages/py-1.9.0-py3.9.egg-info/top_level.txt
/usr/lib/python3.9/site-packages/py/__init__.py
...
/usr/lib/python3.9/site-packages/py/_vendored_packages
...
/usr/lib/python3.9/site-packages/py/_vendored_packages/apipkg-1.4.dist-info
/usr/lib/python3.9/site-packages/py/_vendored_packages/apipkg-1.4.dist-info/DESCRIPTION.rst
/usr/lib/python3.9/site-packages/py/_vendored_packages/apipkg-1.4.dist-info/INSTALLER
/usr/lib/python3.9/site-packages/py/_vendored_packages/apipkg-1.4.dist-info/METADATA
/usr/lib/python3.9/site-packages/py/_vendored_packages/apipkg-1.4.dist-info/RECORD
/usr/lib/python3.9/site-packages/py/_vendored_packages/apipkg-1.4.dist-info/WHEEL
/usr/lib/python3.9/site-packages/py/_vendored_packages/apipkg-1.4.dist-info/metadata.json
/usr/lib/python3.9/site-packages/py/_vendored_packages/apipkg-1.4.dist-info/top_level.txt
/usr/lib/python3.9/site-packages/py/_vendored_packages/apipkg.py
/usr/lib/python3.9/site-packages/py/_vendored_packages/iniconfig-1.0.0.dist-info
/usr/lib/python3.9/site-packages/py/_vendored_packages/iniconfig-1.0.0.dist-info/DESCRIPTION.rst
/usr/lib/python3.9/site-packages/py/_vendored_packages/iniconfig-1.0.0.dist-info/INSTALLER
/usr/lib/python3.9/site-packages/py/_vendored_packages/iniconfig-1.0.0.dist-info/METADATA
/usr/lib/python3.9/site-packages/py/_vendored_packages/iniconfig-1.0.0.dist-info/RECORD
/usr/lib/python3.9/site-packages/py/_vendored_packages/iniconfig-1.0.0.dist-info/WHEEL
/usr/lib/python3.9/site-packages/py/_vendored_packages/iniconfig-1.0.0.dist-info/metadata.json
/usr/lib/python3.9/site-packages/py/_vendored_packages/iniconfig-1.0.0.dist-info/top_level.txt
/usr/lib/python3.9/site-packages/py/_vendored_packages/iniconfig.py
...


It provides:

python3.9dist(apipkg) = 1.4
python3.9dist(iniconfig) = 1.0.0
python3.9dist(py) = 1.9.0



In this case, we should probably remove the inner dist-info directories, however there are other cases (such as packaged test data etc.). E.g. python39-test provides:

  python3.6dist(example) = 21.12
  python3dist(example) = 21.12


Because it has:

  /usr/lib64/python3.9/test/test_importlib/data/example-21.12-py3.6.egg


This is obviously dangerous.




In Fedora, this was fixed by:

https://src.fedoraproject.org/rpms/python-rpm-generators/c/9f6f709036af34a75839e43e1f21d6519231e339

(Only the diff of pythondist.attr is relevant for this bugzilla.)


That fix is the correct thing to do: The provides should only be generated for dist-info/egg-info/egg from site-packages, not below.

Comment 4 Miro Hrončok 2021-07-22 08:50:47 UTC
I've verified that the fix does not break any regular provides. All (~300) non-modular RHEL 8 Python packages that I was able to build were tested.

Comment 12 errata-xmlrpc 2021-11-09 18:50:38 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 (python-rpm-generators 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-2021:4309


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