Hello community, here is the log from the commit of package grub2 for openSUSE:Factory checked in at 2015-07-05 17:51:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-18 06:36:53.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.grub2.new/grub2.changes 2015-07-05 17:51:04.000000000 +0200 @@ -1,0 +2,8 @@ +Thu Jun 18 08:43:07 UTC 2015 - mch...@suse.com + +- Fix btrfs subvol detection on BigEndian systems (bsc#933541) + * modified grub2-btrfs-06-subvol-mount.patch +- Fix grub2-mkrelpath outputs wrong path on BigEndian system + * added grub2-getroot-fix-get-btrfs-fs-prefix-big-endian.patch + +------------------------------------------------------------------- New: ---- grub2-getroot-fix-get-btrfs-fs-prefix-big-endian.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ grub2.spec ++++++ --- /var/tmp/diff_new_pack.oZ4Vo8/_old 2015-07-05 17:51:06.000000000 +0200 +++ /var/tmp/diff_new_pack.oZ4Vo8/_new 2015-07-05 17:51:06.000000000 +0200 @@ -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 @@ -199,6 +199,7 @@ Patch66: grub2-glibc-2.20.patch 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 # Btrfs snapshot booting related patches Patch101: grub2-btrfs-01-add-ability-to-boot-from-subvolumes.patch Patch102: grub2-btrfs-02-export-subvolume-envvars.patch @@ -445,6 +446,7 @@ %patch66 -p1 %patch67 -p1 %patch68 -p1 +%patch69 -p1 %patch101 -p1 %patch102 -p1 %patch103 -p1 ++++++ grub2-btrfs-06-subvol-mount.patch ++++++ --- /var/tmp/diff_new_pack.oZ4Vo8/_old 2015-07-05 17:51:06.000000000 +0200 +++ /var/tmp/diff_new_pack.oZ4Vo8/_new 2015-07-05 17:51:06.000000000 +0200 @@ -283,7 +283,7 @@ struct btrfs_ioctl_search_args { struct btrfs_ioctl_search_key key; grub_uint64_t buf[(4096 - sizeof(struct btrfs_ioctl_search_key)) -@@ -366,6 +374,105 @@ get_btrfs_fs_prefix (const char *mount_p +@@ -366,6 +374,109 @@ get_btrfs_fs_prefix (const char *mount_p int use_relative_path_on_btrfs = 0; @@ -314,6 +314,8 @@ + struct grub_btrfs_root_backref *br; + struct btrfs_ioctl_search_header *search_header; + char *old; ++ grub_uint16_t len; ++ grub_uint64_t inode_id; + + memset (&sargs, 0, sizeof(sargs)); + @@ -339,20 +341,22 @@ + search_header = (struct btrfs_ioctl_search_header *)sargs.buf; + br = (struct grub_btrfs_root_backref *) (search_header + 1); + ++ len = grub_le_to_cpu16 (br->n); ++ inode_id = grub_le_to_cpu64 (br->inode_id); + tree_id = search_header->offset; + + old = ret; -+ ret = malloc (br->n + 1); -+ memcpy (ret, br->name, br->n); -+ ret[br->n] = '\0'; ++ ret = malloc (len + 1); ++ memcpy (ret, br->name, len); ++ ret[len] = '\0'; + -+ if (br->inode_id != GRUB_BTRFS_TREE_ROOT_OBJECTID) ++ if (inode_id != GRUB_BTRFS_TREE_ROOT_OBJECTID) + { + char *s; + + memset(&args, 0, sizeof(args)); + args.treeid = search_header->offset; -+ args.objectid = br->inode_id; ++ args.objectid = inode_id; + + if (ioctl (fd, BTRFS_IOC_INO_LOOKUP, &args) < 0) + goto error; @@ -389,7 +393,7 @@ char ** grub_find_root_devices_from_mountinfo (const char *dir, char **relroot) { -@@ -502,12 +609,15 @@ grub_find_root_devices_from_mountinfo (c +@@ -502,12 +613,15 @@ grub_find_root_devices_from_mountinfo (c else if (grub_strcmp (entries[i].fstype, "btrfs") == 0) { ret = grub_find_root_devices_from_btrfs (dir); @@ -408,7 +412,7 @@ } } if (!ret) -@@ -1094,6 +1204,34 @@ grub_util_get_grub_dev_os (const char *o +@@ -1094,6 +1208,34 @@ grub_util_get_grub_dev_os (const char *o return grub_dev; } ++++++ grub2-getroot-fix-get-btrfs-fs-prefix-big-endian.patch ++++++ Index: grub-2.02~beta2/grub-core/osdep/linux/getroot.c =================================================================== --- grub-2.02~beta2.orig/grub-core/osdep/linux/getroot.c +++ grub-2.02~beta2/grub-core/osdep/linux/getroot.c @@ -324,9 +324,9 @@ get_btrfs_fs_prefix (const char *mount_p tree_id = sargs.buf[2]; br = (struct grub_btrfs_root_backref *) (sargs.buf + 4); - inode_id = br->inode_id; + inode_id = grub_le_to_cpu64 (br->inode_id); name = br->name; - namelen = br->n; + namelen = grub_le_to_cpu16 (br->n); } else { @@ -353,7 +353,7 @@ get_btrfs_fs_prefix (const char *mount_p ir = (struct grub_btrfs_inode_ref *) (sargs.buf + 4); name = ir->name; - namelen = ir->n; + namelen = grub_le_to_cpu16 (ir->n); } old = ret; ret = xmalloc (namelen + (old ? strlen (old) : 0) + 2);