Bug 1546742 - kubernetes uses env python shebang, which leads to FTBFS in rawhide
Summary: kubernetes uses env python shebang, which leads to FTBFS in rawhide
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kubernetes
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Chaloupka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3 PYTHON3-PYTHON2
TreeView+ depends on / blocked
 
Reported: 2018-02-19 13:46 UTC by Iryna Shcherbina
Modified: 2019-01-13 15:23 UTC (History)
9 users (show)

Fixed In Version: kubernetes-1.10.3-2.fc30
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-13 15:23:49 UTC


Attachments (Terms of Use)

Description Iryna Shcherbina 2018-02-19 13:46:29 UTC
The kubernetes-unit-test (1.9.3-1.fc28) RPM requires both Python 2 and Python 3:

$ dnf --disablerepo=* --enablerepo=rawhide repoquery --requires kubernetes-unit-test | grep python
/usr/bin/python2
/usr/bin/python3

This happened due to recently introduced shebangs mangling [0], and you might see the warnings in the build log:

> + /usr/lib/rpm/redhat/brp-mangle-shebangs
> *** WARNING: mangling shebang in ./var/lib/kubernetes-unit-test/src/k8s.io/kubernetes/cluster/juju/return-node-ips.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
> *** WARNING: mangling shebang in ./var/lib/kubernetes-unit-test/src/k8s.io/kubernetes/cluster/juju/identify-leaders.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!
> <there are more like this in the build.log>

The executables contain `#!/usr/bin/env python` shebang, which is forbidden by the guidelines and is automatically mangled to `#!/usr/bin/python2` during build. Please fix the shebang to be `#!/usr/bin/python3` explicitly [1].

It's ok to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 27 as well.


If anything is unclear, or if you need any kind of assistance, you can
ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy
to help investigating or fixing this issue!

[0] https://pagure.io/packaging-committee/issue/738#comment-490366
[1] http://python-rpm-porting.readthedocs.io/en/latest/application-modules.html#fixing-shebangs

Comment 1 Fedora End Of Life 2018-02-20 15:32:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 2 Jakub Čajka 2019-01-11 13:44:46 UTC
Kube is now FTBFS in rawhide due to this.


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