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 2026-07-08 17:35:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old)
 and      /work/SRC/openSUSE:Factory/.libstorage-ng.new.1982 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libstorage-ng"

Wed Jul  8 17:35:21 2026 rev:348 rq:1364174 version:4.5.341

Changes:
--------
--- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes      
2026-07-06 12:28:36.783646620 +0200
+++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1982/libstorage-ng.changes    
2026-07-08 17:37:12.354870155 +0200
@@ -1,0 +2,16 @@
+Tue Jul 7 06:30:25 UTC 2026 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#1089
+- minor improvements calling external programs
+- 4.5.341
+
+--------------------------------------------------------------------
+Mon Jul 6 11:28:12 UTC 2026 - [email protected]
+
+- merge gh#openSUSE/libstorage-ng#1088
+- provide functions for encryption format and open options using
+  vector of strings
+- extended tests
+- 4.5.340
+
+--------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ libstorage-ng.spec ++++++
--- /var/tmp/diff_new_pack.yCG96Z/_old  2026-07-08 17:37:16.107002536 +0200
+++ /var/tmp/diff_new_pack.yCG96Z/_new  2026-07-08 17:37:16.131003383 +0200
@@ -18,7 +18,7 @@
 
 %define libname %{name}1
 Name:           libstorage-ng
-Version:        4.5.339
+Version:        4.5.341
 Release:        0
 Summary:        Library for storage management
 License:        GPL-2.0-only

++++++ libstorage-ng-4.5.339.tar.xz -> libstorage-ng-4.5.341.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/VERSION 
new/libstorage-ng-4.5.341/VERSION
--- old/libstorage-ng-4.5.339/VERSION   2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/VERSION   2026-07-07 08:30:25.000000000 +0200
@@ -1 +1 @@
-4.5.339
+4.5.341
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/integration-tests/luks/create-pervasive.py 
new/libstorage-ng-4.5.341/integration-tests/luks/create-pervasive.py
--- old/libstorage-ng-4.5.339/integration-tests/luks/create-pervasive.py        
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/integration-tests/luks/create-pervasive.py        
2026-07-07 08:30:25.000000000 +0200
@@ -25,7 +25,8 @@
 luks = to_luks(dasdb1.create_encryption("cr-dasdb1", EncryptionType_LUKS2))
 
 luks.set_key_file("/etc/luks_keys/dasdb1.key")
-luks.set_format_options("--master-key-file 
'/etc/zkey/repository/secure_xtskey1.skey' --key-size 1024 --cipher 
paes-xts-plain64 --sector-size 4096")
+luks.set_format_options_v2([ "--master-key-file", 
"/etc/zkey/repository/secure_xtskey1.skey", "--key-size", "1024",
+                             "--cipher", "paes-xts-plain64", "--sector-size", 
"4096" ])
 
 ext4 = luks.create_blk_filesystem(FsType_EXT4)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/integration-tests/luks/create-with-integrity.py 
new/libstorage-ng-4.5.341/integration-tests/luks/create-with-integrity.py
--- old/libstorage-ng-4.5.339/integration-tests/luks/create-with-integrity.py   
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/integration-tests/luks/create-with-integrity.py   
2026-07-07 08:30:25.000000000 +0200
@@ -21,7 +21,7 @@
 luks = to_luks(sdc1.create_encryption("cr-test", EncryptionType_LUKS2))
 
 luks.set_pbkdf("argon2i")
-luks.set_format_options("--pbkdf-memory=1024")
+luks.set_format_options_v2(VectorString([ "--pbkdf-memory=1024" ]))
 luks.set_password("12345678")
 luks.set_label("TOP-SECRET")
 luks.set_cipher("aegis128-random")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/integration-tests/luks/create.py 
new/libstorage-ng-4.5.341/integration-tests/luks/create.py
--- old/libstorage-ng-4.5.339/integration-tests/luks/create.py  2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/integration-tests/luks/create.py  2026-07-07 
08:30:25.000000000 +0200
@@ -21,9 +21,10 @@
 luks = to_luks(sdc1.create_encryption("cr-test", EncryptionType_LUKS2))
 
 luks.set_pbkdf("argon2i")
-luks.set_format_options("--pbkdf-memory=1024")
+luks.set_format_options_v2(VectorString([ "--pbkdf-memory", "1024" ]))
+luks.set_open_options_v2(VectorString([ "--key-slot", "0" ]))
 luks.set_password("12345678")
-luks.set_label("TOP-SECRET")
+luks.set_label("-TOP-SECRET-")
 luks.set_mount_by(MountByType_LABEL)
 
 print(staging)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/integration-tests/luks/grow.py 
new/libstorage-ng-4.5.341/integration-tests/luks/grow.py
--- old/libstorage-ng-4.5.339/integration-tests/luks/grow.py    2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/integration-tests/luks/grow.py    2026-07-07 
08:30:25.000000000 +0200
@@ -1,7 +1,7 @@
 #!/usr/bin/python3
 
 # requirements: partition /dev/sdc1 with at least 512MiB space behind
-# /dev/sdc1 and luks on it, possible also something on luks, e.g. filesystem
+# /dev/sdc1 and luks1 on it, possible also something on luks, e.g. filesystem
 # or lvm pv
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/integration-tests/luks/shrink.py 
new/libstorage-ng-4.5.341/integration-tests/luks/shrink.py
--- old/libstorage-ng-4.5.339/integration-tests/luks/shrink.py  2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/integration-tests/luks/shrink.py  2026-07-07 
08:30:25.000000000 +0200
@@ -1,7 +1,7 @@
 #!/usr/bin/python3
 
 # requirements: partition /dev/sdc1 with size at least 1 GiB and luks on it,
-# possible also something on luks, e.g. filesystem or lvm pv
+# possible also something on luks1, e.g. filesystem or lvm pv
 
 
 from storage import *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/integration-tests/misc/activate.py 
new/libstorage-ng-4.5.341/integration-tests/misc/activate.py
--- old/libstorage-ng-4.5.339/integration-tests/misc/activate.py        
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/integration-tests/misc/activate.py        
2026-07-07 08:30:25.000000000 +0200
@@ -6,6 +6,7 @@
 from sys import exit
 from storage import *
 from storageitu import *
+from os import environ
 
 
 set_logger(get_logfile_logger())
@@ -56,6 +57,8 @@
 
 my_activate_callbacks = MyActivateCallbacks()
 
+# environ["LIBSTORAGE_MDADM_ACTIVATE_METHOD"] = "1"
+
 environment = Environment(False)
 
 storage = Storage(environment)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/integration-tests/partitions/set-label.py 
new/libstorage-ng-4.5.341/integration-tests/partitions/set-label.py
--- old/libstorage-ng-4.5.339/integration-tests/partitions/set-label.py 
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/integration-tests/partitions/set-label.py 
2026-07-07 08:30:25.000000000 +0200
@@ -32,6 +32,8 @@
 # partition.set_label("\"'test'\"")
 # partition.set_label("'\"test\"'")
 
+# partition.set_label("-test-")
+
 print(staging)
 
 commit(storage)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Devices/BitlockerV2Impl.cc 
new/libstorage-ng-4.5.341/storage/Devices/BitlockerV2Impl.cc
--- old/libstorage-ng-4.5.339/storage/Devices/BitlockerV2Impl.cc        
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Devices/BitlockerV2Impl.cc        
2026-07-07 08:30:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2022-2023] SUSE LLC
+ * Copyright (c) [2022-2026] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -216,8 +216,8 @@
            // TRANSLATORS: progress message
            message_callback(activate_callbacks, sformat(_("Activating 
BitLocker %s"), uuid));
 
-           SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", 
"open", "--type", "bitlk", name,
-               dm_table_name, "--tries", "1", "--key-file", "-" };
+           SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", 
"--type", "bitlk", "--tries", "1",
+               "--key-file", "-", "--", "open", name, dm_table_name,  };
 
            SystemCmd::Options cmd_options(cmd_args, SystemCmd::DoThrow);
            cmd_options.stdin_text = password;
@@ -325,7 +325,7 @@
            if (!boost::starts_with(value.second.uuid, "CRYPT-BITLK"))
                continue;
 
-           SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", 
"close", value.first };
+           SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "--", 
"close", value.first };
 
            SystemCmd cmd(cmd_args);
 
