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-06-30 15:11:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.11887 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng" Tue Jun 30 15:11:18 2026 rev:346 rq:1362443 version:4.5.336 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2026-06-25 10:50:48.320079125 +0200 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.11887/libstorage-ng.changes 2026-06-30 15:11:34.092252796 +0200 @@ -1,0 +2,7 @@ +Mon Jun 29 13:15:06 UTC 2026 - [email protected] + +- merge gh#openSUSE/libstorage-ng#1084 +- make more use of new SystemCmd interface +- 4.5.336 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.5.335.tar.xz New: ---- libstorage-ng-4.5.336.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.Xn9V0c/_old 2026-06-30 15:11:35.272292764 +0200 +++ /var/tmp/diff_new_pack.Xn9V0c/_new 2026-06-30 15:11:35.276292899 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.5.335 +Version: 4.5.336 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.5.335.tar.xz -> libstorage-ng-4.5.336.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.335/VERSION new/libstorage-ng-4.5.336/VERSION --- old/libstorage-ng-4.5.335/VERSION 2026-06-23 11:37:59.000000000 +0200 +++ new/libstorage-ng-4.5.336/VERSION 2026-06-29 15:15:06.000000000 +0200 @@ -1 +1 @@ -4.5.335 +4.5.336 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.335/storage/SystemInfo/CmdBtrfs.cc new/libstorage-ng-4.5.336/storage/SystemInfo/CmdBtrfs.cc --- old/libstorage-ng-4.5.335/storage/SystemInfo/CmdBtrfs.cc 2026-06-23 11:37:59.000000000 +0200 +++ new/libstorage-ng-4.5.336/storage/SystemInfo/CmdBtrfs.cc 2026-06-29 15:15:06.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2004-2015] Novell, Inc. - * Copyright (c) [2017-2023] SUSE LLC + * Copyright (c) [2017-2026] SUSE LLC * * All Rights Reserved. * @@ -30,6 +30,7 @@ #include "storage/Utils/StorageDefines.h" #include "storage/Utils/ExceptionImpl.h" #include "storage/Utils/JsonFile.h" +#include "storage/Utils/Mockup.h" #include "storage/SystemInfo/CmdBtrfs.h" #include "storage/Filesystems/BtrfsImpl.h" @@ -162,9 +163,16 @@ CmdBtrfsSubvolumeList::CmdBtrfsSubvolumeList(const key_t& key, const string& mount_point) { - const string tmp = BTRFS_BIN " subvolume list -a -puq "; - SystemCmd::Options cmd_options(tmp + quote(mount_point), SystemCmd::DoThrow); - cmd_options.mockup_key = tmp + "(device:" + key + ")"; + SystemCmd::Args cmd_args = { BTRFS_BIN, "subvolume", "list", "-a", "-puq", mount_point }; + + SystemCmd::Options cmd_options(cmd_args, SystemCmd::DoThrow); + + if (Mockup::get_mode() != Mockup::Mode::NONE) + { + // replace mount point by special key + cmd_args.get_values().back() = "(device:" + key + ")"; + cmd_options.mockup_key = boost::join(cmd_args.get_values(), " "); + } SystemCmd cmd(cmd_options); parse(cmd.stdout()); @@ -259,9 +267,16 @@ CmdBtrfsSubvolumeShow::CmdBtrfsSubvolumeShow(const key_t& key, const string& mount_point) { - const string tmp = BTRFS_BIN " subvolume show "; - SystemCmd::Options cmd_options(tmp + quote(mount_point), SystemCmd::DoThrow); - cmd_options.mockup_key = tmp + "(device:" + key + ")"; + SystemCmd::Args cmd_args = { BTRFS_BIN, "subvolume", "show", mount_point }; + + SystemCmd::Options cmd_options(cmd_args, SystemCmd::DoThrow); + + if (Mockup::get_mode() != Mockup::Mode::NONE) + { + // replace mount point by special key + cmd_args.get_values().back() = "(device:" + key + ")"; + cmd_options.mockup_key = boost::join(cmd_args.get_values(), " "); + } SystemCmd cmd(cmd_options); parse(cmd.stdout()); @@ -314,9 +329,16 @@ CmdBtrfsSubvolumeGetDefault::CmdBtrfsSubvolumeGetDefault(const key_t& key, const string& mount_point) { - const string tmp = BTRFS_BIN " subvolume get-default "; - SystemCmd::Options cmd_options(tmp + quote(mount_point), SystemCmd::DoThrow); - cmd_options.mockup_key = tmp + "(device:" + key + ")"; + SystemCmd::Args cmd_args = { BTRFS_BIN, "subvolume", "get-default", mount_point }; + + SystemCmd::Options cmd_options(cmd_args, SystemCmd::DoThrow); + + if (Mockup::get_mode() != Mockup::Mode::NONE) + { + // replace mount point by special key + cmd_args.get_values().back() = "(device:" + key + ")"; + cmd_options.mockup_key = boost::join(cmd_args.get_values(), " "); + } SystemCmd cmd(cmd_options); parse(cmd.stdout()); @@ -353,9 +375,20 @@ { const bool json = CmdBtrfsVersion::supports_json_option_for_filesystem_df(); - const string tmp = BTRFS_BIN " " + string(json ? "--format json " : "") + "filesystem df "; - SystemCmd::Options cmd_options(tmp + quote(mount_point), SystemCmd::DoThrow); - cmd_options.mockup_key = tmp + "(device:" + key + ")"; + SystemCmd::Args cmd_args = { BTRFS_BIN }; + if (json) + cmd_args << "--format" << "json"; + cmd_args << "filesystem" << "df" << mount_point; + + SystemCmd::Options cmd_options(cmd_args, SystemCmd::DoThrow); + cmd_options.verify = [](int exit_code) { return exit_code == 0 || exit_code == 1; }; + + if (Mockup::get_mode() != Mockup::Mode::NONE) + { + // replace mount point by special key + cmd_args.get_values().back() = "(device:" + key + ")"; + cmd_options.mockup_key = boost::join(cmd_args.get_values(), " "); + } SystemCmd cmd(cmd_options); if (json) @@ -449,11 +482,21 @@ const bool json = CmdBtrfsVersion::supports_json_option_for_qgroup_show(); - const string tmp = BTRFS_BIN " " + string(json ? "--format json " : "") + "qgroup show -rep --raw "; - SystemCmd::Options cmd_options(tmp + quote(mount_point), SystemCmd::DoThrow); - cmd_options.mockup_key = tmp + "(device:" + key + ")"; + SystemCmd::Args cmd_args = { BTRFS_BIN }; + if (json) + cmd_args << "--format" << "json"; + cmd_args << "qgroup" << "show" << "-rep" << "--raw" << mount_point; + + SystemCmd::Options cmd_options(cmd_args, SystemCmd::DoThrow); cmd_options.verify = [](int exit_code) { return exit_code == 0 || exit_code == 1; }; + if (Mockup::get_mode() != Mockup::Mode::NONE) + { + // replace mount point by special key + cmd_args.get_values().back() = "(device:" + key + ")"; + cmd_options.mockup_key = boost::join(cmd_args.get_values(), " "); + } + SystemCmd cmd(cmd_options); if (cmd.retcode() == 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.335/storage/SystemInfo/CmdBtrfs.h new/libstorage-ng-4.5.336/storage/SystemInfo/CmdBtrfs.h --- old/libstorage-ng-4.5.335/storage/SystemInfo/CmdBtrfs.h 2026-06-23 11:37:59.000000000 +0200 +++ new/libstorage-ng-4.5.336/storage/SystemInfo/CmdBtrfs.h 2026-06-29 15:15:06.000000000 +0200 @@ -114,7 +114,7 @@ { public: - typedef string key_t; + using key_t = string; CmdBtrfsSubvolumeList(const key_t& key, const string& mount_point); @@ -162,7 +162,7 @@ { public: - typedef string key_t; + using key_t = string; CmdBtrfsSubvolumeShow(const key_t& key, const string& mount_point); @@ -188,7 +188,7 @@ { public: - typedef string key_t; + using key_t = string; CmdBtrfsSubvolumeGetDefault(const key_t& key, const string& mount_point); @@ -214,7 +214,7 @@ { public: - typedef string key_t; + using key_t = string; CmdBtrfsFilesystemDf(const key_t& key, const string& mount_point); @@ -242,7 +242,7 @@ { public: - typedef string key_t; + using key_t = string; CmdBtrfsQgroupShow(const key_t& key, const string& mount_point); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.335/storage/SystemInfo/CmdLsattr.cc new/libstorage-ng-4.5.336/storage/SystemInfo/CmdLsattr.cc --- old/libstorage-ng-4.5.335/storage/SystemInfo/CmdLsattr.cc 2026-06-23 11:37:59.000000000 +0200 +++ new/libstorage-ng-4.5.336/storage/SystemInfo/CmdLsattr.cc 2026-06-29 15:15:06.000000000 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) [2015-2017] SUSE LLC + * Copyright (c) [2015-2026] SUSE LLC * * All Rights Reserved. * @@ -25,6 +25,7 @@ #include "storage/SystemInfo/CmdLsattr.h" #include "storage/Utils/ExceptionImpl.h" #include "storage/Utils/LoggerImpl.h" +#include "storage/Utils/Mockup.h" namespace storage @@ -36,7 +37,12 @@ : mount_point(mount_point), path(path) { SystemCmd::Options cmd_options({ LSATTR_BIN, "-d", mount_point + "/" + path }, SystemCmd::DoThrow); - cmd_options.mockup_key = LSATTR_BIN " -d (device:" + get<0>(key) + " path:" + get<1>(key) + ")"; + + if (Mockup::get_mode() != Mockup::Mode::NONE) + { + // replace mount point and path by special keys + cmd_options.mockup_key = LSATTR_BIN " -d (device:" + get<0>(key) + " path:" + get<1>(key) + ")"; + } SystemCmd cmd(cmd_options); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.335/storage/SystemInfo/CmdLsattr.h new/libstorage-ng-4.5.336/storage/SystemInfo/CmdLsattr.h --- old/libstorage-ng-4.5.335/storage/SystemInfo/CmdLsattr.h 2026-06-23 11:37:59.000000000 +0200 +++ new/libstorage-ng-4.5.336/storage/SystemInfo/CmdLsattr.h 2026-06-29 15:15:06.000000000 +0200 @@ -39,7 +39,7 @@ { public: - typedef std::tuple<string, string> key_t; + using key_t = std::tuple<string, string>; CmdLsattr(const key_t& key, const string& mount_point, const string& path); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.335/storage/Utils/SystemCmd.h new/libstorage-ng-4.5.336/storage/Utils/SystemCmd.h --- old/libstorage-ng-4.5.335/storage/Utils/SystemCmd.h 2026-06-23 11:37:59.000000000 +0200 +++ new/libstorage-ng-4.5.336/storage/Utils/SystemCmd.h 2026-06-29 15:15:06.000000000 +0200 @@ -57,6 +57,7 @@ Args(std::initializer_list<string> init) : values(init) {} + vector<string>& get_values() { return values; } const vector<string>& get_values() const { return values; } Args& operator<<(const char* arg) { values.push_back(arg); return *this; }
