Bug 2001034 - EPEL 9: python3-devel should require pyproject-rpm-macros
Summary: EPEL 9: python3-devel should require pyproject-rpm-macros
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: epel-rpm-macros
Version: epel9
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Troy Dawson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-03 15:24 UTC by Ken Dreyer (Red Hat)
Modified: 2022-07-12 14:57 UTC (History)
12 users (show)

Fixed In Version: epel-rpm-macros-9-2.el9.next
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-12 02:07:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FC-522 0 None None None 2022-07-12 14:57:43 UTC

Description Ken Dreyer (Red Hat) 2021-09-03 15:24:24 UTC
Description of problem:
In Fedora 34+, python3-devel requires pyproject-rpm-macros. Individual python packages do not need to BuildRequire it explicitly. 

In CentOS Stream 9, python3-devel does not require pyproject-rpm-macros.

As a result, it is not easy to rebuild Fedora python packages on RHEL 9 if they use the new pyproject RPM macros. This hinders the adoption of these modern macros.


Version-Release number of selected component (if applicable):
python3-devel-3.9.6-6.el9

How reproducible:
always

Steps to Reproduce:
1. Run dnf repoquery --requires python3-devel on Fedora 34+
2. Run dnf repoquery --requires python3-devel on CentOS 9
3. Compare the presence or absence of pyproject-rpm-macros

Actual results:
CentOS 9's python3-devel does not require pyproject-rpm-macros, so every Python packager for el9 must add "BuildRequires: pyproject-rpm-macros" to each individual package. This leads to a divergence between Fedora, more friction with EPEL 9. Developers must re-add code they've already cleaned up across spec files over multiple Fedora releases.

Expected results:
CentOS 9's python3-devel package requires pyproject-rpm-macros just as in Fedora.

Additional info:

Comment 1 Ken Dreyer (Red Hat) 2021-09-03 15:29:16 UTC
Here's an example package where I have to add "BuildRequires: pyproject-rpm-macros". I expect to encounter this more often as more Fedora packages clean up.

https://src.fedoraproject.org/fork/ktdreyer/rpms/python-websocket-client/commits/rhbz2001034

Comment 2 Ken Dreyer (Red Hat) 2021-09-03 15:34:07 UTC
Looks like this was a one-line change in Fedora: https://src.fedoraproject.org/rpms/python3.10/c/d2d07f0ea7f6f7a1ccc34ab90abe22598ee382db

Comment 3 Miro Hrončok 2021-09-03 16:36:46 UTC
Indeed, that would be useful. One problem I see is that pyproject-rpm-macros is in the CRB repository while both python3-devel and rpm-build are in AppStream. Hence requiring it might move pyproject-rpm-macros to AppStream which might not be desired.

Can we make this happen somehow, or is that a blocker?

Comment 4 Miro Hrončok 2021-09-03 16:37:52 UTC
About EPEL: Once epel-rpm-macros is available for EPEL 9 Next, we can add the requirement there (i.e. add Requires: pyproject-rpm-macros if python3-devel).

Comment 5 Miro Hrončok 2021-09-03 16:39:14 UTC
Removing devel_ack which should have not been given before the repo thing is answered.

Comment 6 Tomas Orsava 2021-09-06 09:32:40 UTC
(In reply to Miro Hrončok from comment #3)
> Indeed, that would be useful. One problem I see is that pyproject-rpm-macros
> is in the CRB repository while both python3-devel and rpm-build are in
> AppStream. Hence requiring it might move pyproject-rpm-macros to AppStream
> which might not be desired.
> 
> Can we make this happen somehow, or is that a blocker?

Since python3-devel needs to *runtime* require pyproject-rpm-macros, adding that dependency to python3-devel in AppStream would indeed pull pyproject-rpm-macros into the same repository. Packages from BaseOS/AppStream can't runtime-require packages outside of these two repos. That way the packages are installable without having to enable any other repository.

And we do not consider pyproject-rpm-macros a suitable candidate for AppStream, because we would be forced to guarantee backwards compatibility for the next 10/15 years. Since the macros are rather new in Fedora, they're expected to evolve and change, often in backwards incompatible ways. So by including pyproject-rpm-macros in AppStream, we would be forced to keep the old version of the macros, and over time we would introduce much greater inconsistency between Fedora and RHEL then just adding one more buildrequires.


> About EPEL: Once epel-rpm-macros is available for EPEL 9 Next, we can add the requirement there (i.e. add Requires: pyproject-rpm-macros if python3-devel).

I like  that idea.

Comment 7 Tomas Orsava 2021-09-22 12:19:43 UTC
Reassigning this bug to EPEL since it cannot be solved on the RHEL side. There is no EPEL 9 yet, so I've set it to EPEL 8 temporarily.

Comment 8 Troy Dawson 2021-10-20 20:58:21 UTC
I will be working on the initial epel-rpm-macros fpr epel9-next this week.
I'll be sure to get this in.

Comment 9 Miro Hrončok 2021-10-24 20:34:51 UTC
Troy, if you do, please add:


    Requires: pyproject-rpm-macros if python3-rpm-macros

That'll ensure pyproject-rpm-macros are only pulled in when python3-rpm-macros is required, which is pulled in by another conditional requirement in python3-devel (required only if rpm-build).

Or import the package without this and we'll send a PR later.

Comment 10 Troy Dawson 2021-10-25 17:00:16 UTC
I've added it to the spec file
https://src.fedoraproject.org/rpms/epel-rpm-macros/blob/epel9-next/f/epel-rpm-macros.spec

Still working on the package, but it should be in the first release.
Taking this ticket, and I'll close it when we manage to get epel-rpm-macros built.

Comment 11 Fedora Update System 2021-11-05 19:24:40 UTC
FEDORA-EPEL-NEXT-2021-341875060f has been submitted as an update to Fedora EPEL 9 Next. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-NEXT-2021-341875060f

Comment 12 Fedora Update System 2021-11-05 21:21:06 UTC
FEDORA-EPEL-NEXT-2021-341875060f has been pushed to the Fedora EPEL 9 Next testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-NEXT-2021-341875060f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2021-11-05 21:43:51 UTC
FEDORA-EPEL-NEXT-2021-341875060f has been submitted as an update to Fedora EPEL 9 Next. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-NEXT-2021-341875060f

Comment 14 Fedora Update System 2021-11-05 22:03:02 UTC
FEDORA-EPEL-NEXT-2021-341875060f has been pushed to the Fedora EPEL 9 Next testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-NEXT-2021-341875060f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2021-11-10 21:43:06 UTC
FEDORA-EPEL-NEXT-2021-341875060f has been submitted as an update to Fedora EPEL 9 Next. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-NEXT-2021-341875060f

Comment 16 Fedora Update System 2021-11-11 02:53:15 UTC
FEDORA-EPEL-NEXT-2021-341875060f has been pushed to the Fedora EPEL 9 Next testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-NEXT-2021-341875060f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 17 Fedora Update System 2021-11-12 02:07:43 UTC
FEDORA-EPEL-NEXT-2021-341875060f has been pushed to the Fedora EPEL 9 Next stable repository.
If problem still persists, please make note of it in this bug report.


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