From b346757383170e1377688073f91d06a4bf7cdf88f74a4bda20fe803ef85a9d50 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Fri, 30 Oct 2015 10:01:48 +0000 Subject: [PATCH 1/3] Accepting request 341430 from home:michael-chang:branches:Base:System - Add missing quoting for linuxefi (bsc#951962) * modified grub2-secureboot-use-linuxefi-on-uefi.patch * refreshed grub2-secureboot-provide-linuxefi-config.patch OBS-URL: https://build.opensuse.org/request/show/341430 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=184 --- grub2-secureboot-provide-linuxefi-config.patch | 4 ++-- grub2-secureboot-use-linuxefi-on-uefi.patch | 4 ++-- grub2.changes | 7 +++++++ grub2.spec | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/grub2-secureboot-provide-linuxefi-config.patch b/grub2-secureboot-provide-linuxefi-config.patch index d313c9b..3628b26 100644 --- a/grub2-secureboot-provide-linuxefi-config.patch +++ b/grub2-secureboot-provide-linuxefi-config.patch @@ -50,7 +50,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in - if [ -d /sys/firmware/efi ]; then + if [ -d /sys/firmware/efi ] && [ "x${GRUB_USE_LINUXEFI}" = "xtrue" ]; then sed "s/^/$submenu_indentation/" << EOF - echo '$message' + echo '$(echo "$message" | grub_quote)' linuxefi ${rel_dirname}/${basename} ${root_device} ${args} @@ -147,7 +147,7 @@ EOF if test -n "${initrd}" ; then @@ -59,5 +59,5 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in - if [ -d /sys/firmware/efi ]; then + if [ -d /sys/firmware/efi ] && [ "x${GRUB_USE_LINUXEFI}" = "xtrue" ]; then sed "s/^/$submenu_indentation/" << EOF - echo '$message' + echo '$(echo "$message" | grub_quote)' initrdefi ${rel_dirname}/${initrd} diff --git a/grub2-secureboot-use-linuxefi-on-uefi.patch b/grub2-secureboot-use-linuxefi-on-uefi.patch index ce7f8e6..23c28a6 100644 --- a/grub2-secureboot-use-linuxefi-on-uefi.patch +++ b/grub2-secureboot-use-linuxefi-on-uefi.patch @@ -22,7 +22,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in - sed "s/^/$submenu_indentation/" << EOF + if [ -d /sys/firmware/efi ]; then + sed "s/^/$submenu_indentation/" << EOF -+ echo '$message' ++ echo '$(echo "$message" | grub_quote)' + linuxefi ${rel_dirname}/${basename} ${root_device} ${args} +EOF + else @@ -37,7 +37,7 @@ Index: grub-2.02~beta2/util/grub.d/10_linux.in - sed "s/^/$submenu_indentation/" << EOF + if [ -d /sys/firmware/efi ]; then + sed "s/^/$submenu_indentation/" << EOF -+ echo '$message' ++ echo '$(echo "$message" | grub_quote)' + initrdefi ${rel_dirname}/${initrd} +EOF + else diff --git a/grub2.changes b/grub2.changes index b8b1784..87aebfd 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Oct 29 04:17:08 UTC 2015 - mchang@suse.com + +- Add missing quoting for linuxefi (bsc#951962) + * modified grub2-secureboot-use-linuxefi-on-uefi.patch + * refreshed grub2-secureboot-provide-linuxefi-config.patch + ------------------------------------------------------------------- Sun Oct 18 11:45:10 UTC 2015 - eich@suse.com diff --git a/grub2.spec b/grub2.spec index 250b7f0..d7ec470 100644 --- a/grub2.spec +++ b/grub2.spec @@ -1,7 +1,7 @@ # # spec file for package grub2 # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed From c75a5674a1461b147b0a5e6ef1fc92927a1514d5bfedf83d8277f56178921a1b Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Sat, 31 Oct 2015 13:21:40 +0000 Subject: [PATCH 2/3] Accepting request 341627 from home:michael-chang:branches:Base:System - Allow to execute menuentry unrestricted as default (fate#318574) * added grub2-menu-unrestricted.patch OBS-URL: https://build.opensuse.org/request/show/341627 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=185 --- grub2-menu-unrestricted.patch | 23 +++++++++++++++++++++++ grub2.changes | 6 ++++++ grub2.spec | 2 ++ 3 files changed, 31 insertions(+) create mode 100644 grub2-menu-unrestricted.patch diff --git a/grub2-menu-unrestricted.patch b/grub2-menu-unrestricted.patch new file mode 100644 index 0000000..c4a1e5f --- /dev/null +++ b/grub2-menu-unrestricted.patch @@ -0,0 +1,23 @@ +Index: grub-2.02~beta2/grub-core/normal/menu.c +=================================================================== +--- grub-2.02~beta2.orig/grub-core/normal/menu.c ++++ grub-2.02~beta2/grub-core/normal/menu.c +@@ -213,7 +213,17 @@ grub_menu_execute_entry(grub_menu_entry_ + grub_size_t sz = 0; + + if (entry->restricted) +- err = grub_auth_check_authentication (entry->users); ++ { ++ int auth_check = 1; ++ if (entry->users && entry->users[0] == 0) ++ { ++ const char *unr = grub_env_get ("unrestricted_menu"); ++ if (unr && (unr[0] == '1' || unr[0] == 'y')) ++ auth_check = 0; ++ } ++ if (auth_check) ++ err = grub_auth_check_authentication (entry->users); ++ } + + if (err) + { diff --git a/grub2.changes b/grub2.changes index 87aebfd..b7e14e2 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 30 10:09:02 UTC 2015 - mchang@suse.com + +- Allow to execute menuentry unrestricted as default (fate#318574) + * added grub2-menu-unrestricted.patch + ------------------------------------------------------------------- Thu Oct 29 04:17:08 UTC 2015 - mchang@suse.com diff --git a/grub2.spec b/grub2.spec index d7ec470..6973643 100644 --- a/grub2.spec +++ b/grub2.spec @@ -205,6 +205,7 @@ Patch67: grub2-Initialized-initrd_ctx-so-we-don-t-free-a-random-poi.patch Patch68: grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch Patch69: grub2-getroot-fix-get-btrfs-fs-prefix-big-endian.patch Patch70: grub2-default-distributor.patch +Patch71: grub2-menu-unrestricted.patch # Btrfs snapshot booting related patches Patch101: grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch Patch102: grub2-btrfs-02-export-subvolume-envvars.patch @@ -477,6 +478,7 @@ mv po/grub.pot po/%{name}.pot %patch68 -p1 %patch69 -p1 %patch70 -p1 +%patch71 -p1 %patch101 -p1 %patch102 -p1 %patch103 -p1 From 985105075ba841cb33bea2f51c408c5066d7c234373382b0134cef1775d429c4 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Tue, 3 Nov 2015 06:07:18 +0000 Subject: [PATCH 3/3] Accepting request 342138 from home:arvidjaar:bnc:953022 - Modify grub2-linguas.sh-no-rsync.patch to re-enable en@quot catalog (boo#953022). Other autogenerated catalogs still fail to build due to missing C.UTF-8 locale. OBS-URL: https://build.opensuse.org/request/show/342138 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=186 --- grub2-linguas.sh-no-rsync.patch | 22 ++++++++-------------- grub2.changes | 7 +++++++ grub2.spec | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/grub2-linguas.sh-no-rsync.patch b/grub2-linguas.sh-no-rsync.patch index 3f0415a..df9f653 100644 --- a/grub2-linguas.sh-no-rsync.patch +++ b/grub2-linguas.sh-no-rsync.patch @@ -4,24 +4,18 @@ Subject: disable rsync to make it possible to use in RPM build We need to create po/LINGUAS to generate message catalogs. Use linguas.sh to ensure we always use the same rules as upstream, but disable rsync. -Index: grub-2.00/linguas.sh +Index: grub-2.02~beta2/linguas.sh =================================================================== ---- grub-2.00.orig/linguas.sh -+++ grub-2.00/linguas.sh -@@ -1,6 +1,6 @@ +--- grub-2.02~beta2.orig/linguas.sh 2015-11-02 20:47:03.471686784 +0300 ++++ grub-2.02~beta2/linguas.sh 2015-11-02 20:48:15.707687638 +0300 +@@ -1,8 +1,8 @@ #!/bin/sh -rsync -Lrtvz --exclude=ko.po translationproject.org::tp/latest/grub/ po +#rsync -Lrtvz --exclude=ko.po translationproject.org::tp/latest/grub/ po - autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH" +-autogenerated="en@quot en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH" ++autogenerated="en@quot" # en@hebrew de@hebrew en@cyrillic en@greek en@arabic en@piglatin de_CH" -@@ -14,7 +14,7 @@ done - ( - cd po && ls *.po| cut -d. -f1 - for x in $autogenerated; do -- echo "$x"; -+ : echo "$x"; - done - ) | sort | uniq | xargs - ) >po/LINGUAS + + for x in $autogenerated; do diff --git a/grub2.changes b/grub2.changes index b7e14e2..508d98c 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 1 21:30:02 UTC 2015 - arvidjaar@gmail.com + +- Modify grub2-linguas.sh-no-rsync.patch to re-enable en@quot catalog + (boo#953022). Other autogenerated catalogs still fail to build due + to missing C.UTF-8 locale. + ------------------------------------------------------------------- Fri Oct 30 10:09:02 UTC 2015 - mchang@suse.com diff --git a/grub2.spec b/grub2.spec index 6973643..ccce862 100644 --- a/grub2.spec +++ b/grub2.spec @@ -1,7 +1,7 @@ # # spec file for package grub2 # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed