summaryrefslogtreecommitdiff
path: root/system/lvm2/bashism-configure.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/lvm2/bashism-configure.patch')
-rw-r--r--system/lvm2/bashism-configure.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/system/lvm2/bashism-configure.patch b/system/lvm2/bashism-configure.patch
new file mode 100644
index 000000000..5c9f3258c
--- /dev/null
+++ b/system/lvm2/bashism-configure.patch
@@ -0,0 +1,49 @@
+Upstream-URL: https://gitlab.com/lvmteam/lvm2/-/merge_requests/29
+
+From b0b259e3571b5be49d912e56518c9af734f317d4 Mon Sep 17 00:00:00 2001
+From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
+Date: Mon, 2 Jun 2025 04:08:08 +0000
+Subject: [PATCH] configure: Use portable string comparison
+
+= and == are equivalent in Bash for strings, but = is the only portable
+operator for compatibility with other shells. Before this change,
+running ./configure with Dash as /bin/sh resulted in:
+
+./configure: 14558: test: yes: unexpected operator
+
+and the test did not work (i.e. --enable-cmdlib --disable-shared allowed
+a failed build to continue). Now, the test works in Bash and Dash.
+---
+ configure | 2 +-
+ configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 342bd0047..75564a228 100755
+--- a/configure
++++ b/configure
+@@ -14564,7 +14564,7 @@ printf %s "checking whether to compile liblvm2cmd.so... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CMDLIB" >&5
+ printf "%s\n" "$CMDLIB" >&6; }
+
+-if test "$CMDLIB" == "yes" && test "$SHARED_LINK" = "no"
++if test "$CMDLIB" = "yes" && test "$SHARED_LINK" = "no"
+ then :
+ as_fn_error $? "--enable-cmdlib requires dynamic linking." "$LINENO" 5
+ fi
+diff --git a/configure.ac b/configure.ac
+index 6fcf6f2b5..470057be4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1395,7 +1395,7 @@ AS_IF([test "$CMDLIB" != "yes"], [CMDLIB="no" LVM2CMD_LIB=], [LVM2CMD_LIB="-llvm
+ AC_MSG_CHECKING([whether to compile liblvm2cmd.so])
+ AC_MSG_RESULT([$CMDLIB])
+
+-AS_IF([test "$CMDLIB" == "yes" && test "$SHARED_LINK" = "no"],
++AS_IF([test "$CMDLIB" = "yes" && test "$SHARED_LINK" = "no"],
+ [AC_MSG_ERROR([--enable-cmdlib requires dynamic linking.])])
+
+
+--
+2.40.0
+