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 1774260 - [RHEL8] python-rpm-generators is not generating python dependencies
Summary: [RHEL8] python-rpm-generators is not generating python dependencies
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: python-rpm-generators
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Python Maintainers
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On:
Blocks: 1757463
TreeView+ depends on / blocked
 
Reported: 2019-11-19 22:21 UTC by Troy Dawson
Modified: 2019-12-17 12:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-17 12:19:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure epel issue 94 0 None None None 2019-11-20 14:57:00 UTC

Description Troy Dawson 2019-11-19 22:21:07 UTC
Description of problem:
When creating python rpm's, python-rpm-generator is supposed to find all the python dependencies.  But it isn't.

Version-Release number of selected component (if applicable):
python-rpm-generators-5-4.el8

How reproducible:
100% for all the packages I've tried.

Steps to Reproduce:
1. wget https://kojipkgs.fedoraproject.org//packages/python-flake8/3.7.7/1.fc30/src/python-flake8-3.7.7-1.fc30.src.rpm
2. mock -r epel-8-x86_64 --rebuild python-flake8-3.7.7-1.fc30.src.rpm
3.rpm -qp --requires /var/lib/mock/epel-8-x86_64/result/python3-flake8-3.7.7-1.el8.noarch.rpm

Actual results:

/usr/libexec/platform-python
python(abi) = 3.6
python3-setuptools
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1

Expected results:

/usr/libexec/platform-python
python(abi) = 3.6
python3-setuptools
python3.6dist(entrypoints) >= 0.3
python3.6dist(entrypoints) < 0.4
python3.6dist(mccabe) >= 0.6
python3.6dist(mccabe) < 0.7
python3.6dist(pycodestyle) >= 2.5
python3.6dist(pycodestyle) < 2.6
python3.6dist(pyflakes) >= 2.1
python3.6dist(pyflakes) < 2.2
python3.6dist(setuptools)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1

Additional info:
I have not tested this with epel7.

Comment 1 Troy Dawson 2019-11-19 22:22:58 UTC
This works properly on Fedora, which is at python-rpm-generator version 9.
I haven't tested the various versions between 5 and 9 to see which has the change that fixes the problem.

Comment 2 Troy Dawson 2019-11-19 23:02:59 UTC
Did some tests, and this works in python3-rpm-generators-7

Comment 3 Miro Hrončok 2019-11-19 23:18:40 UTC
IIRC this feature is turned off and remains an opt-in. See https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_automatically_generated_dependencies and let me know if the opt-in is working.

I don't recall whether this was a deliberate choice or just the fact that the dependency generator was disabled by default in Fedora 28.

See the relevant Fedora commit: https://src.fedoraproject.org/rpms/python-rpm-generators/c/e745e149a6c877ae9b7fc26027d35fa6aeaaf902?branch=master

See the relevant Fedora 30 change: https://fedoraproject.org/wiki/Changes/EnablingPythonGeneratorsByDefault

Comment 4 Ken Dreyer (Red Hat) 2019-11-20 14:56:42 UTC
Is there any way we can turn this on for RHEL 8 at this point?

If not, is there any way we can turn this on for EPEL 8?

Comment 5 Petr Viktorin (pviktori) 2019-11-20 15:22:16 UTC
> Is there any way we can turn this on for RHEL 8 at this point?

Use %?python_enable_dependency_generator  -- that's documented (at least in [release notes]); it's a bug if it doesn't work.

If you mean globally, then no. RHEL8 is stable, we're quite unlikely to change how it's build. Why do you need it?



[release notes]: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/configuring_basic_system_settings/index#spec-file-description-for-a-python-package_packaging-of-python-3-rpms

Comment 6 Ken Dreyer (Red Hat) 2019-11-20 15:31:47 UTC
The reason my team and I need this is that we are trying to bring many Fedora packages to EPEL 8. When we cannot copy the packages directly from Fedora 30+ to EPEL 8, it is more packaging work for my team.

Comment 9 Troy Dawson 2019-11-21 14:37:43 UTC
I can understand that RHEL8 is stable and the change could potentially could break and/or change the users experience.
For EPEL8 (and possibly EPEL7) we are going to try enabling it by default.
At least for EPEL users, this should solve the problem.

Comment 10 Miro Hrončok 2019-11-21 15:35:37 UTC
The EPEL 7 case might be lost. Automatic provides need to be activated first and for a lot of the Python 2 packages, this means doing it in RHEL 7.

For Python 3 however, possible, as setuptools and pip have the python3.6dist(...) provides.

Comment 11 Troy Dawson 2019-12-09 21:23:58 UTC
epel-rpm-macros-8 has been updated and deployed, so that EPEL 8 python builds find the python dependencies, just like Fedora.
Since this bug was specifically for RHEL 8, I think this can be closed.
If others want to discuss having the same features in RHEL7 and EPEL7, perhaps it would be best done on it's own bug.


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