[Rpm-maint] [rpm-software-management/rpm] scripts: add brp-mangle-shebangs (#344)

Panu Matilainen notifications at github.com
Fri Nov 3 06:19:04 UTC 2017

If an env-shebang is left alone then it's not right to filter /bin/env out of the dependencies because env is then needed for running too. The reason rpm doesn't generate dependencies for env-shebangs is that it can't be sure about the path. There was a ticket on the old rpm.org trac instance, probably dating back to last decade or so, discussed it with @scop there...  Okay, these days most many distros have the everything in /usr and there are only so many things that are used in shebang to begin with... might actually be time to revisit that part, but like that's a different topic.

The bigger reason for mangling env out of shebang lines is to make the interpreter of system utilities etc predictable and not subject to user environment. There is a point to that - I remember encountering and debugging some oddities that turned out to be caused by local Python installation in users path and cursing the waste of time. Down that path, you'd probably want to add some further restrictions to some interpreters, eg -E / -I / -s for Python etc.

And then there are cases where that flexibility is exactly what you *want*, which is why @remicollet is less than happy about this one (or rather, the new Fedora policy). So lets just accept there are valid reasons for both, and not make life unnecessarily hard for either case.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20171103/c851aa66/attachment.html>

More information about the Rpm-maint mailing list