Skip to content

Commit

Permalink
fgrep-is-obsolescent-using-grep-F.patch
Browse files Browse the repository at this point in the history
  • Loading branch information
phoepsilonix committed Oct 10, 2022
1 parent ecaead6 commit 8dfe342
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PKGBUILD
Expand Up @@ -70,6 +70,7 @@ source=("git+https://git.savannah.gnu.org/git/grub.git#commit=${_commit}"
'grub-export-path.patch'
'grub-manjaro-modifications.patch'
'grub-use-efivarfs.patch'
'fgrep-is-obsolescent-using-grep-F.patch'
'0001-grub-maybe_quiet.patch'
'0002-grub-gettext_quiet.patch'
'0003-grub-quick-boot.patch'
Expand All @@ -88,6 +89,7 @@ sha256sums=('SKIP'
'5dee6628c48eef79812bb9e86ee772068d85e7fcebbd2b2b8d1e19d24eda9dab'
'63c611189a60d68c6ae094f2ced91ac576b3921b7fd2e75a551c2dc6baefc35e'
'40f23e1a36fd4f9821d63bdec0c4334aeb3ceddde15857a21c97c0002fd4900f'
'ddfda7c170fe386fa340440178096260ae72b5cbab23f2566634b7c54f812a07'
'20b2b6e7f501596b5cce6ffa05906980427f760c03d308d0e045cf2ecf47bb0e'
'a522514edb264374c8cce08998c5586ffc832091c5db1be7bf8b21078223e2a6'
'39d7843dfe1e10ead912a81be370813b8621794a7967b3cc5e4d4188b5bf7264'
Expand Down Expand Up @@ -155,6 +157,9 @@ prepare() {
echo "Patch to include Manjaro Linux Modifications"
patch -Np1 -i "${srcdir}/grub-manjaro-modifications.patch"

echo "Patch to fgrep is obsolescent using grep -F"
patch -Np1 -i "${srcdir}/fgrep-is-obsolescent-using-grep-F.patch"

echo "Add Ubuntu patches"
echo "0001"
patch -Np1 -i "${srcdir}/0001-grub-maybe_quiet.patch"
Expand Down
96 changes: 96 additions & 0 deletions fgrep-is-obsolescent-using-grep-F.patch
@@ -0,0 +1,96 @@
From 5d3bf2809cfb3afe74d4d07bd578bbc3d16194bb Mon Sep 17 00:00:00 2001
From: Masato Toyoshima <phoepsilonix@gmail.com>
Date: Mon, 10 Oct 2022 23:11:02 +0900
Subject: [PATCH] fgrep-is-obsolescent-using-grep-F.patch

---
grub-core/lib/libgcrypt/src/libgcrypt-config.in | 4 ++--
util/grub.d/10_hurd.in | 2 +-
util/grub.d/10_kfreebsd.in | 2 +-
util/grub.d/10_linux.in | 2 +-
util/grub.d/20_linux_xen.in | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/grub-core/lib/libgcrypt/src/libgcrypt-config.in b/grub-core/lib/libgcrypt/src/libgcrypt-config.in
index c052638cd..84f3b26df 100644
--- a/grub-core/lib/libgcrypt/src/libgcrypt-config.in
+++ b/grub-core/lib/libgcrypt/src/libgcrypt-config.in
@@ -142,7 +142,7 @@ if test "$echo_cflags" = "yes"; then

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 @@ if test "$echo_libs" = "yes"; then

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 --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in
index 2fafa4e59..b26c2567d 100644
--- a/util/grub.d/10_hurd.in
+++ b/util/grub.d/10_hurd.in
@@ -222,7 +222,7 @@ while [ "x$kernels" != "x" ] ; do
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 --git a/util/grub.d/10_kfreebsd.in b/util/grub.d/10_kfreebsd.in
index 199b20e16..0ed082f05 100644
--- a/util/grub.d/10_kfreebsd.in
+++ b/util/grub.d/10_kfreebsd.in
@@ -239,7 +239,7 @@ while [ "x$list" != "x" ] ; do
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 --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index b4a4d6900..4b22eeadc 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -296,7 +296,7 @@ while [ "x$list" != "x" ] ; do
"${GRUB_CMDLINE_LINUX_RECOVERY} ${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 --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
index 51a983926..d6e299b99 100644
--- a/util/grub.d/20_linux_xen.in
+++ b/util/grub.d/20_linux_xen.in
@@ -352,12 +352,12 @@ while [ "x${xen_list}" != "x" ] ; do
"${GRUB_CMDLINE_LINUX_RECOVERY} ${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
--
2.37.3

0 comments on commit 8dfe342

Please sign in to comment.