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-07-02 13:26:32
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage-ng.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Fri Jul  2 13:26:32 2021 rev:120 rq:903279 version:4.4.19

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes      
2021-06-24 18:22:25.368906141 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.2625/libstorage-ng.changes    
2021-07-02 13:26:48.981063529 +0200
@@ -1,0 +2,34 @@
+Wed Jun 30 16:16:51 UTC 2021 - aschn...@suse.com
+
+- merge gh#openSUSE/libstorage-ng#818
+- fixed action dependency generation when certain LVM and btrfs
+  quota action are present
+- added unit test
+- more detailed exception messages
+- 4.4.19
+
+--------------------------------------------------------------------
+Wed Jun 30 08:05:34 UTC 2021 - aschn...@suse.com
+
+- merge gh#openSUSE/libstorage-ng#817
+- allow trailing newlines in json parser
+- 4.4.18
+
+--------------------------------------------------------------------
+Tue Jun 29 09:10:06 UTC 2021 - aschn...@suse.com
+
+- merge gh#openSUSE/libstorage-ng#816
+- new exceptions for invalid stripe and chunk sizes
+- 4.4.17
+
+--------------------------------------------------------------------
+Mon Jun 28 08:42:41 UTC 2021 - aschn...@suse.com
+
+- merge gh#openSUSE/libstorage-ng#815
+- added functions to validate LVM VG and LV names
+- preceded LVM VG and LV name by '--' during command invocation
+- added notes
+- work on LVM support
+- 4.4.16
+
+--------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.lyIPkh/_old  2021-07-02 13:26:49.629058502 +0200
+++ /var/tmp/diff_new_pack.lyIPkh/_new  2021-07-02 13:26:49.629058502 +0200
@@ -18,7 +18,7 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.4.15
+Version:        4.4.19
 Release:        0
 Summary:        Library for storage management
 License:        GPL-2.0-only

++++++ libstorage-ng-4.4.15.tar.xz -> libstorage-ng-4.4.19.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/LIBVERSION 
new/libstorage-ng-4.4.19/LIBVERSION
--- old/libstorage-ng-4.4.15/LIBVERSION 2021-06-21 12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/LIBVERSION 2021-06-30 18:16:51.000000000 +0200
@@ -1 +1 @@
-1.55.2
+1.57.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/VERSION 
new/libstorage-ng-4.4.19/VERSION
--- old/libstorage-ng-4.4.15/VERSION    2021-06-21 12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/VERSION    2021-06-30 18:16:51.000000000 +0200
@@ -1 +1 @@
-4.4.15
+4.4.19
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/bindings/storage-catches.i 
new/libstorage-ng-4.4.19/bindings/storage-catches.i
--- old/libstorage-ng-4.4.15/bindings/storage-catches.i 2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/bindings/storage-catches.i 2021-06-30 
18:16:51.000000000 +0200
@@ -19,8 +19,10 @@
 %exceptionclass storage::IOException;
 %exceptionclass storage::IndexOutOfRangeException;
 %exceptionclass storage::InvalidBlockSize;
+%exceptionclass storage::InvalidChunkSize;
 %exceptionclass storage::InvalidExtentSize;
 %exceptionclass storage::InvalidMountPointPath;
+%exceptionclass storage::InvalidStripeSize;
 %exceptionclass storage::LockException;
 %exceptionclass storage::LogicException;
 %exceptionclass storage::LvmLvNotFoundByLvName;
@@ -297,8 +299,8 @@
 %catches(storage::Exception) storage::LvmLv::get_origin();
 %catches(storage::Exception) storage::LvmLv::get_origin() const;
 %catches(storage::Exception) storage::LvmLv::get_thin_pool() const;
-%catches(storage::Exception) storage::LvmLv::set_chunk_size(unsigned long long 
chunk_size);
-%catches(storage::Exception) storage::LvmLv::set_stripe_size(unsigned long 
long stripe_size);
+%catches(storage::InvalidChunkSize, storage::Exception) 
storage::LvmLv::set_chunk_size(unsigned long long chunk_size);
+%catches(storage::InvalidStripeSize, storage::Exception) 
storage::LvmLv::set_stripe_size(unsigned long long stripe_size);
 %catches(storage::Exception) storage::LvmLv::set_stripes(unsigned int stripes);
 %catches(storage::Exception) storage::LvmPv::get_blk_device();
 %catches(storage::Exception) storage::LvmPv::get_blk_device() const;
@@ -319,6 +321,7 @@
 %catches(storage::Exception) storage::Md::get_allowed_md_parities() const;
 %catches(storage::Exception) storage::Md::get_number() const;
 %catches(storage::Exception) storage::Md::remove_device(BlkDevice *blk_device);
+%catches(storage::InvalidChunkSize, storage::Exception) 
storage::Md::set_chunk_size(unsigned long chunk_size);
 %catches(storage::Exception) storage::MdContainer::create(Devicegraph 
*devicegraph, const std::string &name);
 %catches(storage::Exception) storage::MdMember::create(Devicegraph 
*devicegraph, const std::string &name);
 %catches(storage::Exception) storage::MdMember::get_md_container();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/configure.ac 
new/libstorage-ng-4.4.19/configure.ac
--- old/libstorage-ng-4.4.15/configure.ac       2021-06-21 12:33:29.000000000 
+0200
+++ new/libstorage-ng-4.4.19/configure.ac       2021-06-30 18:16:51.000000000 
+0200
@@ -127,6 +127,7 @@
        testsuite/dependencies/resize/ext4/Makefile
        testsuite/dependencies/resize/btrfs/Makefile
        testsuite/dependencies/bcache/Makefile
