Bug 2169780
Summary: | python3_version macros doesn't support python 3.11 | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Dimitri Savineau <dsavinea> | |
Component: | python-rpm-macros | Assignee: | Python Maintainers <python-maint> | |
Status: | CLOSED ERRATA | QA Contact: | Lukáš Zachar <lzachar> | |
Severity: | medium | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 8.8 | CC: | lmiksik, maxwell, orion, python-maint, torsava | |
Target Milestone: | rc | Keywords: | Triaged | |
Target Release: | --- | |||
Hardware: | All | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | python-rpm-macros-3-45.el8 | Doc Type: | No Doc Update | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2172909 (view as bug list) | Environment: | ||
Last Closed: | 2023-05-16 08:35:40 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2137139, 2172909 |
Description
Dimitri Savineau
2023-02-14 16:49:32 UTC
Thanks for the report. The idea is that for Python 3.11 you use python3.11-rpm-macros on RHEL 8, because the original macros are too old. https://git.centos.org/rpms/python3.11/blob/c8s/f/SOURCES/macros.python3.11#_12 But on the other hand, fixing the %python3_version macro in python3-rpm-macros (and python-rpm-macros) is certainly possible and I suspect we will have a hard time explaining the concept of python3.11-rpm-macros to users who get bit by this if we don't fix it. > The idea is that for Python 3.11 you use python3.11-rpm-macros on RHEL 8
That was my initial plan by using
%global python3_pkgversion 3.11
BuildRequires: python%{python3_pkgversion}-rpm-macros
And I was not able to find any python3.11-rpm-macros package available.
But looks like I didn't look closely as that package is built as part of the python3.11 package so let me retest this.
So if this is working correctly then we can close this BZ unless you really want to fix this for python3-rpm-macros
Ok I confirm that using the correct python3.11-rpm-macros fix my issue. I'll let you decide if this needs to be fixed for python3-rpm-macros or not and close this BZ accordaly $ rpm -qa | grep python | grep macros python-rpm-macros-3-44.el8.noarch python-srpm-macros-3-44.el8.noarch python3-rpm-macros-3-44.el8.noarch $ rpm --define '__python3 /usr/bin/python3.11' --eval '%python3_version' 3.1 $ rpm --define '__python3 /usr/bin/python3.11' --eval '%python3_version_nodots' 31 $ rpm --define '__python3 /usr/bin/python3.11' --eval '%py3_shebang_fix' \ if [ -f /usr/bin/pathfix3.1.py ]; then pathfix=/usr/bin/pathfix3.1.py else # unversioned pathfix.py provided by platform-python-devel pathfix=/usr/bin/pathfix.py fi if [ -z "s" ]; then shebang_flags="-k" else shebang_flags="-kas" fi $pathfix -pni /usr/bin/python3.11 $shebang_flags =========================================================================== $ rpm -qa | grep python | grep macros python-rpm-macros-3-45.el8.noarch python-srpm-macros-3-45.el8.noarch python3-rpm-macros-3-45.el8.noarch $ rpm --define '__python3 /usr/bin/python3.11' --eval '%python3_version' 3.11 $ rpm --define '__python3 /usr/bin/python3.11' --eval '%python3_version_nodots' 311 $ rpm --define '__python3 /usr/bin/python3.11' --eval '%py3_shebang_fix' \ if [ -f /usr/bin/pathfix3.11.py ]; then pathfix=/usr/bin/pathfix3.11.py else # unversioned pathfix.py provided by platform-python-devel pathfix=/usr/bin/pathfix.py fi if [ -z "s" ]; then shebang_flags="-k" else shebang_flags="-kas" fi $pathfix -pni /usr/bin/python3.11 $shebang_flags Regression check, this still works as expected: $ rpm --eval '%python3_version' 3.6 $ rpm --eval '%python3_version_nodots' 36 The updated package is missing from CentOS 8 Stream: $ repoquery -q --repo=RHEL8.9-AppStream python3-rpm-macros python3-rpm-macros-0:3-45.el8.noarch $ repoquery -q --repo=c8s-appstream python3-rpm-macros python3-rpm-macros-0:3-41.el8.noarch python3-rpm-macros-0:3-42.el8.noarch python3-rpm-macros-0:3-43.el8.noarch (In reply to Miro Hrončok from comment #14) > The updated package is missing from CentOS 8 Stream: > > $ repoquery -q --repo=RHEL8.9-AppStream python3-rpm-macros > python3-rpm-macros-0:3-45.el8.noarch > > $ repoquery -q --repo=c8s-appstream python3-rpm-macros > python3-rpm-macros-0:3-41.el8.noarch > python3-rpm-macros-0:3-42.el8.noarch > python3-rpm-macros-0:3-43.el8.noarch I reported this in https://issues.redhat.com/browse/CS-1523 It seems python-rpm-macros-3-45.el8 was not built at all in CentOS Stream Koji [1]. The last build is python-rpm-macros-3-44.el8. Are the maintainers able to submit a build? [1] https://kojihub.stream.centos.org/koji/packageinfo?packageID=1891 I don't really know. I can submit the build but it will not reach the compose until it's built and gated into RHEL, which will likely fail. I'd better ask in the CS jira ticket. Ah, bstinson is actually building it, as it seems from https://kojihub.stream.centos.org/koji/packageinfo?packageID=1891 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-2023:2820 |