Generally fixing wrong-path-for-interpreter

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Generally fixing wrong-path-for-interpreter

Andreas Tille-5
Hi,

lots of Debian Med packages are affected by

   wrong-path-for-interpreter ... (#!/usr/bin/env perl != /usr/bin/perl)

I usually fix this by

override_dh_install:
        dh_install
        for pl in `grep -Rl '#!/usr/bin/env[[:space:]]\+perl' debian/*/usr/*` ; do \
            sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
        done

Since this is a more general problem:  Do you think it would be a good
idea to integrate such a code snippet into dh_perl (or any other
sensible debhelper tool instead of forcing single maintainers to do
this manually (and may be failing to do this a long time).

Kind regards

       Andreas.

PS: Similar things exist with Python and probably other interpreters but
    I stumbled by far most about Perl.  If you think there should be a
    more general solution feel free to move the thread to debian-devel
    or whatever place might seem appropriate.

--
http://fam-tille.de

Reply | Threaded
Open this post in threaded view
|

Re: Generally fixing wrong-path-for-interpreter

Joost van Baal-Ilić-77
Hi Andreas e.a.,

On Fri, Oct 19, 2018 at 11:24:47AM +0200, Andreas Tille wrote:

>
> lots of Debian Med packages are affected by
>
>    wrong-path-for-interpreter ... (#!/usr/bin/env perl != /usr/bin/perl)
>
> I usually fix this by
>
> override_dh_install:
>         dh_install
>         for pl in `grep -Rl '#!/usr/bin/env[[:space:]]\+perl' debian/*/usr/*` ; do \
>             sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
>         done
>
> Since this is a more general problem:  Do you think it would be a good
> idea to integrate such a code snippet into dh_perl (or any other
> sensible debhelper tool instead of forcing single maintainers to do
> this manually (and may be failing to do this a long time).
>
> Kind regards
>
>        Andreas.
>
> PS: Similar things exist with Python and probably other interpreters but
>     I stumbled by far most about Perl.  If you think there should be a
>     more general solution feel free to move the thread to debian-devel
>     or whatever place might seem appropriate.


FWIW, and as yet another data point: policy 10.4 is stricter on perl than on
python (see lintian checks/scripts.desc).  Checking the policy as well as
lintian, it seems using #!/usr/bin/env python is OK.

I seems debian-devel is a better venue for this discussion...

Bye,

Joost


Reply | Threaded
Open this post in threaded view
|

Re: Generally fixing wrong-path-for-interpreter

Alex Mestiashvili-4

On 10/19/2018 11:45 AM, Joost van Baal-Ilić wrote:

> Hi Andreas e.a.,
>
> On Fri, Oct 19, 2018 at 11:24:47AM +0200, Andreas Tille wrote:
>>
>> lots of Debian Med packages are affected by
>>
>>    wrong-path-for-interpreter ... (#!/usr/bin/env perl != /usr/bin/perl)
>>
>> I usually fix this by
>>
>> override_dh_install:
>>         dh_install
>>         for pl in `grep -Rl '#!/usr/bin/env[[:space:]]\+perl' debian/*/usr/*` ; do \
>>             sed -i '1s?^#!/usr/bin/env[[:space:]]\+perl?#!/usr/bin/perl?' $${pl} ; \
>>         done
>>
>> Since this is a more general problem:  Do you think it would be a good
>> idea to integrate such a code snippet into dh_perl (or any other
>> sensible debhelper tool instead of forcing single maintainers to do
>> this manually (and may be failing to do this a long time).
>>
>> Kind regards
>>
>>        Andreas.
>>
>> PS: Similar things exist with Python and probably other interpreters but
>>     I stumbled by far most about Perl.  If you think there should be a
>>     more general solution feel free to move the thread to debian-devel
>>     or whatever place might seem appropriate.
>
>
> FWIW, and as yet another data point: policy 10.4 is stricter on perl than on
> python (see lintian checks/scripts.desc).  Checking the policy as well as
> lintian, it seems using #!/usr/bin/env python is OK.
>
> I seems debian-devel is a better venue for this discussion...
>
> Bye,
>
> Joost
>
>

It has been discussed already:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906901

I think it's fine to ignore the warning for now.

Best,
Alex

Reply | Threaded
Open this post in threaded view
|

Re: Generally fixing wrong-path-for-interpreter

gregor herrmann-3
On Fri, 19 Oct 2018 12:15:10 +0200, Alex Mestiashvili wrote:

> > FWIW, and as yet another data point: policy 10.4 is stricter on perl than on
> > python (see lintian checks/scripts.desc).  Checking the policy as well as
> > lintian, it seems using #!/usr/bin/env python is OK.
> > I seems debian-devel is a better venue for this discussion...
>
> It has been discussed already:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906901
>
> I think it's fine to ignore the warning for now.

And the corresponding debhelper bug is
https://bugs.debian.org/904409

Cheers,
gregor

--
 .''`.  https://info.comodo.priv.at -- Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe
   `-   NP: J.J. Cale: Call me The Breeze

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Generally fixing wrong-path-for-interpreter

Andreas Tille-5
In reply to this post by Alex Mestiashvili-4
On Fri, Oct 19, 2018 at 12:15:10PM +0200, Alex Mestiashvili wrote:
>
> > FWIW, and as yet another data point: policy 10.4 is stricter on perl than on
> > python (see lintian checks/scripts.desc).  Checking the policy as well as
> > lintian, it seems using #!/usr/bin/env python is OK.
> >
> > I seems debian-devel is a better venue for this discussion...
>
> It has been discussed already:
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906901

Ahhh, I missed all this. :-(
 
> I think it's fine to ignore the warning for now.

The point is that lintian issues an *error* and I'm not sure whether
this specific one is causing an auto-reject.

Thanks to Gregor for the pointer to #904409.  I wonder whether something
might happen soon.  The last remark[1] was asking for "implement this
ASAP" but no further news here.  Hmmm...

Kind regards

      Andreas.


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=904409#21

--
http://fam-tille.de