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

Re: Bug#906901: debian-policy: Perl script shebang requirement is disturbing and inconsistent with rest of policy



Norbert Preining <norbert@preining.info> writes:

> But we probably have the very same situation with any other interpreter.
> ANyone ever checked the shebangs of python/php/lua/whatever scripts?

Apparently the Python packaging community in Debian already had this
discussion and chose to standardize on /usr/bin paths for everything, and
the debhelper add-ons for Python just rewrite the #! line accordingly.  So
yeah, this is something other interpreters have looked at.  I'm not sure
what PHP and Lua have done, but Python at least decided it was worth
standardizing.

Note too that Policy *did* say that one "should" use /usr/bin/perl and the
Perl Policy said that one "must" (and has for a while -- the DocBook
conversion makes git annotate not as useful, but I didn't see any relevant
changelog entry and suspect it may have been that way since it was
incorporated into Policy).  So this isn't entirely out of the blue.
That's why we thought the change was uncontroversial.  I'm fairly sure
that 2,000 or so scripts is much less than the total number in Debian,
although I'm sure this was still an unpleasant surprise to a lot of people
since it doesn't look like we had any detection or enforcement of that.

I'm sorry for the surprise.  That's largely my fault.

> First of all, I don't see that this will happen on more then a very rare
> basis - and if it happens, the user/admin who did this should be aware
> that things might go not as smooth as expected.

Installing a separate local version of Perl?  Hm, I'm surprised that you
think that will only happen on a very rare basis, although I guess this is
less a thing than it used to be.  But surely this is still not too
uncommon for stable users?  Maybe I'm just out of touch and everyone uses
containers these days, or Perl is so stable that people don't tend to
install their own versions as much.

> And, if you decide on one of the two, again many packages will get
> lintian errors. You mentioned that the env perl had about 2000 scripts,
> I guess the /usr/bin/perl shebang will affect even more scripts.

I agree that this is surely a hassle, but there are things we could do to
make it easier.  For instance, it looks like there's a bug filed against
debhelper to have it just automatically fix the #! lines, which would make
quite a lot of that go away if they moved forward with that approach.
That's apparently the approach Python took.

Certainly we should avoid making every packager carry a bunch of diffs or
something to fix this if we decide to standardize and can make their lives
easier!  I totally agree with that.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: