Bug 1546742

Summary: kubernetes uses env python shebang, which leads to FTBFS in rawhide
Product: [Fedora] Fedora Reporter: Iryna Shcherbina <ishcherb>
Component: kubernetesAssignee: Jan Chaloupka <jchaloup>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: eparis, ichavero, jbrooks, jcajka, jchaloup, mhroncok, nhorman, tstclair, vbatts
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kubernetes-1.10.3-2.fc30 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-13 15:23:49 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: 1285816, 1340802    

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.