summaryrefslogtreecommitdiff
path: root/user/grub/fix-deprecated-fgrep-usage.patch
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2023-05-10 10:51:41 -0700
committerZach van Rijn <me@zv.io>2023-05-10 10:51:41 -0700
commit44b0fed6a2dafab3ccce48a145d2e55722ae8fe5 (patch)
treebd8e4d777c70c77879e0ecc96965bd5f4f3e5ae4 /user/grub/fix-deprecated-fgrep-usage.patch
parent3532cc0386b927b1ee43c03bcebebb3330a6e821 (diff)
downloadpackages-44b0fed6a2dafab3ccce48a145d2e55722ae8fe5.tar.gz
packages-44b0fed6a2dafab3ccce48a145d2e55722ae8fe5.tar.bz2
packages-44b0fed6a2dafab3ccce48a145d2e55722ae8fe5.tar.xz
packages-44b0fed6a2dafab3ccce48a145d2e55722ae8fe5.zip
user/grub: add patch for deprecated fgrep usage. fixes #1027.
Diffstat (limited to 'user/grub/fix-deprecated-fgrep-usage.patch')
-rw-r--r--user/grub/fix-deprecated-fgrep-usage.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/user/grub/fix-deprecated-fgrep-usage.patch b/user/grub/fix-deprecated-fgrep-usage.patch
new file mode 100644
index 000000000..a37ce9912
--- /dev/null
+++ b/user/grub/fix-deprecated-fgrep-usage.patch
@@ -0,0 +1,75 @@
+diff -ur a/grub-core/lib/libgcrypt/src/libgcrypt-config.in b/grub-core/lib/libgcrypt/src/libgcrypt-config.in
+--- a/grub-core/lib/libgcrypt/src/libgcrypt-config.in 2023-05-10 17:44:15.293941096 +0000
++++ b/grub-core/lib/libgcrypt/src/libgcrypt-config.in 2023-05-10 17:44:42.164950456 +0000
+@@ -142,7 +142,7 @@
+
+ tmp=""
+ for i in $includes $cflags_final; do
+- if echo "$tmp" | fgrep -v -- "$i" >/dev/null; then
++ if echo "$tmp" | grep -F -v -- "$i" >/dev/null; then
+ tmp="$tmp $i"
+ fi
+ done
+@@ -163,7 +163,7 @@
+
+ tmp=""
+ for i in $libdirs $libs_final; do
+- if echo "$tmp" | fgrep -v -- "$i" >/dev/null; then
++ if echo "$tmp" | grep -F -v -- "$i" >/dev/null; then
+ tmp="$tmp $i"
+ fi
+ done
+diff -ur a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
+--- a/util/grub.d/10_hurd.in 2023-05-10 17:44:15.453935199 +0000
++++ b/util/grub.d/10_hurd.in 2023-05-10 17:44:42.088953259 +0000
+@@ -168,7 +168,7 @@
+ hurd_entry "$kernel" advanced
+ hurd_entry "$kernel" recovery
+
+- kernels=`echo $kernels | tr ' ' '\n' | fgrep -vx "$kernel" | tr '\n' ' '`
++ kernels=`echo $kernels | tr ' ' '\n' | grep -F -vx "$kernel" | tr '\n' ' '`
+ done
+
+ # If at least one kernel was found, then we need to
+diff -ur a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
+--- a/util/grub.d/10_kfreebsd.in 2023-05-10 17:44:15.453935199 +0000
++++ b/util/grub.d/10_kfreebsd.in 2023-05-10 17:44:42.164950456 +0000
+@@ -231,7 +231,7 @@
+ kfreebsd_entry "${OS}" "${version}" recovery "-s"
+ fi
+
+- list=`echo $list | tr ' ' '\n' | fgrep -vx "$kfreebsd" | tr '\n' ' '`
++ list=`echo $list | tr ' ' '\n' | grep -F -vx "$kfreebsd" | tr '\n' ' '`
+ done
+
+ # If at least one kernel was found, then we need to
+diff -ur a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+--- a/util/grub.d/10_linux.in 2023-05-10 17:44:15.453935199 +0000
++++ b/util/grub.d/10_linux.in 2023-05-10 17:44:42.160950604 +0000
+@@ -282,7 +282,7 @@
+ "single ${GRUB_CMDLINE_LINUX}"
+ fi
+
+- list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
++ list=`echo $list | tr ' ' '\n' | grep -F -vx "$linux" | tr '\n' ' '`
+ done
+
+ # If at least one kernel was found, then we need to
+diff -ur a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
+--- a/util/grub.d/20_linux_xen.in 2023-05-10 17:44:15.453935199 +0000
++++ b/util/grub.d/20_linux_xen.in 2023-05-10 17:44:42.156950751 +0000
+@@ -310,12 +310,12 @@
+ "single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
+ fi
+
+- list=`echo $list | tr ' ' '\n' | fgrep -vx "$linux" | tr '\n' ' '`
++ list=`echo $list | tr ' ' '\n' | grep -F -vx "$linux" | tr '\n' ' '`
+ done
+ if [ x"$is_top_level" != xtrue ]; then
+ echo ' }'
+ fi
+- xen_list=`echo $xen_list | tr ' ' '\n' | fgrep -vx "$current_xen" | tr '\n' ' '`
++ xen_list=`echo $xen_list | tr ' ' '\n' | grep -F -vx "$current_xen" | tr '\n' ' '`
+ done
+
+ # If at least one kernel was found, then we need to