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-05-07 16:45:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstorage-ng" Fri May 7 16:45:21 2021 rev:112 rq:891097 version:4.4.4 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2021-04-29 22:44:53.184169376 +0200 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.2988/libstorage-ng.changes 2021-05-07 16:45:32.540326559 +0200 @@ -1,0 +2,23 @@ +Thu May 6 13:35:31 UTC 2021 - opensuse-packag...@opensuse.org + +- Translated using Weblate (Slovak) (bsc#1149754) +- 4.4.4 + +-------------------------------------------------------------------- +Wed May 5 09:59:20 UTC 2021 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#806 +- do not run efibootmgr if efivars in read-only or empty (bsc#1185610) +- 4.4.3 + +-------------------------------------------------------------------- +Tue May 4 10:25:58 UTC 2021 - aschn...@suse.com + +- merge gh#openSUSE/libstorage-ng#805 +- added argument keep_sids to Devicegraph::load() +- added functions to set source or target of holder +- use in-class member initialization +- added keep_sids and set_source +- 4.4.2 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.4.1.tar.xz New: ---- libstorage-ng-4.4.4.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.daukr1/_old 2021-05-07 16:45:33.168324584 +0200 +++ /var/tmp/diff_new_pack.daukr1/_new 2021-05-07 16:45:33.172324572 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.4.1 +Version: 4.4.4 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.4.1.tar.xz -> libstorage-ng-4.4.4.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/LIBVERSION new/libstorage-ng-4.4.4/LIBVERSION --- old/libstorage-ng-4.4.1/LIBVERSION 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/LIBVERSION 2021-05-06 17:57:27.000000000 +0200 @@ -1 +1 @@ -1.52.0 +1.53.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/VERSION new/libstorage-ng-4.4.4/VERSION --- old/libstorage-ng-4.4.1/VERSION 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/VERSION 2021-05-06 17:57:27.000000000 +0200 @@ -1 +1 @@ -4.4.1 +4.4.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/bindings/storage-catches.i new/libstorage-ng-4.4.4/bindings/storage-catches.i --- old/libstorage-ng-4.4.1/bindings/storage-catches.i 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/bindings/storage-catches.i 2021-05-06 17:57:27.000000000 +0200 @@ -275,6 +275,7 @@ %catches(storage::HolderNotFoundBySids, storage::WrongNumberOfHolders) storage::Devicegraph::find_holder(sid_t source_sid, sid_t target_sid); %catches(storage::HolderNotFoundBySids, storage::WrongNumberOfHolders) storage::Devicegraph::find_holder(sid_t source_sid, sid_t target_sid) const; %catches(storage::Exception) storage::Devicegraph::load(const std::string &filename); +%catches(storage::Exception) storage::Devicegraph::load(const std::string &filename, bool keep_sids); %catches(storage::DeviceNotFoundBySid) storage::Devicegraph::remove_device(sid_t sid); %catches(storage::Exception) storage::Devicegraph::save(const std::string &filename) const; %catches(storage::Exception) storage::Devicegraph::write_graphviz(const std::string &filename, DevicegraphStyleCallbacks *style_callbacks, View view) const; @@ -287,6 +288,8 @@ %catches(storage::Exception) storage::Filesystem::detect_space_info() const; %catches(storage::HolderAlreadyExists) storage::FilesystemUser::create(Devicegraph *devicegraph, const Device *source, const Device *target); %catches(storage::Exception) storage::Holder::copy_to_devicegraph(Devicegraph *devicegraph) const; +%catches(storage::Exception) storage::Holder::set_source(const Device *source); +%catches(storage::Exception) storage::Holder::set_target(const Device *target); %catches(storage::Exception) storage::ImplicitPt::create_implicit_partition(); %catches(storage::Exception) storage::LvmLv::create_lvm_lv(const std::string &lv_name, LvType lv_type, unsigned long long size); %catches(storage::Exception) storage::LvmLv::get_lvm_lv(const std::string &lv_name); @@ -307,6 +310,7 @@ %catches(storage::Exception) storage::LvmVg::get_lvm_lv(const std::string &lv_name); %catches(storage::InvalidExtentSize, storage::Exception) storage::LvmVg::set_extent_size(unsigned long long extent_size); %catches(storage::WrongNumberOfChildren) storage::Md::add_device(BlkDevice *blk_device); +%catches(storage::Exception) storage::Md::calculate_underlying_size(MdLevel md_level, unsigned int number_of_devices, unsigned long long size); %catches(storage::Exception) storage::Md::compare_by_number(const Md *lhs, const Md *rhs); %catches(storage::Exception) storage::Md::create(Devicegraph *devicegraph, const std::string &name); %catches(storage::DeviceNotFound, storage::DeviceHasWrongType) storage::Md::find_by_name(Devicegraph *devicegraph, const std::string &name); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/po/sk.po new/libstorage-ng-4.4.4/po/sk.po --- old/libstorage-ng-4.4.1/po/sk.po 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/po/sk.po 2021-05-06 17:57:27.000000000 +0200 @@ -6,7 +6,7 @@ "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-28 14:51+0000\n" -"PO-Revision-Date: 2021-03-15 19:56+0000\n" +"PO-Revision-Date: 2021-05-06 15:57+0000\n" "Last-Translator: Ferdinand Galko <galko.ferdin...@gmail.com>\n" "Language-Team: Slovak <https://l10n.opensuse.org/projects/libstorage/" "ng-master/sk/>\n" @@ -15,7 +15,7 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 3.6.1\n" +"X-Generator: Weblate 4.6\n" msgid "" "\n" @@ -405,7 +405,7 @@ "Create %1$s %2$s (%3$s) for %4$s with %5$s\n" "from %6$s" msgstr "" -"Vytvori?? %1$s %2$s (%3$s) pre %4$s pre %5$s\n" +"Vytvori?? %1$s %2$s (%3$s) pre %4$s s %5$s\n" "z %6$s" #. TRANSLATORS: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/Devicegraph.cc new/libstorage-ng-4.4.4/storage/Devicegraph.cc --- old/libstorage-ng-4.4.1/storage/Devicegraph.cc 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/Devicegraph.cc 2021-05-06 17:57:27.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. * @@ -158,7 +158,14 @@ void Devicegraph::load(const string& filename) { - get_impl().load(this, filename); + get_impl().load(this, filename, true); + } + + + void + Devicegraph::load(const string& filename, bool keep_sids) + { + get_impl().load(this, filename, keep_sids); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/Devicegraph.h new/libstorage-ng-4.4.4/storage/Devicegraph.h --- old/libstorage-ng-4.4.1/storage/Devicegraph.h 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/Devicegraph.h 2021-05-06 17:57:27.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. * @@ -190,11 +190,21 @@ /** * Load the devicegraph from a file. * + * Deprecated in favor of load(const std::string&, bool keep_sids) which will get + * the default of true for keep_sids. + * * @throw Exception */ void load(const std::string& filename); /** + * Load the devicegraph from a file. + * + * @throw Exception + */ + void load(const std::string& filename, bool keep_sids); + + /** * Save the devicegraph to a file. * * @throw Exception diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/DevicegraphImpl.cc new/libstorage-ng-4.4.4/storage/DevicegraphImpl.cc --- old/libstorage-ng-4.4.1/storage/DevicegraphImpl.cc 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/DevicegraphImpl.cc 2021-05-06 17:57:27.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. * @@ -478,6 +478,25 @@ } + Devicegraph::Impl::edge_descriptor + Devicegraph::Impl::set_target(edge_descriptor old_edge, vertex_descriptor target_vertex) + { + vertex_descriptor source_vertex = boost::source(old_edge, graph); + + Holder* new_holder = graph[old_edge].get()->clone(); + + Devicegraph::Impl::edge_descriptor new_edge = add_edge(source_vertex, target_vertex, + new_holder); + + // set back-reference + new_holder->get_impl().set_edge(new_edge); + + remove_edge(old_edge); + + return new_edge; + } + + void Devicegraph::Impl::clear() { @@ -720,7 +739,7 @@ void - Devicegraph::Impl::load(Devicegraph* devicegraph, const string& filename) + Devicegraph::Impl::load(Devicegraph* devicegraph, const string& filename, bool keep_sids) { if (&devicegraph->get_impl() != this) ST_THROW(LogicException("wrong impl-ptr")); @@ -767,6 +786,15 @@ it->second(devicegraph, holder_node); } } + + if (!keep_sids) + { + for (vertex_descriptor vertex : vertices()) + { + Device* device = graph[vertex].get(); + device->get_impl().set_sid(Storage::Impl::get_next_sid()); + } + } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/DevicegraphImpl.h new/libstorage-ng-4.4.4/storage/DevicegraphImpl.h --- old/libstorage-ng-4.4.1/storage/DevicegraphImpl.h 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/DevicegraphImpl.h 2021-05-06 17:57:27.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. * @@ -135,6 +135,7 @@ vertex_descriptor target(edge_descriptor edge) const { return boost::target(edge, graph); } edge_descriptor set_source(edge_descriptor edge, vertex_descriptor vertex); + edge_descriptor set_target(edge_descriptor edge, vertex_descriptor vertex); Device* operator[](vertex_descriptor vertex) { return graph[vertex].get(); } const Device* operator[](vertex_descriptor vertex) const { return graph[vertex].get(); } @@ -150,7 +151,7 @@ boost::iterator_range<vertex_iterator> vertices() const; boost::iterator_range<edge_iterator> edges() const; - void load(Devicegraph* devicegraph, const string& filename); + void load(Devicegraph* devicegraph, const string& filename, bool keep_sids); void save(const string& filename) const; void print(std::ostream& out) const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/Devices/LvmPvImpl.cc new/libstorage-ng-4.4.4/storage/Devices/LvmPvImpl.cc --- old/libstorage-ng-4.4.1/storage/Devices/LvmPvImpl.cc 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/Devices/LvmPvImpl.cc 2021-05-06 17:57:27.000000000 +0200 @@ -50,7 +50,7 @@ LvmPv::Impl::Impl(const xmlNode* node) - : Device::Impl(node), uuid(), pe_start(default_pe_start) + : Device::Impl(node) { getChildValue(node, "uuid", uuid); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/Devices/LvmPvImpl.h new/libstorage-ng-4.4.4/storage/Devices/LvmPvImpl.h --- old/libstorage-ng-4.4.1/storage/Devices/LvmPvImpl.h 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/Devices/LvmPvImpl.h 2021-05-06 17:57:27.000000000 +0200 @@ -45,7 +45,7 @@ static const unsigned long long default_pe_start = 1 * MiB; Impl() - : Device::Impl(), uuid(), pe_start(default_pe_start) {} + : Device::Impl() {} Impl(const xmlNode* node); @@ -121,7 +121,7 @@ * Usually 1 MiB (default_pe_start), for details see implementation of * calculate_pe_start(). */ - unsigned long long pe_start; + unsigned long long pe_start = default_pe_start; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/Devices/PartitionImpl.cc new/libstorage-ng-4.4.4/storage/Devices/PartitionImpl.cc --- old/libstorage-ng-4.4.1/storage/Devices/PartitionImpl.cc 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/Devices/PartitionImpl.cc 2021-05-06 17:57:27.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. * @@ -1118,13 +1118,39 @@ } + // TODO move to Arch class + static bool + is_efibootmgr() + { + static bool did_check = false; + static bool efibootmgr; + + if (!did_check) + { + // Check that efivars directory is writeable and nonempty (bsc #1185610). + + SystemCmd::Options options(TEST_BIN " -w '" EFIVARS_DIR "' -a " + "\"$(" LS_BIN " -A '" EFIVARS_DIR "')\"", SystemCmd::DoThrow); + options.verify = [](int exit_code) { return exit_code == 0 || exit_code == 1; }; + + SystemCmd cmd(options); + + efibootmgr = cmd.retcode() == 0; + + did_check = true; + } + + return efibootmgr; + } + + void Partition::Impl::do_delete_efi_boot_mgr() const { if (!is_gpt(get_partition_table())) return; - if (!get_devicegraph()->get_storage()->get_arch().is_efiboot()) + if (!get_devicegraph()->get_storage()->get_arch().is_efiboot() || !is_efibootmgr()) return; const Partitionable* partitionable = get_partitionable(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/Holders/Holder.cc new/libstorage-ng-4.4.4/storage/Holders/Holder.cc --- old/libstorage-ng-4.4.1/storage/Holders/Holder.cc 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/Holders/Holder.cc 2021-05-06 17:57:27.000000000 +0200 @@ -138,6 +138,20 @@ } + void + Holder::set_source(const Device* source) + { + get_impl().set_source(source); + } + + + void + Holder::set_target(const Device* target) + { + get_impl().set_target(target); + } + + sid_t Holder::get_source_sid() const { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/Holders/Holder.h new/libstorage-ng-4.4.4/storage/Holders/Holder.h --- old/libstorage-ng-4.4.1/storage/Holders/Holder.h 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/Holders/Holder.h 2021-05-06 17:57:27.000000000 +0200 @@ -70,6 +70,26 @@ const Device* get_source() const; /** + * Set the source device of the holder. Experimental. + * + * So far this function does not adjust the devices connected to the holder. E.g. + * setting a disk as source for a partition table does not adjust the device names + * of the partitions. This may change in the future. + * + * @throw Exception + */ + void set_source(const Device* source); + + /** + * Set the target device of the holder. + * + * @see set_source(const Device*) + * + * @throw Exception + */ + void set_target(const Device* target); + + /** * Return the storage id (sid) of the source of the holder. * * @see sid_t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/Holders/HolderImpl.cc new/libstorage-ng-4.4.4/storage/Holders/HolderImpl.cc --- old/libstorage-ng-4.4.1/storage/Holders/HolderImpl.cc 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/Holders/HolderImpl.cc 2021-05-06 17:57:27.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. * @@ -22,6 +22,7 @@ #include "storage/Holders/HolderImpl.h" +#include "storage/Devices/DeviceImpl.h" #include "storage/Devicegraph.h" #include "storage/Storage.h" #include "storage/Utils/XmlFile.h" @@ -168,6 +169,28 @@ } + void + Holder::Impl::set_source(const Device* source) + { + if (get_devicegraph() != source->get_devicegraph()) + ST_THROW(Exception("new source has wrong devicegraph")); + + Devicegraph::Impl::vertex_descriptor vertex = source->get_impl().get_vertex(); + devicegraph->get_impl().set_source(edge, vertex); + } + + + void + Holder::Impl::set_target(const Device* target) + { + if (get_devicegraph() != target->get_devicegraph()) + ST_THROW(Exception("new target has wrong devicegraph")); + + Devicegraph::Impl::vertex_descriptor vertex = target->get_impl().get_vertex(); + devicegraph->get_impl().set_target(edge, vertex); + } + + sid_t Holder::Impl::get_source_sid() const { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/Holders/HolderImpl.h new/libstorage-ng-4.4.4/storage/Holders/HolderImpl.h --- old/libstorage-ng-4.4.1/storage/Holders/HolderImpl.h 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/Holders/HolderImpl.h 2021-05-06 17:57:27.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. * @@ -87,11 +87,13 @@ Device* get_source(); const Device* get_source() const; + void set_source(const Device* source); sid_t get_source_sid() const; Device* get_target(); const Device* get_target() const; + void set_target(const Device* target); sid_t get_target_sid() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/SystemInfo/Arch.cc new/libstorage-ng-4.4.4/storage/SystemInfo/Arch.cc --- old/libstorage-ng-4.4.1/storage/SystemInfo/Arch.cc 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/SystemInfo/Arch.cc 2021-05-06 17:57:27.000000000 +0200 @@ -105,7 +105,7 @@ } else { - SystemCmd::Options options(TEST_BIN " -d '/sys/firmware/efi/efivars'", SystemCmd::DoThrow); + SystemCmd::Options options(TEST_BIN " -d '" EFIVARS_DIR "'", SystemCmd::DoThrow); options.verify = [](int exit_code) { return exit_code == 0 || exit_code == 1; }; SystemCmd cmd(options); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.4.1/storage/Utils/StorageDefines.h new/libstorage-ng-4.4.4/storage/Utils/StorageDefines.h --- old/libstorage-ng-4.4.1/storage/Utils/StorageDefines.h 2021-04-27 20:56:40.000000000 +0200 +++ new/libstorage-ng-4.4.4/storage/Utils/StorageDefines.h 2021-05-06 17:57:27.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2004-2015] Novell, Inc. - * Copyright (c) [2016-2020] SUSE LLC + * Copyright (c) [2016-2021] SUSE LLC * * All Rights Reserved. * @@ -39,6 +39,8 @@ #define SYSFS_DIR "/sys" #define PROC_DIR "/proc" +#define EFIVARS_DIR SYSFS_DIR "/firmware/efi/efivars" + // commands @@ -142,7 +144,7 @@ #define DISPLAY_BIN "/usr/bin/display" -//regexes +// regexes #define UUID_REGEX "[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}"