commit libstorage-ng for openSUSE:Factory
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 2022-05-31 15:47:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libstorage-ng" Tue May 31 15:47:05 2022 rev:167 rq:980044 version:4.5.16 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2022-05-25 20:34:16.860204096 +0200 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1548/libstorage-ng.changes 2022-05-31 15:47:53.000008180 +0200 @@ -1,0 +2,14 @@ +Tue May 31 07:29:14 UTC 2022 - aschnell@suse.com + +- merge gh#openSUSE/libstorage-ng#881 +- increase disk size requirement in obs to avoid build failures +- 4.5.16 + +-------------------------------------------------------------------- +Mon May 30 10:36:01 UTC 2022 - aschnell@suse.com + +- merge gh#openSUSE/libstorage-ng#880 +- added partition id for linux-server-data +- 4.5.15 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.5.14.tar.xz New: ---- libstorage-ng-4.5.16.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.eN73nD/_old 2022-05-31 15:47:53.612008586 +0200 +++ /var/tmp/diff_new_pack.eN73nD/_new 2022-05-31 15:47:53.616008589 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.5.14 +Version: 4.5.16 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ _constraints ++++++ --- /var/tmp/diff_new_pack.eN73nD/_old 2022-05-31 15:47:53.652008613 +0200 +++ /var/tmp/diff_new_pack.eN73nD/_new 2022-05-31 15:47:53.656008615 +0200 @@ -1,7 +1,7 @@ <constraints> <hardware> <disk> - <size unit="G">4</size> + <size unit="G">6</size> </disk> <memory> <size unit="G">4</size> ++++++ libstorage-ng-4.5.14.tar.xz -> libstorage-ng-4.5.16.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.14/VERSION new/libstorage-ng-4.5.16/VERSION --- old/libstorage-ng-4.5.14/VERSION 2022-05-24 15:50:04.000000000 +0200 +++ new/libstorage-ng-4.5.16/VERSION 2022-05-31 09:29:14.000000000 +0200 @@ -1 +1 @@ -4.5.14 +4.5.16 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.14/configure.ac new/libstorage-ng-4.5.16/configure.ac --- old/libstorage-ng-4.5.14/configure.ac 2022-05-24 15:50:04.000000000 +0200 +++ new/libstorage-ng-4.5.16/configure.ac 2022-05-31 09:29:14.000000000 +0200 @@ -22,7 +22,6 @@ AM_INIT_AUTOMAKE(libstorage-ng, $VERSION) AM_CONFIG_HEADER(config.h) - AC_PROG_CXX AM_PATH_PYTHON([3]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.14/obs/_constraints new/libstorage-ng-4.5.16/obs/_constraints --- old/libstorage-ng-4.5.14/obs/_constraints 2022-05-24 15:50:04.000000000 +0200 +++ new/libstorage-ng-4.5.16/obs/_constraints 2022-05-31 09:29:14.000000000 +0200 @@ -1,7 +1,7 @@ <constraints> <hardware> <disk> - <size unit="G">4</size> + <size unit="G">6</size> </disk> <memory> <size unit="G">4</size> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.14/storage/Devices/GptImpl.cc new/libstorage-ng-4.5.16/storage/Devices/GptImpl.cc --- old/libstorage-ng-4.5.14/storage/Devices/GptImpl.cc 2022-05-24 15:50:04.000000000 +0200 +++ new/libstorage-ng-4.5.16/storage/Devices/GptImpl.cc 2022-05-31 09:29:14.000000000 +0200 @@ -212,7 +212,8 @@ { static const vector<unsigned int> supported_ids = { ID_UNKNOWN, ID_LINUX, ID_SWAP, ID_LVM, ID_RAID, ID_IRST, ID_ESP, ID_BIOS_BOOT, ID_PREP, - ID_WINDOWS_BASIC_DATA, ID_MICROSOFT_RESERVED, ID_DIAG, ID_LINUX_HOME + ID_WINDOWS_BASIC_DATA, ID_MICROSOFT_RESERVED, ID_DIAG, ID_LINUX_HOME, + ID_LINUX_SERVER_DATA }; return contains(supported_ids, id); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.14/storage/Devices/Partition.h new/libstorage-ng-4.5.16/storage/Devices/Partition.h --- old/libstorage-ng-4.5.14/storage/Devices/Partition.h 2022-05-24 15:50:04.000000000 +0200 +++ new/libstorage-ng-4.5.16/storage/Devices/Partition.h 2022-05-31 09:29:14.000000000 +0200 @@ -128,16 +128,19 @@ /** BIOS boot partition (https://en.wikipedia.org/wiki/BIOS_boot_partition), only for GPT. */ - ID_BIOS_BOOT = 0x101, + ID_BIOS_BOOT, /** Windows basic data partition, only for GPT. */ - ID_WINDOWS_BASIC_DATA = 0x102, + ID_WINDOWS_BASIC_DATA, /** Microsoft reserved partition, only for GPT. */ - ID_MICROSOFT_RESERVED = 0x103, + ID_MICROSOFT_RESERVED, - /** Linux home, only for GPT. */ - ID_LINUX_HOME = 0x104, + /** Linux Home, only for GPT. Required parted 3.5 or higher. */ + ID_LINUX_HOME, + + /** Linux Server Data, only for GPT. Required SUSE parted 3.5 or higher. */ + ID_LINUX_SERVER_DATA, }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.14/storage/Devices/PartitionImpl.cc new/libstorage-ng-4.5.16/storage/Devices/PartitionImpl.cc --- old/libstorage-ng-4.5.14/storage/Devices/PartitionImpl.cc 2022-05-24 15:50:04.000000000 +0200 +++ new/libstorage-ng-4.5.16/storage/Devices/PartitionImpl.cc 2022-05-31 09:29:14.000000000 +0200 @@ -1090,9 +1090,11 @@ string cmd_line = PARTED_BIN " --script " + quote(partitionable->get_name()); - // Note: Neither the 'type' option nor the "type-id" command are available in - // upstream parted (2022-04-22). 'swap' is not available for MS-DOS in upstream - // parted (2021-07-26). 'swap' for DASD is SUSE specific (2021-10-07). + // Note: The 'type' command is now available in upstream parted + // (2022-05-24). 'swap' is not available for MS-DOS in upstream parted + // (2021-07-26). 'swap' for DASD is SUSE specific (2021-10-07). In parted 3.6 + // 'swap' should work for all partition table types (2022-05-24). In SLE15 'swap' + // is not available for all partition table types. map<unsigned int, const char*>::const_iterator it = Parted::id_to_name.find(get_id()); if (it != Parted::id_to_name.end() && it->first != ID_SWAP) @@ -1106,13 +1108,22 @@ else cmd_line += " set " + to_string(get_number()) + " type " + to_string(get_id()); } + else if (is_gpt(partition_table) && PartedVersion::supports_type_command()) + { + map<unsigned int, const char*>::const_iterator it2 = Parted::id_to_uuid.find(get_id()); + if (it2 != Parted::id_to_uuid.end()) + cmd_line += " type " + to_string(get_number()) + " " + it2->second; + else + ST_THROW(Exception("impossible to set partition id")); + } else { switch (get_id()) { case ID_LINUX: // This is tricky but parted has no clearer way - it also fails if the - // partition has a swap signature. TODO Use new upstream type command. + // partition has a swap signature. For MS-DOS and GPT the new 'type' + // command is used if available. cmd_line += " set " + to_string(get_number()) + " lvm on set " + to_string(get_number()) + " lvm off"; break; @@ -1551,6 +1562,10 @@ switch (id) { + case ID_UNKNOWN: + // TRANSLATORS: name of partition type + return _("Unknown"); + case ID_DOS12: // TRANSLATORS: name of partition type return _("DOS12 Partition"); @@ -1618,6 +1633,10 @@ case ID_LINUX_HOME: // TRANSLATORS: name of partition type return _("Linux Home"); + + case ID_LINUX_SERVER_DATA: + // TRANSLATORS: name of partition type + return _("Linux Server Data"); } return Text(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.14/storage/SystemInfo/CmdParted.cc new/libstorage-ng-4.5.16/storage/SystemInfo/CmdParted.cc --- old/libstorage-ng-4.5.14/storage/SystemInfo/CmdParted.cc 2022-05-24 15:50:04.000000000 +0200 +++ new/libstorage-ng-4.5.16/storage/SystemInfo/CmdParted.cc 2022-05-31 09:29:14.000000000 +0200 @@ -224,7 +224,9 @@ if (label == PtType::MSDOS) { - // the "type-id" entry is SUSE specific (2022-04-22). + // The "type-id" entry is SUSE specific (2022-04-22). Meanwhile included + // upstream (2022-05-24). + if (get_child_value(node, "type-id", tmp)) { std::istringstream data(tmp); @@ -233,6 +235,22 @@ } } + if (label == PtType::GPT) + { + // ID_LINUX is the default and thus also the value for unknown types. In that + // case look for the type UUID. The "type-uuid" is meanwhile included upstream + // (2022-05-24). + + if (entry.id == ID_LINUX && get_child_value(node, "type-uuid", tmp)) + { + map<unsigned int, const char*>::const_iterator it = + find_if(id_to_uuid.begin(), id_to_uuid.end(), + [&tmp](const auto& v) { return v.second == tmp; }); + + entry.id = it != id_to_uuid.end() ? it->first : ID_UNKNOWN; + } + } + entries.push_back(entry); } @@ -592,6 +610,13 @@ }; + const map<unsigned int, const char*> Parted::id_to_uuid = { + { ID_LINUX, "0fc63daf-8483-4772-8e79-3d69d8477de4" }, + { ID_LINUX_SERVER_DATA, "3b8f8425-20e0-4f3b-907f-1a25a76f98e8" }, + { ID_SWAP, "0657fd6d-a4ab-43c4-84e5-0933c84b4f4f" }, + }; + + const map<const char*, PtType> Parted::name_to_pt_type = { { "aix", PtType::AIX }, { "amiga", PtType::AMIGA }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.14/storage/SystemInfo/CmdParted.h new/libstorage-ng-4.5.16/storage/SystemInfo/CmdParted.h --- old/libstorage-ng-4.5.14/storage/SystemInfo/CmdParted.h 2022-05-24 15:50:04.000000000 +0200 +++ new/libstorage-ng-4.5.16/storage/SystemInfo/CmdParted.h 2022-05-31 09:29:14.000000000 +0200 @@ -139,6 +139,11 @@ */ static const map<unsigned int, const char*> id_to_name; + /** + * Mapping from partition ids to GPT partition type UUIDs. + */ + static const map<unsigned int, const char*> id_to_uuid; + private: typedef vector<Entry>::const_iterator const_iterator;
participants (1)
-
Source-Sync