Skip to contentSkip to conversation

Fix most Shebang lines

PATCH In review Finn Behrens 2 participants 2 messages Nov 23, 2020 – Nov 25, 2020

Subsystems (15)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Fix most Shebang lines

Change every shebang which does not need an argument to use /usr/bin/env. This is needed as not every distro has everything under /usr/bin, sometimes not even bash.

---
Should apply now, sorry for that.

 Documentation/sphinx/parse-headers.pl                           | 2 +-
 Documentation/target/tcm_mod_builder.py                         | 2 +-
 Documentation/trace/postprocess/decode_msr.py                   | 2 +-
 Documentation/trace/postprocess/trace-pagealloc-postprocess.pl  | 2 +-
 Documentation/trace/postprocess/trace-vmscan-postprocess.pl     | 2 +-
 arch/ia64/scripts/unwcheck.py                                   | 2 +-
 scripts/bloat-o-meter                                           | 2 +-
 scripts/config                                                  | 2 +-
 scripts/diffconfig                                              | 2 +-
 scripts/get_abi.pl                                              | 2 +-
 scripts/show_delta                                              | 2 +-
 scripts/sphinx-pre-install                                      | 2 +-
 scripts/split-man.pl                                            | 2 +-
 scripts/tracing/draw_functrace.py                               | 2 +-
 tools/perf/python/tracepoint.py                                 | 2 +-
 tools/perf/python/twatch.py                                     | 2 +-
 tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py      | 2 +-
 tools/testing/ktest/compare-ktest-sample.pl                     | 2 +-
 tools/testing/kunit/kunit.py                                    | 2 +-
 tools/testing/kunit/kunit_tool_test.py                          | 2 +-
 tools/testing/selftests/bpf/test_offload.py                     | 2 +-
 .../selftests/drivers/net/mlxsw/sharedbuffer_configuration.py   | 2 +-
 tools/testing/selftests/kselftest/prefix.pl                     | 2 +-
 tools/testing/selftests/net/devlink_port_split.py               | 2 +-
 tools/testing/selftests/tc-testing/tdc_batch.py                 | 2 +-
 tools/testing/selftests/tc-testing/tdc_multibatch.py            | 2 +-
 26 files changed, 26 insertions(+), 26 deletions(-)
Documentation/sphinx/parse-headers.pl +1 -1
index 1910079f984f..b063f2f1cfb2 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 use strict;
 use Text::Tabs;
 use Getopt::Long;
Documentation/target/tcm_mod_builder.py +1 -1
index 1548d8420499..54492aa813b9 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
 #
 # Copyright (c) 2010 Rising Tide Systems
Documentation/trace/postprocess/decode_msr.py +1 -1
index 0ab40e0db580..aa9cc7abd5c2 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # add symbolic names to read_msr / write_msr in trace
 # decode_msr msr-index.h < trace
 import sys
Documentation/trace/postprocess/trace-pagealloc-postprocess.pl +1 -1
index 0a120aae33ce..b9b7d80c2f9d 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # This is a POC (proof of concept or piece of crap, take your pick) for reading the
 # text representation of trace output related to page allocation. It makes an attempt
 # to extract some high-level information on what is going on. The accuracy of the parser
Documentation/trace/postprocess/trace-vmscan-postprocess.pl +1 -1
index 995da15b16ca..2f4e39875fb3 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # This is a POC for reading the text representation of trace output related to
 # page reclaim. It makes an attempt to extract some high-level information on
 # what is going on. The accuracy of the parser may vary
arch/ia64/scripts/unwcheck.py +1 -1
index c55276e31b6b..bfd1b671e35f 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 #
 # Usage: unwcheck.py FILE
scripts/bloat-o-meter +1 -1
index d7ca46c612b3..652e9542043f 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Copyright 2004 Matt Mackall <[email protected]>
 #
scripts/config +1 -1
index eee5b7f3a092..8c8d7c3d7acc 100755
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # SPDX-License-Identifier: GPL-2.0
 # Manipulate options in a .config file from the command line
 
scripts/diffconfig +1 -1
index 89abf777f197..627eba5849b5 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 #
 # diffconfig - a tool to compare .config files.
scripts/get_abi.pl +1 -1
index 68dab828a722..92d9aa6cc4f5 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0
 
 use strict;
scripts/show_delta +1 -1
index 264399307c4f..28e67e178194 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0-only
 #
 # show_deltas: Read list of printk messages instrumented with
scripts/sphinx-pre-install +1 -1
index 40fa6923e80a..828a8615a918 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0-or-later
 use strict;
 
scripts/split-man.pl +1 -1
index c3db607ee9ec..96bd99dc977a 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0
 #
 # Author: Mauro Carvalho Chehab <[email protected]>
scripts/tracing/draw_functrace.py +1 -1
index b65735758520..74f8aadfd4cb 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0-only
 
 """
tools/perf/python/tracepoint.py +1 -1
index eb76f6516247..461848c7f57d 100755
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 # -*- python -*-
 # -*- coding: utf-8 -*-
tools/perf/python/twatch.py +1 -1
index ff87ccf5b708..04f3db29b9bc 100755
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0-only
 # -*- python -*-
 # -*- coding: utf-8 -*-
tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py +1 -1
index 3c47865bb247..e15e20696d17 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0-only
 # -*- coding: utf-8 -*-
 #
tools/testing/ktest/compare-ktest-sample.pl +1 -1
index 4118eb4a842d..ebea21d0a1be 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0
 
 open (IN,"ktest.pl");
tools/testing/kunit/kunit.py +1 -1
index d4f7846d0745..21516e293d17 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 #
 # A thin wrapper on top of the KUnit Kernel
tools/testing/kunit/kunit_tool_test.py +1 -1
index 497ab51bc170..b593f4448e83 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 #
 # A collection of tests for tools/testing/kunit/kunit.py
tools/testing/selftests/bpf/test_offload.py +1 -1
index 43c9cda199b8..f736d34b89e1 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 # Copyright (C) 2017 Netronome Systems, Inc.
 # Copyright (c) 2019 Mellanox Technologies. All rights reserved
tools/testing/selftests/drivers/net/mlxsw/sharedbuffer_configuration.py +1 -1
index 0d4b9327c9b3..2223337eed0c 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 
 import subprocess
tools/testing/selftests/kselftest/prefix.pl +1 -1
index 31f7c2a0a8bd..12a7f4ca2684 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0
 # Prefix all lines with "# ", unbuffered. Command being piped in may need
 # to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd".
tools/testing/selftests/net/devlink_port_split.py +1 -1
index 58bb7e9b88ce..834066d465fc 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 
 from subprocess import PIPE, Popen
tools/testing/selftests/tc-testing/tdc_batch.py +1 -1
index 995f66ce43eb..35d5d9493784 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 """
 tdc_batch.py - a script to generate TC batch file
tools/testing/selftests/tc-testing/tdc_multibatch.py +1 -1
index 5e7237952e49..48e1f17ff2e8 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 """
 tdc_multibatch.py - a thin wrapper over tdc_batch.py to generate multiple batch
Signature · 1 line
2.29.2
#1 lore raw
Quoted 7 lines · Finn Behrens

Change every shebang which does not need an argument to use /usr/bin/env. This is needed as not every distro has everything under /usr/bin, sometimes not even bash.

---

Applied to linux-kbuild. Thanks.

Quoted 293 lines

Should apply now, sorry for that.

 Documentation/sphinx/parse-headers.pl                           | 2 +-
 Documentation/target/tcm_mod_builder.py                         | 2 +-
 Documentation/trace/postprocess/decode_msr.py                   | 2 +-
 Documentation/trace/postprocess/trace-pagealloc-postprocess.pl  | 2 +-
 Documentation/trace/postprocess/trace-vmscan-postprocess.pl     | 2 +-
 arch/ia64/scripts/unwcheck.py                                   | 2 +-
 scripts/bloat-o-meter                                           | 2 +-
 scripts/config                                                  | 2 +-
 scripts/diffconfig                                              | 2 +-
 scripts/get_abi.pl                                              | 2 +-
 scripts/show_delta                                              | 2 +-
 scripts/sphinx-pre-install                                      | 2 +-
 scripts/split-man.pl                                            | 2 +-
 scripts/tracing/draw_functrace.py                               | 2 +-
 tools/perf/python/tracepoint.py                                 | 2 +-
 tools/perf/python/twatch.py                                     | 2 +-
 tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py      | 2 +-
 tools/testing/ktest/compare-ktest-sample.pl                     | 2 +-
 tools/testing/kunit/kunit.py                                    | 2 +-
 tools/testing/kunit/kunit_tool_test.py                          | 2 +-
 tools/testing/selftests/bpf/test_offload.py                     | 2 +-
 .../selftests/drivers/net/mlxsw/sharedbuffer_configuration.py   | 2 +-
 tools/testing/selftests/kselftest/prefix.pl                     | 2 +-
 tools/testing/selftests/net/devlink_port_split.py               | 2 +-
 tools/testing/selftests/tc-testing/tdc_batch.py                 | 2 +-
 tools/testing/selftests/tc-testing/tdc_multibatch.py            | 2 +-
 26 files changed, 26 insertions(+), 26 deletions(-)
Documentation/sphinx/parse-headers.pl +1 -1
index 1910079f984f..b063f2f1cfb2 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 use strict;
 use Text::Tabs;
 use Getopt::Long;
Documentation/target/tcm_mod_builder.py +1 -1
index 1548d8420499..54492aa813b9 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # The TCM v4 multi-protocol fabric module generation script for drivers/target/$NEW_MOD
 #
 # Copyright (c) 2010 Rising Tide Systems
Documentation/trace/postprocess/decode_msr.py +1 -1
index 0ab40e0db580..aa9cc7abd5c2 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # add symbolic names to read_msr / write_msr in trace
 # decode_msr msr-index.h < trace
 import sys
Documentation/trace/postprocess/trace-pagealloc-postprocess.pl +1 -1
index 0a120aae33ce..b9b7d80c2f9d 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # This is a POC (proof of concept or piece of crap, take your pick) for reading the
 # text representation of trace output related to page allocation. It makes an attempt
 # to extract some high-level information on what is going on. The accuracy of the parser
Documentation/trace/postprocess/trace-vmscan-postprocess.pl +1 -1
index 995da15b16ca..2f4e39875fb3 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # This is a POC for reading the text representation of trace output related to
 # page reclaim. It makes an attempt to extract some high-level information on
 # what is going on. The accuracy of the parser may vary
arch/ia64/scripts/unwcheck.py +1 -1
index c55276e31b6b..bfd1b671e35f 100644
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 #
 # Usage: unwcheck.py FILE
scripts/bloat-o-meter +1 -1
index d7ca46c612b3..652e9542043f 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Copyright 2004 Matt Mackall <[email protected]>
 #
scripts/config +1 -1
index eee5b7f3a092..8c8d7c3d7acc 100755
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 # SPDX-License-Identifier: GPL-2.0
 # Manipulate options in a .config file from the command line
 
scripts/diffconfig +1 -1
index 89abf777f197..627eba5849b5 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 #
 # diffconfig - a tool to compare .config files.
scripts/get_abi.pl +1 -1
index 68dab828a722..92d9aa6cc4f5 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0
 
 use strict;
scripts/show_delta +1 -1
index 264399307c4f..28e67e178194 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0-only
 #
 # show_deltas: Read list of printk messages instrumented with
scripts/sphinx-pre-install +1 -1
index 40fa6923e80a..828a8615a918 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0-or-later
 use strict;
 
scripts/split-man.pl +1 -1
index c3db607ee9ec..96bd99dc977a 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0
 #
 # Author: Mauro Carvalho Chehab <[email protected]>
scripts/tracing/draw_functrace.py +1 -1
index b65735758520..74f8aadfd4cb 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0-only
 
 """