+       testsuite/dependencies/rear/Makefile
        testsuite/sorting/Makefile
        testsuite/style/Makefile
        testsuite/partitions/Makefile
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Action.cc 
new/libstorage-ng-4.4.19/storage/Action.cc
--- old/libstorage-ng-4.4.15/storage/Action.cc  2021-06-21 12:33:29.000000000 
+0200
+++ new/libstorage-ng-4.4.19/storage/Action.cc  2021-06-30 18:16:51.000000000 
+0200
@@ -144,7 +144,7 @@
        Create::get_device(const Actiongraph::Impl& actiongraph) const
        {
            if (!affects_device())
-               ST_THROW(Exception("requested device for action not affecting 
device"));
+               ST_THROW(Exception("requested device for action not affecting 
device, " + details()));
 
            return actiongraph.get_devicegraph(RHS)->find_device(sid);
        }
@@ -154,7 +154,7 @@
        Create::get_holder(const Actiongraph::Impl& actiongraph) const
        {
            if (!affects_holder())
-               ST_THROW(Exception("requested holder for action not affecting 
holder"));
+               ST_THROW(Exception("requested holder for action not affecting 
holder, " + details()));
 
            return 
actiongraph.get_devicegraph(RHS)->find_holder(sid_pair.first, sid_pair.second);
        }
@@ -164,7 +164,7 @@
        Modify::get_device(const Actiongraph::Impl& actiongraph, Side side) 
const
        {
            if (!affects_device())
-               ST_THROW(Exception("requested device for action not affecting 
device"));
+               ST_THROW(Exception("requested device for action not affecting 
device, " + details()));
 
            return actiongraph.get_devicegraph(side)->find_device(sid);
        }
@@ -228,7 +228,7 @@
        Delete::get_device(const Actiongraph::Impl& actiongraph) const
        {
            if (!affects_device())
-               ST_THROW(Exception("requested device for action not affecting 
device"));
+               ST_THROW(Exception("requested device for action not affecting 
device, " + details()));
 
            return actiongraph.get_devicegraph(LHS)->find_device(sid);
        }
@@ -238,7 +238,7 @@
        Delete::get_holder(const Actiongraph::Impl& actiongraph) const
        {
            if (!affects_holder())
-               ST_THROW(Exception("requested holder for action not affecting 
holder"));
+               ST_THROW(Exception("requested holder for action not affecting 
holder, " + details()));
 
            return 
actiongraph.get_devicegraph(LHS)->find_holder(sid_pair.first, sid_pair.second);
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Devices/LvmLv.cc 
new/libstorage-ng-4.4.19/storage/Devices/LvmLv.cc
--- old/libstorage-ng-4.4.15/storage/Devices/LvmLv.cc   2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Devices/LvmLv.cc   2021-06-30 
18:16:51.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -20,6 +20,8 @@
  */
 
 
+#include <boost/algorithm/string.hpp>
+
 #include "storage/Devices/LvmLvImpl.h"
 #include "storage/Devicegraph.h"
 #include "storage/Action.h"
@@ -45,6 +47,18 @@
     }
 
 
+    InvalidStripeSize::InvalidStripeSize(const string& msg)
+       : Exception(msg)
+    {
+    }
+
+
+    InvalidChunkSize::InvalidChunkSize(const string& msg)
+       : Exception(msg)
+    {
+    }
+
+
     LvmLv*
     LvmLv::create(Devicegraph* devicegraph, const string& vg_name, const 
string& lv_name,
                  LvType lv_type)
@@ -119,6 +133,28 @@
     }
 
 
+    bool
+    LvmLv::is_valid_lv_name(const string& lv_name)
+    {
+       static const regex rx("[a-zA-Z0-9+_.][a-zA-Z0-9+_.-]*", 
regex::extended);
+
+       if (!regex_match(lv_name, rx))
+           return false;
+
+       if (lv_name == "." || lv_name == ".." || lv_name == "snapshot" || 
lv_name == "pvmove")
+           return false;
+
+       static const vector<string> illegal_subnames = { "_cdata", "_cmeta", 
"_corig", "_mlog",
+           "_mimage", "_pmspare", "_rimage", "_rmeta", "_tdata", "_tmeta", 
"_vorigin", "_vdata" };
+
+       for (const string& illegal_subname : illegal_subnames)
+           if (boost::contains(lv_name, illegal_subname))
+               return false;
+
+       return true;
+    }
+
+
     LvType
     LvmLv::get_lv_type() const
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Devices/LvmLv.h 
new/libstorage-ng-4.4.19/storage/Devices/LvmLv.h
--- old/libstorage-ng-4.4.15/storage/Devices/LvmLv.h    2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Devices/LvmLv.h    2021-06-30 
18:16:51.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -124,6 +124,22 @@
     };
 
 
+    class InvalidStripeSize : public Exception
+    {
+    public:
+
+       InvalidStripeSize(const std::string& msg);
+    };
+
+
+    class InvalidChunkSize : public Exception
+    {
+    public:
+
+       InvalidChunkSize(const std::string& msg);
+    };
+
+
     /**
      * A Logical Volume of the Logical Volume Manager (LVM).
      */
@@ -171,12 +187,20 @@
        void set_lv_name(const std::string& lv_name);
 
        /**
+        * Check whether a (new and public) logical volume name is valid.
+        */
+       static bool is_valid_lv_name(const std::string& lv_name);
+
+       /**
         * Return the logical volume type.
         *
         * @see LvType
         */
        LvType get_lv_type() const;
 
+       /**
+        * Get the number of stripes.
+        */
        unsigned int get_stripes() const;
 
        /**
@@ -188,19 +212,29 @@
         */
        void set_stripes(unsigned int stripes);
 
+       /**
+        * Get the stripe size.
+        */
        unsigned long long get_stripe_size() const;
 
        /**
-        * @throw Exception
+        * Set the stripe size.
+        *
+        * @see set_stripes(unsigned int)
+        *
+        * @throw InvalidStripeSize, Exception
         */
        void set_stripe_size(unsigned long long stripe_size);
 
+       /**
+        * Get the chunk size. Only thin pools can have a chunk size.
+        */
        unsigned long long get_chunk_size() const;
 
        /**
         * Set the chunk size. Only thin pools can have a chunk size.
         *
-        * @throw Exception
+        * @throw InvalidChunkSize, Exception
         */
        void set_chunk_size(unsigned long long chunk_size);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Devices/LvmLvImpl.cc 
new/libstorage-ng-4.4.19/storage/Devices/LvmLvImpl.cc
--- old/libstorage-ng-4.4.15/storage/Devices/LvmLvImpl.cc       2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Devices/LvmLvImpl.cc       2021-06-30 
18:16:51.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2020] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -456,10 +456,10 @@
        if (stripe_size > 0)
        {
            if (stripe_size < 4 * KiB)
-               ST_THROW(Exception("stripe size below 4 KiB"));
+               ST_THROW(InvalidStripeSize("stripe size below 4 KiB"));
 
            if (!is_power_of_two(stripe_size))
-               ST_THROW(Exception("stripe size not a power of two"));
+               ST_THROW(InvalidStripeSize("stripe size not a power of two"));
        }
 
        Impl::stripe_size = stripe_size;
@@ -480,13 +480,13 @@
        if (chunk_size > 0)
        {
            if (chunk_size < 64 * KiB)
-               ST_THROW(Exception("chunk size below 64 KiB"));
+               ST_THROW(InvalidChunkSize("chunk size below 64 KiB"));
 
            if (chunk_size > 1 * GiB)
-               ST_THROW(Exception("chunk size above 1 GiB"));
+               ST_THROW(InvalidChunkSize("chunk size above 1 GiB"));
 
            if (!is_multiple_of(chunk_size, 64 * KiB))
-               ST_THROW(Exception("chunk size not multiple of 64 KiB"));
+               ST_THROW(InvalidChunkSize("chunk size not multiple of 64 KiB"));
        }
 
        Impl::chunk_size = chunk_size;
@@ -1028,7 +1028,7 @@
            cmd_line += " --chunksize " + to_string(chunk_size / KiB);
        }
 
-       cmd_line += " --name " + quote(lv_name) + " " + 
quote(lvm_vg->get_vg_name());
+       cmd_line += " --name " + quote(lv_name) + " -- " + 
quote(lvm_vg->get_vg_name());
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
@@ -1041,7 +1041,7 @@
 
        const LvmVg* lvm_vg = get_lvm_vg();
 
-       string cmd_line = LVS_BIN " --options vg_name,lv_name,lv_uuid,lv_size 
--units b " +
+       string cmd_line = LVS_BIN " --options vg_name,lv_name,lv_uuid,lv_size 
--units b -- " +
            quote(lvm_vg->get_vg_name() + "/" + lv_name);
 
        SystemCmd cmd(cmd_line, SystemCmd::NoThrow);
@@ -1208,8 +1208,8 @@
        if (action->resize_mode == ResizeMode::SHRINK)
            cmd_line += " --force";
 
-       cmd_line += " " + quote(lvm_vg->get_vg_name() + "/" + lv_name) + " 
--extents " +
-           to_string(lvm_lv_rhs->get_region().get_length());
+       cmd_line += " --extents " + 
to_string(lvm_lv_rhs->get_region().get_length()) + " -- "
+           + quote(lvm_vg->get_vg_name() + "/" + lv_name);
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
@@ -1276,7 +1276,7 @@
     {
        const LvmVg* lvm_vg = get_lvm_vg();
 
-       string cmd_line = LVREMOVE_BIN " --force " + 
quote(lvm_vg->get_vg_name() + "/" + lv_name);
+       string cmd_line = LVREMOVE_BIN " --force -- " + 
quote(lvm_vg->get_vg_name() + "/" + lv_name);
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
@@ -1343,7 +1343,7 @@
     {
        const LvmVg* lvm_vg = get_lvm_vg();
 
-       string cmd_line = LVCHANGE_BIN " --activate y " + 
quote(lvm_vg->get_vg_name() + "/" + lv_name);
+       string cmd_line = LVCHANGE_BIN " --activate y -- " + 
quote(lvm_vg->get_vg_name() + "/" + lv_name);
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
@@ -1410,7 +1410,7 @@
     {
        const LvmVg* lvm_vg = get_lvm_vg();
 
-       string cmd_line = LVCHANGE_BIN " --activate n " + 
quote(lvm_vg->get_vg_name() + "/" + lv_name);
+       string cmd_line = LVCHANGE_BIN " --activate n -- " + 
quote(lvm_vg->get_vg_name() + "/" + lv_name);
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Devices/LvmVg.cc 
new/libstorage-ng-4.4.19/storage/Devices/LvmVg.cc
--- old/libstorage-ng-4.4.15/storage/Devices/LvmVg.cc   2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Devices/LvmVg.cc   2021-06-30 
18:16:51.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2017] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -47,6 +47,12 @@
     }
 
 
+    InvalidExtentSize::InvalidExtentSize(const string& msg)
+       : Exception(msg)
+    {
+    }
+
+
     LvmVg*
     LvmVg::create(Devicegraph* devicegraph, const string& vg_name)
     {
@@ -169,6 +175,21 @@
     }
 
 
+    bool
+    LvmVg::is_valid_vg_name(const string& vg_name)
+    {
+       static const regex rx("[a-zA-Z0-9+_.][a-zA-Z0-9+_.-]*", 
regex::extended);
+
+       if (!regex_match(vg_name, rx))
+           return false;
+
+       if (vg_name == "." || vg_name == "..")
+           return false;
+
+       return true;
+    }
+
+
     LvmPv*
     LvmVg::add_lvm_pv(BlkDevice* blk_device)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Devices/LvmVg.h 
new/libstorage-ng-4.4.19/storage/Devices/LvmVg.h
--- old/libstorage-ng-4.4.15/storage/Devices/LvmVg.h    2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Devices/LvmVg.h    2021-06-30 
18:16:51.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2017] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -49,7 +49,8 @@
     {
     public:
 
-       InvalidExtentSize(unsigned long long extent_size);
+       InvalidExtentSize(unsigned long long extent_size) ST_DEPRECATED;
+       InvalidExtentSize(const std::string& msg);
     };
 
 
@@ -82,6 +83,12 @@
         */
        void set_vg_name(const std::string& vg_name);
 
+       /**
+        * Check whether a volume group name is valid. Does not check for 
collisions in
+        * /dev.
+        */
+       static bool is_valid_vg_name(const std::string& vg_name);
+
        const Region& get_region() const;
 
        /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Devices/LvmVgImpl.cc 
new/libstorage-ng-4.4.19/storage/Devices/LvmVgImpl.cc
--- old/libstorage-ng-4.4.15/storage/Devices/LvmVgImpl.cc       2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Devices/LvmVgImpl.cc       2021-06-30 
18:16:51.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2019] SUSE LLC
+ * Copyright (c) [2016-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -158,8 +158,11 @@
 
        unsigned long long old_extent_size = region.get_block_size();
 
-       if (!is_power_of_two(extent_size) || !is_multiple_of(extent_size, 128 * 
KiB))
-           ST_THROW(InvalidExtentSize(extent_size));
+       if (!is_power_of_two(extent_size))
+           ST_THROW(InvalidExtentSize("extent size not a power of two"));
+
+       if (!is_multiple_of(extent_size, 128 * KiB))
+           ST_THROW(InvalidExtentSize("extent size not multiple of 128 KiB"));
 
        region.set_block_size(extent_size);
 
@@ -555,7 +558,7 @@
     LvmVg::Impl::do_create()
     {
        string cmd_line = VGCREATE_BIN " --physicalextentsize " + 
to_string(get_extent_size()) +
-           "b " + quote(vg_name);
+           "b -- " + quote(vg_name);
 
        for (const LvmPv* lvm_pv : get_lvm_pvs())
            cmd_line += " " + quote(lvm_pv->get_blk_device()->get_name());
@@ -570,7 +573,7 @@
        // log some data about the volume group that might be useful for 
debugging
 
        string cmd_line = VGS_BIN " --options 
vg_name,vg_uuid,vg_size,vg_extent_size,"
-           "vg_extent_count --units b " + quote(vg_name);
+           "vg_extent_count --units b -- " + quote(vg_name);
 
        SystemCmd cmd(cmd_line, SystemCmd::NoThrow);
     }
@@ -596,7 +599,7 @@
     void
     LvmVg::Impl::do_delete() const
     {
-       string cmd_line = VGREMOVE_BIN " " + quote(vg_name);
+       string cmd_line = VGREMOVE_BIN " -- " + quote(vg_name);
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
@@ -667,7 +670,7 @@
     void
     LvmVg::Impl::do_reduce(const LvmPv* lvm_pv) const
     {
-       string cmd_line = VGREDUCE_BIN " " + quote(vg_name) + " " + 
quote(lvm_pv->get_blk_device()->get_name());
+       string cmd_line = VGREDUCE_BIN " -- " + quote(vg_name) + " " + 
quote(lvm_pv->get_blk_device()->get_name());
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
@@ -676,7 +679,7 @@
     void
     LvmVg::Impl::do_extend(const LvmPv* lvm_pv) const
     {
-       string cmd_line = VGEXTEND_BIN " " + quote(vg_name) + " " + 
quote(lvm_pv->get_blk_device()->get_name());
+       string cmd_line = VGEXTEND_BIN " -- " + quote(vg_name) + " " + 
quote(lvm_pv->get_blk_device()->get_name());
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
@@ -700,7 +703,7 @@
     void
     LvmVg::Impl::do_reduce_missing() const
     {
-       string cmd_line = VGREDUCE_BIN " " + quote(vg_name) + " --removemissing 
--force";
+       string cmd_line = VGREDUCE_BIN " --removemissing --force -- " + 
quote(vg_name);
 
        SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
     }
@@ -745,6 +748,9 @@
     bool
     LvmVg::Impl::action_is_my_reallot(const Action::Base* action, const 
Actiongraph::Impl& actiongraph) const
     {
+       if (!action->affects_device())
+           return false;
+
        const Action::Reallot* reallot = dynamic_cast<const 
Action::Reallot*>(action);
        return reallot && reallot->sid == get_sid();
     }
@@ -753,6 +759,9 @@
     bool
     LvmVg::Impl::action_is_my_pv_resize(const Action::Base* action, const 
Actiongraph::Impl& actiongraph) const
     {
+       if (!action->affects_device())
+           return false;
+
        const Action::Resize* resize = dynamic_cast<const 
Action::Resize*>(action);
        if (!resize)
            return false;
@@ -773,6 +782,9 @@
     bool
     LvmVg::Impl::action_uses_vg_space(const Action::Base* action, const 
Actiongraph::Impl& actiongraph) const
     {
+       if (!action->affects_device())
+           return false;
+
        const Action::Create* create_action = dynamic_cast<const 
Action::Create*>(action);
        if (create_action)
            return is_my_lvm_lv(create_action->get_device(actiongraph));
@@ -788,6 +800,9 @@
     bool
     LvmVg::Impl::action_frees_vg_space(const Action::Base* action, const 
Actiongraph::Impl& actiongraph) const
     {
+       if (!action->affects_device())
+           return false;
+
        const Action::Delete* delete_action = dynamic_cast<const 
Action::Delete*>(action);
        if (delete_action)
            return is_my_lvm_lv(delete_action->get_device(actiongraph));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Devices/Md.h 
new/libstorage-ng-4.4.19/storage/Devices/Md.h
--- old/libstorage-ng-4.4.15/storage/Devices/Md.h       2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Devices/Md.h       2021-06-30 
18:16:51.000000000 +0200
@@ -169,7 +169,22 @@
         */
        std::vector<MdParity> get_allowed_md_parities() const;
 
+       /**
+        * Get the chunk size of the MD RAID. The chunk size is not meaningful 
for RAID1.
+        */
        unsigned long get_chunk_size() const;
+
+       /**
+        * Set the chunk size of the MD RAID. The chunk size is not meaningful 
for RAID1.
+        *
+        * The function does not make a complete check of the chunk size since 
that
+        * depends on the RAID Level and the underlying devices. Use the
+        * Devicegraph::check() function.
+        *
+        * Only for MD RAIDs not created on disk yet.
+        *
+        * @throw InvalidChunkSize, Exception
+        */
        void set_chunk_size(unsigned long chunk_size);
 
        /**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Devices/MdImpl.cc 
new/libstorage-ng-4.4.19/storage/Devices/MdImpl.cc
--- old/libstorage-ng-4.4.15/storage/Devices/MdImpl.cc  2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Devices/MdImpl.cc  2021-06-30 
18:16:51.000000000 +0200
@@ -215,7 +215,7 @@
 
        if (check_callbacks && chunk_size > 0)
        {
-           // See man page of mdadm and // 
http://bugzilla.suse.com/show_bug.cgi?id=1065381
+           // See man page of mdadm and 
http://bugzilla.suse.com/show_bug.cgi?id=1065381
            // for the constraints.
 
            switch (md_level)
@@ -331,6 +331,17 @@
     void
     Md::Impl::set_chunk_size(unsigned long chunk_size)
     {
+       if (chunk_size > 0)
+       {
+           // See check().
+
+           if (chunk_size < 4 * KiB)
+               ST_THROW(InvalidChunkSize("chunk size below 4 KiB"));
+
+           if (!is_multiple_of(chunk_size, 512 * B))
+               ST_THROW(InvalidChunkSize("chunk size not multiple of 512 B"));
+       }
+
        if (Impl::chunk_size == chunk_size)
            return;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.4.15/storage/Filesystems/ExfatImpl.cc 
new/libstorage-ng-4.4.19/storage/Filesystems/ExfatImpl.cc
--- old/libstorage-ng-4.4.15/storage/Filesystems/ExfatImpl.cc   2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Filesystems/ExfatImpl.cc   2021-06-30 
18:16:51.000000000 +0200
@@ -84,6 +84,9 @@
     {
        const BlkDevice* blk_device = get_blk_device();
 
+       // TODO labels starting with a '-' work with exfat-utils-1.3. But they 
do not work
+       // with exfatprogs-1.1.2 (see bsc #1187744).
+
        string cmd_line = EXFATLABEL_BIN " " + quote(blk_device->get_name()) + 
" " +
            quote(get_label());
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Filesystems/NtfsImpl.cc 
new/libstorage-ng-4.4.19/storage/Filesystems/NtfsImpl.cc
--- old/libstorage-ng-4.4.15/storage/Filesystems/NtfsImpl.cc    2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Filesystems/NtfsImpl.cc    2021-06-30 
18:16:51.000000000 +0200
@@ -128,6 +128,8 @@
     {
        const BlkDevice* blk_device = get_blk_device();
 
+       // TODO labels starting with a '-' do not work (see bsc #1187746).
+
        string cmd_line = NTFSLABEL_BIN " " + quote(blk_device->get_name()) + " 
" +
            quote(get_label());
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Filesystems/VfatImpl.cc 
new/libstorage-ng-4.4.19/storage/Filesystems/VfatImpl.cc
--- old/libstorage-ng-4.4.15/storage/Filesystems/VfatImpl.cc    2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Filesystems/VfatImpl.cc    2021-06-30 
18:16:51.000000000 +0200
@@ -90,6 +90,9 @@
     {
        const BlkDevice* blk_device = get_blk_device();
 
+       // TODO labels starting with a '-' do not work with dosfstools 4.2, a 
preceding
+       // '--' is needed. But that does not work with dosfstools 4.1.
+
        string cmd_line = FATLABEL_BIN " " + quote(blk_device->get_name()) + " 
" +
            quote(get_label());
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/storage/Utils/JsonFile.cc 
new/libstorage-ng-4.4.19/storage/Utils/JsonFile.cc
--- old/libstorage-ng-4.4.15/storage/Utils/JsonFile.cc  2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/storage/Utils/JsonFile.cc  2021-06-30 
18:16:51.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017 SUSE LLC
+ * Copyright (c) [2017-2021] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -43,10 +43,20 @@
        {
            root = json_tokener_parse_ex(tokener.get(), line.c_str(), 
line.size());
 
-           json_tokener_error jerr = json_tokener_get_error(tokener.get());
-           if (jerr != json_tokener_success && jerr != json_tokener_continue)
-               ST_THROW(Exception("json parser failed"));
+           switch (json_tokener_get_error(tokener.get()))
+           {
+               case json_tokener_continue:
+                   continue;
+
+               case json_tokener_success:
+                   return;
+
+               default:
+                   break;
+           }
        }
+
+       ST_THROW(Exception("json parser failed"));
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/testsuite/Makefile.am 
new/libstorage-ng-4.4.19/testsuite/Makefile.am
--- old/libstorage-ng-4.4.15/testsuite/Makefile.am      2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/testsuite/Makefile.am      2021-06-30 
18:16:51.000000000 +0200
@@ -19,7 +19,7 @@
        md1.test md2.test md3.test md4.test md5.test encryption1.test           
\
        encryption2.test lvm1.test lvm-pv-usable-size.test graphviz.test        
\
        copy-individual.test mountpoint.test bcache1.test graph.test            
\
-       restore.test set-source.test
+       restore.test set-source.test valid-names.test
 
 AM_DEFAULT_SOURCE_EXT = .cc
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/testsuite/Utils/Makefile.am 
new/libstorage-ng-4.4.19/testsuite/Utils/Makefile.am
--- old/libstorage-ng-4.4.15/testsuite/Utils/Makefile.am        2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/testsuite/Utils/Makefile.am        2021-06-30 
18:16:51.000000000 +0200
@@ -9,7 +9,7 @@
 check_PROGRAMS = enum.test udev-encoding.test humanstring.test region.test     
\
        exception.test topology.test alignment.test math.test systemcmd.test    
\
        dirname.test basename.test algorithm.test format.test join.test         
\
-       regex.test sort-by.test
+       regex.test sort-by.test jsonfile.test
 
 AM_DEFAULT_SOURCE_EXT = .cc
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/testsuite/Utils/jsonfile.cc 
new/libstorage-ng-4.4.19/testsuite/Utils/jsonfile.cc
--- old/libstorage-ng-4.4.15/testsuite/Utils/jsonfile.cc        1970-01-01 
01:00:00.000000000 +0100
+++ new/libstorage-ng-4.4.19/testsuite/Utils/jsonfile.cc        2021-06-30 
18:16:51.000000000 +0200
@@ -0,0 +1,68 @@
+
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MODULE libstorage
+
+#include <boost/test/unit_test.hpp>
+
+#include "storage/Utils/JsonFile.h"
+#include "storage/Utils/Exception.h"
+
+using namespace storage;
+
+
+BOOST_AUTO_TEST_CASE(good1)
+{
+    vector<string> lines = {
+       "{}"
+    };
+
+    JsonFile json_file(lines);
+}
+
+
+BOOST_AUTO_TEST_CASE(good2)
+{
+    vector<string> lines = {
+       "{ \"device\" : \"/dev/sda\" }"
+    };
+
+    JsonFile json_file(lines);
+
+    string tmp;
+    BOOST_CHECK(get_child_value(json_file.get_root(), "device", tmp));
+    BOOST_CHECK_EQUAL(tmp, "/dev/sda");
+}
+
+
+BOOST_AUTO_TEST_CASE(good3)
+{
+    vector<string> lines = {
+       "{ \"device\" : \"/dev/sda\" }  ",
+       "  "
+    };
+
+    JsonFile json_file(lines);
+
+    string tmp;
+    BOOST_CHECK(get_child_value(json_file.get_root(), "device", tmp));
+    BOOST_CHECK_EQUAL(tmp, "/dev/sda");
+}
+
+
+BOOST_AUTO_TEST_CASE(bad1)
+{
+    vector<string> lines = {
+    };
+
+    BOOST_CHECK_THROW({ JsonFile json_file(lines); }, Exception);
+}
+
+
+BOOST_AUTO_TEST_CASE(bad2)
+{
+    vector<string> lines = {
+       "{"
+    };
+
+    BOOST_CHECK_THROW({ JsonFile json_file(lines); }, Exception);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.4.15/testsuite/dependencies/Makefile.am 
new/libstorage-ng-4.4.19/testsuite/dependencies/Makefile.am
--- old/libstorage-ng-4.4.15/testsuite/dependencies/Makefile.am 2021-06-21 
12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/testsuite/dependencies/Makefile.am 2021-06-30 
18:16:51.000000000 +0200
@@ -2,7 +2,7 @@
 # Makefile.am for libstorage/testsuite/dependencies
 #
 
-SUBDIRS = luks lvm md partitions btrfs partition-tables resize bcache
+SUBDIRS = luks lvm md partitions btrfs partition-tables resize bcache rear
 
 AM_CPPFLAGS = -I$(top_srcdir)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.4.15/testsuite/dependencies/lvm/complex1-mockup.xml 
new/libstorage-ng-4.4.19/testsuite/dependencies/lvm/complex1-mockup.xml
--- old/libstorage-ng-4.4.15/testsuite/dependencies/lvm/complex1-mockup.xml     
2021-06-21 12:33:29.000000000 +0200
+++ new/libstorage-ng-4.4.19/testsuite/dependencies/lvm/complex1-mockup.xml     
2021-06-30 18:16:51.000000000 +0200
@@ -5,11 +5,11 @@
       <name>/usr/bin/udevadm settle --timeout=20</name>
     </Command>
     <Command>
-      <name>/sbin/lvresize --force 'testvg/secondlv' --extents 640</name>
+      <name>/sbin/lvresize --force --extents 640 -- 'testvg/secondlv'</name>
       <!-- stdout missing -->
     </Command>
     <Command>
-      <name>/sbin/vgreduce 'testvg' '/dev/sdb3'</name>
+      <name>/sbin/vgreduce -- 'testvg' '/dev/sdb3'</name>
       <!-- stdout missing -->
     </Command>
     <Command>
@@ -25,19 +25,19 @@
       <!-- stdout missing -->
     </Command>
     <Command>
-      <name>/sbin/vgextend 'testvg' '/dev/sdb4'</name>
+      <name>/sbin/vgextend -- 'testvg' '/dev/sdb4'</name>
       <!-- stdout missing -->
     </Command>
     <Command>
-      <name>/sbin/lvresize 'testvg/firstlv' --extents 5120</name>
+      <name>/sbin/lvresize --extents 5120 -- 'testvg/firstlv'</name>
       <!-- stdout missing -->
     </Command>
     <Command>
-      <name>/sbin/lvcreate --zero=y --wipesignatures=y --yes --extents 640 
--name 'newlv' 'testvg'</name>
+      <name>/sbin/lvcreate --zero=y --wipesignatures=y --yes --extents 640 
--name 'newlv' -- 'testvg'</name>
       <!-- stdout missing -->
     </Command>
     <Command>
-      <name>/sbin/lvs --options vg_name,lv_name,lv_uuid,lv_size --units b 
'testvg/newlv'</name>
+      <name>/sbin/lvs --options vg_name,lv_name,lv_uuid,lv_size --units b -- 
'testvg/newlv'</name>
       <!-- stdout missing -->
     </Command>
   </Commands>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.4.15/testsuite/dependencies/rear/Makefile.am 
new/libstorage-ng-4.4.19/testsuite/dependencies/rear/Makefile.am
--- old/libstorage-ng-4.4.15/testsuite/dependencies/rear/Makefile.am    
1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-ng-4.4.19/testsuite/dependencies/rear/Makefile.am    
2021-06-30 18:16:51.000000000 +0200
@@ -0,0 +1,19 @@
+#
+# Makefile.am for libstorage/testsuite/dependencies/rear
+#
+
+AM_CPPFLAGS = -I$(top_srcdir)
+
+LDADD = ../../../storage/libstorage-ng.la ../../helpers/libhelpers.la          
\
+       -lboost_unit_test_framework
+
+check_PROGRAMS =                                                               
\
+       rear1.test
+
+AM_DEFAULT_SOURCE_EXT = .cc
+
+TESTS = $(check_PROGRAMS)
+
+EXTRA_DIST =                                                                   
        \
+       rear1-probed.xml rear1-staging.xml rear1-expected.txt
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.4.15/testsuite/dependencies/rear/rear1-expected.txt 
new/libstorage-ng-4.4.19/testsuite/dependencies/rear/rear1-expected.txt
--- old/libstorage-ng-4.4.15/testsuite/dependencies/rear/rear1-expected.txt     
1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-ng-4.4.19/testsuite/dependencies/rear/rear1-expected.txt     
2021-06-30 18:16:51.000000000 +0200
@@ -0,0 +1,27 @@
+1a - Create GPT on /dev/sda -> 1b
+1b - Set protective MBR boot flag of GPT on /dev/sda -> 2a
+
+2a - Create partition /dev/sda2 (19.99 GiB) -> 2b
+2b - Set id of partition /dev/sda2 to Linux LVM -> 2c
+2c - Set legacy boot flag of partition /dev/sda2 -> 3a
+
+3a - Create physical volume on /dev/sda2 -> 3b
+3b - Create volume group system (19.99 GiB) from /dev/sda2 (19.99 GiB) -> 3c
+3c - Create logical volume root (12.59 GiB) on volume group system -> 4a
+
+4a - Create btrfs on /dev/system/root (12.59 GiB) -> 4b
+4b - Enable quota on /dev/system/root (12.59 GiB) -> 4c 4d 5a 7a
+4c - Create qgroup 1/0 on /dev/system/root (12.59 GiB) -> 7a
+4d - Create subvolume @ on /dev/system/root (12.59 GiB) -> 4e
+4e - Create subvolume @/.snapshots on /dev/system/root (12.59 GiB) -> 4f 4h 5b
+4f - Create subvolume @/.snapshots/1/snapshot on /dev/system/root (12.59 GiB) 
-> 4g
+4g - Set default subvolume to subvolume @/.snapshots/1/snapshot on 
/dev/system/root (12.59 GiB) -> 4h
+4h - Create subvolume @/.snapshots/2/snapshot on /dev/system/root (12.59 GiB) 
-> 4c 7a
+
+5a - Mount /dev/system/root (12.59 GiB) at / -> 5b 6a
+5b - Mount subvolume @/.snapshots on /dev/system/root (12.59 GiB) at 
/.snapshots -> 6b
+
+6a - Add mount point / of /dev/system/root (12.59 GiB) to /etc/fstab ->
+6b - Add mount point /.snapshots of subvolume @/.snapshots on /dev/system/root 
(12.59 GiB) to /etc/fstab ->
+
+7a - Assign qgroup of subvolume @/.snapshots/2/snapshot to qgroup 1/0 on 
/dev/system/root (12.59 GiB) ->
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.4.15/testsuite/dependencies/rear/rear1-probed.xml 
new/libstorage-ng-4.4.19/testsuite/dependencies/rear/rear1-probed.xml
--- old/libstorage-ng-4.4.15/testsuite/dependencies/rear/rear1-probed.xml       
1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-ng-4.4.19/testsuite/dependencies/rear/rear1-probed.xml       
2021-06-30 18:16:51.000000000 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<Devicegraph>
+  <Devices>
+    <Disk>
+      <sid>42</sid>
+      <name>/dev/sda</name>
+      <sysfs-name>sda</sysfs-name>
+      
<sysfs-path>/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0/block/sda</sysfs-path>
+      <region>
+        <length>41943040</length>
+        <block-size>512</block-size>
+      </region>
+      <udev-path>pci-0000:00:01.1-ata-1</udev-path>
+      <udev-path>pci-0000:00:01.1-ata-1.0</udev-path>
+      <udev-id>ata-QEMU_HARDDISK_QM00001</udev-id>
+      <udev-id>scsi-0ATA_QEMU_HARDDISK_QM00001</udev-id>
+      <udev-id>scsi-1ATA_QEMU_HARDDISK_QM00001</udev-id>
+      <udev-id>scsi-SATA_QEMU_HARDDISK_QM00001</udev-id>
+      <range>256</range>
+      <rotational>true</rotational>
+      <transport>ATA</transport>
+    </Disk>
+  </Devices>
+</Devicegraph>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.4.15/testsuite/dependencies/rear/rear1-staging.xml 
new/libstorage-ng-4.4.19/testsuite/dependencies/rear/rear1-staging.xml
--- old/libstorage-ng-4.4.15/testsuite/dependencies/rear/rear1-staging.xml      
1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-ng-4.4.19/testsuite/dependencies/rear/rear1-staging.xml      
2021-06-30 18:16:51.000000000 +0200
@@ -0,0 +1,281 @@
+<?xml version="1.0"?>
+<Devicegraph>
+  <Devices>
+    <Disk>
+      <sid>42</sid>
+      <name>/dev/sda</name>
+      <sysfs-name>sda</sysfs-name>
+      
<sysfs-path>/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0/block/sda</sysfs-path>
+      <region>
+        <length>41943040</length>
+        <block-size>512</block-size>
+      </region>
+      <udev-path>pci-0000:00:01.1-ata-1</udev-path>
+      <udev-path>pci-0000:00:01.1-ata-1.0</udev-path>
+      <udev-id>ata-QEMU_HARDDISK_QM00001</udev-id>
+      <udev-id>scsi-0ATA_QEMU_HARDDISK_QM00001</udev-id>
+      <udev-id>scsi-1ATA_QEMU_HARDDISK_QM00001</udev-id>
+      <udev-id>scsi-SATA_QEMU_HARDDISK_QM00001</udev-id>
+      <range>256</range>
+      <rotational>true</rotational>
+      <transport>ATA</transport>
+    </Disk>
+    <LvmVg>
+      <sid>43</sid>
+      <vg-name>system</vg-name>
+      <uuid>53KBMR-icai-WK2Y-fOc4-9duz-2AGd-JvKFHh</uuid>
+      <region>
+        <length>5117</length>
+        <block-size>4194304</block-size>
+      </region>
+      <reserved-extents>0</reserved-extents>
+    </LvmVg>
+    <LvmPv>
+      <sid>44</sid>
+      <uuid>e2NM5J-brmg-6kic-exST-oBwb-GY2h-KREbYJ</uuid>
+      <pe-start>1048576</pe-start>
+    </LvmPv>
+    <LvmLv>
+      <sid>46</sid>
+      <name>/dev/system/root</name>
+      <sysfs-name>dm-1</sysfs-name>
+      <sysfs-path>/devices/virtual/block/dm-1</sysfs-path>
+      <region>
+        <length>3224</length>
+        <block-size>4194304</block-size>
+      </region>
+      <dm-table-name>system-root</dm-table-name>
+      <lv-name>root</lv-name>
+      <lv-type>normal</lv-type>
+      <uuid>yUY66K-3gZv-DIKO-wAuk-1ltP-Z7FF-4FgsQt</uuid>
+      <used-extents>3224</used-extents>
+      <stripes>1</stripes>
+    </LvmLv>
+    <Gpt>
+      <sid>48</sid>
+      <pmbr-boot>true</pmbr-boot>
+    </Gpt>
+    <Partition>
+      <sid>50</sid>
+      <name>/dev/sda2</name>
+      <sysfs-name>sda2</sysfs-name>
+      
<sysfs-path>/devices/pci0000:00/0000:00:01.1/ata1/host0/target0:0:0/0:0:0:0/block/sda/sda2</sysfs-path>
+      <region>
+        <start>18432</start>
+        <length>41924575</length>
+        <block-size>512</block-size>
+      </region>
+      <udev-path>pci-0000:00:01.1-ata-1-part2</udev-path>
+      <udev-path>pci-0000:00:01.1-ata-1.0-part2</udev-path>
+      <udev-id>ata-QEMU_HARDDISK_QM00001-part2</udev-id>
+      <udev-id>scsi-0ATA_QEMU_HARDDISK_QM00001-part2</udev-id>
+      <udev-id>scsi-1ATA_QEMU_HARDDISK_QM00001-part2</udev-id>
+      <udev-id>scsi-SATA_QEMU_HARDDISK_QM00001-part2</udev-id>
+      <type>primary</type>
+      <id>142</id>
+      <legacy-boot>true</legacy-boot>
+      <uuid>085fa6d8-ac3f-45e5-a1a5-1ee9d06648e4</uuid>
+    </Partition>
+    <Btrfs>
+      <sid>55</sid>
+      <uuid>2fda6d6f-3d6e-4da9-8509-dd829d41434b</uuid>
+      <metadata-raid-level>DUP</metadata-raid-level>
+      <data-raid-level>SINGLE</data-raid-level>
+      <quota>true</quota>
+    </Btrfs>
+    <BtrfsSubvolume>
+      <sid>56</sid>
+      <id>5</id>
+      <path></path>
+    </BtrfsSubvolume>
+    <BtrfsSubvolume>
+      <sid>57</sid>
+      <id>256</id>
+      <path>@</path>
+    </BtrfsSubvolume>
+    <BtrfsSubvolume>
+      <sid>66</sid>
+      <id>266</id>
+      <path>@/.snapshots</path>
+    </BtrfsSubvolume>
+    <BtrfsSubvolume>
+      <sid>67</sid>
+      <id>267</id>
+      <path>@/.snapshots/1/snapshot</path>
+      <default-btrfs-subvolume>true</default-btrfs-subvolume>
+    </BtrfsSubvolume>
+    <BtrfsSubvolume>
+      <sid>68</sid>
+      <id>271</id>
+      <path>@/.snapshots/2/snapshot</path>
+    </BtrfsSubvolume>
+    <BtrfsQgroup>
+      <sid>75</sid>
+      <id>0/5</id>
+      <referenced>16384</referenced>
+      <exclusive>16384</exclusive>
+    </BtrfsQgroup>
+    <BtrfsQgroup>
+      <sid>76</sid>
+      <id>0/256</id>
+      <referenced>16384</referenced>
+      <exclusive>16384</exclusive>
+    </BtrfsQgroup>
+    <BtrfsQgroup>
+      <sid>85</sid>
+      <id>0/266</id>
+      <referenced>77824</referenced>
+      <exclusive>77824</exclusive>
+    </BtrfsQgroup>
+    <BtrfsQgroup>
+      <sid>86</sid>
+      <id>0/267</id>
+      <referenced>2890870784</referenced>
+      <exclusive>73437184</exclusive>
+    </BtrfsQgroup>
+    <BtrfsQgroup>
+      <sid>87</sid>
+      <id>0/271</id>
+      <referenced>2860724224</referenced>
+      <exclusive>14327808</exclusive>
+    </BtrfsQgroup>
+    <BtrfsQgroup>
+      <sid>94</sid>
+      <id>1/0</id>
+      <referenced>2960637952</referenced>
+      <exclusive>143204352</exclusive>
+    </BtrfsQgroup>
+    <MountPoint>
+      <sid>95</sid>
+      <path>/</path>
+      <rootprefixed>true</rootprefixed>
+      <mount-by>device</mount-by>
+      <mount-type>btrfs</mount-type>
+      <active>true</active>
+      <in-etc-fstab>true</in-etc-fstab>
+      <id-used-in-etc-fstab>1</id-used-in-etc-fstab>
+      <freq>0</freq>
+      <passno>0</passno>
+    </MountPoint>
+    <MountPoint>
+      <sid>104</sid>
+      <path>/.snapshots</path>
+      <rootprefixed>true</rootprefixed>
+      <mount-by>device</mount-by>
+      <mount-options>subvol=/@/.snapshots</mount-options>
+      <mount-type>btrfs</mount-type>
+      <active>true</active>
+      <in-etc-fstab>true</in-etc-fstab>
+      <id-used-in-etc-fstab>1</id-used-in-etc-fstab>
+      <freq>0</freq>
+      <passno>0</passno>
+    </MountPoint>
+  </Devices>
+  <Holders>
+    <Subdevice>
+      <source-sid>44</source-sid>
+      <target-sid>43</target-sid>
+    </Subdevice>
+    <Subdevice>
+      <source-sid>43</source-sid>
+      <target-sid>46</target-sid>
+    </Subdevice>
+    <User>
+      <source-sid>42</source-sid>
+      <target-sid>48</target-sid>
+    </User>
+    <Subdevice>
+      <source-sid>48</source-sid>
+      <target-sid>50</target-sid>
+    </Subdevice>
+    <User>
+      <source-sid>50</source-sid>
+      <target-sid>44</target-sid>
+    </User>
+    <Subdevice>
+      <source-sid>55</source-sid>
+      <target-sid>56</target-sid>
+    </Subdevice>
+    <FilesystemUser>
+      <source-sid>46</source-sid>
+      <target-sid>55</target-sid>
+      <id>1</id>
+    </FilesystemUser>
+    <Subdevice>
+      <source-sid>56</source-sid>
+      <target-sid>57</target-sid>
+    </Subdevice>
+    <Subdevice>
+      <source-sid>57</source-sid>
+      <target-sid>66</target-sid>
+    </Subdevice>
+    <Subdevice>
+      <source-sid>66</source-sid>
+      <target-sid>67</target-sid>
+    </Subdevice>
+    <Subdevice>
+      <source-sid>66</source-sid>
+      <target-sid>68</target-sid>
+    </Subdevice>
+    <Snapshot>
+      <source-sid>67</source-sid>
+      <target-sid>68</target-sid>
+    </Snapshot>
+    <BtrfsQgroupRelation>
+      <source-sid>55</source-sid>
+      <target-sid>75</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>56</source-sid>
+      <target-sid>75</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>55</source-sid>
+      <target-sid>76</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>57</source-sid>
+      <target-sid>76</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>55</source-sid>
+      <target-sid>85</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>66</source-sid>
+      <target-sid>85</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>55</source-sid>
+      <target-sid>86</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>67</source-sid>
+      <target-sid>86</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>55</source-sid>
+      <target-sid>87</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>68</source-sid>
+      <target-sid>87</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>55</source-sid>
+      <target-sid>94</target-sid>
+    </BtrfsQgroupRelation>
+    <BtrfsQgroupRelation>
+      <source-sid>87</source-sid>
+      <target-sid>94</target-sid>
+    </BtrfsQgroupRelation>
+    <User>
+      <source-sid>55</source-sid>
+      <target-sid>95</target-sid>
+    </User>
+    <User>
+      <source-sid>66</source-sid>
+      <target-sid>104</target-sid>
+    </User>
+  </Holders>
+</Devicegraph>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.4.15/testsuite/dependencies/rear/rear1.cc 
new/libstorage-ng-4.4.19/testsuite/dependencies/rear/rear1.cc
--- old/libstorage-ng-4.4.15/testsuite/dependencies/rear/rear1.cc       
1970-01-01 01:00:00.000000000 +0100
+++ new/libstorage-ng-4.4.19/testsuite/dependencies/rear/rear1.cc       
2021-06-30 18:16:51.000000000 +0200
@@ -0,0 +1,20 @@
+
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MODULE libstorage
+
+#include <boost/test/unit_test.hpp>
+
+#include "storage/Utils/Logger.h"
+#include "testsuite/helpers/TsCmp.h"
+
+
+using namespace storage;
+
+
+BOOST_AUTO_TEST_CASE(dependencies)
+{
+    set_logger(get_stdout_logger());
+
+    TsCmpActiongraph cmp("rear1");
+    BOOST_CHECK_MESSAGE(cmp.ok(), cmp);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.4.15/testsuite/valid-names.cc 
new/libstorage-ng-4.4.19/testsuite/valid-names.cc
--- old/libstorage-ng-4.4.15/testsuite/valid-names.cc   1970-01-01 
01:00:00.000000000 +0100
+++ new/libstorage-ng-4.4.19/testsuite/valid-names.cc   2021-06-30 
18:16:51.000000000 +0200
@@ -0,0 +1,54 @@
+
+#define BOOST_TEST_DYN_LINK
+#define BOOST_TEST_MODULE libstorage
+
+#include <iostream>
+#include <boost/algorithm/string.hpp>
+#include <boost/test/unit_test.hpp>
+
+#include "storage/Devices/LvmVg.h"
+#include "storage/Devices/LvmLv.h"
+
+
+using namespace std;
+using namespace storage;
+
+
+BOOST_AUTO_TEST_CASE(valid_vg_name)
+{
+    BOOST_CHECK(LvmVg::is_valid_vg_name("test"));
+    BOOST_CHECK(LvmVg::is_valid_vg_name("hello-world"));
+    BOOST_CHECK(LvmVg::is_valid_vg_name("data123"));
+}
+
+
+BOOST_AUTO_TEST_CASE(invalid_vg_name)
+{
+    BOOST_CHECK(!LvmVg::is_valid_vg_name(""));
+    BOOST_CHECK(!LvmVg::is_valid_vg_name(".."));
+    BOOST_CHECK(!LvmVg::is_valid_vg_name("-test"));
+    BOOST_CHECK(!LvmVg::is_valid_vg_name("hello world"));
+    BOOST_CHECK(!LvmVg::is_valid_vg_name("sch??ne-neue-Welt"));
+}
+
+
+BOOST_AUTO_TEST_CASE(valid_lv_name)
+{
+    BOOST_CHECK(LvmLv::is_valid_lv_name("test"));
+    BOOST_CHECK(LvmLv::is_valid_lv_name("hello-world"));
+    BOOST_CHECK(LvmLv::is_valid_lv_name("data123"));
+}
+
+
+BOOST_AUTO_TEST_CASE(invalid_lv_name)
+{
+    BOOST_CHECK(!LvmLv::is_valid_lv_name(""));
+    BOOST_CHECK(!LvmLv::is_valid_lv_name(".."));
+    BOOST_CHECK(!LvmLv::is_valid_lv_name("-test"));
+    BOOST_CHECK(!LvmLv::is_valid_lv_name("hello world"));
+    BOOST_CHECK(!LvmLv::is_valid_lv_name("sch??ne-neue-Welt"));
+
+    BOOST_CHECK(!LvmLv::is_valid_lv_name("snapshot"));
+
+    BOOST_CHECK(!LvmLv::is_valid_lv_name("test_cdata"));
+}

Reply via email to