[Fedora-packaging] Draft to prohibit use of #!/usr/bin/env

Toshio Kuratomi a.badger at gmail.com
Sun Jul 19 15:42:15 UTC 2009

On 07/19/2009 05:11 AM, Jonathan Underwood wrote:
> 2009/7/17 Toshio Kuratomi <a.badger at gmail.com>:
>> https://fedoraproject.org/wiki/Script_Interpreters_(draft)
>> I've just submitted this draft.  This seems to support the following
> This part:
> "Also, RPM does dependency additions based on script interpreter
> lines. If a script has #! /usr/bin/env python, the dependency added to
> the resulting rpm is on /usr/bin/env, not on the actual python
> interpreter. This may lead to incorrect dependencies, and broken
> scripts."
> really sounds like something that could/should be fixed up in rpm
> automatic dependency generator(s).
It's not easy to fix 100% correctly, though.

   #!/usr/bin/myinterp Argument

Rpm can put a dependency on the file /usr/bin/myinterp.  Pretty easy.

#!/usr/bin/env myinterp

Rpm can put a dependency on /usr/bin/env.  Then it has to have a special
case for /usr/bin/env that says look at the next argument and treat that
as a dependency also.  Then it has to resolve what myinterp is.  The big
thing there is that there's no guarantee that the building host has
myinterp installed.  Many scripting languages are fine if you use
install (or cp) to install the script to the proper directory and don't
need to have the interpreter installed until runtime.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/fedora-packaging/attachments/20090719/c4022ffb/attachment.sig>

More information about the Fedora-packaging mailing list