[katello-devel] Why #!/usr/bin/env ?

Lukas Zapletal lzap at redhat.com
Wed Jul 25 15:17:24 UTC 2012


On Wed, Jul 25, 2012 at 02:49:11PM +0200, Jan Pazdziora wrote:
> Clearly, the upstream should be runnable on any combination of
> anything, for the purpose of developer setup games, but once you
> start building packages for particular distribution, be it RHEL
> or Fedora, those packages should have a clear dependency on other
> things in that OS distribution.
> 
> The best solution seems to be to
> 
> 	s%^#!/usr/bin/env\s(\S+)%#!/usr/bin/$1%
> 
> in rpm build time so that in rpm-based installations, you know what
> ruby / python / whatever you are using and there are no nasty
> surprises.

+1

By the way this is recommended by default in Fedora 16+:

http://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython

I guess I would be able to find it in packaging guidelines somewhere. I
am pretty sure I have been fixing those at least two times for my (few)
fedora packages. Even rpmlint warns about it I believe!

Therefore: Do not use env, use direct path.

-- 
Later,

 Lukas "lzap" Zapletal
 #katello #systemengine




More information about the katello-devel mailing list