@@ -477,7 +477,7 @@
     {
        const BlkDevice* blk_device = get_blk_device();
 
-       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "erase", 
blk_device->get_name() };
+       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "--", 
"erase", blk_device->get_name() };
 
        SystemCmd cmd(cmd_args, SystemCmd::DoThrow);
 
@@ -493,17 +493,30 @@
     {
        const BlkDevice* blk_device = get_blk_device();
 
-       string cmd_line = CRYPTSETUP_BIN " --batch-mode open --type bitlk " + 
quote(blk_device->get_name()) +
-           " " + quote(get_dm_table_name()) + " --tries 1 " + 
get_open_options();
+       if (get_open_options().empty())
+       {
+           SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", 
"--type", "bitlk", "--tries", "1" };
+
+           cmd_args << get_open_options_v2();
+
+           add_key_file_option_and_execute_v2(cmd_args, "open", { 
blk_device->get_name(), get_dm_table_name() });
+       }
+       else
+       {
+           // code path deprecated
 
-       add_key_file_option_and_execute(cmd_line);
+           string cmd_line = CRYPTSETUP_BIN " --batch-mode open --type bitlk " 
+ quote(blk_device->get_name()) +
+               " " + quote(get_dm_table_name()) + " --tries 1 " + 
get_open_options();
+
+           add_key_file_option_and_execute(cmd_line);
+       }
     }
 
 
     void
     BitlockerV2::Impl::do_deactivate()
     {
-       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "close", 
get_dm_table_name() };
+       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "--", 
"close", get_dm_table_name() };
 
        SystemCmd cmd(cmd_args, SystemCmd::DoThrow);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Devices/Encryption.cc 
new/libstorage-ng-4.5.341/storage/Devices/Encryption.cc
--- old/libstorage-ng-4.5.339/storage/Devices/Encryption.cc     2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Devices/Encryption.cc     2026-07-07 
08:30:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2023] SUSE LLC
+ * Copyright (c) [2016-2026] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -236,7 +236,7 @@
 
 
     void
-    Encryption::set_pbkdf(const std::string& pbkdf)
+    Encryption::set_pbkdf(const string& pbkdf)
     {
        get_impl().set_pbkdf(pbkdf);
     }
@@ -250,7 +250,7 @@
 
 
     void
-    Encryption::set_integrity(const std::string& integrity)
+    Encryption::set_integrity(const string& integrity)
     {
        get_impl().set_integrity(integrity);
     }
@@ -284,6 +284,20 @@
     }
 
 
+    const vector<string>&
+    Encryption::get_open_options_v2() const
+    {
+       return get_impl().get_open_options_v2();
+    }
+
+
+    void
+    Encryption::set_open_options_v2(const vector<string>& open_options_v2)
+    {
+       get_impl().set_open_options_v2(open_options_v2);
+    }
+
+
     vector<Encryption*>
     Encryption::get_all(Devicegraph* devicegraph)
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Devices/Encryption.h 
new/libstorage-ng-4.5.341/storage/Devices/Encryption.h
--- old/libstorage-ng-4.5.339/storage/Devices/Encryption.h      2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Devices/Encryption.h      2026-07-07 
08:30:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2023] SUSE LLC
+ * Copyright (c) [2016-2026] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -235,16 +235,20 @@
         */
        const BlkDevice* get_blk_device() const;
 
+       const std::string& get_open_options() const ST_DEPRECATED;
+       void set_open_options(const std::string& open_options) ST_DEPRECATED;
+
        /**
         * Get extra options for open calls.
         */
-       const std::string& get_open_options() const;
+       const std::vector<std::string>& get_open_options_v2() const;
 
        /**
-        * Set extra options for open calls. The options are
-        * injected as-is to the command so must be properly quoted.
+        * Set extra options for open calls. No quoting required. It is 
undefined where
+        * exactly the extra options are inserted into the command line options 
of the
+        * external program.
         */
