]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
scripts: Switch to more portable Perl shebang
authorKamil Rytarowski <n54@gmx.com>
Sun, 7 May 2017 21:25:26 +0000 (23:25 +0200)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Sun, 14 May 2017 02:20:44 +0000 (11:20 +0900)
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?).

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
24 files changed:
scripts/bootgraph.pl
scripts/checkincludes.pl
scripts/checkpatch.pl
scripts/checkstack.pl
scripts/checkversion.pl
scripts/cleanfile
scripts/cleanpatch
scripts/dtc/dt_to_config
scripts/export_report.pl
scripts/extract-module-sig.pl
scripts/extract-sys-certs.pl
scripts/extract_xc3028.pl
scripts/get_dvb_firmware
scripts/get_maintainer.pl
scripts/headerdep.pl
scripts/headers_check.pl
scripts/kconfig/streamline_config.pl
scripts/kernel-doc
scripts/kernel-doc-xml-ref
scripts/markup_oops.pl
scripts/namespace.pl
scripts/profile2linkerlist.pl
scripts/recordmcount.pl
scripts/stackdelta

index 9ca667bcaee95024750d8fdc4febad2f8d5f6d76..594c55541b1623aacb78eb986356f14383502157 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Copyright 2008, Intel Corporation
 #
index 381c018a461297881c4c704c0a71854bb87b65b4..ce9edefd6e0be32ca34b26cb47f61d35a3a2fa9d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #
 # checkincludes: find/remove files included more than once
 #
index 4b9569fa931b90200a2c809598fe3765b157fbb7..3465a7c5a154899dce70459fd9eee56132e6808a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # (c) 2001, Dave Jones. (the file handling bit)
 # (c) 2005, Joel Schopp <jschopp@austin.ibm.com> (the ugly bit)
 # (c) 2007,2008, Andy Whitcroft <apw@uk.ibm.com> (new conditions, test suite)
@@ -6,6 +6,7 @@
 # Licensed under the terms of the GNU GPL License version 2
 
 use strict;
+use warnings;
 use POSIX;
 use File::Basename;
 use Cwd 'abs_path';
index 9d37aa4faf5ce8ce2719c71921ee7ab0eabc22a1..7f4c41717e265e608483304983e71e01237517ef 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #      Check the stack usage of functions
 #
index 5e490a8ceca5582e3003890cf34a21c33447969f..8b4f205234b539b71e748f925b6a8f1254935795 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#! /usr/bin/env perl
 #
 # checkversion find uses of LINUX_VERSION_CODE or KERNEL_VERSION
 # without including <linux/version.h>, or cases of
index cefd29e5229880ce1dfb5b6ef64be1393b34380a..72e3755327ae0563d07224ba12b8d24347a08d11 100755 (executable)
@@ -1,9 +1,10 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # Clean a text file -- or directory of text files -- of stealth whitespace.
 # WARNING: this can be a highly destructive operation.  Use with caution.
 #
 
+use warnings;
 use bytes;
 use File::Basename;
 
index 9680d03ad2b8e5dfb23b45079999382abba3fe85..3e5a2303dc0e744508804a3b136e0ba681cc9436 100755 (executable)
@@ -1,9 +1,10 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # Clean a patch file -- or directory of patch files -- of stealth whitespace.
 # WARNING: this can be a highly destructive operation.  Use with caution.
 #
 
+use warnings;
 use bytes;
 use File::Basename;
 
index 9a248b505c58572e8012808fba6d5b4bdf494c85..5dfd1bff351f764e3c686df7edb6f6661203f59f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Copyright 2016 by Frank Rowand
 # Copyright 2016 by Gaurav Minocha
index 8f79b701de876a807ae76abd89ad077d65ef3390..68ff426b347c7f0e7bc1d15659b69a77d7b4727d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # (C) Copyright IBM Corporation 2006.
 #      Released under GPL v2.
@@ -7,6 +7,7 @@
 # Usage: export_report.pl -k Module.symvers [-o report_file ] -f *.mod.c
 #
 
+use warnings;
 use Getopt::Std;
 use strict;
 
index faac6f2e377fac754d32f017444cd2c96dd45b07..0f161ea4126157fd673d755570b107e67357135a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # extract-mod-sig <part> <module-file>
 #
@@ -12,6 +12,7 @@
 #  -k: Just the key ID
 #  -s: Just the crypto signature or PKCS#7 message
 #
