Hello community, here is the log from the commit of package grub2 for openSUSE:Factory checked in at 2015-06-09 12:24:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/grub2 (Old) and /work/SRC/openSUSE:Factory/.grub2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "grub2" Changes: -------- --- /work/SRC/openSUSE:Factory/grub2/grub2.changes 2015-06-05 08:45:34.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.grub2.new/grub2.changes 2015-06-09 12:24:37.000000000 +0200 @@ -1,0 +2,7 @@ +Fri Jun 5 03:46:33 UTC 2015 - mch...@suse.com + +- Fix btrfs patch on BigEndian systems (bsc#933541) + * modified grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch + * modified grub2-btrfs-06-subvol-mount.patch + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grub2.spec ++++++ --- /var/tmp/diff_new_pack.zvHFn6/_old 2015-06-09 12:24:39.000000000 +0200 +++ /var/tmp/diff_new_pack.zvHFn6/_new 2015-06-09 12:24:39.000000000 +0200 @@ -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 ++++++ grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch ++++++ --- /var/tmp/diff_new_pack.zvHFn6/_old 2015-06-09 12:24:39.000000000 +0200 +++ /var/tmp/diff_new_pack.zvHFn6/_new 2015-06-09 12:24:39.000000000 +0200 @@ -21,10 +21,10 @@ grub-core/fs/btrfs.c | 529 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 518 insertions(+), 11 deletions(-) -Index: grub-2.00/grub-core/fs/btrfs.c +Index: grub-2.02~beta2/grub-core/fs/btrfs.c =================================================================== ---- grub-2.00.orig/grub-core/fs/btrfs.c -+++ grub-2.00/grub-core/fs/btrfs.c +--- grub-2.02~beta2.orig/grub-core/fs/btrfs.c ++++ grub-2.02~beta2/grub-core/fs/btrfs.c @@ -29,6 +29,9 @@ #include <minilzo.h> #include <grub/i18n.h> @@ -125,7 +125,7 @@ + if (err) + return grub_error(GRUB_ERR_FILE_NOT_FOUND, "couldn't locate %s\n", path); + -+ if (key.object_id != GRUB_BTRFS_OBJECT_ID_CHUNK || tree == 0) ++ if (key.object_id != grub_cpu_to_le64_compile_time (GRUB_BTRFS_OBJECT_ID_CHUNK) || tree == 0) + return grub_error(GRUB_ERR_BAD_FILE_TYPE, "%s: not a subvolume\n", path); + + data->fs_tree = tree; @@ -164,7 +164,7 @@ return data; } -@@ -1216,6 +1301,91 @@ get_root (struct grub_btrfs_data *data, +@@ -1226,6 +1311,91 @@ get_root (struct grub_btrfs_data *data, } static grub_err_t @@ -217,21 +217,21 @@ + if (err) + return grub_error(err, "read_logical caught %d\n", err); + -+ alloc += inode_ref->n + 2; ++ alloc += grub_le_to_cpu16 (inode_ref->n) + 2; + new = grub_malloc(alloc); + if (!new) + return grub_error(GRUB_ERR_OUT_OF_MEMORY, + "couldn't allocate memory for name (%"PRIuGRUB_SIZE")\n", alloc); + -+ grub_memcpy(new, inode_ref->name, inode_ref->n); ++ grub_memcpy(new, inode_ref->name, grub_le_to_cpu16 (inode_ref->n)); + if (p) + { -+ new[inode_ref->n] = '/'; -+ grub_strcpy (new + inode_ref->n + 1, p); ++ new[grub_le_to_cpu16 (inode_ref->n)] = '/'; ++ grub_strcpy (new + grub_le_to_cpu16 (inode_ref->n) + 1, p); + grub_free(p); + } + else -+ new[inode_ref->n] = 0; ++ new[grub_le_to_cpu16 (inode_ref->n)] = 0; + grub_free(inode_ref); + + p = new; @@ -256,7 +256,7 @@ find_path (struct grub_btrfs_data *data, const char *path, struct grub_btrfs_key *key, grub_uint64_t *tree, grub_uint8_t *type) -@@ -1233,14 +1403,26 @@ find_path (struct grub_btrfs_data *data, +@@ -1243,14 +1413,26 @@ find_path (struct grub_btrfs_data *data, char *origpath = NULL; unsigned symlinks_max = 32; @@ -287,7 +287,7 @@ while (1) { while (path[0] == '/') -@@ -1413,9 +1595,21 @@ find_path (struct grub_btrfs_data *data, +@@ -1423,9 +1605,21 @@ find_path (struct grub_btrfs_data *data, path = path_alloc = tmp; if (path[0] == '/') { @@ -312,7 +312,7 @@ } continue; } -@@ -1656,6 +1850,20 @@ grub_btrfs_read (grub_file_t file, char +@@ -1666,6 +1860,20 @@ grub_btrfs_read (grub_file_t file, char data->tree, file->offset, buf, len); } @@ -333,7 +333,7 @@ static grub_err_t grub_btrfs_uuid (grub_device_t device, char **uuid) { -@@ -1667,15 +1875,7 @@ grub_btrfs_uuid (grub_device_t device, c +@@ -1677,15 +1885,7 @@ grub_btrfs_uuid (grub_device_t device, c if (!data) return grub_errno; @@ -350,7 +350,7 @@ grub_btrfs_unmount (data); -@@ -1732,6 +1932,242 @@ grub_btrfs_embed (grub_device_t device _ +@@ -1742,6 +1942,242 @@ grub_btrfs_embed (grub_device_t device _ } #endif @@ -453,7 +453,7 @@ + char *devname; + grub_uint64_t tree; + struct grub_btrfs_key key_in = { -+ .object_id = grub_cpu_to_le64(GRUB_BTRFS_FS_TREE_OBJECTID), ++ .object_id = grub_cpu_to_le64_compile_time (GRUB_BTRFS_FS_TREE_OBJECTID), + .type = GRUB_BTRFS_ROOT_REF_KEY, + .offset = 0, + }, key_out; @@ -492,8 +492,8 @@ + if (!data) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "could not open device"); + -+ tree = grub_le_to_cpu64(data->sblock.root_tree); -+ err = get_fs_root(data, tree, grub_cpu_to_le64(GRUB_BTRFS_FS_TREE_OBJECTID), ++ tree = data->sblock.root_tree; ++ err = get_fs_root(data, tree, grub_cpu_to_le64_compile_time (GRUB_BTRFS_FS_TREE_OBJECTID), + 0, &fs_root); + if (err) + goto out; @@ -593,7 +593,7 @@ static struct grub_fs grub_btrfs_fs = { .name = "btrfs", .dir = grub_btrfs_dir, -@@ -1747,12 +2183,88 @@ static struct grub_fs grub_btrfs_fs = { +@@ -1757,12 +2193,88 @@ static struct grub_fs grub_btrfs_fs = { #endif }; @@ -682,10 +682,10 @@ } + +// vim: si et sw=2: -Index: grub-2.00/include/grub/btrfs.h +Index: grub-2.02~beta2/include/grub/btrfs.h =================================================================== ---- grub-2.00.orig/include/grub/btrfs.h -+++ grub-2.00/include/grub/btrfs.h +--- grub-2.02~beta2.orig/include/grub/btrfs.h ++++ grub-2.02~beta2/include/grub/btrfs.h @@ -29,6 +29,7 @@ enum GRUB_BTRFS_ITEM_TYPE_ROOT_ITEM = 0x84, GRUB_BTRFS_ITEM_TYPE_ROOT_BACKREF = 0x90, ++++++ grub2-btrfs-06-subvol-mount.patch ++++++ --- /var/tmp/diff_new_pack.zvHFn6/_old 2015-06-09 12:24:39.000000000 +0200 +++ /var/tmp/diff_new_pack.zvHFn6/_new 2015-06-09 12:24:39.000000000 +0200 @@ -185,7 +185,7 @@ + if (err) + goto err_out; + -+ if (key_in.object_id != GRUB_BTRFS_OBJECT_ID_CHUNK || tree == 0) ++ if (key_in.object_id != grub_cpu_to_le64_compile_time (GRUB_BTRFS_OBJECT_ID_CHUNK) || tree == 0) + { + err = grub_error (GRUB_ERR_BAD_FILE_TYPE, "%s: not a subvolume\n", subvol); + goto err_out;