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-06-29 16:00:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstorage-ng (Old) and /work/SRC/openSUSE:Factory/.libstorage-ng.new.1548 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libstorage-ng" Wed Jun 29 16:00:58 2022 rev:172 rq:985576 version:4.5.24 Changes: -------- --- /work/SRC/openSUSE:Factory/libstorage-ng/libstorage-ng.changes 2022-06-23 10:22:30.947625595 +0200 +++ /work/SRC/openSUSE:Factory/.libstorage-ng.new.1548/libstorage-ng.changes 2022-06-29 16:01:54.884667148 +0200 @@ -1,0 +2,8 @@ +Tue Jun 28 11:45:53 UTC 2022 - aschnell@suse.com + +- merge gh#openSUSE/libstorage-ng#885 +- added some GPT type GUIDs from the Discoverable Partitions + Specification +- 4.5.24 + +-------------------------------------------------------------------- Old: ---- libstorage-ng-4.5.23.tar.xz New: ---- libstorage-ng-4.5.24.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstorage-ng.spec ++++++ --- /var/tmp/diff_new_pack.M2Khtb/_old 2022-06-29 16:01:55.404667839 +0200 +++ /var/tmp/diff_new_pack.M2Khtb/_new 2022-06-29 16:01:55.408667846 +0200 @@ -18,7 +18,7 @@ %define libname %{name}1 Name: libstorage-ng -Version: 4.5.23 +Version: 4.5.24 Release: 0 Summary: Library for storage management License: GPL-2.0-only ++++++ libstorage-ng-4.5.23.tar.xz -> libstorage-ng-4.5.24.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.23/LIBVERSION new/libstorage-ng-4.5.24/LIBVERSION --- old/libstorage-ng-4.5.23/LIBVERSION 2022-06-22 13:32:28.000000000 +0200 +++ new/libstorage-ng-4.5.24/LIBVERSION 2022-06-28 13:45:53.000000000 +0200 @@ -1 +1 @@ -1.77.0 +1.78.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.23/VERSION new/libstorage-ng-4.5.24/VERSION --- old/libstorage-ng-4.5.23/VERSION 2022-06-22 13:32:28.000000000 +0200 +++ new/libstorage-ng-4.5.24/VERSION 2022-06-28 13:45:53.000000000 +0200 @@ -1 +1 @@ -4.5.23 +4.5.24 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.23/integration-tests/partitions/linux-root-id.py new/libstorage-ng-4.5.24/integration-tests/partitions/linux-root-id.py --- old/libstorage-ng-4.5.23/integration-tests/partitions/linux-root-id.py 1970-01-01 01:00:00.000000000 +0100 +++ new/libstorage-ng-4.5.24/integration-tests/partitions/linux-root-id.py 2022-06-28 13:45:53.000000000 +0200 @@ -0,0 +1,17 @@ +#!/usr/bin/python3 + + +from storage import * + + +set_logger(get_logfile_logger()) + +system_info = SystemInfo() + +print("aarch64", ID_LINUX_ROOT_AARCH64) +print("ppc64le", ID_LINUX_ROOT_PPC64LE) +print("s390x", ID_LINUX_ROOT_S390X) +print("x86_64", ID_LINUX_ROOT_X86_64) + +print(get_linux_partition_id(LinuxPartitionIdCategory_ROOT, system_info)) + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.23/storage/Devices/BlkDevice.h new/libstorage-ng-4.5.24/storage/Devices/BlkDevice.h --- old/libstorage-ng-4.5.23/storage/Devices/BlkDevice.h 2022-06-22 13:32:28.000000000 +0200 +++ new/libstorage-ng-4.5.24/storage/Devices/BlkDevice.h 2022-06-28 13:45:53.000000000 +0200 @@ -29,7 +29,6 @@ #include "storage/Utils/Swig.h" #include "storage/Devices/Device.h" #include "storage/Filesystems/BlkFilesystem.h" -#include "storage/SystemInfo/SystemInfo.h" namespace storage @@ -42,6 +41,7 @@ class Bcache; class BcacheCset; class RemoveInfo; + class SystemInfo; //! An abstract Block Device. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.23/storage/Devices/GptImpl.cc new/libstorage-ng-4.5.24/storage/Devices/GptImpl.cc --- old/libstorage-ng-4.5.23/storage/Devices/GptImpl.cc 2022-06-22 13:32:28.000000000 +0200 +++ new/libstorage-ng-4.5.24/storage/Devices/GptImpl.cc 2022-06-28 13:45:53.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2014-2015] Novell, Inc. - * Copyright (c) [2016-2020] SUSE LLC + * Copyright (c) [2016-2022] SUSE LLC * * All Rights Reserved. * @@ -212,8 +212,13 @@ { 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_LINUX_SERVER_DATA + ID_WINDOWS_BASIC_DATA, ID_MICROSOFT_RESERVED, ID_DIAG, ID_LINUX_HOME, ID_LINUX_SERVER_DATA, + ID_LINUX_ROOT_ARM, ID_LINUX_ROOT_AARCH64, ID_LINUX_ROOT_PPC32, ID_LINUX_ROOT_PPC64BE, + ID_LINUX_ROOT_PPC64LE, ID_LINUX_ROOT_RISCV32, ID_LINUX_ROOT_RISCV64, ID_LINUX_ROOT_S390, + ID_LINUX_ROOT_S390X, ID_LINUX_ROOT_X86, ID_LINUX_ROOT_X86_64, ID_LINUX_USR_ARM, + ID_LINUX_USR_AARCH64, ID_LINUX_USR_PPC32, ID_LINUX_USR_PPC64BE, ID_LINUX_USR_PPC64LE, + ID_LINUX_USR_RISCV32, ID_LINUX_USR_RISCV64, ID_LINUX_USR_S390, ID_LINUX_USR_S390X, + ID_LINUX_USR_X86, ID_LINUX_USR_X86_64, }; return contains(supported_ids, id); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.23/storage/Devices/Partition.cc new/libstorage-ng-4.5.24/storage/Devices/Partition.cc --- old/libstorage-ng-4.5.23/storage/Devices/Partition.cc 2022-06-22 13:32:28.000000000 +0200 +++ new/libstorage-ng-4.5.24/storage/Devices/Partition.cc 2022-06-28 13:45:53.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2014-2015] Novell, Inc. - * Copyright (c) [2016-2021] SUSE LLC + * Copyright (c) [2016-2022] SUSE LLC * * All Rights Reserved. * @@ -24,9 +24,10 @@ #include <boost/algorithm/string.hpp> #include "storage/Utils/StorageDefines.h" +#include "storage/Utils/Format.h" #include "storage/Devices/PartitionImpl.h" #include "storage/Devicegraph.h" -#include "storage/Action.h" +#include "storage/SystemInfo/SystemInfoImpl.h" namespace storage @@ -49,6 +50,30 @@ } + IdNum + get_linux_partition_id(LinuxPartitionIdCategory linux_partition_id_category, SystemInfo& system_info) + { + static const map<string, vector<IdNum>> arch_to_ids = { + { "aarch64", { ID_LINUX_ROOT_AARCH64, ID_LINUX_USR_AARCH64 } }, + { "i586", { ID_LINUX_ROOT_X86, ID_LINUX_USR_X86 } }, + { "ppc", { ID_LINUX_ROOT_PPC32,ID_LINUX_USR_PPC32 } }, + { "ppc64", { ID_LINUX_ROOT_PPC64BE, ID_LINUX_USR_PPC64BE } }, + { "ppc64le", { ID_LINUX_ROOT_PPC64LE, ID_LINUX_USR_PPC64LE } }, + { "riscv64", { ID_LINUX_ROOT_RISCV64, ID_LINUX_USR_RISCV64 } }, + { "s390", { ID_LINUX_ROOT_S390, ID_LINUX_USR_S390 } }, + { "s390x", { ID_LINUX_ROOT_S390X, ID_LINUX_USR_S390X } }, + { "x86_64", { ID_LINUX_ROOT_X86_64, ID_LINUX_USR_X86_64 } }, + }; + + const string& arch = system_info.get_impl().getArch().get_arch(); + const map<string, vector<IdNum>>::const_iterator it = arch_to_ids.find(arch); + if (it == arch_to_ids.end()) + ST_THROW(Exception(sformat("partition id unknown for architecture %s", arch))); + + return it->second[(int)(linux_partition_id_category)]; + } + + Partition* Partition::create(Devicegraph* devicegraph, const string& name, const Region& region, PartitionType type) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.23/storage/Devices/Partition.h new/libstorage-ng-4.5.24/storage/Devices/Partition.h --- old/libstorage-ng-4.5.23/storage/Devices/Partition.h 2022-06-22 13:32:28.000000000 +0200 +++ new/libstorage-ng-4.5.24/storage/Devices/Partition.h 2022-06-28 13:45:53.000000000 +0200 @@ -33,6 +33,7 @@ class PartitionTable; class Partitionable; + class SystemInfo; /** @@ -136,12 +137,78 @@ /** Microsoft reserved partition, only for GPT. */ ID_MICROSOFT_RESERVED, - /** Linux Home, only for GPT. Required parted 3.5 or higher. */ + /** Linux Home, only for GPT. Requires parted 3.5 or higher. */ ID_LINUX_HOME, - /** Linux Server Data, only for GPT. Required SUSE parted 3.5 or higher. */ + /** Linux Server Data, only for GPT. Requires SUSE parted 3.5 or higher. */ ID_LINUX_SERVER_DATA, + /** Linux Root Partition (arm), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_ARM, + + /** Linux Root Partition (aarch64), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_AARCH64, + + /** Linux Root Partition (ppc), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_PPC32, + + /** Linux Root Partition (ppc64be), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_PPC64BE, + + /** Linux Root Partition (ppc64le), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_PPC64LE, + + /** Linux Root Partition (riscv32, only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_RISCV32, + + /** Linux Root Partition (riscv64), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_RISCV64, + + /** Linux Root Partition (s390), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_S390, + + /** Linux Root Partition (s390x), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_S390X, + + /** Linux Root Partition (x86), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_X86, + + /** Linux Root Partition (x86_64), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_ROOT_X86_64, + + /** Linux USR Partition (arm), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_ARM, + + /** Linux USR Partition (aarch64), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_AARCH64, + + /** Linux USR Partition (ppc), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_PPC32, + + /** Linux USR Partition (ppc64be), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_PPC64BE, + + /** Linux USR Partition (ppc64le), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_PPC64LE, + + /** Linux USR Partition (riscv32), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_RISCV32, + + /** Linux USR Partition (riscv64), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_RISCV64, + + /** Linux USR Partition (s390), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_S390, + + /** Linux USR Partition (s390x), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_S390X, + + /** Linux USR Partition (x86), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_X86, + + /** Linux USR Partition (x86_64), only for GPT. Requires SUSE parted 3.5 or higher. */ + ID_LINUX_USR_X86_64, + }; @@ -156,6 +223,26 @@ /** + * Enum with categories for Linux partitions. + */ + enum class LinuxPartitionIdCategory + { + ROOT, USR + }; + + + /** + * Get the partition id for the Linux partition of the given category (root, usr, ...) + * depending on the architecture. + * + * @see IdNum, LinuxPartitionIdCategory + * + * @throw Exception + */ + IdNum get_linux_partition_id(LinuxPartitionIdCategory linux_partition_id_category, SystemInfo& system_info); + + + /** * A partition of a Partitionable, e.g. Disk or Md. */ class Partition : public BlkDevice diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.23/storage/Devices/PartitionImpl.cc new/libstorage-ng-4.5.24/storage/Devices/PartitionImpl.cc --- old/libstorage-ng-4.5.23/storage/Devices/PartitionImpl.cc 2022-06-22 13:32:28.000000000 +0200 +++ new/libstorage-ng-4.5.24/storage/Devices/PartitionImpl.cc 2022-06-28 13:45:53.000000000 +0200 @@ -1,6 +1,6 @@ /* * Copyright (c) [2014-2015] Novell, Inc. - * Copyright (c) [2016-2021] SUSE LLC + * Copyright (c) [2016-2022] SUSE LLC * * All Rights Reserved. * @@ -1637,6 +1637,94 @@ case ID_LINUX_SERVER_DATA: // TRANSLATORS: name of partition type return _("Linux Server Data"); + + case ID_LINUX_ROOT_ARM: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (ARM 32-bit)"); + + case ID_LINUX_ROOT_AARCH64: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (ARM 64-bit)"); + + case ID_LINUX_ROOT_PPC32: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (PPC 32-bit)"); + + case ID_LINUX_ROOT_PPC64BE: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (PPC 64-bit BE)"); + + case ID_LINUX_ROOT_PPC64LE: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (PPC 64-bit LE)"); + + case ID_LINUX_ROOT_RISCV32: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (RISC-V 32-bit)"); + + case ID_LINUX_ROOT_RISCV64: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (RISC-V 64-bit)"); + + case ID_LINUX_ROOT_S390: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (S/390 32-bit)"); + + case ID_LINUX_ROOT_S390X: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (S/390 64-bit)"); + + case ID_LINUX_ROOT_X86: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (x86 32-bit)"); + + case ID_LINUX_ROOT_X86_64: + // TRANSLATORS: name of partition type + return _("Linux Root Partition (x86 64-bit)"); + + case ID_LINUX_USR_ARM: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (ARM 32-bit)"); + + case ID_LINUX_USR_AARCH64: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (ARM 64-bit)"); + + case ID_LINUX_USR_PPC32: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (PPC 32-bit)"); + + case ID_LINUX_USR_PPC64BE: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (PPC 64-bit BE)"); + + case ID_LINUX_USR_PPC64LE: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (PPC 64-bit LE)"); + + case ID_LINUX_USR_RISCV32: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (RISC-V 32-bit)"); + + case ID_LINUX_USR_RISCV64: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (RISC-V 64-bit)"); + + case ID_LINUX_USR_S390: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (S/390 32-bit)"); + + case ID_LINUX_USR_S390X: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (S/390 64-bit)"); + + case ID_LINUX_USR_X86: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (x86 32-bit)"); + + case ID_LINUX_USR_X86_64: + // TRANSLATORS: name of partition type + return _("Linux USR Partition (x86 64-bit)"); } return Text(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstorage-ng-4.5.23/storage/SystemInfo/CmdParted.cc new/libstorage-ng-4.5.24/storage/SystemInfo/CmdParted.cc --- old/libstorage-ng-4.5.23/storage/SystemInfo/CmdParted.cc 2022-06-22 13:32:28.000000000 +0200 +++ new/libstorage-ng-4.5.24/storage/SystemInfo/CmdParted.cc 2022-06-28 13:45:53.000000000 +0200 @@ -612,7 +612,29 @@ const map<unsigned int, const char*> Parted::id_to_uuid = { { ID_LINUX, "0fc63daf-8483-4772-8e79-3d69d8477de4" }, + { ID_LINUX_ROOT_ARM, "69dad710-2ce4-4e3c-b16c-21a1d49abed3" }, + { ID_LINUX_ROOT_AARCH64, "b921b045-1df0-41c3-af44-4c6f280d3fae" }, + { ID_LINUX_ROOT_PPC32, "1de3f1ef-fa98-47b5-8dcd-4a860a654d78" }, + { ID_LINUX_ROOT_PPC64BE, "912ade1d-a839-4913-8964-a10eee08fbd2" }, + { ID_LINUX_ROOT_PPC64LE, "c31c45e6-3f39-412e-80fb-4809c4980599" }, + { ID_LINUX_ROOT_RISCV32, "60d5a7fe-8e7d-435c-b714-3dd8162144e1" }, + { ID_LINUX_ROOT_RISCV64, "72ec70a6-cf74-40e6-bd49-4bda08e8f224" }, + { ID_LINUX_ROOT_S390, "08a7acea-624c-4a20-91e8-6e0fa67d23f9" }, + { ID_LINUX_ROOT_S390X, "5eead9a9-fe09-4a1e-a1d7-520d00531306" }, + { ID_LINUX_ROOT_X86, "44479540-f297-41b2-9af7-d131d5f0458a" }, + { ID_LINUX_ROOT_X86_64, "4f68bce3-e8cd-4db1-96e7-fbcaf984b709" }, { ID_LINUX_SERVER_DATA, "3b8f8425-20e0-4f3b-907f-1a25a76f98e8" }, + { ID_LINUX_USR_ARM, "7d0359a3-02b3-4f0a-865c-654403e70625" }, + { ID_LINUX_USR_AARCH64, "b0e01050-ee5f-4390-949a-9101b17104e9" }, + { ID_LINUX_USR_PPC32, "7d14fec5-cc71-415d-9d6c-06bf0b3c3eaf" }, + { ID_LINUX_USR_PPC64BE, "2c9739e2-f068-46b3-9fd0-01c5a9afbcca" }, + { ID_LINUX_USR_PPC64LE, "15bb03af-77e7-4d4a-b12b-c0d084f7491c" }, + { ID_LINUX_USR_RISCV32, "b933fb22-5c3f-4f91-af90-e2bb0fa50702" }, + { ID_LINUX_USR_RISCV64, "beaec34b-8442-439b-a40b-984381ed097d" }, + { ID_LINUX_USR_S390, "cd0f869b-d0fb-4ca0-b141-9ea87cc78d66" }, + { ID_LINUX_USR_S390X, "8a4f5770-50aa-4ed3-874a-99b710db6fea" }, + { ID_LINUX_USR_X86, "75250d76-8cc6-458e-bd66-bd47cc81a812" }, + { ID_LINUX_USR_X86_64, "8484680c-9521-48c6-9c11-b0720656f69e" }, { ID_SWAP, "0657fd6d-a4ab-43c4-84e5-0933c84b4f4f" }, };
participants (1)
-
Source-Sync