On 17.10.2017 21:40, Sebastian wrote:
Hi,
I wish to have some easy way to fix these issues, so * either the shebangs are fixed on the fly during the build process (preferred).
I'm not sure this can be done. We could catch the env shebangs, but an automated process can't decide whether the shebang belongs or not, whether it should be python2 or python3 when it says "python" (yes, PEP 394 says that it should be python2, but that is no longer appropriate for many of our packages), etc.
* Or provide a very easy to use script/macro to fix them, plus a copy-pasteable example in the rpmlint output. That macro could be part of the python-rpm-macros or (better) some macros which are always installed (as not all python packages use the singlespec-approach).
This is unfortunately difficult to do right. I intend to create a package "shebang-macros" and make it a requirement of both python-rpm-macros and rpmbuild itself, somehow. It would be nice to get the macros into suse_macros, or even better, upstream, but that would make for some incompatible spec file mess. I'm open to suggestions as to get the macro to "everyone". Writing the macro itself is simple. m.
Fixing a problem as easy as possible is equally important as to check/report it.
Sebastian
On 10/17/2017 08:49 PM, Todd Rme wrote:
The current version of rpmlint in devel:languages:python [1] contains a patch relative to the one in openSUSE:Factory. This patch adds additional warnings and errors regarding shebangs in scripts. Specifically, executable scripts with "/usr/bin/env" cause an error and "/usr/bin/python" cause a warning.
However, the submission to openSUSE:Factory [2] was rejected 4 months ago over doubts regarding whether there should be an error and whether the checks are really necessary.
Since then, devel:languages:python has had this different rpmlint behavior than openSUSE:Factory. I hope we can get this issue resolved so we can bring the two versions back into agreement.
1: https://build.opensuse.org/package/show/devel:languages:python/rpmlint 2: https://build.opensuse.org/request/show/508168