Bugzilla – Bug 1210583
john: get rid of /usr/bin/python and /usr/bin/python2 as the script interpreter
Last modified: 2023-05-09 09:24:18 UTC
there is a tons of files released in /usr/bin/*.py has /usr/bin/python(or /usr/bin/python2) shebang as the script interpreter that was indicate to python2, Leap 15.5 stopped to ship python2 entirely then it end up to an installation error when installing the john package: nothing provides /usr/bin/python, we need to change it to use python3(/usr/bin/python3) as the script interpreter, and might need to converting these python files to python3 if code isn't python3 supported.
https://github.com/openwall/john/pull/5309 https://build.opensuse.org/request/show/1085494
First of all, to the whole bug: absolutely not. I won’t take the responsibility for all customers’ scripts which will get broken, because they are actually not py3k compatible. If a customer is persuaded that they are, there is nothing wrong with them making /usr/bin/python3 -> /usr/local/bin/python link (please, not /usr/bin/python, so it doesn’t conflict with our packaging). However, then it is their responsibility and they would be breaking their systems. Second, to the submit request: please, do not let shebang with /usr/bin/env be in any package in our distributions. If you are fixing shebangs (which is probably the only thing we can do) than change it into /usr/bin/python3, please.
The shebang is already fixed in john.spec with sed -i 's|#!%{_bindir}/env python|#!%{_bindir}/python|' run/*.py sed -i 's|#! %{_bindir}/env python|#!%{_bindir}/python|' run/*.py