From 1336b185ee488d7c40e87723c0ea3e5561af123f296a4c63a3627458884e1ca0 Mon Sep 17 00:00:00 2001 From: Michael Chang Date: Mon, 29 Sep 2014 07:00:39 +0000 Subject: [PATCH 1/2] Accepting request 252657 from home:arvidjaar:grub2-next fix btrfs on big endian systems (ppc/ppc64) - patch from upstream. OBS-URL: https://build.opensuse.org/request/show/252657 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=120 --- ...ot-key-comparison-failures-due-to-en.patch | 28 +++++++++++++++++++ grub2.changes | 6 ++++ grub2.spec | 2 ++ 3 files changed, 36 insertions(+) create mode 100644 grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch diff --git a/grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch b/grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch new file mode 100644 index 0000000..c2352ed --- /dev/null +++ b/grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch @@ -0,0 +1,28 @@ +From 4afd0107efa6a2d9cbe6fc71c529264dc2b9fb8a Mon Sep 17 00:00:00 2001 +From: Thomas Falcon +Date: Mon, 31 Mar 2014 15:32:30 +0100 +Subject: [PATCH] btrfs: fix get_root key comparison failures due to endianness + +* grub-core/fs/btrfs.c (get_root): Convert +GRUB_BTRFS_ROOT_VOL_OBJECTID to little-endian. +--- + ChangeLog | 7 +++++++ + grub-core/fs/btrfs.c | 2 +- + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/grub-core/fs/btrfs.c b/grub-core/fs/btrfs.c +index 89666b6..f7b6c15 100644 +--- a/grub-core/fs/btrfs.c ++++ b/grub-core/fs/btrfs.c +@@ -1201,7 +1201,7 @@ get_root (struct grub_btrfs_data *data, struct grub_btrfs_key *key, + struct grub_btrfs_key key_out, key_in; + struct grub_btrfs_root_item ri; + +- key_in.object_id = GRUB_BTRFS_ROOT_VOL_OBJECTID; ++ key_in.object_id = grub_cpu_to_le64_compile_time (GRUB_BTRFS_ROOT_VOL_OBJECTID); + key_in.offset = 0; + key_in.type = GRUB_BTRFS_ITEM_TYPE_ROOT_ITEM; + err = lower_bound (data, &key_in, &key_out, +-- +1.8.4.5 + diff --git a/grub2.changes b/grub2.changes index c7d6c53..325c668 100644 --- a/grub2.changes +++ b/grub2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Sep 28 06:16:35 UTC 2014 - arvidjaar@gmail.com + +- fix btrfs on big endian systems (ppc/ppc64) + * add grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.patch + ------------------------------------------------------------------- Sun Sep 21 06:47:12 UTC 2014 - arvidjaar@gmail.com diff --git a/grub2.spec b/grub2.spec index 12f3c59..f4ff610 100644 --- a/grub2.spec +++ b/grub2.spec @@ -156,6 +156,7 @@ Patch44: grub2-glibc-2.20.patch Patch45: grub2-efinet-reopen-SNP-protocol-for-exclusive-use-by-grub.patch Patch46: grub2-xen-legacy-config-device-name.patch Patch47: grub2-Initialized-initrd_ctx-so-we-don-t-free-a-random-poi.patch +Patch48: grub2-btrfs-fix-get_root-key-comparison-failures-due-to-en.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 @@ -361,6 +362,7 @@ mv po/grub.pot po/%{name}.pot %patch45 -p1 %patch46 -p1 %patch47 -p1 +%patch48 -p1 %patch101 -p1 %patch102 -p1 %patch103 -p1 From fcbf2cb71b953e5efedce66d3b994d66699c09d23a6ec637cebe7dd3973e6e7d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 1 Oct 2014 07:24:29 +0000 Subject: [PATCH 2/2] Accepting request 253157 from home:michael-chang:branches:Base:System - packaging 20_memtest86+ and 20_ppc_terminfo in corresponing grubarch package - Add '80_suse_btrfs_snapshot' required to show btrfs snapshots inside of the boot menu. OBS-URL: https://build.opensuse.org/request/show/253157 OBS-URL: https://build.opensuse.org/package/show/Base:System/grub2?expand=0&rev=121 --- 80_suse_btrfs_snapshot | 10 ++++++++++ grub2.changes | 12 ++++++++++++ grub2.spec | 23 ++++++++++++++++++++++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 80_suse_btrfs_snapshot diff --git a/80_suse_btrfs_snapshot b/80_suse_btrfs_snapshot new file mode 100644 index 0000000..9826426 --- /dev/null +++ b/80_suse_btrfs_snapshot @@ -0,0 +1,10 @@ +#! /bin/sh +set -e +if [ "x${SUSE_BTRFS_SNAPSHOT_BOOTING}" = "xtrue" ] && + [ "x${GRUB_FS}" = "xbtrfs" ] ; then + cat <