tools/perf/python/tracepoint.py +1 -1
index eb76f6516247..461848c7f57d 100755
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 # -*- python -*-
 # -*- coding: utf-8 -*-
tools/perf/python/twatch.py +1 -1
index ff87ccf5b708..04f3db29b9bc 100755
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0-only
 # -*- python -*-
 # -*- coding: utf-8 -*-
tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py +1 -1
index 3c47865bb247..e15e20696d17 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0-only
 # -*- coding: utf-8 -*-
 #
tools/testing/ktest/compare-ktest-sample.pl +1 -1
index 4118eb4a842d..ebea21d0a1be 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0
 
 open (IN,"ktest.pl");
tools/testing/kunit/kunit.py +1 -1
index d4f7846d0745..21516e293d17 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 #
 # A thin wrapper on top of the KUnit Kernel
tools/testing/kunit/kunit_tool_test.py +1 -1
index 497ab51bc170..b593f4448e83 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 #
 # A collection of tests for tools/testing/kunit/kunit.py
tools/testing/selftests/bpf/test_offload.py +1 -1
index 43c9cda199b8..f736d34b89e1 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 # Copyright (C) 2017 Netronome Systems, Inc.
 # Copyright (c) 2019 Mellanox Technologies. All rights reserved
tools/testing/selftests/drivers/net/mlxsw/sharedbuffer_configuration.py +1 -1
index 0d4b9327c9b3..2223337eed0c 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # SPDX-License-Identifier: GPL-2.0
 
 import subprocess
tools/testing/selftests/kselftest/prefix.pl +1 -1
index 31f7c2a0a8bd..12a7f4ca2684 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # SPDX-License-Identifier: GPL-2.0
 # Prefix all lines with "# ", unbuffered. Command being piped in may need
 # to have unbuffering forced with "stdbuf -i0 -o0 -e0 $cmd".
tools/testing/selftests/net/devlink_port_split.py +1 -1
index 58bb7e9b88ce..834066d465fc 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 
 from subprocess import PIPE, Popen
tools/testing/selftests/tc-testing/tdc_batch.py +1 -1
index 995f66ce43eb..35d5d9493784 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 
 """
 tdc_batch.py - a script to generate TC batch file
tools/testing/selftests/tc-testing/tdc_multibatch.py +1 -2
index 5e7237952e49..48e1f17ff2e8 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 # SPDX-License-Identifier: GPL-2.0
 """
 tdc_multibatch.py - a thin wrapper over tdc_batch.py to generate multiple batch
--

2.29.2

Signature · 2 lines
Best Regards
Masahiro Yamada