Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-2243

rpm-ostree should not BuildRequire /usr/bin/python3

Details

    • sst_rhcos
    • False
    • Hide

      None

      Show
      None
    • Sprint 243 - Update&Remoting, Sprint 244 - Update&Remoting, Sprint 246 - Update&Remoting, 248 - Core Packages, 249 - Core Packages, 250 - Core Packages

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-jmarrero Joseph Marrero Corchado
              lbalhar@redhat.com Lumir Balhar
              CoreOS Bot CoreOS Bot
              Huijing Hei Huijing Hei
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: