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.
Description of problem:
In RHEL 7, we generate Python RPM provides via:
%__pythondist_provides %{_rpmconfigdir}/pythondistdeps.py --provides
Unlike Fedora, where we have the --majorver-provides flag, in RHEL 7 we don't have it.
That means, that Python packages will provide:
python3.6dist(six)
But not:
python3dist(six)
However, the %{py3_dist six} macro invocation will output python3dist(six).
Hence, the macros are not compatible within each other. As such, this perfectly valid Fedora spec snippet:
BuildRequires: %{py3_dist six}
Will produce unmet build dependencies in EPEL.
As a fixer, I think it makes perfect sense to amend %py3_dist to output the versioned provide.
Version-Release number of selected component (if applicable):
python-rpm-macros-3-32.el7
As a fix, this:
print("python3dist(" .. canonical .. ") ");
Can be replaced with:
python3_version = rpm.expand("%python3_version");
print("python" .. python3_version .. "dist(" .. canonical .. ") ");
I can provide a pull request, if we are still able to fix this in RHEL 7.
Side note: Likewise, the %py2_dist macro is completely useless on RHEL 7, as Python 2 packages don't have the necessary provides at all (neither python2dist() nor python2.7dist()). As such we can either turn it into error, delete it, or leave it be to maintain artificial backwards compatibility with self (useless, but safe).
Comment 3Charalampos Stratakis
2020-03-18 16:37:47 UTC
To test:
Before:
$ rpm --eval '%{py3_dist six}'
python3dist(six)
After:
$ rpm --eval '%{py3_dist six}'
python3.6dist(six)
Or even (on EPEL):
$ rpm --define '__python3 %__python3_other' --eval '%{py3_dist six}'
python3.4dist(six)
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-macros 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-2020:3881
Error: No Package found for python%python3_versiondist(six)
Error: No Package found for python%python3_versiondist(sphinx)
still not working $subject
Miro , while %python3_version isn't available on buitroot, python3_pkgversion is. So I think macro should be "python%python3_pkgversiondist" , because just after install python3-devel macro works( as is now )
Miro what do you think ? should I open a new bug ?
Description of problem: In RHEL 7, we generate Python RPM provides via: %__pythondist_provides %{_rpmconfigdir}/pythondistdeps.py --provides Unlike Fedora, where we have the --majorver-provides flag, in RHEL 7 we don't have it. That means, that Python packages will provide: python3.6dist(six) But not: python3dist(six) However, the %{py3_dist six} macro invocation will output python3dist(six). Hence, the macros are not compatible within each other. As such, this perfectly valid Fedora spec snippet: BuildRequires: %{py3_dist six} Will produce unmet build dependencies in EPEL. As a fixer, I think it makes perfect sense to amend %py3_dist to output the versioned provide. Version-Release number of selected component (if applicable): python-rpm-macros-3-32.el7 As a fix, this: print("python3dist(" .. canonical .. ") "); Can be replaced with: python3_version = rpm.expand("%python3_version"); print("python" .. python3_version .. "dist(" .. canonical .. ") "); I can provide a pull request, if we are still able to fix this in RHEL 7. Side note: Likewise, the %py2_dist macro is completely useless on RHEL 7, as Python 2 packages don't have the necessary provides at all (neither python2dist() nor python2.7dist()). As such we can either turn it into error, delete it, or leave it be to maintain artificial backwards compatibility with self (useless, but safe).