-       void set_open_options(const std::string& open_options);
+       void set_open_options_v2(const std::vector<std::string>& 
open_options_v2);
 
        /**
         * Get all Encryption objects of the devicegraph.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Devices/EncryptionImpl.cc 
new/libstorage-ng-4.5.341/storage/Devices/EncryptionImpl.cc
--- old/libstorage-ng-4.5.339/storage/Devices/EncryptionImpl.cc 2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Devices/EncryptionImpl.cc 2026-07-07 
08:30:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2025] SUSE LLC
+ * Copyright (c) [2016-2026] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -95,6 +95,7 @@
        getChildValue(node, "in-etc-crypttab", in_etc_crypttab);
 
        getChildValue(node, "open-options", open_options);
+       getChildValue(node, "open-options-v2", open_options_v2);
     }
 
 
@@ -229,6 +230,7 @@
        setChildValue(node, "in-etc-crypttab", in_etc_crypttab);
 
        setChildValueIf(node, "open-options", open_options, 
!open_options.empty());
+       setChildValueIf(node, "open-options-v2", open_options_v2, 
!open_options_v2.empty());
     }
 
 
@@ -351,7 +353,8 @@
            use_key_file_in_commit == rhs.use_key_file_in_commit &&
            cipher == rhs.cipher && key_size == rhs.key_size && pbkdf == 
rhs.pbkdf &&
            integrity == rhs.integrity && mount_by == rhs.mount_by && 
crypt_options == rhs.crypt_options &&
-           in_etc_crypttab == rhs.in_etc_crypttab && open_options == 
rhs.open_options;
+           in_etc_crypttab == rhs.in_etc_crypttab && open_options == 
rhs.open_options &&
+           open_options_v2 == rhs.open_options_v2;
     }
 
 
@@ -382,6 +385,7 @@
        storage::log_diff(log, "in-etc-crypttab", in_etc_crypttab, 
rhs.in_etc_crypttab);
 
        storage::log_diff(log, "open-options", open_options, rhs.open_options);
+       storage::log_diff(log, "open-options-v2", open_options_v2, 
rhs.open_options_v2);
     }
 
 
@@ -422,12 +426,17 @@
 
        if (!open_options.empty())
            out << " open-options:" << open_options;
+
+       if (!open_options_v2.empty())
+           out << " open-options-v2:" << open_options_v2;
     }
 
 
     void
     Encryption::Impl::add_key_file_option_and_execute(const string& cmd_line) 
const
     {
+       // code path deprecated
+
        const BlkDevice* blk_device = get_blk_device();
 
        SystemCmd::Options cmd_options(cmd_line, SystemCmd::DoThrow);
@@ -448,6 +457,33 @@
     }
 
 
+    void
+    Encryption::Impl::add_key_file_option_and_execute_v2(const 
SystemCmd::Args& cmd_args, const string& action,
+                                                        const vector<string>& 
action_args) const
+    {
+       const BlkDevice* blk_device = get_blk_device();
+
+       SystemCmd::Options cmd_options(cmd_args, SystemCmd::DoThrow);
+
+       if (!get_key_file().empty() && use_key_file_in_commit)
+       {
+           cmd_options.args.insert(cmd_options.args.end(), { "--key-file", 
get_key_file() });
+       }
+       else
+       {
+           cmd_options.args.insert(cmd_options.args.end(), { "--key-file", "-" 
});
+           cmd_options.stdin_text = get_password();
+       }
+
+       cmd_options.args.insert(cmd_options.args.end(), { "--", action });
+       cmd_options.args.insert(cmd_options.args.end(), action_args.begin(), 
action_args.end());
+
+       wait_for_devices({ blk_device });
+
+       SystemCmd cmd(cmd_options);
+    }
+
+
     Text
     Encryption::Impl::do_create_text(Tense tense) const
     {
@@ -530,15 +566,20 @@
     {
        const Encryption* encryption_rhs = 
to_encryption(action->get_device(commit_data.actiongraph, RHS));
 
-       string cmd_line = CRYPTSETUP_BIN " resize " + 
quote(get_dm_table_name());
+       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN };
 
        if (action->resize_mode == ResizeMode::SHRINK)
-           cmd_line += " --size " + 
to_string(encryption_rhs->get_impl().get_size() / (512 * B));
+           cmd_args << "--size" << 
to_string(encryption_rhs->get_impl().get_size() / (512 * B));
 
        if (do_resize_needs_password())
-           add_key_file_option_and_execute(cmd_line);
+       {
+           add_key_file_option_and_execute_v2(cmd_args, "resize", { 
get_dm_table_name() });
+       }
        else
-           SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
+       {
+           cmd_args << "--" << "resize" << get_dm_table_name();
+           SystemCmd cmd(cmd_args, SystemCmd::DoThrow);
+       }
     }
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Devices/EncryptionImpl.h 
new/libstorage-ng-4.5.341/storage/Devices/EncryptionImpl.h
--- old/libstorage-ng-4.5.339/storage/Devices/EncryptionImpl.h  2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Devices/EncryptionImpl.h  2026-07-07 
08:30:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2023] SUSE LLC
+ * Copyright (c) [2016-2026] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -26,6 +26,7 @@
 
 #include "storage/Utils/Enum.h"
 #include "storage/Utils/StorageDefines.h"
+#include "storage/Utils/SystemCmd.h"
 #include "storage/Devices/Encryption.h"
 #include "storage/Devices/BlkDeviceImpl.h"
 #include "storage/EtcCrypttab.h"
@@ -80,6 +81,9 @@
        const string& get_open_options() const { return open_options; }
        void set_open_options(const string& open_options) { Impl::open_options 
= open_options; }
 
+       const vector<string>& get_open_options_v2() const { return 
open_options_v2; }
+       void set_open_options_v2(const vector<string>& open_options_v2) { 
Impl::open_options_v2 = open_options_v2; }
+
        const string& get_cipher() const { return cipher; }
        void set_cipher(const string& cipher) { Impl::cipher = cipher; }
 
@@ -170,6 +174,8 @@
        static string next_free_cr_auto_name(const Storage& storage, 
SystemInfo::Impl& system_info);
 
        void add_key_file_option_and_execute(const string& cmd_line) const;
+       void add_key_file_option_and_execute_v2(const SystemCmd::Args& options, 
const string& action,
+                                               const vector<string>& 
action_args) const;
 
     private:
 
@@ -199,6 +205,7 @@
        string crypttab_blk_device_name; // block device name as found in 
/etc/crypttab
 
        string open_options;
+       vector<string> open_options_v2;
 
     };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Devices/Luks.cc 
new/libstorage-ng-4.5.341/storage/Devices/Luks.cc
--- old/libstorage-ng-4.5.339/storage/Devices/Luks.cc   2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Devices/Luks.cc   2026-07-07 
08:30:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2023] SUSE LLC
+ * Copyright (c) [2016-2026] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -138,12 +138,26 @@
 
 
     void
-    Luks::set_format_options(const std::string& format_options)
+    Luks::set_format_options(const string& format_options)
     {
        get_impl().set_format_options(format_options);
     }
 
 
+    const vector<string>&
+    Luks::get_format_options_v2() const
+    {
+       return get_impl().get_format_options_v2();
+    }
+
+
+    void
+    Luks::set_format_options_v2(const vector<string>& format_options_v2)
+    {
+       get_impl().set_format_options_v2(format_options_v2);
+    }
+
+
     void
     Luks::reset_activation_infos()
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Devices/Luks.h 
new/libstorage-ng-4.5.341/storage/Devices/Luks.h
--- old/libstorage-ng-4.5.339/storage/Devices/Luks.h    2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Devices/Luks.h    2026-07-07 
08:30:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2021] SUSE LLC
+ * Copyright (c) [2016-2026] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -83,19 +83,23 @@
         */
        void set_label(const std::string& label);
 
+       const std::string& get_format_options() const ST_DEPRECATED;
+       void set_format_options(const std::string& format_options) 
ST_DEPRECATED;
+
        /**
         * Get extra options for luks format call.
         */
