Prepare for bash-completion-2.12
OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=490
This commit is contained in:
parent
7dfdb912ce
commit
132cb41b80
145
grub2-bash-completion-2.12.patch
Normal file
145
grub2-bash-completion-2.12.patch
Normal file
@ -0,0 +1,145 @@
|
||||
From: Werner Fink <werner@suse.de>
|
||||
Date: Thu, 29 Feb 2024 10:07:58 +000
|
||||
Subject: Make bash completion work with version 2.12 and before 2.11
|
||||
|
||||
Note that the shell function have() had become deprecated with 2.11
|
||||
and had been removed from 2.12 which is now providing _comp_have_command()
|
||||
|
||||
resolves boo#1220626
|
||||
|
||||
---
|
||||
util/bash-completion.d/grub-completion.bash.in | 38 ++++++++++++++++---------
|
||||
1 file changed, 25 insertions(+), 13 deletions(-)
|
||||
|
||||
--- a/util/bash-completion.d/grub-completion.bash.in
|
||||
+++ b/util/bash-completion.d/grub-completion.bash.in 2024-02-29 10:04:52.197876569 +0000
|
||||
@@ -17,6 +17,18 @@
|
||||
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
||||
# bash completion for grub
|
||||
|
||||
+if test "$(type -t _comp_have_command)" = function
|
||||
+then
|
||||
+ _have() {
|
||||
+ _comp_have_command $1
|
||||
+ }
|
||||
+elif test "$(type -t have)" = function
|
||||
+then
|
||||
+ _have() {
|
||||
+ have $1
|
||||
+ }
|
||||
+fi
|
||||
+
|
||||
__grub_dir() {
|
||||
local i c=1 boot_dir
|
||||
|
||||
@@ -177,12 +189,12 @@ _grub_set_entry () {
|
||||
}
|
||||
|
||||
__grub_set_default_program="@grub_set_default@"
|
||||
-have ${__grub_set_default_program} && \
|
||||
+_have ${__grub_set_default_program} && \
|
||||
complete -F _grub_set_entry -o filenames ${__grub_set_default_program}
|
||||
unset __grub_set_default_program
|
||||
|
||||
__grub_reboot_program="@grub_reboot@"
|
||||
-have ${__grub_reboot_program} && \
|
||||
+_have ${__grub_reboot_program} && \
|
||||
complete -F _grub_set_entry -o filenames ${__grub_reboot_program}
|
||||
unset __grub_reboot_program
|
||||
|
||||
@@ -209,7 +221,7 @@ _grub_editenv () {
|
||||
}
|
||||
|
||||
__grub_editenv_program="@grub_editenv@"
|
||||
-have ${__grub_editenv_program} && \
|
||||
+_have ${__grub_editenv_program} && \
|
||||
complete -F _grub_editenv -o filenames ${__grub_editenv_program}
|
||||
unset __grub_editenv_program
|
||||
|
||||
@@ -230,7 +242,7 @@ _grub_mkconfig () {
|
||||
fi
|
||||
}
|
||||
__grub_mkconfig_program="@grub_mkconfig@"
|
||||
-have ${__grub_mkconfig_program} && \
|
||||
+_have ${__grub_mkconfig_program} && \
|
||||
complete -F _grub_mkconfig -o filenames ${__grub_mkconfig_program}
|
||||
unset __grub_mkconfig_program
|
||||
|
||||
@@ -265,12 +277,12 @@ _grub_setup () {
|
||||
}
|
||||
|
||||
__grub_bios_setup_program="@grub_bios_setup@"
|
||||
-have ${__grub_bios_setup_program} && \
|
||||
+_have ${__grub_bios_setup_program} && \
|
||||
complete -F _grub_setup -o filenames ${__grub_bios_setup_program}
|
||||
unset __grub_bios_setup_program
|
||||
|
||||
__grub_sparc64_setup_program="@grub_sparc64_setup@"
|
||||
-have ${__grub_sparc64_setup_program} && \
|
||||
+_have ${__grub_sparc64_setup_program} && \
|
||||
complete -F _grub_setup -o filenames ${__grub_sparc64_setup_program}
|
||||
unset __grub_sparc64_setup_program
|
||||
|
||||
@@ -316,7 +328,7 @@ _grub_install () {
|
||||
fi
|
||||
}
|
||||
__grub_install_program="@grub_install@"
|
||||
-have ${__grub_install_program} && \
|
||||
+_have ${__grub_install_program} && \
|
||||
complete -F _grub_install -o filenames ${__grub_install_program}
|
||||
unset __grub_install_program
|
||||
|
||||
@@ -338,7 +350,7 @@ _grub_mkfont () {
|
||||
fi
|
||||
}
|
||||
__grub_mkfont_program="@grub_mkfont@"
|
||||
-have ${__grub_mkfont_program} && \
|
||||
+_have ${__grub_mkfont_program} && \
|
||||
complete -F _grub_mkfont -o filenames ${__grub_mkfont_program}
|
||||
unset __grub_mkfont_program
|
||||
|
||||
@@ -369,7 +381,7 @@ _grub_mkrescue () {
|
||||
fi
|
||||
}
|
||||
__grub_mkrescue_program="@grub_mkrescue@"
|
||||
-have ${__grub_mkrescue_program} && \
|
||||
+_have ${__grub_mkrescue_program} && \
|
||||
complete -F _grub_mkrescue -o filenames ${__grub_mkrescue_program}
|
||||
unset __grub_mkrescue_program
|
||||
|
||||
@@ -411,7 +423,7 @@ _grub_mkimage () {
|
||||
fi
|
||||
}
|
||||
__grub_mkimage_program="@grub_mkimage@"
|
||||
-have ${__grub_mkimage_program} && \
|
||||
+_have ${__grub_mkimage_program} && \
|
||||
complete -F _grub_mkimage -o filenames ${__grub_mkimage_program}
|
||||
unset __grub_mkimage_program
|
||||
|
||||
@@ -433,7 +445,7 @@ _grub_mkpasswd_pbkdf2 () {
|
||||
fi
|
||||
}
|
||||
__grub_mkpasswd_pbkdf2_program="@grub_mkpasswd_pbkdf2@"
|
||||
-have ${__grub_mkpasswd_pbkdf2_program} && \
|
||||
+_have ${__grub_mkpasswd_pbkdf2_program} && \
|
||||
complete -F _grub_mkpasswd_pbkdf2 -o filenames ${__grub_mkpasswd_pbkdf2_program}
|
||||
unset __grub_mkpasswd_pbkdf2_program
|
||||
|
||||
@@ -471,7 +483,7 @@ _grub_probe () {
|
||||
fi
|
||||
}
|
||||
__grub_probe_program="@grub_probe@"
|
||||
-have ${__grub_probe_program} && \
|
||||
+_have ${__grub_probe_program} && \
|
||||
complete -F _grub_probe -o filenames ${__grub_probe_program}
|
||||
unset __grub_probe_program
|
||||
|
||||
@@ -493,7 +505,7 @@ _grub_script_check () {
|
||||
fi
|
||||
}
|
||||
__grub_script_check_program="@grub_script_check@"
|
||||
-have ${__grub_script_check_program} && \
|
||||
+_have ${__grub_script_check_program} && \
|
||||
complete -F _grub_script_check -o filenames ${__grub_script_check_program}
|
||||
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 29 10:12:12 UTC 2024 - Dr. Werner Fink <werner@suse.de>
|
||||
|
||||
- Add patch grub2-bash-completion-2.12.patch
|
||||
The shell function have() had become deprecated with 2.11
|
||||
and had been removed from 2.12 which is now providing
|
||||
the shell function _comp_have_command() (boo#1220626)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 22 04:19:21 UTC 2024 - Michael Chang <mchang@suse.com>
|
||||
|
||||
|
@ -393,6 +393,7 @@ Patch199: 0001-squash-ieee1275-ofpath-enable-NVMeoF-logical-device-.patch
|
||||
Patch200: 0001-ofdisk-enhance-boot-time-by-focusing-on-boot-disk-re.patch
|
||||
Patch201: 0002-ofdisk-add-early_log-support.patch
|
||||
Patch202: 0001-disk-Optimize-disk-iteration-by-moving-memdisk-to-th.patch
|
||||
Patch203: grub2-bash-completion-2.12.patch
|
||||
|
||||
Requires: gettext-runtime
|
||||
%if 0%{?suse_version} >= 1140
|
||||
|
Loading…
Reference in New Issue
Block a user