Re: [PATCH] scripts: Switch to more portable Perl shebang

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

 



On 07.05.2017 22:22, Joe Perches wrote:
> On Sun, 2017-05-07 at 22:14 +0200, Kamil Rytarowski wrote:
>> On 07.05.2017 19:01, Joe Perches wrote:
>>> On Sun, 2017-05-07 at 16:56 +0200, Kamil Rytarowski wrote:
>>>> The default NetBSD package manager is pkgsrc and it installs Perl
>>>> along other third party programs under custom and configurable prefix.
>>>> The default prefix for binary prebuilt packages is /usr/pkg, and the
>>>> Perl executable lands in /usr/pkg/bin/perl.
>>>>
>>>> This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
>>>> the most portable solution that should work for almost everybody.
>>>> Perl's executable is detected automatically.
>>>>
>>>> This change switches -w option passed to the executable with more
>>>> modern "use warnings;" approach. There is no functional change to the
>>>> default behavior.
>>>
>>> Functionality would then depend on user $PATH.
>>
>> Yes.
>>
>>> Better?  <shrug>
>>
>> Correct.
>>
>> In pkgsrc we have automatic scripts to adjust shebangs for scripting
>> languages (Perl, Python, Bash etc). But in this case I build the Linux
>> kernel out of the pkgsrc context on my NetBSD workstation.
>>
>> Exactly the same change has been accepted in qemu, currently it's
>> waiting to be merged with master. from the "-trival" branch.
>>
>> In my case I won't be enforced to keep fixing it manually every time I
>> sync with HEAD. Another point is that the Linux version of this script
>> is model and projects fork it, and we need to keep adjusting it downstream.
>>
>>>
>>> For the perl "-w", adding "use warnings;" instead of
>>> "-w" seems sensible enough.  Is any build environment
>>> using a perl version below 5.6?
>>>
>>
>> 5.6 was released in 2003.
> 
> I know a person using 5.8 (cough: Andrew Morton), but 5.6
> really is quite old.
> 

It was just decided to depend on GNU Make 3.81 (released 2010). Minimal
required GCC bump has been discussed a while ago.. I don't expect to
have people with 2003 setups and functional enough to build the kernel
from HEAD.

>> Out of context of this patch, scripts/namespace.pl ships with "require
>> 5" (year 1994?) - removal of this line could be evaluated.
> 
> I'm for removal.
> 

I will include it in v2.

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux