aboutsummaryrefslogtreecommitdiff
path: root/repos/xorg/spacefm/spacefm-dash.patch
diff options
context:
space:
mode:
authoremmett1 <emmett1.2miligrams@protonmail.com>2024-06-29 23:15:54 +0800
committeremmett1 <emmett1.2miligrams@protonmail.com>2024-06-29 23:15:54 +0800
commitae4593e20cef97c7323d522b40994a59425cd6d5 (patch)
tree7b3e8750bbbfa32e917869e325027108ee59ee85 /repos/xorg/spacefm/spacefm-dash.patch
parentb5aa76f45da627817380276080b2b8bba6e74f68 (diff)
downloadalicelinux-ae4593e20cef97c7323d522b40994a59425cd6d5.tar.gz
alicelinux-ae4593e20cef97c7323d522b40994a59425cd6d5.zip
added xorg repo
Diffstat (limited to 'repos/xorg/spacefm/spacefm-dash.patch')
-rw-r--r--repos/xorg/spacefm/spacefm-dash.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/repos/xorg/spacefm/spacefm-dash.patch b/repos/xorg/spacefm/spacefm-dash.patch
new file mode 100644
index 00000000..7b99fee4
--- /dev/null
+++ b/repos/xorg/spacefm/spacefm-dash.patch
@@ -0,0 +1,47 @@
+https://github.com/IgnorantGuru/spacefm/pull/813
+
+From 30fc0024a8f023277537db1e168294c21ca3b9b0 Mon Sep 17 00:00:00 2001
+From: orbea <orbea@riseup.net>
+Date: Sun, 7 May 2023 07:31:56 -0700
+Subject: [PATCH] configure.ac: fix bad substitutions with dash
+
+Uses POSIX compatible substitutions that is not specific to bash.
+
+Gentoo-Issue: https://bugs.gentoo.org/891181
+---
+ configure.ac | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 035da60e2..ec080e03f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -40,11 +40,11 @@ bash_path="$withval"
+ # bash v4. SpaceFM runs bash as root and you WILL open root exploits if you
+ # disable this check, or run bash based on $PATH.
+ if test ! -z "$bash_path"; then
+- if test ! "${bash_path:0:1}" = "/"; then
++ if test "${bash_path%"${bash_path#?}"}" != "/"; then
+ AC_MSG_ERROR([Fatal Error: Option --with-bash-path requires absolute path.])
+ fi
+ echo "Modifying spacefm-auth to use bash path..."
+- bash_esc="${bash_path//\//\\/}"
++ bash_esc="$(printf %s "$bash_path" | sed "s|/|\\\/|g")"
+ sed "s/\(\/bin\/bash\)/$bash_esc/" src/spacefm-auth.bash > src/spacefm-auth
+ else
+ cp -pf src/spacefm-auth.bash src/spacefm-auth
+@@ -308,12 +308,12 @@ data/Makefile
+ ])
+
+ resolve_datadir="$(eval echo "$datadir")"
+-while [[ "${resolve_datadir:0:1}" == "$" ]]; do
++while test "${resolve_datadir%"${resolve_datadir#?}"}" = "\$"; do
+ resolve_datadir="$(eval echo "$resolve_datadir")"
+ done
+
+ resolve_htmldir="$(eval echo "$htmldir")"
+-while [[ "${resolve_htmldir:0:1}" == "$" ]]; do
++while test "${resolve_htmldir%"${resolve_htmldir#?}"}" = "\$"; do
+ resolve_htmldir="$(eval echo "$resolve_htmldir")"
+ done
+