Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libstorage-ng for openSUSE:Factory 
checked in at 2021-04-29 22:44:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage-ng.new.1947 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Thu Apr 29 22:44:41 2021 rev:111 rq:888870 version:4.4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes      
2021-04-10 15:26:16.870301089 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1947/libstorage-ng.changes    
2021-04-29 22:44:53.184169376 +0200
@@ -1,0 +2,16 @@
+Tue Apr 27 18:56:40 UTC 2021 - aschn...@suse.com
+
+- merge gh#openSUSE/libstorage-ng#804
+- added function Holder::get_devicegraph()
+- fixed typo
+- use in-class member initialization
+- 4.4.1
+
+--------------------------------------------------------------------
+Tue Apr 27 14:10:17 UTC 2021 - aschn...@suse.com
+
+- merge gh#openSUSE/libstorage-ng#803
+- support setting UUIDs for RAID, LUKS and more filesystems
+- 4.4.0
+
+--------------------------------------------------------------------

Old:
----
  libstorage-ng-4.3.106.tar.xz

New:
----
  libstorage-ng-4.4.1.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.1wIT58/_old  2021-04-29 22:44:53.712167025 +0200
+++ /var/tmp/diff_new_pack.1wIT58/_new  2021-04-29 22:44:53.716167006 +0200
@@ -18,7 +18,7 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.3.106
+Version:        4.4.1
 Release:        0
 Summary:        Library for storage management
 License:        GPL-2.0-only

++++++ libstorage-ng-4.3.106.tar.xz -> libstorage-ng-4.4.1.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/LIBVERSION 
new/libstorage-ng-4.4.1/LIBVERSION
--- old/libstorage-ng-4.3.106/LIBVERSION        2021-04-07 16:14:26.000000000 
+0200
+++ new/libstorage-ng-4.4.1/LIBVERSION  2021-04-27 20:56:40.000000000 +0200
@@ -1 +1 @@
-1.50.1
+1.52.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/VERSION 
new/libstorage-ng-4.4.1/VERSION
--- old/libstorage-ng-4.3.106/VERSION   2021-04-07 16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/VERSION     2021-04-27 20:56:40.000000000 +0200
@@ -1 +1 @@
-4.3.106
+4.4.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/DevicegraphImpl.cc 
new/libstorage-ng-4.4.1/storage/DevicegraphImpl.cc
--- old/libstorage-ng-4.3.106/storage/DevicegraphImpl.cc        2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/DevicegraphImpl.cc  2021-04-27 
20:56:40.000000000 +0200
@@ -191,7 +191,7 @@
 
                // check device back reference
 
-               if (&device->get_impl().get_devicegraph()->get_impl() != this)
+               if (&device->get_devicegraph()->get_impl() != this)
                    ST_THROW(LogicException("wrong graph in back references"));
 
                if (device->get_impl().get_vertex() != vertex)
@@ -208,7 +208,7 @@
 
                // check holder back reference
 
-               if (&holder->get_impl().get_devicegraph()->get_impl() != this)
+               if (&holder->get_devicegraph()->get_impl() != this)
                    ST_THROW(LogicException("wrong graph in back references"));
 
                if (holder->get_impl().get_edge() != edge)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.3.106/storage/Devices/BlkDeviceImpl.cc 
new/libstorage-ng-4.4.1/storage/Devices/BlkDeviceImpl.cc
--- old/libstorage-ng-4.3.106/storage/Devices/BlkDeviceImpl.cc  2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/BlkDeviceImpl.cc    2021-04-27 
20:56:40.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -58,8 +58,7 @@
 
 
     BlkDevice::Impl::Impl(const string& name, const Region& region)
-       : Device::Impl(), name(name), active(true), read_only(false), 
region(region), topology(),
-         udev_paths(), udev_ids(), dm_table_name()
+       : Device::Impl(), name(name), region(region)
     {
        if (!is_valid_name(name))
            ST_THROW(Exception("invalid BlkDevice name"));
@@ -67,8 +66,7 @@
 
 
     BlkDevice::Impl::Impl(const xmlNode* node)
-       : Device::Impl(node), name(), active(true), read_only(false), region(0, 
0, 512), topology(),
-         udev_paths(), udev_ids(), dm_table_name()
+       : Device::Impl(node), name(), region(0, 0, 512)
     {
        if (!getChildValue(node, "name", name))
            ST_THROW(Exception("no name"));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.3.106/storage/Devices/BlkDeviceImpl.h 
new/libstorage-ng-4.4.1/storage/Devices/BlkDeviceImpl.h
--- old/libstorage-ng-4.3.106/storage/Devices/BlkDeviceImpl.h   2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/BlkDeviceImpl.h     2021-04-27 
20:56:40.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -209,9 +209,9 @@
         *
         * This active here means that the device node exists.
         */
-       bool active;
+       bool active = true;
 
-       bool read_only;
+       bool read_only = false;
 
        /**
         * For most devices region.start is zero. Always used to keep track of
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/Device.h 
new/libstorage-ng-4.4.1/storage/Devices/Device.h
--- old/libstorage-ng-4.3.106/storage/Devices/Device.h  2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/Device.h    2021-04-27 
20:56:40.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -279,7 +279,14 @@
         */
        std::string get_name_sort_key() const;
 
+       /**
+        * Return the devicegraph the device belongs to.
+        */
        Devicegraph* get_devicegraph();
+
+       /**
+        * @copydoc get_devicegraph()
+        */
        const Devicegraph* get_devicegraph() const;
 
     public:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/DmRaidImpl.cc 
new/libstorage-ng-4.4.1/storage/Devices/DmRaidImpl.cc
--- old/libstorage-ng-4.3.106/storage/Devices/DmRaidImpl.cc     2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/DmRaidImpl.cc       2021-04-27 
20:56:40.000000000 +0200
@@ -46,7 +46,7 @@
 
 
     DmRaid::Impl::Impl(const string& name)
-       : Partitionable::Impl(name), rotational(false)
+       : Partitionable::Impl(name)
     {
        if (!is_valid_name(name))
            ST_THROW(Exception("invalid DmRaid name"));
@@ -56,7 +56,7 @@
 
 
     DmRaid::Impl::Impl(const string& name, const Region& region)
-       : Partitionable::Impl(name, region), rotational(false)
+       : Partitionable::Impl(name, region)
     {
        if (!is_valid_name(name))
            ST_THROW(Exception("invalid DmRaid name"));
@@ -66,7 +66,7 @@
 
 
     DmRaid::Impl::Impl(const xmlNode* node)
-       : Partitionable::Impl(node), rotational(false)
+       : Partitionable::Impl(node)
     {
        getChildValue(node, "rotational", rotational);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/DmRaidImpl.h 
new/libstorage-ng-4.4.1/storage/Devices/DmRaidImpl.h
--- old/libstorage-ng-4.3.106/storage/Devices/DmRaidImpl.h      2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/DmRaidImpl.h        2021-04-27 
20:56:40.000000000 +0200
@@ -87,7 +87,7 @@
 
     private:
 
-       bool rotational;
+       bool rotational = false;
 
     };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.3.106/storage/Devices/EncryptionImpl.cc 
new/libstorage-ng-4.4.1/storage/Devices/EncryptionImpl.cc
--- old/libstorage-ng-4.3.106/storage/Devices/EncryptionImpl.cc 2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/EncryptionImpl.cc   2021-04-27 
20:56:40.000000000 +0200
@@ -50,17 +50,14 @@
 
 
     Encryption::Impl::Impl(const string& dm_table_name)
-       : BlkDevice::Impl(DEV_MAPPER_DIR "/" + dm_table_name), 
type(EncryptionType::LUKS1), password(),
-         key_file(), cipher(), key_size(0), mount_by(MountByType::DEVICE), 
in_etc_crypttab(true),
-         open_options()
+       : BlkDevice::Impl(DEV_MAPPER_DIR "/" + dm_table_name)
     {
        set_dm_table_name(dm_table_name);
     }
 
 
     Encryption::Impl::Impl(const xmlNode* node)
-       : BlkDevice::Impl(node), type(EncryptionType::LUKS1), password(), 
key_file(), cipher(),
-         key_size(0), mount_by(MountByType::DEVICE), in_etc_crypttab(true), 
open_options()
+       : BlkDevice::Impl(node)
     {
        string tmp;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.3.106/storage/Devices/EncryptionImpl.h 
new/libstorage-ng-4.4.1/storage/Devices/EncryptionImpl.h
--- old/libstorage-ng-4.3.106/storage/Devices/EncryptionImpl.h  2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/EncryptionImpl.h    2021-04-27 
20:56:40.000000000 +0200
@@ -159,7 +159,7 @@
 
     private:
 
-       EncryptionType type;
+       EncryptionType type = EncryptionType::LUKS1;
 
        /**
         * The password.
@@ -171,13 +171,13 @@
        string key_file;
 
        string cipher;
-       unsigned int key_size;
+       unsigned int key_size = 0;
 
-       MountByType mount_by;
+       MountByType mount_by = MountByType::DEVICE;
 
        CryptOpts crypt_options;
 
-       bool in_etc_crypttab;
+       bool in_etc_crypttab = true;
 
        string crypttab_blk_device_name; // block device name as found in 
/etc/crypttab
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/Luks.cc 
new/libstorage-ng-4.4.1/storage/Devices/Luks.cc
--- old/libstorage-ng-4.3.106/storage/Devices/Luks.cc   2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/Luks.cc     2021-04-27 
20:56:40.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2019] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -96,6 +96,13 @@
     }
 
 
+    void
+    Luks::set_uuid(const string& uuid)
+    {
+       get_impl().set_uuid(uuid);
+    }
+
+
     const string&
     Luks::get_label() const
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/Luks.h 
new/libstorage-ng-4.4.1/storage/Devices/Luks.h
--- old/libstorage-ng-4.3.106/storage/Devices/Luks.h    2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/Luks.h      2021-04-27 
20:56:40.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -65,6 +65,11 @@
        const std::string& get_uuid() const;
 
        /**
+        * Set the LUKS UUID. The UUID is only set when creating a new LUKS on 
disk.
+        */
+       void set_uuid(const std::string& uuid);
+
+       /**
         * Get the LUKS label.
         *
         * Only available in LUKS version 2.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/LuksImpl.cc 
new/libstorage-ng-4.4.1/storage/Devices/LuksImpl.cc
--- old/libstorage-ng-4.3.106/storage/Devices/LuksImpl.cc       2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/LuksImpl.cc 2021-04-27 
20:56:40.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2019] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -591,6 +591,9 @@
 
        cmd_line += " --tries 1";
 
+       if (!uuid.empty())
+           cmd_line += " --uuid " + quote(uuid);
+
        if (!get_cipher().empty())
            cmd_line += " --cipher " + quote(get_cipher());
 
@@ -602,7 +605,10 @@
 
        add_key_file_option_and_execute(cmd_line);
 
-       probe_uuid();
+       if (uuid.empty())
+       {
+           probe_uuid();
+       }
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/LuksImpl.h 
new/libstorage-ng-4.4.1/storage/Devices/LuksImpl.h
--- old/libstorage-ng-4.3.106/storage/Devices/LuksImpl.h        2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/LuksImpl.h  2021-04-27 
20:56:40.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2019] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -76,6 +76,7 @@
        virtual string get_mount_by_name(MountByType mount_by_type) const 
override;
 
        const string& get_uuid() const { return uuid; }
+       void set_uuid(const string& uuid) { Impl::uuid = uuid; }
 
        const string& get_label() const { return label; }
        void set_label(const string& label) { Impl::label = label; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/Md.h 
new/libstorage-ng-4.4.1/storage/Devices/Md.h
--- old/libstorage-ng-4.3.106/storage/Devices/Md.h      2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/Md.h        2021-04-27 
20:56:40.000000000 +0200
@@ -178,8 +178,7 @@
        const std::string& get_uuid() const;
 
        /**
-        * Set UUID for testing purposes. The real UUID is not modified during
-        * the commit phase.
+        * Set the UUID. The UUID is only set when creating a new RAID on disk.
         */
        void set_uuid(const std::string& uuid);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/MdImpl.cc 
new/libstorage-ng-4.4.1/storage/Devices/MdImpl.cc
--- old/libstorage-ng-4.3.106/storage/Devices/MdImpl.cc 2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/MdImpl.cc   2021-04-27 
20:56:40.000000000 +0200
@@ -1094,6 +1094,9 @@
        if (md_parity != MdParity::DEFAULT)
            cmd_line += " --parity=" + toString(md_parity);
 
+       if (!uuid.empty())
+           cmd_line += " --uuid=" + quote(uuid);
+
        cmd_line += " --raid-devices=" + to_string(devices.size());
 
        if (!spares.empty())
@@ -1113,7 +1116,10 @@
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
 
-       probe_uuid();
+       if (uuid.empty())
+       {
+           probe_uuid();
+       }
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/MsdosImpl.cc 
new/libstorage-ng-4.4.1/storage/Devices/MsdosImpl.cc
--- old/libstorage-ng-4.3.106/storage/Devices/MsdosImpl.cc      2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/MsdosImpl.cc        2021-04-27 
20:56:40.000000000 +0200
@@ -45,7 +45,7 @@
 
 
     Msdos::Impl::Impl(const xmlNode* node)
-       : PartitionTable::Impl(node), minimal_mbr_gap(default_minimal_mbr_gap)
+       : PartitionTable::Impl(node)
     {
        getChildValue(node, "minimal-mbr-gap", minimal_mbr_gap);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Devices/MsdosImpl.h 
new/libstorage-ng-4.4.1/storage/Devices/MsdosImpl.h
--- old/libstorage-ng-4.3.106/storage/Devices/MsdosImpl.h       2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Devices/MsdosImpl.h 2021-04-27 
20:56:40.000000000 +0200
@@ -54,7 +54,7 @@
        static const int num_ebrs = 128;
 
        Impl()
-           : PartitionTable::Impl(), minimal_mbr_gap(default_minimal_mbr_gap) 
{}
+           : PartitionTable::Impl() {}
 
        Impl(const xmlNode* node);
 
@@ -117,7 +117,7 @@
 
        static const unsigned long default_minimal_mbr_gap = 1 * MiB;
 
-       unsigned long minimal_mbr_gap;
+       unsigned long minimal_mbr_gap = default_minimal_mbr_gap;
 
     };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.3.106/storage/Filesystems/BlkFilesystem.h 
new/libstorage-ng-4.4.1/storage/Filesystems/BlkFilesystem.h
--- old/libstorage-ng-4.3.106/storage/Filesystems/BlkFilesystem.h       
2021-04-07 16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/BlkFilesystem.h 2021-04-27 
20:56:40.000000000 +0200
@@ -84,7 +84,9 @@
        const std::string& get_uuid() const;
 
        /**
-        * Set the filesystem UUID. Only supported for swap.
+        * Set the filesystem UUID. Only supported for btrfs, xfs, ext, 
reiserfs, jfs, udf
+        * and swap. In general the UUID is only set when creating a new 
filesystem on
+        * disk.
         */
        void set_uuid(const std::string& uuid);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.3.106/storage/Filesystems/BtrfsImpl.cc 
new/libstorage-ng-4.4.1/storage/Filesystems/BtrfsImpl.cc
--- old/libstorage-ng-4.3.106/storage/Filesystems/BtrfsImpl.cc  2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/BtrfsImpl.cc    2021-04-27 
20:56:40.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2015 Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -992,6 +992,9 @@
        if (data_raid_level != BtrfsRaidLevel::DEFAULT)
            cmd_line += " --data=" + toString(data_raid_level);
 
+       if (!get_uuid().empty())
+           cmd_line += " --uuid=" + quote(get_uuid());
+
        if (!get_mkfs_options().empty())
            cmd_line += " " + get_mkfs_options();
 
@@ -1005,7 +1008,10 @@
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
 
-       parse_mkfs_output(cmd.stdout());
+       if (get_uuid().empty())
+       {
+           parse_mkfs_output(cmd.stdout());
+       }
 
         // This would fit better in do_mount(), but that one is a const method
         // which would not allow to set the snapper_config member variable.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Filesystems/ExtImpl.cc 
new/libstorage-ng-4.4.1/storage/Filesystems/ExtImpl.cc
--- old/libstorage-ng-4.3.106/storage/Filesystems/ExtImpl.cc    2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/ExtImpl.cc      2021-04-27 
20:56:40.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2019] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -142,9 +142,12 @@
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
 
-       // TODO uuid is included in mkfs output
+       if (get_uuid().empty())
+       {
+           // TODO uuid is included in mkfs output
 
-       probe_uuid();
+           probe_uuid();
+       }
     }
 
 
@@ -157,6 +160,17 @@
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
+
+
+    void
+    Ext::Impl::do_set_uuid() const
+    {
+       const BlkDevice* blk_device = get_blk_device();
+
+       string cmd_line = TUNE2FS_BIN " -U " + quote(get_uuid()) + " " + 
quote(blk_device->get_name());
+
+       SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+    }
 
 
     void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Filesystems/ExtImpl.h 
new/libstorage-ng-4.4.1/storage/Filesystems/ExtImpl.h
--- old/libstorage-ng-4.3.106/storage/Filesystems/ExtImpl.h     2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/ExtImpl.h       2021-04-27 
20:56:40.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2019] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -54,6 +54,7 @@
        virtual unsigned int max_labelsize() const override { return 16; }
 
        virtual bool supports_uuid() const override { return true; }
+       virtual bool supports_modify_uuid() const override { return true; }
 
        virtual void probe_pass_2b(Prober& prober) override;
 
@@ -74,6 +75,8 @@
 
        virtual void do_set_label() const override;
 
+       virtual void do_set_uuid() const override;
+
        virtual void do_set_tune_options() const override;
 
        virtual void do_resize(const CommitData& commit_data, const 
Action::Resize* action) const override;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Filesystems/JfsImpl.cc 
new/libstorage-ng-4.4.1/storage/Filesystems/JfsImpl.cc
--- old/libstorage-ng-4.3.106/storage/Filesystems/JfsImpl.cc    2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/JfsImpl.cc      2021-04-27 
20:56:40.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 SUSE LLC
+ * Copyright (c) [2018-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -63,7 +63,10 @@
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
 
-       probe_uuid();
+       if (get_uuid().empty())
+       {
+           probe_uuid();
+       }
     }
 
 
@@ -76,6 +79,18 @@
            quote(blk_device->get_name());
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+    }
+
+
+    void
+    Jfs::Impl::do_set_uuid() const
+    {
+       const BlkDevice* blk_device = get_blk_device();
+
+       string cmd_line = TUNEJFS_BIN " -U " + quote(get_uuid()) + " " +
+           quote(blk_device->get_name());
+
+       SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Filesystems/JfsImpl.h 
new/libstorage-ng-4.4.1/storage/Filesystems/JfsImpl.h
--- old/libstorage-ng-4.3.106/storage/Filesystems/JfsImpl.h     2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/JfsImpl.h       2021-04-27 
20:56:40.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 SUSE LLC
+ * Copyright (c) [2018-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -57,6 +57,7 @@
        virtual unsigned int max_labelsize() const override { return 16; }
 
        virtual bool supports_uuid() const override { return true; }
+       virtual bool supports_modify_uuid() const override { return true; }
 
     public:
 
@@ -81,6 +82,8 @@
 
        virtual void do_set_label() const override;
 
+       virtual void do_set_uuid() const override;
+
     };
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.3.106/storage/Filesystems/MountPointImpl.cc 
new/libstorage-ng-4.4.1/storage/Filesystems/MountPointImpl.cc
--- old/libstorage-ng-4.3.106/storage/Filesystems/MountPointImpl.cc     
2021-04-07 16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/MountPointImpl.cc       
2021-04-27 20:56:40.000000000 +0200
@@ -51,8 +51,7 @@
 
 
     MountPoint::Impl::Impl(const string& path)
-       : Device::Impl(), mount_by(MountByType::DEVICE), 
mount_type(FsType::UNKNOWN),
-         freq(0), passno(0), active(true), in_etc_fstab(true)
+       : Device::Impl()
     {
 #if 0
        if (!valid_path(path))
@@ -63,8 +62,7 @@
 
 
     MountPoint::Impl::Impl(const xmlNode* node)
-       : Device::Impl(node), path(), mount_by(MountByType::DEVICE), 
mount_type(FsType::UNKNOWN),
-         freq(0), passno(0), active(true), in_etc_fstab(true)
+       : Device::Impl(node)
     {
        string tmp;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.3.106/storage/Filesystems/MountPointImpl.h 
new/libstorage-ng-4.4.1/storage/Filesystems/MountPointImpl.h
--- old/libstorage-ng-4.3.106/storage/Filesystems/MountPointImpl.h      
2021-04-07 16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/MountPointImpl.h        
2021-04-27 20:56:40.000000000 +0200
@@ -197,19 +197,19 @@
 
        string path;
 
-       MountByType mount_by;
+       MountByType mount_by = MountByType::DEVICE;
 
-       FsType mount_type;
+       FsType mount_type = FsType::UNKNOWN;
 
        MountOpts mount_options;
 
-       int freq;
-       int passno;
+       int freq = 0;
+       int passno = 0;
 
        // TODO: maybe move to Device since also BlkDevice has the flag
-       bool active;
+       bool active = true;
 
-       bool in_etc_fstab;
+       bool in_etc_fstab = true;
 
        FstabAnchor fstab_anchor;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.3.106/storage/Filesystems/ReiserfsImpl.cc 
new/libstorage-ng-4.4.1/storage/Filesystems/ReiserfsImpl.cc
--- old/libstorage-ng-4.3.106/storage/Filesystems/ReiserfsImpl.cc       
2021-04-07 16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/ReiserfsImpl.cc 2021-04-27 
20:56:40.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2017-2020] SUSE LLC
+ * Copyright (c) [2017-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -64,9 +64,12 @@
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
 
-       // uuid is included in mkfs output
+       if (get_uuid().empty())
+       {
+           // uuid is included in mkfs output
 
-       probe_uuid();
+           probe_uuid();
+       }
     }
 
 
@@ -77,7 +80,21 @@
 
        // TODO handle mounted
 
-       string cmd_line = TUNEREISERFS_BIN " -l " + quote(get_label()) + " " +
+       string cmd_line = TUNEREISERFS_BIN " --label " + quote(get_label()) + " 
" +
+           quote(blk_device->get_name());
+
+       SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+    }
+
+
+    void
+    Reiserfs::Impl::do_set_uuid() const
+    {
+       const BlkDevice* blk_device = get_blk_device();
+
+       // TODO handle mounted?
+
+       string cmd_line = TUNEREISERFS_BIN " --uuid " + quote(get_uuid()) + " " 
+
            quote(blk_device->get_name());
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.3.106/storage/Filesystems/ReiserfsImpl.h 
new/libstorage-ng-4.4.1/storage/Filesystems/ReiserfsImpl.h
--- old/libstorage-ng-4.3.106/storage/Filesystems/ReiserfsImpl.h        
2021-04-07 16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/ReiserfsImpl.h  2021-04-27 
20:56:40.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2017-2018] SUSE LLC
+ * Copyright (c) [2017-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -57,6 +57,7 @@
        virtual unsigned int max_labelsize() const override { return 16; }
 
        virtual bool supports_uuid() const override { return true; }
+       virtual bool supports_modify_uuid() const override { return true; }
 
     public:
 
@@ -81,6 +82,8 @@
 
        virtual void do_set_label() const override;
 
+       virtual void do_set_uuid() const override;
+
        virtual void do_set_tune_options() const override;
 
        virtual void do_resize(const CommitData& commit_data, const 
Action::Resize* action) const override;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Filesystems/UdfImpl.cc 
new/libstorage-ng-4.4.1/storage/Filesystems/UdfImpl.cc
--- old/libstorage-ng-4.3.106/storage/Filesystems/UdfImpl.cc    2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/UdfImpl.cc      2021-04-27 
20:56:40.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2017-2018] SUSE LLC
+ * Copyright (c) [2017-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -74,14 +74,21 @@
     {
        const BlkDevice* blk_device = get_blk_device();
 
-       string cmd_line = MKFS_UDF_BIN " " + get_mkfs_options() + " --label " + 
quote(get_label()) +
-           " " + quote(blk_device->get_name());
+       string cmd_line = MKFS_UDF_BIN " " + get_mkfs_options() + " --label=" + 
quote(get_label());
+
+       if (!get_uuid().empty())
+           cmd_line += " --uuid=" + quote(get_uuid());
+
+       cmd_line += " " + quote(blk_device->get_name());
 
        wait_for_devices();
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
 
-       probe_uuid();
+       if (get_uuid().empty())
+       {
+           probe_uuid();
+       }
     }
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Filesystems/XfsImpl.cc 
new/libstorage-ng-4.4.1/storage/Filesystems/XfsImpl.cc
--- old/libstorage-ng-4.3.106/storage/Filesystems/XfsImpl.cc    2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/XfsImpl.cc      2021-04-27 
20:56:40.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2015 Novell, Inc.
- * Copyright (c) [2016-2018] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -88,7 +88,10 @@
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
 
-       probe_uuid();
+       if (get_uuid().empty())
+       {
+           probe_uuid();
+       }
     }
 
 
@@ -116,5 +119,16 @@
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
+
+
+    void
+    Xfs::Impl::do_set_uuid() const
+    {
+       const BlkDevice* blk_device = get_blk_device();
+
+       string cmd_line = XFSADMIN_BIN " -U " + quote(get_uuid()) + " " + 
quote(blk_device->get_name());
+
+       SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+    }
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Filesystems/XfsImpl.h 
new/libstorage-ng-4.4.1/storage/Filesystems/XfsImpl.h
--- old/libstorage-ng-4.3.106/storage/Filesystems/XfsImpl.h     2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Filesystems/XfsImpl.h       2021-04-27 
20:56:40.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2018] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -58,6 +58,7 @@
        virtual unsigned int max_labelsize() const override { return 12; }
 
        virtual bool supports_uuid() const override { return true; }
+       virtual bool supports_modify_uuid() const override { return true; }
 
        virtual bool supports_external_journal() const override { return true; }
 
@@ -88,6 +89,8 @@
 
        virtual void do_set_label() const override;
 
+       virtual void do_set_uuid() const override;
+
     };
 
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Holders/Holder.cc 
new/libstorage-ng-4.4.1/storage/Holders/Holder.cc
--- old/libstorage-ng-4.3.106/storage/Holders/Holder.cc 2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Holders/Holder.cc   2021-04-27 
20:56:40.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -174,10 +174,10 @@
        ST_CHECK_PTR(source);
        ST_CHECK_PTR(target);
 
-       if (source->get_impl().get_devicegraph() != devicegraph)
+       if (source->get_devicegraph() != devicegraph)
            ST_THROW(Exception("wrong graph in source"));
 
-       if (target->get_impl().get_devicegraph() != devicegraph)
+       if (target->get_devicegraph() != devicegraph)
            ST_THROW(Exception("wrong graph in target"));
 
        Devicegraph::Impl::vertex_descriptor source_vertex = 
source->get_impl().get_vertex();
@@ -217,4 +217,18 @@
        return out;
     }
 
+
+    Devicegraph*
+    Holder::get_devicegraph()
+    {
+       return get_impl().get_devicegraph();
+    }
+
+
+    const Devicegraph*
+    Holder::get_devicegraph() const
+    {
+       return get_impl().get_devicegraph();
+    }
+
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/storage/Holders/Holder.h 
new/libstorage-ng-4.4.1/storage/Holders/Holder.h
--- old/libstorage-ng-4.3.106/storage/Holders/Holder.h  2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/storage/Holders/Holder.h    2021-04-27 
20:56:40.000000000 +0200
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) [2014-2015] Novell, Inc.
- * Copyright (c) [2017-2020] SUSE LLC
+ * Copyright (c) [2017-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -143,6 +143,16 @@
 
        friend std::ostream& operator<<(std::ostream& out, const Holder& 
holder);
 
+       /**
+        * Return the devicegraph the holder belongs to.
+        */
+       Devicegraph* get_devicegraph();
+
+       /**
+        * @copydoc get_devicegraph()
+        */
+       const Devicegraph* get_devicegraph() const;
+
     public:
 
        class Impl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.3.106/testsuite/helpers/TsCmp.cc 
new/libstorage-ng-4.4.1/testsuite/helpers/TsCmp.cc
--- old/libstorage-ng-4.3.106/testsuite/helpers/TsCmp.cc        2021-04-07 
16:14:26.000000000 +0200
+++ new/libstorage-ng-4.4.1/testsuite/helpers/TsCmp.cc  2021-04-27 
20:56:40.000000000 +0200
@@ -57,13 +57,12 @@
 
 
     /**
-     * This function adjusts the sids which is needed when devices are the
-     * detected in a differnet order than expected. Block devices use the name
-     * for identification, most others a uuid or a path. Some types are not
-     * handled at all, e.g. Nfs.
+     * This function adjusts the sids which is needed when devices are 
detected in a
+     * differnet order than expected. Block devices use the name for 
identification, most
+     * others a uuid or a path. Some types are not handled at all, e.g. Nfs.
      *
-     * The function makes assumptions that break in the general case and does
-     * no error checking. It can even ruin the devicegraph.
+     * The function makes assumptions that break in the general case and does 
no error
+     * checking. It can even ruin the devicegraph.
      *
      * Only enable it when you know what you are doing!
      */

Reply via email to