-       const std::string& get_format_options() const;
+       const std::vector<std::string>& get_format_options_v2() const;
 
        /**
-        * Set extra options for luks format call. The options are
-        * injected as-is to the command so must be properly quoted.
+        * Set extra options for luks format call. No quoting required. It is 
undefined
+        * where exactly the extra options are inserted into the command line 
options of
+        * the external program.
         *
         * Options that modify the size of the resulting blk device
         * (e.g. --integrity) are not allowed.
         */
-       void set_format_options(const std::string& format_options);
+       void set_format_options_v2(const std::vector<std::string>& 
format_options_v2);
 
        /**
         * The library keeps track of whether the activation of a specific LUKS 
device was
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Devices/LuksImpl.cc 
new/libstorage-ng-4.5.341/storage/Devices/LuksImpl.cc
--- old/libstorage-ng-4.5.339/storage/Devices/LuksImpl.cc       2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Devices/LuksImpl.cc       2026-07-07 
08:30:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2025] SUSE LLC
+ * Copyright (c) [2016-2026] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -53,6 +53,7 @@
        getChildValue(node, "label", label);
 
        getChildValue(node, "format-options", format_options);
+       getChildValue(node, "format-options-v2", format_options_v2);
     }
 
 
@@ -73,6 +74,7 @@
        setChildValueIf(node, "label", label, !label.empty());
 
        setChildValueIf(node, "format-options", format_options, 
!format_options.empty());
+       setChildValueIf(node, "format-options-v2", format_options_v2, 
!format_options_v2.empty());
     }
 
 
@@ -263,8 +265,8 @@
            // TRANSLATORS: progress message
            message_callback(activate_callbacks, sformat(_("Activating LUKS 
%s"), uuid));
 
-           SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", 
"open", "--type", "luks",
-               name, dm_table_name, "--tries", "1", "--key-file", "-" };
+           SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", 
"--type", "luks",
+               "--tries", "1", "--key-file", "-", "--", "open", name, 
dm_table_name };
 
            SystemCmd::Options cmd_options(cmd_args, SystemCmd::DoThrow);
            cmd_options.stdin_text = password;
@@ -369,7 +371,7 @@
            if (!boost::starts_with(value.second.uuid, "CRYPT-LUKS"))
                continue;
 
-           SystemCmd::Args cmd_args { CRYPTSETUP_BIN, "--batch-mode", "close", 
value.first };
+           SystemCmd::Args cmd_args { CRYPTSETUP_BIN, "--batch-mode", "--", 
"close", value.first };
 
            SystemCmd cmd(cmd_args);
 
@@ -581,7 +583,8 @@
        if (!Encryption::Impl::equal(rhs))
            return false;
 
-       return uuid == rhs.uuid && label == rhs.label && format_options == 
rhs.format_options;
+       return uuid == rhs.uuid && label == rhs.label && format_options == 
rhs.format_options &&
+           format_options_v2 == rhs.format_options_v2;
     }
 
 
@@ -596,6 +599,7 @@
        storage::log_diff(log, "label", label, rhs.label);
 
        storage::log_diff(log, "format-options", format_options, 
rhs.format_options);
+       storage::log_diff(log, "format-options-v2", format_options_v2, 
rhs.format_options_v2);
     }
 
 
@@ -611,6 +615,9 @@
 
        if (!format_options.empty())
            out << " format-options:" << format_options;
+
+       if (!format_options_v2.empty())
+           out << " format-options-v2:" << format_options_v2;
     }
 
 
@@ -655,46 +662,93 @@
     {
        const BlkDevice* blk_device = get_blk_device();
 
-       string cmd_line = CRYPTSETUP_BIN " --batch-mode luksFormat " + 
quote(blk_device->get_name());
-
-       switch (get_type())
+       if (format_options.empty())
        {
-           case EncryptionType::LUKS1:
-               cmd_line += " --type luks1";
-               break;
+           SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode" };
 
-           case EncryptionType::LUKS2:
-               cmd_line += " --type luks2";
-               if (!label.empty())
-                   cmd_line += " --label " + quote(label);
-               break;
+           switch (get_type())
+           {
+               case EncryptionType::LUKS1:
+                   cmd_args << "--type" << "luks1";
+                   break;
+
+               case EncryptionType::LUKS2:
+                   cmd_args << "--type" << "luks2";
+                   if (!label.empty())
+                       cmd_args << "--label" << label;
+                   break;
 
-           default:
-               ST_THROW(Exception("invalid encryption type"));
+               default:
+                   ST_THROW(Exception("invalid encryption type"));
+           }
+
+           cmd_args << "--tries" << "1";
+
+           if (!uuid.empty())
+               cmd_args << "--uuid" << uuid;
+
+           if (!get_cipher().empty())
+               cmd_args << "--cipher" << get_cipher();
+
+           if (get_key_size() != 0)
+               cmd_args << "--key-size" << to_string(get_key_size() * 8);
+
+           if (!get_pbkdf().empty())
+               cmd_args << "--pbkdf" << get_pbkdf();
+
+           // TODO(check the LUKS version and the cipher)
+           if (!get_integrity().empty())
+               cmd_args << "--integrity" << get_integrity();
+
+           cmd_args << get_format_options_v2();
+
+           add_key_file_option_and_execute_v2(cmd_args, "luksFormat", { 
blk_device->get_name() });
        }
+       else
+       {
+           // code path deprecated
 
-       cmd_line += " --tries 1";
+           string cmd_line = CRYPTSETUP_BIN " --batch-mode luksFormat " + 
quote(blk_device->get_name());
 
-       if (!uuid.empty())
-           cmd_line += " --uuid " + quote(uuid);
+           switch (get_type())
+           {
+               case EncryptionType::LUKS1:
+                   cmd_line += " --type luks1";
+                   break;
+
+               case EncryptionType::LUKS2:
+                   cmd_line += " --type luks2";
+                   if (!label.empty())
+                       cmd_line += " --label " + quote(label);
+                   break;
 
-       if (!get_cipher().empty())
-           cmd_line += " --cipher " + quote(get_cipher());
+               default:
+                   ST_THROW(Exception("invalid encryption type"));
+           }
 
-       if (get_key_size() != 0)
-           cmd_line += " --key-size " + to_string(get_key_size() * 8);
+           cmd_line += " --tries 1";
 
-       if (!get_pbkdf().empty())
-           cmd_line += " --pbkdf " + quote(get_pbkdf());
+           if (!uuid.empty())
+               cmd_line += " --uuid " + quote(uuid);
 
-       // TODO(check the LUKS version and the cipher)
-       if (!get_integrity().empty())
-           cmd_line += " --integrity " + quote(get_integrity());
+           if (!get_cipher().empty())
+               cmd_line += " --cipher " + quote(get_cipher());
+
+           if (get_key_size() != 0)
+               cmd_line += " --key-size " + to_string(get_key_size() * 8);
+
+           if (!get_pbkdf().empty())
+               cmd_line += " --pbkdf " + quote(get_pbkdf());
+
+           // TODO(check the LUKS version and the cipher)
+           if (!get_integrity().empty())
+               cmd_line += " --integrity " + quote(get_integrity());
 
-       if (!get_format_options().empty())
-           cmd_line += " " + get_format_options();
+           if (!get_format_options().empty())
+               cmd_line += " " + get_format_options();
 
-       add_key_file_option_and_execute(cmd_line);
+           add_key_file_option_and_execute(cmd_line);
+       }
 
        if (uuid.empty())
        {
@@ -708,7 +762,7 @@
     {
        const BlkDevice* blk_device = get_blk_device();
 
-       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "erase", 
blk_device->get_name() };
+       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "--", 
"erase", blk_device->get_name() };
 
        SystemCmd cmd(cmd_args, SystemCmd::DoThrow);
 
@@ -724,10 +778,24 @@
     {
        const BlkDevice* blk_device = get_blk_device();
 
-       string cmd_line = CRYPTSETUP_BIN " --batch-mode open --type luks " + 
quote(blk_device->get_name()) +
-           " " + quote(get_dm_table_name()) + " --tries 1 " + 
get_open_options();
+       if (get_open_options().empty())
+       {
+           SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", 
"--type", "luks",
+               "--tries", "1" };
+
+           cmd_args << get_open_options_v2();
 
-       add_key_file_option_and_execute(cmd_line);
+           add_key_file_option_and_execute_v2(cmd_args, "open", { 
blk_device->get_name(), get_dm_table_name() });
+       }
+       else
+       {
+           // code path deprecated
+
+           string cmd_line = CRYPTSETUP_BIN " --batch-mode open --type luks " 
+ quote(blk_device->get_name()) +
+               " " + quote(get_dm_table_name()) + " --tries 1 " + 
get_open_options();
+
+           add_key_file_option_and_execute(cmd_line);
+       }
 
        SystemInfo::Impl system_info;
        const CmdUdevadmInfo& cmd_udevadm_info = 
system_info.getCmdUdevadmInfo(get_name());
@@ -757,7 +825,7 @@
     void
     Luks::Impl::do_deactivate()
     {
-       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "close", 
get_dm_table_name() };
+       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "--", 
"close", get_dm_table_name() };
 
        SystemCmd cmd(cmd_args, SystemCmd::DoThrow);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Devices/LuksImpl.h 
new/libstorage-ng-4.5.341/storage/Devices/LuksImpl.h
--- old/libstorage-ng-4.5.339/storage/Devices/LuksImpl.h        2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Devices/LuksImpl.h        2026-07-07 
08:30:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2016-2022] SUSE LLC
+ * Copyright (c) [2016-2026] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -84,6 +84,9 @@
        const string& get_format_options() const { return format_options; }
        void set_format_options(const string& format_options) { 
Impl::format_options = format_options; }
 
+       const vector<string>& get_format_options_v2() const { return 
format_options_v2; }
+       void set_format_options_v2(const vector<string>& format_options_v2) { 
Impl::format_options_v2 = format_options_v2; }
+
        virtual void parent_has_new_region(const Device* parent) override;
 
        virtual bool do_resize_needs_password() const override;
@@ -134,6 +137,7 @@
        string label;
 
        string format_options;
+       vector<string> format_options_v2;
 
     };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Devices/PlainEncryptionImpl.cc 
new/libstorage-ng-4.5.341/storage/Devices/PlainEncryptionImpl.cc
--- old/libstorage-ng-4.5.339/storage/Devices/PlainEncryptionImpl.cc    
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Devices/PlainEncryptionImpl.cc    
2026-07-07 08:30:25.000000000 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) [2019-2023] SUSE LLC
+ * Copyright (c) [2019-2026] SUSE LLC
  *
  * All Rights Reserved.
  *
@@ -196,17 +196,31 @@
     {
        const BlkDevice* blk_device = get_blk_device();
 
-       string cmd_line = CRYPTSETUP_BIN " --batch-mode plainOpen " + 
quote(blk_device->get_name()) + " "
-           + quote(get_dm_table_name()) + " --tries 1 " + get_open_options();
+       if (get_open_options().empty())
+       {
+           SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", 
"--tries", "1" };
+
+           cmd_args << get_open_options_v2();
 
-       add_key_file_option_and_execute(cmd_line);
+           add_key_file_option_and_execute_v2(cmd_args, "plainOpen", { 
blk_device->get_name(),
+                   get_dm_table_name() } );
+       }
+       else
+       {
+           // code path deprecated
+
+           string cmd_line = CRYPTSETUP_BIN " --batch-mode plainOpen " + 
quote(blk_device->get_name()) + " "
+               + quote(get_dm_table_name()) + " --tries 1 " + 
get_open_options();
+
+           add_key_file_option_and_execute(cmd_line);
+       }
     }
 
 
     void
     PlainEncryption::Impl::do_deactivate()
     {
-       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "close", 
get_dm_table_name() };
+       SystemCmd::Args cmd_args = { CRYPTSETUP_BIN, "--batch-mode", "--", 
"close", get_dm_table_name() };
 
        SystemCmd cmd(cmd_args, SystemCmd::DoThrow);
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Filesystems/BcachefsImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/BcachefsImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/BcachefsImpl.cc       
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/BcachefsImpl.cc       
2026-07-07 08:30:25.000000000 +0200
@@ -72,6 +72,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_BCACHEFS_BIN;
 
            if (!get_label().empty())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Filesystems/BtrfsImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/BtrfsImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/BtrfsImpl.cc  2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/BtrfsImpl.cc  2026-07-07 
08:30:25.000000000 +0200
@@ -1018,6 +1018,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_BTRFS_BIN " --force";
 
            if (metadata_raid_level != BtrfsRaidLevel::DEFAULT)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Filesystems/ExfatImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/ExfatImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/ExfatImpl.cc  2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/ExfatImpl.cc  2026-07-07 
08:30:25.000000000 +0200
@@ -80,6 +80,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_EXFAT_BIN " " + get_mkfs_options() + " " + 
quote(blk_device->get_name());
 
            wait_for_devices();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Filesystems/ExtImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/ExtImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/ExtImpl.cc    2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/ExtImpl.cc    2026-07-07 
08:30:25.000000000 +0200
@@ -163,6 +163,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_EXT2_BIN " -v -t " + toString(get_type()) + 
" -F " +
                get_mkfs_options() + " " + quote(blk_device->get_name());
 
@@ -216,6 +218,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = TUNE2FS_BIN " " + get_tune_options() + " " + 
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.5.339/storage/Filesystems/F2fsImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/F2fsImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/F2fsImpl.cc   2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/F2fsImpl.cc   2026-07-07 
08:30:25.000000000 +0200
@@ -69,6 +69,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_F2FS_BIN " " + get_mkfs_options();
 
            if (!get_label().empty())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Filesystems/JfsImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/JfsImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/JfsImpl.cc    2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/JfsImpl.cc    2026-07-07 
08:30:25.000000000 +0200
@@ -67,6 +67,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_JFS_BIN " -q " + get_mkfs_options() + " " +
                quote(blk_device->get_name());
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Filesystems/Nilfs2Impl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/Nilfs2Impl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/Nilfs2Impl.cc 2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/Nilfs2Impl.cc 2026-07-07 
08:30:25.000000000 +0200
@@ -67,6 +67,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_NILFS2_BIN " -v -f " + get_mkfs_options() + 
" " + quote(blk_device->get_name());
 
            wait_for_devices();
@@ -117,6 +119,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = NILFS_TUNE_BIN " " + get_tune_options() + " " + 
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.5.339/storage/Filesystems/NtfsImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/NtfsImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/NtfsImpl.cc   2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/NtfsImpl.cc   2026-07-07 
08:30:25.000000000 +0200
@@ -121,6 +121,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_NTFS_BIN " --fast --with-uuid " + 
get_mkfs_options() + " " +
                quote(blk_device->get_name());
 
@@ -153,7 +155,7 @@
 
        const BlkDevice* blk_device_rhs = ntfs_rhs->get_impl().get_blk_device();
 
-       string cmd_line = "echo y | " NTFSRESIZE_BIN " --force";
+       string cmd_line = ECHO_BIN " y | " NTFSRESIZE_BIN " --force";
        if (action->resize_mode == ResizeMode::SHRINK)
            cmd_line += " --size " + to_string(blk_device_rhs->get_size());
        cmd_line += " " + quote(action->blk_device->get_name());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Filesystems/ReiserfsImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/ReiserfsImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/ReiserfsImpl.cc       
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/ReiserfsImpl.cc       
2026-07-07 08:30:25.000000000 +0200
@@ -68,6 +68,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_REISERFS_BIN " -f -f " + get_mkfs_options() 
+ " " +
                quote(blk_device->get_name());
 
@@ -125,6 +127,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = TUNEREISERFS_BIN " " + get_tune_options() + " " + 
quote(blk_device->get_name());
 
            SystemCmd cmd(cmd_line, SystemCmd::DoThrow);
@@ -141,7 +145,7 @@
 
        string cmd_line = REISERFSRESIZE_BIN " -f";
        if (action->resize_mode == ResizeMode::SHRINK)
-           cmd_line = "echo y | " + cmd_line + " -s " +
+           cmd_line = ECHO_BIN " y | " + cmd_line + " -s " +
                to_string(blk_device_rhs->get_size() / KiB) + "K";
        cmd_line += " " + quote(action->blk_device->get_name());
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Filesystems/SwapImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/SwapImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/SwapImpl.cc   2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/SwapImpl.cc   2026-07-07 
08:30:25.000000000 +0200
@@ -113,6 +113,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKSWAP_BIN " -f " + quote(blk_device->get_name());
 
            if (!get_mkfs_options().empty())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Filesystems/UdfImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/UdfImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/UdfImpl.cc    2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/UdfImpl.cc    2026-07-07 
08:30:25.000000000 +0200
@@ -87,6 +87,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_UDF_BIN " " + get_mkfs_options() + " 
--label=" + quote(get_label());
 
            if (!get_uuid().empty())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/Filesystems/VfatImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/VfatImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/VfatImpl.cc   2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/VfatImpl.cc   2026-07-07 
08:30:25.000000000 +0200
@@ -84,6 +84,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_FAT_BIN " -v " + get_mkfs_options() + " " + 
quote(blk_device->get_name());
 
            wait_for_devices();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Filesystems/XfsImpl.cc 
new/libstorage-ng-4.5.341/storage/Filesystems/XfsImpl.cc
--- old/libstorage-ng-4.5.339/storage/Filesystems/XfsImpl.cc    2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Filesystems/XfsImpl.cc    2026-07-07 
08:30:25.000000000 +0200
@@ -109,6 +109,8 @@
        }
        else
        {
+           // code path deprecated
+
            string cmd_line = MKFS_XFS_BIN " -q -f " + get_mkfs_options() + " " 
+
                quote(blk_device->get_name());
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/storage/SystemInfo/CmdCryptsetup.cc 
new/libstorage-ng-4.5.341/storage/SystemInfo/CmdCryptsetup.cc
--- old/libstorage-ng-4.5.339/storage/SystemInfo/CmdCryptsetup.cc       
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/SystemInfo/CmdCryptsetup.cc       
2026-07-07 08:30:25.000000000 +0200
@@ -39,7 +39,7 @@
     CmdCryptsetupStatus::CmdCryptsetupStatus(const string& name)
        : name(name)
     {
-       SystemCmd cmd({ CRYPTSETUP_BIN, "status", name }, SystemCmd::DoThrow);
+       SystemCmd cmd({ CRYPTSETUP_BIN, "--", "status", name }, 
SystemCmd::DoThrow);
 
        parse(cmd.stdout());
     }
@@ -99,7 +99,7 @@
     CmdCryptsetupLuksDump::CmdCryptsetupLuksDump(const string& name)
        : name(name)
     {
-       SystemCmd cmd({ CRYPTSETUP_BIN, "luksDump", name }, SystemCmd::DoThrow);
+       SystemCmd cmd({ CRYPTSETUP_BIN, "--", "luksDump", name }, 
SystemCmd::DoThrow);
 
        parse(cmd.stdout());
     }
@@ -292,7 +292,7 @@
     CmdCryptsetupBitlkDump::CmdCryptsetupBitlkDump(const string& name)
        : name(name)
     {
-       SystemCmd cmd({ CRYPTSETUP_BIN, "bitlkDump", name }, 
SystemCmd::DoThrow);
+       SystemCmd cmd({ CRYPTSETUP_BIN, "--", "bitlkDump", name }, 
SystemCmd::DoThrow);
 
        parse(cmd.stdout());
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Utils/StorageDefines.h 
new/libstorage-ng-4.5.341/storage/Utils/StorageDefines.h
--- old/libstorage-ng-4.5.339/storage/Utils/StorageDefines.h    2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Utils/StorageDefines.h    2026-07-07 
08:30:25.000000000 +0200
@@ -67,6 +67,7 @@
 
 #define ECHO_BIN "/usr/bin/echo"
 #define CAT_BIN "/usr/bin/cat"
+#define ENV_BIN "/usr/bin/env"
 
 #define UNAME_BIN "/usr/bin/uname"
 #define GETCONF_BIN "/usr/bin/getconf"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/storage/Utils/SystemCmd.cc 
new/libstorage-ng-4.5.341/storage/Utils/SystemCmd.cc
--- old/libstorage-ng-4.5.339/storage/Utils/SystemCmd.cc        2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/storage/Utils/SystemCmd.cc        2026-07-07 
08:30:25.000000000 +0200
@@ -202,9 +202,9 @@
            if (!ret.empty())
                ret += ' ';
 
-           // For display only. No proper check needed.
-           if (s.empty() || s.find_first_of(" $&();<>|") != string::npos)
-               ret += quote(s);
+           // For display only. No proper check or quoting needed.
+           if (s.empty() || s.find_first_of(" ") != string::npos)
+               ret += "'" + s + "'";
            else
                ret += s;
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/SystemInfo/cryptsetup-bitlk-dump.cc 
new/libstorage-ng-4.5.341/testsuite/SystemInfo/cryptsetup-bitlk-dump.cc
--- old/libstorage-ng-4.5.339/testsuite/SystemInfo/cryptsetup-bitlk-dump.cc     
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/SystemInfo/cryptsetup-bitlk-dump.cc     
2026-07-07 08:30:25.000000000 +0200
@@ -19,7 +19,7 @@
 check(const string& name, const vector<string>& input, const vector<string>& 
output)
 {
     Mockup::set_mode(Mockup::Mode::PLAYBACK);
-    Mockup::set_command({ CRYPTSETUP_BIN, "bitlkDump", name }, input);
+    Mockup::set_command({ CRYPTSETUP_BIN, "--", "bitlkDump", name }, input);
 
     CmdCryptsetupBitlkDump cmd_cryptsetup_bitlk_dump(name);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/SystemInfo/cryptsetup-luks-dump.cc 
new/libstorage-ng-4.5.341/testsuite/SystemInfo/cryptsetup-luks-dump.cc
--- old/libstorage-ng-4.5.339/testsuite/SystemInfo/cryptsetup-luks-dump.cc      
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/SystemInfo/cryptsetup-luks-dump.cc      
2026-07-07 08:30:25.000000000 +0200
@@ -19,7 +19,7 @@
 check(const string& name, const vector<string>& input, const vector<string>& 
output)
 {
     Mockup::set_mode(Mockup::Mode::PLAYBACK);
-    Mockup::set_command({ CRYPTSETUP_BIN, "luksDump", name }, input);
+    Mockup::set_command({ CRYPTSETUP_BIN, "--", "luksDump", name }, input);
 
     CmdCryptsetupLuksDump cmd_cryptsetup_luks_dump(name);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/SystemInfo/cryptsetup-status.cc 
new/libstorage-ng-4.5.341/testsuite/SystemInfo/cryptsetup-status.cc
--- old/libstorage-ng-4.5.339/testsuite/SystemInfo/cryptsetup-status.cc 
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/SystemInfo/cryptsetup-status.cc 
2026-07-07 08:30:25.000000000 +0200
@@ -19,7 +19,7 @@
 check(const string& name, const vector<string>& input, const vector<string>& 
output)
 {
     Mockup::set_mode(Mockup::Mode::PLAYBACK);
-    Mockup::set_command({ CRYPTSETUP_BIN, "status", name }, input);
+    Mockup::set_command({ CRYPTSETUP_BIN, "--", "status", name }, input);
 
     CmdCryptsetupStatus cmd_cryptsetup_status(name);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libstorage-ng-4.5.339/testsuite/Utils/systemcmd.cc 
new/libstorage-ng-4.5.341/testsuite/Utils/systemcmd.cc
--- old/libstorage-ng-4.5.339/testsuite/Utils/systemcmd.cc      2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/Utils/systemcmd.cc      2026-07-07 
08:30:25.000000000 +0200
@@ -256,7 +256,7 @@
 {
     setenv("TWO", "2", 1);
 
-    SystemCmd::Options options("env");
+    SystemCmd::Options options({ ENV_BIN });
 
     BOOST_CHECK(find(options.envs.begin(), options.envs.end(), "TWO=2") != 
options.envs.end());
 
@@ -295,7 +295,7 @@
     setenv("FUNNY", "++", 1);          // will not be overridden
     setenv("AMUSING", "no", 1);                // will be overridden (by 
addition to options.env)
 
-    SystemCmd::Options options("echo $LC_ALL $FUNNY $AMUSING");
+    SystemCmd::Options options({ SH_BIN, "-c", ECHO_BIN " $LC_ALL $FUNNY 
$AMUSING" });
 
     options.setenv("AMUSING", "sure");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/probe/bitlocker2-mockup.xml 
new/libstorage-ng-4.5.341/testsuite/probe/bitlocker2-mockup.xml
--- old/libstorage-ng-4.5.339/testsuite/probe/bitlocker2-mockup.xml     
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/probe/bitlocker2-mockup.xml     
2026-07-07 08:30:25.000000000 +0200
@@ -97,7 +97,7 @@
       <stdout>/dev/loop3: TYPE="squashfs"</stdout>
     </Command>
     <Command>
-      <name>/sbin/cryptsetup bitlkDump /dev/sda3</name>
+      <name>/sbin/cryptsetup -- bitlkDump /dev/sda3</name>
       <stdout>Info for BITLK device /dev/sda3.</stdout>
       <stdout>Version:         2</stdout>
       <stdout>GUID:            dc2541db-275b-4c84-85e0-0a743b3ff229</stdout>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/probe/integrity-mockup.xml 
new/libstorage-ng-4.5.341/testsuite/probe/integrity-mockup.xml
--- old/libstorage-ng-4.5.339/testsuite/probe/integrity-mockup.xml      
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/probe/integrity-mockup.xml      
2026-07-07 08:30:25.000000000 +0200
@@ -86,7 +86,7 @@
       <stdout> Snapshot(s):</stdout>
     </Command>
     <Command>
-      <name>/sbin/cryptsetup luksDump /dev/sda3</name>
+      <name>/sbin/cryptsetup -- luksDump /dev/sda3</name>
       <stdout>LUKS header information</stdout>
       <stdout>Version:         2</stdout>
       <stdout>Epoch:           3</stdout>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/probe/luks+lvm1-mockup.xml 
new/libstorage-ng-4.5.341/testsuite/probe/luks+lvm1-mockup.xml
--- old/libstorage-ng-4.5.339/testsuite/probe/luks+lvm1-mockup.xml      
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/probe/luks+lvm1-mockup.xml      
2026-07-07 08:30:25.000000000 +0200
@@ -28,7 +28,7 @@
     </Command>
     <Command>
       <!-- output faked and incomplete -->
-      <name>/sbin/cryptsetup luksDump /dev/sda2</name>
+      <name>/sbin/cryptsetup -- luksDump /dev/sda2</name>
       <stdout>Version:         1</stdout>
       <stdout>Cipher name:    aes</stdout>
       <stdout>Cipher mode:    xts-plain64</stdout>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/probe/luks1-mockup.xml 
new/libstorage-ng-4.5.341/testsuite/probe/luks1-mockup.xml
--- old/libstorage-ng-4.5.339/testsuite/probe/luks1-mockup.xml  2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/probe/luks1-mockup.xml  2026-07-07 
08:30:25.000000000 +0200
@@ -22,7 +22,7 @@
     </Command>
     <Command>
       <!-- output faked and incomplete -->
-      <name>/sbin/cryptsetup luksDump /dev/sda2</name>
+      <name>/sbin/cryptsetup -- luksDump /dev/sda2</name>
       <stdout>Version:         1</stdout>
       <stdout>Cipher name:    aes</stdout>
       <stdout>Cipher mode:    xts-plain64</stdout>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/probe/luks2-mockup.xml 
new/libstorage-ng-4.5.341/testsuite/probe/luks2-mockup.xml
--- old/libstorage-ng-4.5.339/testsuite/probe/luks2-mockup.xml  2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/probe/luks2-mockup.xml  2026-07-07 
08:30:25.000000000 +0200
@@ -23,7 +23,7 @@
     </Command>
     <Command>
       <!-- output faked and incomplete -->
-      <name>/sbin/cryptsetup luksDump /dev/sdb1</name>
+      <name>/sbin/cryptsetup -- luksDump /dev/sdb1</name>
       <stdout>Version:         1</stdout>
       <stdout>Cipher name:    aes</stdout>
       <stdout>Cipher mode:    xts-plain64</stdout>
@@ -31,7 +31,7 @@
     </Command>
     <Command>
       <!-- output faked and incomplete -->
-      <name>/sbin/cryptsetup luksDump /dev/sdb2</name>
+      <name>/sbin/cryptsetup -- luksDump /dev/sdb2</name>
       <stdout>Version:         1</stdout>
       <stdout>Cipher name:    aes</stdout>
       <stdout>Cipher mode:    xts-plain64</stdout>
@@ -39,7 +39,7 @@
     </Command>
     <Command>
       <!-- output faked and incomplete -->
-      <name>/sbin/cryptsetup luksDump /dev/sdb3</name>
+      <name>/sbin/cryptsetup -- luksDump /dev/sdb3</name>
       <stdout>Version:         1</stdout>
       <stdout>Cipher name:    aes</stdout>
       <stdout>Cipher mode:    xts-plain64</stdout>
@@ -47,7 +47,7 @@
     </Command>
     <Command>
       <!-- output faked and incomplete -->
-      <name>/sbin/cryptsetup luksDump /dev/sdb4</name>
+      <name>/sbin/cryptsetup -- luksDump /dev/sdb4</name>
       <stdout>Version:         1</stdout>
       <stdout>Cipher name:    aes</stdout>
       <stdout>Cipher mode:    xts-plain64</stdout>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/probe/luks3-mockup.xml 
new/libstorage-ng-4.5.341/testsuite/probe/luks3-mockup.xml
--- old/libstorage-ng-4.5.339/testsuite/probe/luks3-mockup.xml  2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/probe/luks3-mockup.xml  2026-07-07 
08:30:25.000000000 +0200
@@ -18,7 +18,7 @@
     </Command>
     <Command>
       <!-- output faked and incomplete -->
-      <name>/sbin/cryptsetup luksDump /dev/sdc1</name>
+      <name>/sbin/cryptsetup -- luksDump /dev/sdc1</name>
       <stdout>Version:         1</stdout>
       <stdout>Cipher name:    aes</stdout>
       <stdout>Cipher mode:    xts-plain64</stdout>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/probe/luks4-mockup.xml 
new/libstorage-ng-4.5.341/testsuite/probe/luks4-mockup.xml
--- old/libstorage-ng-4.5.339/testsuite/probe/luks4-mockup.xml  2026-07-03 
08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/probe/luks4-mockup.xml  2026-07-07 
08:30:25.000000000 +0200
@@ -286,7 +286,7 @@
       <stdout>   Usage exclusive:      16.00KiB</stdout>
     </Command>
     <Command>
-      <name>/sbin/cryptsetup luksDump /dev/sdb1</name>
+      <name>/sbin/cryptsetup -- luksDump /dev/sdb1</name>
       <stdout>LUKS header information for /dev/sdb1</stdout>
       <stdout></stdout>
       <stdout>Version:         1</stdout>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/probe/lvm+luks1-mockup.xml 
new/libstorage-ng-4.5.341/testsuite/probe/lvm+luks1-mockup.xml
--- old/libstorage-ng-4.5.339/testsuite/probe/lvm+luks1-mockup.xml      
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/probe/lvm+luks1-mockup.xml      
2026-07-07 08:30:25.000000000 +0200
@@ -28,7 +28,7 @@
     </Command>
     <Command>
       <!-- output faked and incomplete -->
-      <name>/sbin/cryptsetup luksDump /dev/system/home</name>
+      <name>/sbin/cryptsetup -- luksDump /dev/system/home</name>
       <stdout>Version:         1</stdout>
       <stdout>Cipher name:    aes</stdout>
       <stdout>Cipher mode:    xts-plain64</stdout>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libstorage-ng-4.5.339/testsuite/probe/multipath+luks1-mockup.xml 
new/libstorage-ng-4.5.341/testsuite/probe/multipath+luks1-mockup.xml
--- old/libstorage-ng-4.5.339/testsuite/probe/multipath+luks1-mockup.xml        
2026-07-03 08:57:38.000000000 +0200
+++ new/libstorage-ng-4.5.341/testsuite/probe/multipath+luks1-mockup.xml        
2026-07-07 08:30:25.000000000 +0200
@@ -37,7 +37,7 @@
     </Command>
     <Command>
       <!-- output faked and incomplete -->
-      <name>/sbin/cryptsetup luksDump 
/dev/mapper/36005076305ffc73a00000000000013b4-part1</name>
+      <name>/sbin/cryptsetup -- luksDump 
/dev/mapper/36005076305ffc73a00000000000013b4-part1</name>
       <stdout>Version:         1</stdout>
       <stdout>Cipher name:    aes</stdout>
       <stdout>Cipher mode:    xts-plain64</stdout>
@@ -45,7 +45,7 @@
     </Command>
     <Command>
       <!-- output faked and incomplete -->
-      <name>/sbin/cryptsetup luksDump 
/dev/mapper/36005076305ffc73a00000000000013b5</name>
+      <name>/sbin/cryptsetup -- luksDump 
/dev/mapper/36005076305ffc73a00000000000013b5</name>
       <stdout>Version:         1</stdout>
       <stdout>Cipher name:    aes</stdout>
       <stdout>Cipher mode:    xts-plain64</stdout>

Reply via email to