History

scripts: Switch to more portable Perl shebang

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. While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).

Kamil Rytarowski committed 9 years ago

Commit cb77f0d1 parent 2ea659a24 files · +37 −25Browse files

Unified · Split

24 files
  1. scripts/bootgraph.pl +1 −1
  2. scripts/checkincludes.pl +1 −1
  3. scripts/checkpatch.pl +2 −1
  4. scripts/checkstack.pl +1 −1
  5. scripts/checkversion.pl +1 −1
  6. scripts/cleanfile +2 −1
  7. scripts/cleanpatch +2 −1
  8. scripts/dtc/dt_to_config +1 −1
  9. scripts/export_report.pl +2 −1
  10. scripts/extract-module-sig.pl +2 −1
  11. scripts/extract-sys-certs.pl +2 −1
  12. scripts/extract_xc3028.pl +1 −1
  13. scripts/get_dvb_firmware +1 −1
  14. scripts/get_maintainer.pl +2 −1
  15. scripts/headerdep.pl +1 −1
  16. scripts/headers_check.pl +2 −1
  17. scripts/kconfig/streamline_config.pl +2 −1
  18. scripts/kernel-doc +2 −1
  19. scripts/kernel-doc-xml-ref +2 −1
  20. scripts/markup_oops.pl +1 −1
  21. scripts/namespace.pl +2 −2
  22. scripts/profile2linkerlist.pl +1 −1
  23. scripts/recordmcount.pl +2 −1
  24. scripts/stackdelta +1 −1
