Bug 1238967 - Switch libreswan to use python3
Summary: Switch libreswan to use python3
Alias: None
Product: Fedora
Classification: Fedora
Component: libreswan
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Paul Wouters
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: F23PYTHON3
TreeView+ depends on / blocked
Reported: 2015-07-03 07:32 UTC by Robert Kuska
Modified: 2016-04-18 10:17 UTC (History)
3 users (show)

Fixed In Version: libreswan-3.13-2.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-07-13 20:03:40 UTC
Type: Bug

Attachments (Terms of Use)

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.


"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

Note You need to log in before you can comment on or make changes to this bug.