Bug 2237693 - rocksdb should not BuildRequire /usr/bin/python3
Summary: rocksdb should not BuildRequire /usr/bin/python3
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: rocksdb
Version: epel8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: EPEL Packagers SIG
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-09-06 12:22 UTC by Lumír Balhar
Modified: 2024-01-13 14:41 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lumír Balhar 2023-09-06 12:22:50 UTC
Packages in RHEL 8 should not use, Require or BuildRequire `/usr/bin/python3` because that file is provided by all the Python stacks - 3.6 (the main one), 3.8, 3.9, and 3.11. The particular version `/usr/bin/python3` points to depends on the system of alternatives and is determined either by the priority of the individual options or by manual setting by the system administrator. Python 3.6 has the highest priority, so if it is installed, `/usr/bin/python3` means Python 3.6 by default. However, when Python 3.6 is not installed, `/usr/bin/python3` can mean almost anything.

Python 3.6 is the only Python in RHEL 8 with a full 10+ years of support and all system packages should depend on it. All other Python stacks have a shorter support period. If you wish to use an alternate Python version becasue the life cycle of your package allows you to do it, always choose that version explicitly rather than allowing dnf to pull in any Python version.

Packages that Require `/usr/bin/python3` used to install Python 3.6 as a dependency by default, so for majority of use cases this problem never surfaced. However, python3.11 sort alphabetically sooner than python36, so users of RHEL 8.8 will get Python 3.11 by default when a package requires `/usr/bin/python3`.

Please, switch the BuildRequires to `python3-devel` and make sure to always use %{python3} during the build when invoking Python rather than invoking `/usr/bin/python3`. If your need to, you can change shebangs by the %py3_shebang_fix macro. Shebangs of installed files are automatically mangled by `/usr/lib/rpm/redhat/brp-mangle-shebangs`.

It is absolutely essential that no RHEL 8 package Requires `/usr/bin/python3` on runtime. Even if you are confident that your code will work on any Python future version, it is not a good idea to support this for our customers.

And also do not hesitate to let me know if you need any assistance or more information.

Comment 1 Jonny Heggheim 2023-10-29 12:24:36 UTC
rawhide have been updated

-BuildRequires: /usr/bin/python3
+BuildRequires: python3-devel

Comment 2 Lumír Balhar 2023-10-30 09:04:36 UTC
(In reply to Jonny Heggheim from comment #1)
> rawhide have been updated
> 
> -BuildRequires: /usr/bin/python3
> +BuildRequires: python3-devel

Great! But make sure to update EPEL 8 branch which is the one this bugzilla is created for.

Comment 3 Jonny Heggheim 2024-01-13 14:41:30 UTC
epel-packagers-sig group should have access to update


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