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

Bug#683495: Mandating use of /usr/bin/perl in Policy



On Sat, Oct 14, 2017 at 11:49:59AM -0700, Sean Whitton wrote:
> control: tag -1 +patch
> 
> Hello,
> 
> I am seeking seconds for the following patch to close this bug, which I
> think is uncontroversial at this point.
> 
> > @@ -185,7 +185,7 @@ All command scripts, including the package maintainer scripts inside the
> >  package and used by ``dpkg``, should have a ``#!`` line naming the shell
> >  to be used to interpret them.
> >
> > -In the case of Perl scripts this should be ``#!/usr/bin/perl``.
> > +In the case of Perl scripts this must be ``#!/usr/bin/perl``.
> >
> >  When scripts are installed into a directory in the system PATH, the
> >  script name should not include an extension such as ``.sh`` or ``.pl``
> 
> ~~~~~

Seconded.

> As has been pointed out by Gian, there is a broader issue of whether it
> is right for Policy to say
> 
>     Perl programs and modules should follow the current Perl policy.
> 
> or
> 
>     Perl programs and modules must follow the current Perl policy.
> 
> I think this is actually quite tricky: if packages must follow the Perl
> policy, does that erase the difference between 'should' and 'must'
> requirements in the Perl policy?
> 
> If someone thinks it is a big deal that Policy says only that packages
> should follow the Perl policy, and is willing to do the work to handle
> these complexities, they should file a new bug against Policy.
> Otherwise, let's put that broader issue aside and just fix this
> confusing inconsistency about shebangs.

Logically speaking, since the Perl policy is a part of policy (at least,
it is shipped in the same package and has the same update policies applied
to it), it must be followed by all packages dealing with Perl. It seems
that all that's really required here is an informational pointer that 
there is relevant information to be found in this separate document.

However, if the statement above is kept, it should be changed to 'must'.

Probably in 2001 when this statement, and the perl policy itself, was
added to the policy package, many packages did not meet the perl policy,
so this statement, with the 'should' wording, was needed to weaken
the relationship, as a transitional arrangement. After 15 years, I think
we can safely remove this.

The same wording appears in relation to the menu policy, and though
I haven't looked into it, the same reasoning might apply there.

Cheers,
Dominic.


Reply to: