Hello community,
here is the log from the commit of package libguestfs for openSUSE:Factory checked in at 2016-09-24 15:28:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libguestfs (Old)
and /work/SRC/openSUSE:Factory/.libguestfs.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libguestfs"
Changes:
--------
--- /work/SRC/openSUSE:Factory/libguestfs/libguestfs.changes 2016-09-20 13:27:45.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libguestfs.new/libguestfs.changes 2016-09-24 15:29:11.000000000 +0200
@@ -1,0 +2,6 @@
+Thu Sep 22 13:45:00 UTC 2016 - cbosdonnat@suse.com
+
+- Backport btrfs-related fixes (bsc#1000202)
+ commits: d6bba9b, f90185d, 4e0dbf9 and 738c3bf
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ 0000-hotfix.patch ++++++
--- /var/tmp/diff_new_pack.Fm23iR/_old 2016-09-24 15:29:12.000000000 +0200
+++ /var/tmp/diff_new_pack.Fm23iR/_new 2016-09-24 15:29:12.000000000 +0200
@@ -74,6 +74,27 @@
name = "set_network"; added = (1, 5, 4);
style = RErr, [Bool "network"], [];
fish_alias = ["network"]; config_only = true;
+@@ -8897,7 +8923,7 @@ I<other> keys." };
+
+ { defaults with
+ name = "is_lv"; added = (1, 5, 3);
+- style = RBool "lvflag", [Device "device"], [];
++ style = RBool "lvflag", [Mountable "mountable"], [];
+ proc_nr = Some 264;
+ tests = [
+ InitBasicFSonLVM, Always, TestResultTrue (
+@@ -8905,9 +8931,9 @@ I<other> keys." };
+ InitBasicFSonLVM, Always, TestResultFalse (
+ [["is_lv"; "/dev/sda1"]]), []
+ ];
+- shortdesc = "test if device is a logical volume";
++ shortdesc = "test if mountable is a logical volume";
+ longdesc = "\
+-This command tests whether C<device> is a logical volume, and
++This command tests whether C<mountable> is a logical volume, and
+ returns true iff this is the case." };
+
+ { defaults with
Index: libguestfs-1.32.4/po/POTFILES
===================================================================
--- libguestfs-1.32.4.orig/po/POTFILES
@@ -2149,3 +2170,117 @@
L,
L,
L,
+Index: libguestfs-1.32.4/daemon/lvm.c
+===================================================================
+--- libguestfs-1.32.4.orig/daemon/lvm.c
++++ libguestfs-1.32.4/daemon/lvm.c
+@@ -863,9 +863,11 @@ lv_canonical (const char *device, char *
+
+ /* Test if a device is a logical volume (RHBZ#619793). */
+ int
+-do_is_lv (const char *device)
++do_is_lv (const mountable_t *mountable)
+ {
+- return lv_canonical (device, NULL);
++ if (mountable->type != MOUNTABLE_DEVICE)
++ return 0;
++ return lv_canonical (mountable->device, NULL);
+ }
+
+ /* Return canonical name of LV to caller (RHBZ#638899). */
+Index: libguestfs-1.32.4/mllib/common_utils.ml
+===================================================================
+--- libguestfs-1.32.4.orig/mllib/common_utils.ml
++++ libguestfs-1.32.4/mllib/common_utils.ml
+@@ -833,3 +833,10 @@ let read_first_line_from_file filename =
+ let is_regular_file path = (* NB: follows symlinks. *)
+ try (Unix.stat path).Unix.st_kind = Unix.S_REG
+ with Unix.Unix_error _ -> false
++
++let is_btrfs_subvolume g fs =
++ try
++ ignore (g#mountable_subvolume fs); true
++ with Guestfs.Error msg as exn ->
++ if g#last_errno () = Guestfs.Errno.errno_EINVAL then false
++ else raise exn
+Index: libguestfs-1.32.4/mllib/common_utils.mli
+===================================================================
+--- libguestfs-1.32.4.orig/mllib/common_utils.mli
++++ libguestfs-1.32.4/mllib/common_utils.mli
+@@ -273,3 +273,6 @@ val read_first_line_from_file : string -
+
+ val is_regular_file : string -> bool
+ (** Checks whether the file is a regular file. *)
++
++val is_btrfs_subvolume : Guestfs.guestfs -> string -> bool
++(** Checks if a filesystem is a btrfs subvolume. *)
+Index: libguestfs-1.32.4/sysprep/sysprep_operation_fs_uuids.ml
+===================================================================
+--- libguestfs-1.32.4.orig/sysprep/sysprep_operation_fs_uuids.ml
++++ libguestfs-1.32.4/sysprep/sysprep_operation_fs_uuids.ml
+@@ -30,13 +30,15 @@ let rec fs_uuids_perform g root side_eff
+ List.iter (function
+ | _, "unknown" -> ()
+ | dev, typ ->
+- let new_uuid = Common_utils.uuidgen () in
+- try
+- g#set_uuid dev new_uuid
+- with
+- G.Error msg ->
+- warning (f_"cannot set random UUID on filesystem %s type %s: %s")
+- dev typ msg
++ if not (is_btrfs_subvolume g dev) then (
++ let new_uuid = Common_utils.uuidgen () in
++ try
++ g#set_uuid dev new_uuid
++ with
++ G.Error msg ->
++ warning (f_"cannot set random UUID on filesystem %s type %s: %s")
++ dev typ msg
++ )
+ ) fses
+
+ let op = {
+Index: libguestfs-1.32.4/src/inspect-fs-unix.c
+===================================================================
+--- libguestfs-1.32.4.orig/src/inspect-fs-unix.c
++++ libguestfs-1.32.4/src/inspect-fs-unix.c
+@@ -1371,27 +1371,28 @@ check_fstab (guestfs_h *g, struct inspec
+ if (vfstype == NULL) return -1;
+
+ if (STREQ (vfstype, "btrfs")) {
+- char **opt;
++ size_t i;
+
+ snprintf (augpath, sizeof augpath, "%s/opt", *entry);
+ CLEANUP_FREE_STRING_LIST char **opts = guestfs_aug_match (g, augpath);
+ if (opts == NULL) return -1;
+
+- for (opt = opts; *opt; opt++) {
+- CLEANUP_FREE char *optname = guestfs_aug_get (g, augpath);
++ for (i = 0; opts[i] != NULL; ++i) {
++ CLEANUP_FREE char *optname = NULL, *optvalue = NULL, *subvol = NULL;
++ char *old_mountable;
++
++ optname = guestfs_aug_get (g, opts[i]);
+ if (optname == NULL) return -1;
+
+ if (STREQ (optname, "subvol")) {
+- CLEANUP_FREE char *subvol = NULL;
+- char *new;
++ optvalue = safe_asprintf (g, "%s/value", opts[i]);
+
+- snprintf (augpath, sizeof augpath, "%s/value", *opt);
+- subvol = guestfs_aug_get (g, augpath);
++ subvol = guestfs_aug_get (g, optvalue);
+ if (subvol == NULL) return -1;
+
+- new = safe_asprintf (g, "btrfsvol:%s/%s", mountable, subvol);
+- free (mountable);
+- mountable = new;
++ old_mountable = mountable;
++ mountable = safe_asprintf (g, "btrfsvol:%s/%s", mountable, subvol);
++ free (old_mountable);
+ }
+ }
+ }