Bug 1537244 - Avoid /usr/bin/python in RPM build
Summary: Avoid /usr/bin/python in RPM build
Alias: None
Product: Fedora
Classification: Fedora
Component: Changes Tracking
Version: 29
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Petr Viktorin
QA Contact:
Whiteboard: SelfContainedChange
Depends On: 1540316 1550564 1559998 1560000 1578819
TreeView+ depends on / blocked
Reported: 2018-01-22 19:03 UTC by Jan Kurik
Modified: 2018-08-14 13:54 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-08-14 13:47:30 UTC
Type: ---

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1558192 None CLOSED Python bytecompilation queued after %install in /usr/lib/rpm/redhat/macros relies on %{__python} that possibly clashes w... 2019-02-04 12:44:06 UTC

Internal Links: 1558192

Description Jan Kurik 2018-01-22 19:03:26 UTC
This is a tracking bug for Change: Avoid /usr/bin/python in RPM build
For more details, see: https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build

Deprecate, and later disable, running /usr/bin/python (as opposed to /usr/bin/python3 or /usr/bin/python2) during RPM build.
Changes will be driven by Python SIG, but a few packages may fail to build (with the failure message providing an easy workaround).

Comment 1 Miro Hrončok 2018-01-30 22:16:01 UTC
We cannot rebuild python2 due to the gcc8 change. Adding a dependency here in BZ to track the situation.

Comment 2 Jan Kurik 2018-02-20 14:09:54 UTC
On 2018-Feb-20, we have reached the Fedora 28 Change Checkpoint: Completion deadline (testable).

At this point, all accepted changes should be substantially complete, and testable. Additionally, if a change is to be enabled by default, it must be enabled at Change Completion deadline as well.

Change tracking bug should be set to the MODIFIED state to indicate it achieved completeness.

Incomplete and non testable Changes will be reported to FESCo for 2018-Feb-23 meeting.

Comment 3 Fedora End Of Life 2018-02-20 15:38:41 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 4 Miro Hrončok 2018-02-21 12:20:05 UTC
/usr/bin/python in RPM build is now deprecated. Packages build, most packagers probably  just ignore the warning. I don't think we will be able to make it error during this release. However, no analysis have been performed.

Either we say the deprecation makes the change testable and complete and we make the error in another Fedora change for later release, or we say the error was hard requirement for this change and we delay it. Not sure how to deal with that.

Comment 5 Petr Viktorin 2018-02-21 12:33:49 UTC
I'd say delay it to next release. See the Contingency plan:

If everything goes smoothly, but there is still a significant number of packages failing the check, the switch that would render all of them FTBFS will happen in the next release.

Comment 6 Jan Kurik 2018-02-26 08:21:53 UTC
Deferred: https://pagure.io/fesco/issue/1846#comment-495872

Comment 7 Raphael Groner 2018-03-02 21:20:25 UTC
Hint: In GNU documentation for automake, it states for the AM_PATH_PYTHON macro in configure.ac:

If the PYTHON variable is set when AM_PATH_PYTHON is called, then that will be the only Python interpreter that is tried.


In most cases, this line before the call to configure would fix the issue:
export PYTHON=python2

Is it maybe possible to integrate my proposal as a magic fix at a more general level like in the automake or autoconf packages itself?

Comment 8 Miro Hrončok 2018-03-02 21:49:18 UTC
(In reply to Raphael Groner from comment #7)
> Is it maybe possible to integrate my proposal as a magic fix at a more
> general level like in the automake or autoconf packages itself?

This is exactly the magic we want to avoid. Packager python2 or python3 has to be set and always used explicitly. By automagically making it python2, we have the same trouble as with ambigious python: we can never change the automagic to python3.

Comment 9 Jan Pokorný [poki] 2018-03-19 19:50:54 UTC
Note also the very build-environment defining packages may still
clash with the intermediate state of things ATM: [bug 1558192].

Comment 10 Jan Kurik 2018-08-14 10:16:28 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 11 Ben Cotton 2018-08-14 13:12:34 UTC
According to the Fedora 29 schedule[1], today is the deadline for changes to be in a testable state. If your change is ready to be tested, please set the status to ON_QA. A list of incomplete changes will be sent to FESCo tomorrow for evaluation. If you know your change will not be ready for Fedora 29, you can set the version to rawhide and notify bcotton@fedoraproject.org.

[1] https://fedoraproject.org/wiki/Releases/29/Schedule

Comment 12 Miro Hrončok 2018-08-14 13:47:30 UTC
This was obsoleted by https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package

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