Re: EPEL 8: %__python3 == /usr/bin/python3 creates runtime problems with alternatives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 8, 2022 at 5:06 AM Miro Hrončok <mhroncok@xxxxxxxxxx> wrote:
Hello EPEL folks,

In EL 8, it is possible to change the "meaning" of /usr/bin/python3 because it
is managed by alternatives:

   $ ls -l /usr/bin/python3
   lrwxrwxrwx. ... /usr/bin/python3 -> /etc/alternatives/python3

And since %__python3 on EPEL 8 is set to /usr/bin/python3 by epel-rpm-macros:

   $ rpm --eval '%__python3'
   /usr/bin/python3

When packages have %py3_shebang_fix on EPEL 8:

   %py3_shebang_fix %{buildroot}%{_bindir}/*

The shebengs have #!/usr/bin/python3 in them.

(This is done by %__brp_mangle_shebangs automatically, so even packages without
%py3_shebang_fix might be affected.)

But when the package has importable modules in %{python3_sitelib} or
%{python3_sitearch} or simply depends on other Python 3.6 modules, and the user
uses alternatives to change /usr/bin/python3 to e.g. python3.9, the script no
longer works.

I suppose the default value of %__python3 needs to be /usr/bin/python3.6 to
prevent this way of shooting the users to their legs.

(I apologize for letting the alternatives happen, but that ship has sailed a
long time ago. Fortunately, EL 9 no longer have this.)

--
Miro Hrončok
--


Hi Miro,
You have explained the problem very well, and a possible solution.
But I'm a bit confused as to what you want to happen.

Is this a heads up, that you are going to change something?
Do you want us to discuss what is the best thing to do?
Are you letting us know about the problem, and want someone else to implement a solution?

Troy Dawson
 
_______________________________________________
epel-devel mailing list -- epel-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to epel-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/epel-devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Index of Archives]     [Fedora Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Announce]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux