Bug#906901: debian-policy: Perl script shebang requirement is disturbing and inconsistent with rest of policy
Hi
> 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
Hmm, really? Looking throught the python scripts in TeX Live I find a
lot of different things:
/usr/share/texlive/texmf-dist/scripts] find . -name \*.py -exec head -n1 '{}' \;
#! /usr/bin/env python2.7
#!/usr/bin/env python
#!/usr/bin/env python
#!/usr/bin/env python2
#!/usr/bin/env python3
#!/usr/bin/env python
#!/usr/bin/env python2
#!/usr/bin/env python3
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#!/usr/bin/env python
#! /usr/bin/env python2
#!/usr/bin/env python
#!/usr/bin/env python
#!/usr/bin/env python
#!/usr/bin/env python
"""
#!/usr/bin/env python
#!/usr/bin/env python
#!/usr/bin/env python
#!/usr/bin/env python
#!/usr/bin/env python
"""Module to plot using Pgfplots.
Not all of them are linked to /usr/bin I guess, but at least some.
Searching for lua/texlua I get the same env texlua
$ find . -name \*.lua -exec head -n1 '{}' \; | grep ^#
#!/usr/bin/env texlua
#!/usr/bin/env texlua
#!/usr/bin/env texlua
#!/usr/bin/env texlua
#!/usr/bin/env texlua
#!/usr/bin/env texlua
#!/usr/bin/env texlua
#!/usr/bin/env texlua
#!/usr/bin/env texlua
#! /usr/bin/env texlua
#!/usr/bin/env texlua
> 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
Yes, I am aware of that after (re)reading the discussion on debian-perl
that led to this change.
> 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.
But it was never reported by lintian.
> 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
Good question. I leave this to you. I only know one place that compiles
perl because it runs on an old CentOS ...
> 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.
It would be a nice idea, but I don't see it actually working.
cd /usr/bin ; head -n 1 $(ls -l | grep texmf-dist | awk '{print$9}')
gives me a list of files with /usr/bin/env style shebangs. Several
of them with python interpreters. Grepping for usr/bin/env I get:
1x #!/usr/bin/env bash
59x #!/usr/bin/env perl
9x #!/usr/bin/env python
1x #!/usr/bin/env python2
1x #!/usr/bin/env python2.7
19x #!/usr/bin/env texlua
1x #!/usr/bin/env wish
(these are only the TeX Live scripts linked and with /usr/bin/env
shebang)
I don't see that this is acutally working in debhelper.
> Certainly we should avoid making every packager carry a bunch of diffs or
Yeah, I decided against diff and patch the files after they are
installed into the debian/$Pkg/ directories.
Best
Norbert
--
PREINING Norbert http://www.preining.info
Accelia Inc. + JAIST + TeX Live + Debian Developer
GPG: 0x860CDC13 fp: F7D8 A928 26E3 16A1 9FA0 ACF0 6CAC A448 860C DC13
Reply to: