summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@debian.org>2018-12-20 19:33:32 -0500
committerGravatar Benjamin Barenblat <bbaren@debian.org>2018-12-20 19:33:32 -0500
commitf5f556228e149559f2c17c03a3c5537767c5252b (patch)
treed6608d1fae0219c98e3e492db59f40b3e2c38f6e
parent51b791c497507a4119f7829b093cb66b76d1a350 (diff)
Use sh as the shell for rcm
rcm only requires a POSIX-compliant shell – not Bash. The various sh options in Debian are POSIX-compliant, and many of them are substantially faster than Bash. Force rcm to run under /bin/sh.
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/shebang.patch40
2 files changed, 41 insertions, 0 deletions
diff --git a/debian/patches/series b/debian/patches/series
index f3a1eda..d606c4a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
contributors.patch
macos.patch
+shebang.patch
diff --git a/debian/patches/shebang.patch b/debian/patches/shebang.patch
new file mode 100644
index 0000000..9366b9b
--- /dev/null
+++ b/debian/patches/shebang.patch
@@ -0,0 +1,40 @@
+From: Benjamin Barenblat <bbaren@debian.org>
+Subject: Always use /bin/sh to run rcm
+Forwarded: not-needed
+
+rcm only requires a POSIX-compliant shell – not Bash. The various sh
+options in Debian are POSIX-compliant, and many of them are
+substantially faster than Bash. Force rcm to run under /bin/sh,
+regardless of what shell’s interpreting the configure script.
+--- a/bin/lsrc.in
++++ b/bin/lsrc.in
+@@ -1,4 +1,4 @@
+-#!@SHELL@
++#!/bin/sh
+
+ : ${RCM_LIB:=$(dirname "$0")/../share/rcm}
+ . "$RCM_LIB/rcm.sh"
+--- a/bin/mkrc.in
++++ b/bin/mkrc.in
+@@ -1,4 +1,4 @@
+-#!@SHELL@
++#!/bin/sh
+
+ : ${RCM_LIB:=$(dirname "$0")/../share/rcm}
+ . "$RCM_LIB/rcm.sh"
+--- a/bin/rcdn.in
++++ b/bin/rcdn.in
+@@ -1,4 +1,4 @@
+-#!@SHELL@
++#!/bin/sh
+
+ : ${RCM_LIB:=$(dirname "$0")/../share/rcm}
+ . "$RCM_LIB/rcm.sh"
+--- a/bin/rcup.in
++++ b/bin/rcup.in
+@@ -1,4 +1,4 @@
+-#!@SHELL@
++#!/bin/sh
+
+ : ${RCM_LIB:=$(dirname "$0")/../share/rcm}
+ . "$RCM_LIB/rcm.sh"