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-10-08 22:04:59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.2443 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng" Fri Oct 8 22:04:59 2021 rev:131 rq:923678 version:4.4.43 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2021-10-04 18:40:16.978088517 +0200 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.2443/libstorage-ng.changes 2021-10-08 22:05:21.540590797 +0200 @@ -1,0 +2,15 @@ +Thu Oct 7 10:08:08 UTC 2021 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#835 +- generate pools with dasds +- extended testsuite +- 4.4.43 + +-------------------------------------------------------------------- +Tue Oct 5 06:45:52 UTC 2021 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#834 +- added get_dasd_type_name() and get_dasd_format_name() +- 4.4.42 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.4.41.tar.xz New: ---- libstorage-ng-4.4.43.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.7Vzz8u/_old 2021-10-08 22:05:22.096591712 +0200 +++ /var/tmp/diff_new_pack.7Vzz8u/_new 2021-10-08 22:05:22.096591712 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.4.41 +Version: 4.4.43 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.4.41.tar.xz -> libstorage-ng-4.4.43.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/VERSION new/libstorage-ng-4.4.43/VERSION --- old/libstorage-ng-4.4.41/VERSION 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/VERSION 2021-10-07 12:08:08.000000000 +0200 @@ -1 +1 @@ -4.4.41 +4.4.43 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/storage/Devices/Dasd.cc new/libstorage-ng-4.4.43/storage/Devices/Dasd.cc --- old/libstorage-ng-4.4.41/storage/Devices/Dasd.cc 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/storage/Devices/Dasd.cc 2021-10-07 12:08:08.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2014-2015] Novell, Inc. - * Copyright (c) [2016-2017] SUSE LLC + * Copyright (c) [2016-2021] SUSE LLC * * All Rights Reserved. * @@ -35,6 +35,20 @@ using namespace std; + string + get_dasd_type_name(DasdType dasd_type) + { + return toString(dasd_type); + } + + + string + get_dasd_format_name(DasdFormat dasd_format) + { + return toString(dasd_format); + } + + Dasd* Dasd::create(Devicegraph* devicegraph, const string& name) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/storage/Devices/Dasd.h new/libstorage-ng-4.4.43/storage/Devices/Dasd.h --- old/libstorage-ng-4.4.41/storage/Devices/Dasd.h 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/storage/Devices/Dasd.h 2021-10-07 12:08:08.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2014-2015] Novell, Inc. - * Copyright (c) [2016-2020] SUSE LLC + * Copyright (c) [2016-2021] SUSE LLC * * All Rights Reserved. * @@ -48,6 +48,22 @@ /** + * Convert the DASD type dasd_type to a string. + * + * @see DasdType + */ + std::string get_dasd_type_name(DasdType dasd_type); + + + /** + * Convert the DASD format dasd_format to a string. + * + * @see DasdFormat + */ + std::string get_dasd_format_name(DasdFormat dasd_format); + + + /** * A physical DASD device. */ class Dasd : public Partitionable diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/storage/StorageImpl.cc new/libstorage-ng-4.4.43/storage/StorageImpl.cc --- old/libstorage-ng-4.4.41/storage/StorageImpl.cc 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/storage/StorageImpl.cc 2021-10-07 12:08:08.000000000 +0200 @@ -474,33 +474,68 @@ { ST_CHECK_PTR(devicegraph); - // TODO more types, e.g. dasd, multipath? // TODO check partition table? - for (const Disk* disk : Disk::get_all(devicegraph)) + for (const Partitionable* partitionable : Partitionable::get_all(devicegraph)) { - // Ignore disks with size zero - maybe some card reader. - if (disk->get_size() == 0) + // Ignore partitionables with size zero - maybe some card reader. + if (partitionable->get_size() == 0) + continue; + + // Ignore partitionables used by multipath or md raid. + vector<const Device*> children = partitionable->get_children(); + if (any_of(children.begin(), children.end(), [](const Device* child) { + return is_multipath(child) || is_md(child); + })) continue; string name; - if (disk->is_pmem()) - name = "PMEMs"; - else if (disk->is_nvme()) - name = "NVMes"; - else if (disk->get_impl().is_brd()) - name = "BRDs"; - else if (!disk->is_rotational()) - name = "SSDs"; - else - name = "HDDs"; - name += " (" + byte_to_humanstring(disk->get_region().get_block_size(), false, 2, true) + ")"; + if (is_disk(partitionable)) + { + const Disk* disk = to_disk(partitionable); + + if (disk->is_pmem()) + name = "PMEMs"; + else if (disk->is_nvme()) + name = "NVMes"; + else if (disk->get_impl().is_brd()) + name = "BRDs"; + else if (!disk->is_rotational()) + name = "SSDs"; + else + name = "HDDs"; + } + else if (is_multipath(partitionable)) + { + name = "MPs"; + } + else if (is_dasd(partitionable)) + { + const Dasd* dasd = to_dasd(partitionable); + + if (dasd->get_type() == DasdType::ECKD) + { + if (dasd->get_format() == DasdFormat::CDL) + name = "DASDs ECKD CDL"; + else if (dasd->get_format() == DasdFormat::LDL) + name = "DASDs ECKD LDL"; + } + else if (dasd->get_type() == DasdType::FBA) + { + name = "DASDs FBA"; + } + } + + if (name.empty()) + continue; + + name += " (" + byte_to_humanstring(partitionable->get_region().get_block_size(), false, 2, true) + ")"; Pool* pool = exists_pool(name) ? get_pool(name) : create_pool(name); - if (!pool->exists_device(disk)) - pool->add_device(disk); + if (!pool->exists_device(partitionable)) + pool->add_device(partitionable); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/testsuite/helpers/TsCmp.cc new/libstorage-ng-4.4.43/testsuite/helpers/TsCmp.cc --- old/libstorage-ng-4.4.41/testsuite/helpers/TsCmp.cc 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/testsuite/helpers/TsCmp.cc 2021-10-07 12:08:08.000000000 +0200 @@ -9,6 +9,7 @@ #include "storage/Environment.h" #include "storage/Storage.h" #include "storage/Action.h" +#include "storage/Pool.h" #include "storage/Devices/DeviceImpl.h" #include "storage/Devices/BlkDevice.h" #include "storage/Devices/Partitionable.h" @@ -21,6 +22,7 @@ #include "storage/Filesystems/BtrfsSubvolume.h" #include "storage/Filesystems/MountPoint.h" #include "storage/Utils/Mockup.h" +#include "storage/Utils/Format.h" #include "testsuite/helpers/TsCmp.h" @@ -391,4 +393,23 @@ } + string + pools(Storage* storage) + { + const Devicegraph* probed = storage->get_probed(); + + storage->generate_pools(probed); + + string ret; + for (const map<string, const Pool*>::value_type tmp : storage->get_pools()) + { + if (!ret.empty()) + ret += ", "; + + ret += sformat("%s [%d]", tmp.first, tmp.second->get_devices(probed).size()); + } + + return ret; + } + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/testsuite/helpers/TsCmp.h new/libstorage-ng-4.4.43/testsuite/helpers/TsCmp.h --- old/libstorage-ng-4.4.41/testsuite/helpers/TsCmp.h 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/testsuite/helpers/TsCmp.h 2021-10-07 12:08:08.000000000 +0200 @@ -129,4 +129,6 @@ string features(const Actiongraph* actiongraph); + string pools(Storage* storage); + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/testsuite/probe/dasd1.cc new/libstorage-ng-4.4.43/testsuite/probe/dasd1.cc --- old/libstorage-ng-4.4.41/testsuite/probe/dasd1.cc 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/testsuite/probe/dasd1.cc 2021-10-07 12:08:08.000000000 +0200 @@ -38,4 +38,6 @@ BOOST_CHECK_EQUAL(required_features(probed), "dasd ext2 ext4 nfs swap"); BOOST_CHECK_EQUAL(suggested_features(probed), "dasd ext2 ext4 nfs swap"); + + BOOST_CHECK_EQUAL(pools(&storage), "DASDs ECKD CDL (4 KiB) [1]"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/testsuite/probe/dasd2.cc new/libstorage-ng-4.4.43/testsuite/probe/dasd2.cc --- old/libstorage-ng-4.4.41/testsuite/probe/dasd2.cc 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/testsuite/probe/dasd2.cc 2021-10-07 12:08:08.000000000 +0200 @@ -38,4 +38,6 @@ BOOST_CHECK_EQUAL(required_features(probed), "dasd ext2 ext4 swap"); BOOST_CHECK_EQUAL(suggested_features(probed), "dasd ext2 ext4 swap"); + + BOOST_CHECK_EQUAL(pools(&storage), "DASDs ECKD CDL (4 KiB) [1], DASDs ECKD LDL (4 KiB) [1], DASDs FBA (512 B) [1]"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/testsuite/probe/dasd3.cc new/libstorage-ng-4.4.43/testsuite/probe/dasd3.cc --- old/libstorage-ng-4.4.41/testsuite/probe/dasd3.cc 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/testsuite/probe/dasd3.cc 2021-10-07 12:08:08.000000000 +0200 @@ -38,4 +38,6 @@ BOOST_CHECK_EQUAL(required_features(probed), "dasd"); BOOST_CHECK_EQUAL(suggested_features(probed), "dasd"); + + BOOST_CHECK_EQUAL(pools(&storage), "DASDs ECKD CDL (4 KiB) [1]"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/testsuite/probe/disk.cc new/libstorage-ng-4.4.43/testsuite/probe/disk.cc --- old/libstorage-ng-4.4.41/testsuite/probe/disk.cc 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/testsuite/probe/disk.cc 2021-10-07 12:08:08.000000000 +0200 @@ -38,4 +38,6 @@ BOOST_CHECK_EQUAL(required_features(probed), "ext4 swap"); BOOST_CHECK_EQUAL(suggested_features(probed), "ext4 swap"); + + BOOST_CHECK_EQUAL(pools(&storage), "HDDs (512 B) [1], SSDs (512 B) [1]"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/testsuite/probe/md-imsm1.cc new/libstorage-ng-4.4.43/testsuite/probe/md-imsm1.cc --- old/libstorage-ng-4.4.41/testsuite/probe/md-imsm1.cc 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/testsuite/probe/md-imsm1.cc 2021-10-07 12:08:08.000000000 +0200 @@ -38,4 +38,6 @@ BOOST_CHECK_EQUAL(required_features(probed), "ext4 md-raid swap"); BOOST_CHECK_EQUAL(suggested_features(probed), "ext4 md-raid swap"); + + BOOST_CHECK_EQUAL(pools(&storage), "SSDs (512 B) [1]"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.41/testsuite/probe/multipath1.cc new/libstorage-ng-4.4.43/testsuite/probe/multipath1.cc --- old/libstorage-ng-4.4.41/testsuite/probe/multipath1.cc 2021-10-04 12:37:30.000000000 +0200 +++ new/libstorage-ng-4.4.43/testsuite/probe/multipath1.cc 2021-10-07 12:08:08.000000000 +0200 @@ -38,4 +38,6 @@ BOOST_CHECK_EQUAL(required_features(probed), "dasd ext2 ext4 fc multipath swap"); BOOST_CHECK_EQUAL(suggested_features(probed), "dasd ext2 ext3 ext4 fc multipath swap"); + + BOOST_CHECK_EQUAL(pools(&storage), "DASDs ECKD CDL (4 KiB) [1], MPs (512 B) [2]"); }