Bug 1238967

Summary: Switch libreswan to use python3
Product: [Fedora] Fedora Reporter: Robert Kuska <rkuska>
Component: libreswanAssignee: Paul Wouters <pwouters>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jberan, mhroncok, pwouters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libreswan-3.13-2.fc23 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-13 20:03:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1014209    

Description Robert Kuska 2015-07-03 07:32:57 UTC
As of v3.10 libreswan script verify supports Python3. Please note that for Fedora23 system wide change was accepted by FESCO which implies that all packages on LiveCD must run on Python3. Please change shebang of verify script to use /usr/bin/python3.

Comment 1 Miro Hrončok 2015-07-10 12:22:48 UTC
Or, if you don't have time for this, I can do it for you.

May I?

Comment 2 Paul Wouters 2015-07-10 13:25:16 UTC
the ipsec verify routine uses #!/usr/bin/python

why would /usr/bin/python not point to python3?

As upstream, we don't want to hardcode the python version in the shebang

Comment 3 Miro Hrončok 2015-07-10 13:37:34 UTC
(In reply to Paul Wouters from comment #2)
> why would /usr/bin/python not point to python3?

There happened a lot of discussions about this on Python Fedora channels. For now (and for Fedora 23) /usr/bin/python points to python2 and this might or might not change in the future.

https://fedoraproject.org/wiki/Packaging:Python#Multiple_Python_Runtimes

"However, packages in Fedora should not depend on where /usr/bin/python happens to point but instead should call the proper executable for the needed python major version directly, either /usr/bin/python2 or /usr/bin/python3 as appropriate."

> As upstream, we don't want to hardcode the python version in the shebang

As for classical python packages that are installed with setup.py, shebangs are autogenerated with setup.py install. However as this is not the case, you have multiple options considering you don't want to hardcode the python version in the shebang upstream:

 1. Develop a mechanism, that would change the shebang line according to what python is present/used at compile/install time (seems overkill)
 2. Change it in spec's %prep

Fedora 23 Alpha freeze is approaching (18 days), so I would strongly suggest to go with the spec option and consider developing the mechanism later, if really wanted.

Comment 4 Miro Hrončok 2015-07-13 20:03:40 UTC
Thanks.