Re: Draft to prohibit use of #!/usr/bin/env

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/21/2009 11:54 PM, Braden McDaniel wrote:
> On Fri, 2009-07-17 at 01:54 -0700, Toshio Kuratomi wrote:
>> https://fedoraproject.org/wiki/Script_Interpreters_(draft)
>>
>> I've just submitted this draft.  This seems to support the following
>> feature which I need to find the owner of and coordinate with:
> 
> The problem I see with this is that it's bound to result in patches that
> some upstream developers will find unpalatable.  Can non-Fedora-specific
> arguments be made against this practice *that are sufficiently
> compelling to justify the potential for long-term maintenance of
> patches*?
> 
> I say, "non-Fedora-specific" because this is a lot more compelling if
> the project can say, unequivocally, that Fedora is taking a stand
> against a generally harmful practice.  If, however, the reasons driving
> this are mostly Fedora-specific, it's a harder sell.  Broadly speaking,
> a distribution like Fedora should be doing its best to adapt to what
> upstream developers deliver.
> 
I see this falling into two cases:

1) /usr/bin/env was cut and pasted into the script by upstream without
understanding what the tradeoffs are with /usr/bin/INTERPRETER.  In
these cases, upstream may be willing to accept a patch to use
/usr/bin/INTERPRETER when we explain that some system administrators
install multiple versions of the INTERPRETER on a system in different
directories and rely on their path to sort things out for their
site-local scripts.

2) /usr/bin/env is being used upstream purposefully.  This would be when
the upstream is trying to work in situations where INTERPRETER isn't
installed in /usr/bin/INTERPRETER and they are not concerned by multiple
versions of the INTERPRETER conflicting.  This is a case where I think
it is appropriate for Fedora to carry a Fedora-specific patch.

Reasoning: Upstream and Fedora have different aims in this case.
Upstream is trying to ensure that their script runs on as many different
operating systems as possible.  Fedora is trying to ensure that the
script runs on Fedora systems even if local admins have installed extra
interpreter versins.  /usr/bin/env supports upstream's case but breaks
the Fedora case.  So this is something that we should be changing
locally as it makes the scripts more robust on Fedora and the change is
reasonably simple - change the first line of executable files.

A solution that would meet both upstream and Fedora's usage would be to
change the build scripts of the packages to substitute the interpreter
lines in at build time.

-Toshio

Attachment: signature.asc
Description: OpenPGP digital signature

--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux