(a bug template for shebangs) |
No edit summary |
||
Line 112: | Line 112: | ||
Subject: '''<name> uses unqualified `/usr/bin/python` or `/usr/bin/env python` shebangs''' | Subject: '''<name> uses unqualified `/usr/bin/python` or `/usr/bin/env python` shebangs''' | ||
The following RPM(s) use(s) unqualified `/usr/bin/python` or `/usr/bin/env python` | The following RPM(s) use(s) unqualified `/usr/bin/python` or `/usr/bin/env python` | ||
shebangs in executable scripts: | shebangs in executable scripts: | ||
<rpm name>: | <rpm name>: | ||
* <file path> | * <file path> | ||
... (repeat for each affected RPM) | ... (repeat for each affected RPM) | ||
According to Fedora Packaging guidelines for Python [0], packages must not | According to Fedora Packaging guidelines for Python [0], packages must not | ||
reference `/usr/bin/python` or make use of `env` in shebang lines of executables. | reference `/usr/bin/python` or make use of `env` in shebang lines of executables. |
Latest revision as of 16:40, 2 August 2017
The Mass bug filing information for using unqualified python
in package names, requirements and shebangs.
Summary
According to the Fedora packaging guidelines for Python, Python 2 binary packages must be named starting with "python2-" and Python 3 binary package must be named starting with "python3-" [1]. Besides, "python-" must not be used in dependencies unless the proper "python2-" or "python3-" packages do not exist [2].
Here are some common problems; bug report text for each one is below.
- Using
python
instead ofpython2
/python3
in binary RPM package name - Using
python
instead ofpython2
/python3
in (Build)Requires - Using
/usr/bin/python
or/usr/bin/env python
instead of/usr/bin/python2
or/usr/bin/python3
in shebangs
Tracker Bugs
General Tracking Bug
Subject: [UNQUALIFIED_PYTHON] Track usage of python
instead of python2
/python3
Here we are tracking issues related to switching "Python" to mean "Python 3" in Fedora. These include: * Usingpython
instead ofpython2
/python3
in binary RPM package name (bug <tracking bug id>) * Usingpython
instead ofpython2
/python3
in (Build)Requires (bug <tracking bug id>) * Using/usr/bin/python
or/usr/bin/env python
instead of/usr/bin/python2
or/usr/bin/python3
in shebangs (bug <tracking bug id>) For mass bug filing information, see: https://fedoraproject.org/wiki/User:Ishcherb/Package_Naming_Bug_Filing Python packaging guidelines: https://fedoraproject.org/wiki/Packaging:Python
Misnamed Binary RPM
Subject: [PY-MISNAMED-SUBPACKAGE] Track usage of unqualified python
in binary RPM package name
Here we are tracking bugs for packages which usepython
instead ofpython2
/python3
in binary RPM package names. This naming scheme is wrong, thus the affected subpackages must be renamed. Python package naming guidelines: https://fedoraproject.org/wiki/Packaging:Naming?rd=Packaging:NamingGuidelines#Python2_binary_package_naming
Misnamed (Build)Requires
Subject: [PY-MISNAMED-REQUIRE] Track usage of unqualified python
in (Build)Requires
Here we are tracking bugs for packages where dependencies (runtime or build-time) are declared using names withpython-
prefix instead ofpython2-
/python3-
. Python packaging guidelines: https://fedoraproject.org/wiki/Packaging:Python#Dependencies
Wrong Shebang
Subject: [PY-BAD-SHEBANG] Track usage if unqualified /usr/bin/python
or /usr/bin/env python
shebangs
Here we are tracking bugs for packages with dependencies on/usr/bin/python
or/usr/bin/env python
, which are generated by using the corresponding shebangs instead of/usr/bin/python2
or/usr/bin/python3
in executable scripts. Python packaging guidelines: https://fedoraproject.org/wiki/Packaging:Python#Multiple_Python_Runtimes
Bug Titles and Texts
Misnamed Binary RPM
Subject: <name> uses ambiguous python-
prefix
The following Python 2 subpackage(s) is (are) named using a wrong naming scheme: * <name> - expected to be named <correct name> According to Fedora packaging guidelines [0], Python binary packages must be named with eitherpython2-
orpython3-
prefix. Please rename the binary RPM(s). There is a section on Python package naming scheme in the Python RPM Porting Guide [1] and you may refer to it for more instructions. It's ok to do this in Rawhide only. If anything is unclear, or if you need any kind of assistance, you can ask on IRC (#fedora-python on Freenode), or reply here. [0] https://fedoraproject.org/wiki/Packaging:Naming?rd=Packaging:NamingGuidelines#Python2_binary_package_naming [1] https://python-rpm-porting.readthedocs.io/en/latest/naming-scheme.html
Misnamed (Build)Requires
Subject: <name> depends on packages using ambiguous python-
prefix
The following RPM(s) use(s) names with ambiguouspython-
prefix in requirements: <rpm name> (Build)Requires: * <require name> (<correct name> is available) ... (repeat for each affected RPM) According to Fedora Packaging guidelines for Python [0], packages must use names with eitherpython2-
orpython3-
prefix in requirements where available. Please go through the buildtime and runtime requirements of the package and fix the names to comply with the guidelines. It's ok to do this in Rawhide only. If anything is unclear, or if you need any kind of assistance, you can ask on IRC (#fedora-python on Freenode), or reply here. [0] https://fedoraproject.org/wiki/Packaging:Python#Dependencies
Wrong Shebang
Subject: <name> uses unqualified /usr/bin/python
or /usr/bin/env python
shebangs
The following RPM(s) use(s) unqualified/usr/bin/python
or/usr/bin/env python
shebangs in executable scripts: <rpm name>: * <file path> ... (repeat for each affected RPM) According to Fedora Packaging guidelines for Python [0], packages must not reference/usr/bin/python
or make use ofenv
in shebang lines of executables. Please check the package executable files listed above and make sure to explicitly use either/usr/bin/python2
or/usr/bin/python3
shebangs for the needed python major version. There is a section on shebangs in the Python RPM Porting Guide [1] and you may refer to it for more instructions. It's ok to do this in Rawhide only. If anything is unclear, or if you need any kind of assistance, you can ask on IRC (#fedora-python on Freenode), or reply here. [0] https://fedoraproject.org/wiki/Packaging:Python#Multiple_Python_Runtimes [1] https://python-rpm-porting.readthedocs.io/en/latest/tools.html#fixing-shebangs
Misnamed Binary RPM and (Build)Requires
Subject: <name> uses ambiguous python-
prefix
The following Python 2 subpackage(s) is (are) named using a wrong naming scheme: * <name> - expected to be named <correct name> Besides this, the following RPM(s) use(s) names with ambiguouspython
prefix in requirements: <rpm name> (Build)Requires: * <require name> (while <correct name> is available) ... (repeat for each affected RPM) Both issues described above violate Fedora packaging guidelines, which state that: * Python binary packages must be named with eitherpython2-
orpython3-
prefix [0]; * Fedora packages must use names with eitherpython2-
orpython3-
prefix in requirements where available [1]. Please rename the binary RPM(s) and usepython2-
orpython3-
prefixed names in runtime and buildtime requirements. There is a section on Python package naming scheme in the Python RPM Porting Guide [2] and you may refer to it for more instructions. It's ok to do this in Rawhide only. If anything is unclear, or if you need any kind of assistance, you can ask on IRC (#fedora-python on Freenode), or reply here. [0] https://fedoraproject.org/wiki/Packaging:Naming?rd=Packaging:NamingGuidelines#Python2_binary_package_naming [1] https://fedoraproject.org/wiki/Packaging:Python#Dependencies [2] https://python-rpm-porting.readthedocs.io/en/latest/naming-scheme.html