Bug 1546778

Summary: lvm2: lvm2-testsuite requires both Python 2 and Python 3
Product: [Fedora] Fedora Reporter: Iryna Shcherbina <ishcherb>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: agk, anprice, bmarzins, bmr, cfeist, heinzm, jonathan, kzak, lvm-team, mcsontos, msnitzer, prajnoha, pviktori, zkabelac
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-19 14:23:33 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, 1560513    

Description Iryna Shcherbina 2018-02-19 15:22:33 UTC
The lvm2-testsuite (2.02.177-4.fc28) RPM requires both Python 2 and Python 3:

$ dnf --disablerepo=* --enablerepo=rawhide repoquery --requires lvm2-testsuite  | 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:

> *** WARNING: mangling shebang in ./usr/share/lvm2-testsuite/api/python_lvm_unit.py from #!/usr/bin/env python to #!/usr/bin/python2. This will become an ERROR, fix it manually!

The executable contains `#!/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] or remove the executable bit from the file if not needed.


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:37:58 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 2 Petr Viktorin (pviktori) 2019-03-19 14:23:33 UTC
This is fixed, at least on Rawhide.