+use warnings;
 use strict;
 
 die "Format: $0 -[0adnks] module-file >out\n"
index 8227ca10a4942b688aacd3ef64e3f8ad7ec9b33e..2aa873b944e0a5666868c91760b4d9829006e759 100755 (executable)
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
+use warnings;
 use strict;
 use Math::BigInt;
 use Fcntl "SEEK_SET";
index 47877deae6d7f60fe790bb4873df8f649162b691..61d9b256c6581b34f269a5a8dbf880ade359503f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Copyright (c) Mauro Carvalho Chehab <mchehab@infradead.org>
 # Released under GPLv2
index 1a0a04125f713cb586549e1f5315501447eb65de..f3f230225aba0ab955e315573dd8866eafcbe54e 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #     DVB firmware extractor
 #
 #     (c) 2004 Andrew de Quincey
index 633f2dd3de279fda4799ca41ba88553e1c963961..3bd5f4f302354cf8cecd78ae0ab13b9b3bf130ef 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # (c) 2007, Joe Perches <joe@perches.com>
 #           created from checkpatch.pl
 #
@@ -10,6 +10,7 @@
 #
 # Licensed under the terms of the GNU GPL License version 2
 
+use warnings;
 use strict;
 
 my $P = $0;
index 8dd019bc5a7361631c71dc1d5e33095b6f42b6a1..86ebb9ee7570782c565d728becb97b66f6c4ffc0 100755 (executable)
@@ -1,4 +1,4 @@
-#! /usr/bin/perl
+#! /usr/bin/env perl
 #
 # Detect cycles in the header file dependency graph
 # Vegard Nossum <vegardno@ifi.uio.no>
index 8b2da054cdc30a0ddeaf1d59dee73d220083d57c..3091e4ee6ee1329d6224266ae788f4776f8fe073 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # headers_check.pl execute a number of trivial consistency checks
 #
@@ -18,6 +18,7 @@
 #
 # 3) Check for leaked CONFIG_ symbols
 
+use warnings;
 use strict;
 use File::Basename;
 
index b8c7b29affc59d4da88998a7fd379f6307dc64af..a2e83ab17de3cc2c4c5a15f06b8c0f0eecc4ed99 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # Copyright 2005-2009 - Steven Rostedt
 # Licensed under the terms of the GNU GPL License version 2
@@ -42,6 +42,7 @@
 #    mv config_strip .config
 #    make oldconfig
 #
+use warnings;
 use strict;
 use Getopt::Long;
 
index a26a5f2dce39431497bd430ab605dd061c98009c..7b0a8f01fed5af3c07589c166d78ea442e3cab73 100755 (executable)
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
+use warnings;
 use strict;
 
 ## Copyright (c) 1998 Michael Zucchi, All Rights Reserved        ##
index 104a5a5ba2c8e2bc2c1fa3792818c10cc5c8d90a..e3b24bfc804c3681d5b774bf4c023a4360e2487c 100755 (executable)
@@ -1,5 +1,6 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 
+use warnings;
 use strict;
 
 ## Copyright (C) 2015  Intel Corporation                         ##
index c21d16328d3f2bae0ccaba40029a7e1f83229b6a..70dcfb6b3de1cb4d2a8e4093f0513ed4fafb0250 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use File::Basename;
 use Math::BigInt;
index 9f3c9d47a4a5d89c4e95de825f67d84b0258f0df..729c547fc9e1ef54400db1f06e5cf98c592bf290 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 #      namespace.pl.  Mon Aug 30 2004
 #
@@ -62,7 +62,7 @@
 #        result.
 #
 
-require 5;     # at least perl 5
+use warnings;
 use strict;
 use File::Find;
 
index 6943fa7cc95b646d9f1a10752cf2577f4b1a2185..f23d7be943948df09dd037b9679c9cf0de5c6873 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 # Takes a (sorted) output of readprofile and turns it into a list suitable for
index 1633c3e6c0b95af1933339b195b2f68527c639d8..2033af758173c7c02ed02b77b8c8686a43201ad6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 # (c) 2008, Steven Rostedt <srostedt@redhat.com>
 # Licensed under the terms of the GNU GPL License version 2
 #
 # 9) Move the result back to the original object.
 #
 
+use warnings;
 use strict;
 
 my $P = $0;
index 48eabf2f48f85212bd5202c40ca6eab530b285a3..20a79f19a111d7ad319c91c3f53d105524530619 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 # Read two files produced by the stackusage script, and show the
 # delta between them.