summarylogtreecommitdiffstats
path: root/20_linux_xen-remove-grub-submenu-for-multiple-xen-versions.patch
diff options
context:
space:
mode:
authorChris Chapman2020-08-09 10:59:50 +0000
committerChris Chapman2020-08-09 10:59:50 +0000
commit25515585428d1515bd844a95fdf404ea53092cff (patch)
treec96f84a8c0373cfa9c874a704c9c18b3d3cc2e67 /20_linux_xen-remove-grub-submenu-for-multiple-xen-versions.patch
parentc86a6d79ce214f4ad439cf49ce7ab578e6ceb8b4 (diff)
downloadaur-25515585428d1515bd844a95fdf404ea53092cff.tar.gz
Initialize a package to build the GRUB for the Xen platform
Since the time pvgrub2 was adopted by the GRUB [1], the AUR has not had a package that built GRUB2 for the Xen platform. I thought about contributing a patch to the `grub-git` AUR package, but since it would double their build targets (and compile time) for a purpose that was probably not important or useful for most of the users of that package (and since this also seemed like too much for this package to take on as well), I thought it might be better to fork their project and create a new package that would address all the GRUB-ish needs of Xen. The intent is that this would follow `grub-git`, rebasing it on that package as needed. Also some of these patches might be useful upstream, either for the `grub-git` AUR package or for the GRUB project itself. [1]: https://lists.xen.org/archives/html/xen-devel/2013-11/msg01216.html
Diffstat (limited to '20_linux_xen-remove-grub-submenu-for-multiple-xen-versions.patch')
-rw-r--r--20_linux_xen-remove-grub-submenu-for-multiple-xen-versions.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/20_linux_xen-remove-grub-submenu-for-multiple-xen-versions.patch b/20_linux_xen-remove-grub-submenu-for-multiple-xen-versions.patch
new file mode 100644
index 00000000000..4552ec51a40
--- /dev/null
+++ b/20_linux_xen-remove-grub-submenu-for-multiple-xen-versions.patch
@@ -0,0 +1,42 @@
+diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
+index 3b1f47049..bb12d4a76 100644
+--- a/util/grub.d/20_linux_xen.in
++++ b/util/grub.d/20_linux_xen.in
+@@ -245,9 +245,6 @@ while [ "x${xen_list}" != "x" ] ; do
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+ fi
+- if [ "x$is_top_level" != xtrue ]; then
+- echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
+- fi
+ if ($grub_file --is-arm64-efi $current_xen); then
+ xen_loader="xen_hypervisor"
+ module_loader="xen_module"
+@@ -328,15 +325,14 @@ while [ "x${xen_list}" != "x" ] ; do
+ linux_entry "${OS}" "${version}" "${xen_version}" simple \
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
+
+- submenu_indentation="$grub_tab$grub_tab"
++ submenu_indentation="$grub_tab"
+
+ if [ -z "$boot_device_id" ]; then
+ boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
+ fi
+ # TRANSLATORS: %s is replaced with an OS name
+ echo "submenu '$(gettext_printf "Advanced options for %s (with Xen hypervisor)" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
+- echo " submenu '$(gettext_printf "Xen hypervisor, version %s" "${xen_version}" | grub_quote)' \$menuentry_id_option 'xen-hypervisor-$xen_version-$boot_device_id' {"
+- is_top_level=false
++ is_top_level=false
+ fi
+
+ linux_entry "${OS}" "${version}" "${xen_version}" advanced \
+@@ -348,9 +344,6 @@ while [ "x${xen_list}" != "x" ] ; do
+
+ list=`echo $list | tr ' ' '\n' | fgrep -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' ' '`
+ done
+