scripts/bootgraph.pl+1−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl1#!/usr/bin/env perl
2 2
3# Copyright 2008, Intel Corporation3# Copyright 2008, Intel Corporation
4#4#
scripts/checkincludes.pl+1−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl1#!/usr/bin/env perl
2#2#
3# checkincludes: find/remove files included more than once3# checkincludes: find/remove files included more than once
4#4#
scripts/checkpatch.pl+2−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2# (c) 2001, Dave Jones. (the file handling bit)2# (c) 2001, Dave Jones. (the file handling bit)
3# (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)3# (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)
4# (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)4# (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)
@@ -6,6 +6,7 @@ · 1 unmodified line
6# Licensed under the terms of the GNU GPL License version 26# Licensed under the terms of the GNU GPL License version 2
7 7
8use strict;8use strict;
9use warnings;
9use POSIX;10use POSIX;
10use File::Basename;11use File::Basename;
11use Cwd 'abs_path';12use Cwd 'abs_path';
scripts/checkstack.pl+1−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl1#!/usr/bin/env perl
2 2
3# Check the stack usage of functions3# Check the stack usage of functions
4#4#
scripts/checkversion.pl+1−1
@@ -1,4 +1,4 @@
1#! /usr/bin/perl1#! /usr/bin/env perl
2#2#
3# checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION3# checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION
4# without including <linux/version.h>, or cases of4# without including <linux/version.h>, or cases of
scripts/cleanfile+2−1
@@ -1,9 +1,10 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2#2#
3# Clean a text file -- or directory of text files -- of stealth whitespace.3# Clean a text file -- or directory of text files -- of stealth whitespace.
4# WARNING: this can be a highly destructive operation. Use with caution.4# WARNING: this can be a highly destructive operation. Use with caution.
5#5#
6 6
7use warnings;
7use bytes;8use bytes;
8use File::Basename;9use File::Basename;
9 10
scripts/cleanpatch+2−1
@@ -1,9 +1,10 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2#2#
3# Clean a patch file -- or directory of patch files -- of stealth whitespace.3# Clean a patch file -- or directory of patch files -- of stealth whitespace.
4# WARNING: this can be a highly destructive operation. Use with caution.4# WARNING: this can be a highly destructive operation. Use with caution.
5#5#
6 6
7use warnings;
7use bytes;8use bytes;
8use File::Basename;9use File::Basename;
9 10
scripts/dtc/dt_to_config+1−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl1#!/usr/bin/env perl
2 2
3# Copyright 2016 by Frank Rowand3# Copyright 2016 by Frank Rowand
4# Copyright 2016 by Gaurav Minocha4# Copyright 2016 by Gaurav Minocha
scripts/export_report.pl+2−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2#2#
3# (C) Copyright IBM Corporation 2006.3# (C) Copyright IBM Corporation 2006.
4# Released under GPL v2.4# Released under GPL v2.
@@ -7,6 +7,7 @@ · 2 unmodified lines
7# Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c7# Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c
8#8#
9 9
10use warnings;
10use Getopt::Std;11use Getopt::Std;
11use strict;12use strict;
12 13
scripts/extract-module-sig.pl+2−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2#2#
3# extract-mod-sig <part> <module-file>3# extract-mod-sig <part> <module-file>
4#4#
@@ -12,6 +12,7 @@ · 7 unmodified lines
12# -k: Just the key ID12# -k: Just the key ID
13# -s: Just the crypto signature or PKCS#7 message13# -s: Just the crypto signature or PKCS#7 message
14#14#
15use warnings;
15use strict;16use strict;
16 17
17die "Format: $0 -[0adnks] module-file >out\n"18die "Format: $0 -[0adnks] module-file >out\n"
scripts/extract-sys-certs.pl+2−1
@@ -1,5 +1,6 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2#2#
3use warnings;
3use strict;4use strict;
4use Math::BigInt;5use Math::BigInt;
5use Fcntl "SEEK_SET";6use Fcntl "SEEK_SET";
scripts/extract_xc3028.pl+1−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl1#!/usr/bin/env perl
2 2
3# Copyright (c) Mauro Carvalho Chehab <mchehab@infradead.org>3# Copyright (c) Mauro Carvalho Chehab <mchehab@infradead.org>
4# Released under GPLv24# Released under GPLv2
scripts/get_dvb_firmware+1−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl1#!/usr/bin/env perl
2# DVB firmware extractor2# DVB firmware extractor
3#3#
4# (c) 2004 Andrew de Quincey4# (c) 2004 Andrew de Quincey
scripts/get_maintainer.pl+2−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2# (c) 2007, Joe Perches <joe@perches.com>2# (c) 2007, Joe Perches <joe@perches.com>
3# created from checkpatch.pl3# created from checkpatch.pl
4#4#
@@ -10,6 +10,7 @@ · 5 unmodified lines
10#10#
11# Licensed under the terms of the GNU GPL License version 211# Licensed under the terms of the GNU GPL License version 2
12 12
13use warnings;
13use strict;14use strict;
14 15
15my $P = $0;16my $P = $0;
scripts/headerdep.pl+1−1
@@ -1,4 +1,4 @@
1#! /usr/bin/perl1#! /usr/bin/env perl
2#2#
3# Detect cycles in the header file dependency graph3# Detect cycles in the header file dependency graph
4# Vegard Nossum <vegardno@ifi.uio.no>4# Vegard Nossum <vegardno@ifi.uio.no>
scripts/headers_check.pl+2−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2#2#
3# headers_check.pl execute a number of trivial consistency checks3# headers_check.pl execute a number of trivial consistency checks
4#4#
@@ -18,6 +18,7 @@ · 13 unmodified lines
18#18#
19# 3) Check for leaked CONFIG_ symbols19# 3) Check for leaked CONFIG_ symbols
20 20
21use warnings;
21use strict;22use strict;
22use File::Basename;23use File::Basename;
23 24
scripts/kconfig/streamline_config.pl+2−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2#2#
3# Copyright 2005-2009 - Steven Rostedt3# Copyright 2005-2009 - Steven Rostedt
4# Licensed under the terms of the GNU GPL License version 24# Licensed under the terms of the GNU GPL License version 2
@@ -42,6 +42,7 @@ · 37 unmodified lines
42# mv config_strip .config42# mv config_strip .config
43# make oldconfig43# make oldconfig
44#44#
45use warnings;
45use strict;46use strict;
46use Getopt::Long;47use Getopt::Long;
47 48
scripts/kernel-doc+2−1
@@ -1,5 +1,6 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2 2
3use warnings;
3use strict;4use strict;
4 5
5## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##6## Copyright (c) 1998 Michael Zucchi, All Rights Reserved ##
scripts/kernel-doc-xml-ref+2−1
@@ -1,5 +1,6 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2 2
3use warnings;
3use strict;4use strict;
4 5
5## Copyright (C) 2015 Intel Corporation ##6## Copyright (C) 2015 Intel Corporation ##
scripts/markup_oops.pl+1−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl1#!/usr/bin/env perl
2 2
3use File::Basename;3use File::Basename;
4use Math::BigInt;4use Math::BigInt;
scripts/namespace.pl+2−2
@@ -1,4 +1,4 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2#2#
3# namespace.pl. Mon Aug 30 20043# namespace.pl. Mon Aug 30 2004
4#4#
@@ -62,7 +62,7 @@ · 57 unmodified lines
62# result.62# result.
63#63#
64 64
65require 5; # at least perl 565use warnings;
66use strict;66use strict;
67use File::Find;67use File::Find;
68 68
scripts/profile2linkerlist.pl+1−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl1#!/usr/bin/env perl
2 2
3#3#
4# Takes a (sorted) output of readprofile and turns it into a list suitable for4# Takes a (sorted) output of readprofile and turns it into a list suitable for
scripts/recordmcount.pl+2−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl -w1#!/usr/bin/env perl
2# (c) 2008, Steven Rostedt <srostedt@redhat.com>2# (c) 2008, Steven Rostedt <srostedt@redhat.com>
3# Licensed under the terms of the GNU GPL License version 23# Licensed under the terms of the GNU GPL License version 2
4#4#
@@ -106,6 +106,7 @@ · 101 unmodified lines
106# 9) Move the result back to the original object.106# 9) Move the result back to the original object.
107#107#
108 108
109use warnings;
109use strict;110use strict;
110 111
111my $P = $0;112my $P = $0;
scripts/stackdelta+1−1
@@ -1,4 +1,4 @@
1#!/usr/bin/perl1#!/usr/bin/env perl
2 2
3# Read two files produced by the stackusage script, and show the3# Read two files produced by the stackusage script, and show the
4# delta between them.4# delta between them.