File 0008-Make-shebang-for-python-an-absolute-command-path.patch of Package systemd-v234-testsuite
From 8c64c51eee74e9aa3fe7575db2eaed259639ae8f Mon Sep 17 00:00:00 2001
From: Thomas Blume <thomas.blume@suse.com>
Date: Tue, 22 Jan 2019 11:16:33 +0100
Subject: [PATCH 08/11] Make shebang for python an absolute command path
These scripts use 'env' as an interpreter. For the rpm runtime dependency
detection to work, the shebang #!/usr/bin/env python needs to be patched into
#!/usr/bin/python otherwise the package dependency generator merely adds a
dependency on /usr/bin/env rather than the actual interpreter /usr/bin/python.
Alternatively, if the file should not be executed, then ensure that it is not
marked as executable or don't install it in a path that is reserved for
executables.
---
hwdb/acpi-update.py | 2 +-
hwdb/parse_hwdb.py | 2 +-
test/create-sys-script.py | 2 +-
test/networkd-test.py | 2 +-
test/rule-syntax-check.py | 2 +-
test/sys-script.py | 2 +-
test/sysv-generator-test.py | 2 +-
test/test-exec-deserialization.py | 2 +-
tools/catalog-report.py | 2 +-
tools/make-directive-index.py | 2 +-
tools/make-man-index.py | 2 +-
tools/make-man-rules.py | 2 +-
tools/xml_helper.py | 2 +-
13 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/hwdb/acpi-update.py b/hwdb/acpi-update.py
index 2c23b057fb..50da531dc6 100755
--- a/hwdb/acpi-update.py
+++ b/hwdb/acpi-update.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
from html.parser import HTMLParser
from enum import Enum
diff --git a/hwdb/parse_hwdb.py b/hwdb/parse_hwdb.py
index c7b49b83df..4a328fefb6 100755
--- a/hwdb/parse_hwdb.py
+++ b/hwdb/parse_hwdb.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
#
# This file is part of systemd. It is distrubuted under the MIT license, see
diff --git a/test/create-sys-script.py b/test/create-sys-script.py
index 402b4f83ab..47188e2dc9 100755
--- a/test/create-sys-script.py
+++ b/test/create-sys-script.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
OUTFILE_HEADER = """#!/usr/bin/env python3
#
diff --git a/test/networkd-test.py b/test/networkd-test.py
index eee8b65ec0..78cb9f84d3 100755
--- a/test/networkd-test.py
+++ b/test/networkd-test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
#
# networkd integration test
# This uses temporary configuration in /run and temporary veth devices, and
diff --git a/test/rule-syntax-check.py b/test/rule-syntax-check.py
index bb2e65f751..68dd468d64 100755
--- a/test/rule-syntax-check.py
+++ b/test/rule-syntax-check.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# Simple udev rules syntax checker
#
# (C) 2010 Canonical Ltd.
diff --git a/test/sys-script.py b/test/sys-script.py
index 6c9ee5ff83..a9c0046667 100755
--- a/test/sys-script.py
+++ b/test/sys-script.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
#
# sys-script.py
#
diff --git a/test/sysv-generator-test.py b/test/sysv-generator-test.py
index 73a045265e..15db302b44 100755
--- a/test/sysv-generator-test.py
+++ b/test/sysv-generator-test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
#
# systemd-sysv-generator integration test
#
diff --git a/test/test-exec-deserialization.py b/test/test-exec-deserialization.py
index 39a9e62e15..b974b1c133 100755
--- a/test/test-exec-deserialization.py
+++ b/test/test-exec-deserialization.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
#
# Copyright 2017 Michal Sekletar <msekleta@redhat.com>
diff --git a/tools/catalog-report.py b/tools/catalog-report.py
index 357e498cdc..b220060cc8 100755
--- a/tools/catalog-report.py
+++ b/tools/catalog-report.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
#
# This file is part of systemd. It is distrubuted under the MIT license, see
diff --git a/tools/make-directive-index.py b/tools/make-directive-index.py
index 1b287997fa..8ce09ca2fa 100755
--- a/tools/make-directive-index.py
+++ b/tools/make-directive-index.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
#
# This file is part of systemd.
diff --git a/tools/make-man-index.py b/tools/make-man-index.py
index abc33e7394..50ad9532cd 100755
--- a/tools/make-man-index.py
+++ b/tools/make-man-index.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
#
# This file is part of systemd.
diff --git a/tools/make-man-rules.py b/tools/make-man-rules.py
index e9e39f10af..ecb9d2d9b5 100755
--- a/tools/make-man-rules.py
+++ b/tools/make-man-rules.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
#
# This file is part of systemd.
diff --git a/tools/xml_helper.py b/tools/xml_helper.py
index 0088be5bd9..b2c036909d 100755
--- a/tools/xml_helper.py
+++ b/tools/xml_helper.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/python3
# -*- Mode: python; coding: utf-8; indent-tabs-mode: nil -*- */
#
# This file is part of systemd.
--
2.16.4