[apparmor] [patch] drop shebang from apparmor/rule/*.py

Christian Boltz apparmor at cboltz.de
Thu Jul 16 22:47:23 UTC 2015


Hello,

Am Donnerstag, 16. Juli 2015 schrieb Tyler Hicks:
> On 2015-07-17 00:19:51, Christian Boltz wrote:
> > the '#!/usr/bin/env python' line in apparmor/rule/*.py is
> > superfluous
> > and causes "non-executable script" rpmlint warnings on openSUSE.
> 
> Is it more correct to leave the shebang and make the files executable?

No, it doesn't make sense to make python modules executable.
(Executing them does nothing [1], and if it would do something, they'd 
be called "scripts" and live in /usr/bin/ or /usr/sbin/ ;-)

If you prefer a popular vote: all python modules in 
/usr/lib/python3.4/site-packages are -rw-r--r-- on openSUSE ;-)


Regards,

Christian Boltz

[1] well, technically "nothing" is not correct - python reads the code
    so that the *Rule and *Ruleset classes could be used - but the 
    modules end without doing that, which means executing the module
    means wasting some CPU cycles ;-)
-- 
> [submit-request #65647 declined by saschpe:]
>   description is >400 lines, too long :-)
Where is a limit documented?
[Stephan Kulow in opensuse-packaging]




More information about the AppArmor mailing list