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

flatpak should not BuildRequire /usr/bin/python3

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Undefined Undefined
    • rhel-8.10
    • rhel-8.8.0
    • flatpak
    • flatpak-1.10.8-2.el8
    • None
    • None
    • sst_desktop_applications
    • ssg_desktop
    • 5
    • 8
    • None
    • False
    • Hide

      None

      Show
      None
    • Yes
    • None
    • None

      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.
       
      According to this commit where you switched from python3-pyparsing to python3.11-pyparsing, you knew about this problem even earlier than us. If you would have contacted us, we'd be able to tackle it sooner.

            dray@redhat.com Debarshi Ray
            lbalhar@redhat.com Lumir Balhar
            Debarshi Ray Debarshi Ray
            Petr Schindler Petr Schindler
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: