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 1757834 - %py_build uses --executable="%{__python2}
Summary: %py_build uses --executable="%{__python2}
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-rpm-macros
Version: 7.7
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: rc
: ---
Assignee: Charalampos Stratakis
QA Contact: Lukáš Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-02 14:17 UTC by Miro Hrončok
Modified: 2020-09-29 19:34 UTC (History)
5 users (show)

Fixed In Version: python-rpm-macros-3-33.el7
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-09-29 19:34:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:3881 0 None None None 2020-09-29 19:34:39 UTC

Description Miro Hrončok 2019-10-02 14:17:18 UTC
Apparently, the %py_build macro should respect the global definition of %__python, however it hardcodes --executable="%{__python2} and hence it makes it impossible to do the following:

%global __python %__python3
...
%py_build

python-rpm-macros 3-32

Comment 3 Tomas Orsava 2019-10-03 09:33:42 UTC
Hm, a significant number of packages are using that macro, which makes me weary of changing it's definition. However, as %__python and %__python2 should be defined the same, it at least *should* be functionally the same. With plenty of testing we should be fine.

Comment 4 Miro Hrončok 2019-10-03 09:41:00 UTC
This does not impact Python 2 packages. This only impacts Python 3 packages which define %__python to %__python3 AND use %py_build (not %py3_build). My educated guess that no RHEL 7 package does that.

Comment 5 Tomas Orsava 2019-10-03 11:47:19 UTC
I see, thanks! More info in https://bugzilla.redhat.com/show_bug.cgi?id=1757833#c5

Comment 6 Petr Viktorin (pviktori) 2019-10-08 13:50:57 UTC
Right, this shouldn't affect any RHEL7 packages. It might affect CentOS or EPEL packages, or customers' builds.

Comment 7 Petr Viktorin (pviktori) 2019-10-08 13:51:28 UTC
But there's an easy workaround. I'm not sure it's worth fixing in RHEL7.

Comment 8 Miro Hrončok 2019-10-08 14:01:53 UTC
What's the workaround?

We can override the macro in EPEL.

Comment 9 Petr Viktorin (pviktori) 2019-10-08 14:10:35 UTC
Use %py3_build.

Comment 10 Miro Hrončok 2019-10-08 14:19:03 UTC
Oh. The idea is to conditionally set %__python and have a simple specfile with no further %ifs.

Comment 11 Petr Viktorin (pviktori) 2019-10-22 13:40:32 UTC
Overriding in EPEL sounds like a good choice. It seems the timing is not on our side.

Comment 12 Miro Hrončok 2019-10-22 13:50:09 UTC
EPEL 7 workaround: https://src.fedoraproject.org/rpms/epel-rpm-macros/pull-request/9

Comment 13 Tomas Orsava 2019-10-22 14:42:09 UTC
This issue was discovered too late to be fixed in RHEL 7.8. We're leaving it open for later consideration.

Comment 19 errata-xmlrpc 2020-09-29 19:34:04 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-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


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