diff --git a/0001-add-loongarch64-support-for-blivet.patch b/0001-add-loongarch64-support-for-blivet.patch deleted file mode 100644 index aaed9d882442588b1df4d7ca33b7462d978f5ed2..0000000000000000000000000000000000000000 --- a/0001-add-loongarch64-support-for-blivet.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 26d7d0228dff985138593ef085b5f22bfabee0b7 Mon Sep 17 00:00:00 2001 -From: Wenlong Zhang -Date: Sat, 11 Feb 2023 16:28:21 +0800 -Subject: [PATCH] add loongarch64 support for blivet - ---- - blivet/arch.py | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/blivet/arch.py b/blivet/arch.py -index 2cd978e..bc76031 100644 ---- a/blivet/arch.py -+++ b/blivet/arch.py -@@ -333,6 +333,8 @@ def is_ipseries(): - def is_powernv(): - return is_ppc() and get_ppc_machine() == "PowerNV" - -+def is_loongarch(): -+ return os.uname()[4] == 'loongarch64' - - def get_arch(): - """ -@@ -349,6 +351,8 @@ def get_arch(): - elif is_ppc(bits=64): - # ppc64 and ppc64le are distinct architectures - return os.uname()[4] -+ elif is_loongarch(): -+ return os.uname()[4] - elif is_aarch64(): - return 'aarch64' - elif is_alpha(): --- -2.33.0 - diff --git a/0001-force-lvm-plugin.patch b/0001-force-lvm-plugin.patch index 2f9d9a09d8f9111933cfe130635f3090491f529b..8cbade850ce37effcc1c63b8a1aa4cd2f162a9c9 100644 --- a/0001-force-lvm-plugin.patch +++ b/0001-force-lvm-plugin.patch @@ -8,18 +8,18 @@ Subject: [PATCH] Force command line based libblockdev LVM plugin 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/blivet/__init__.py b/blivet/__init__.py -index c5a75bb8..cb759173 100644 +index 0c76dab..c2463d4 100644 --- a/blivet/__init__.py +++ b/blivet/__init__.py -@@ -63,11 +63,16 @@ def log_bd_message(level, msg): +@@ -63,11 +63,16 @@ gi.require_version("BlockDev", "3.0") from gi.repository import GLib from gi.repository import BlockDev as blockdev if arch.is_s390(): -- _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm")) -+ _REQUESTED_PLUGIN_NAMES = set(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm")) +- _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm", "nvme")) ++ _REQUESTED_PLUGIN_NAMES = set(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm", "nvme")) else: -- _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) -+ _REQUESTED_PLUGIN_NAMES = set(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) +- _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm", "nvme")) ++ _REQUESTED_PLUGIN_NAMES = set(("btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm", "nvme")) _requested_plugins = blockdev.plugin_specs_from_names(_REQUESTED_PLUGIN_NAMES) +# XXX force non-dbus LVM plugin @@ -28,5 +28,6 @@ index c5a75bb8..cb759173 100644 +lvm_plugin.so_name = "libbd_lvm.so.2" +_requested_plugins.append(lvm_plugin) try: - # do not check for dependencies during libblockdev initializtion, do runtime - # checks instead + succ_, avail_plugs = blockdev.try_reinit(require_plugins=_requested_plugins, reload=False, log_func=log_bd_message) + except GLib.GError as err: + diff --git a/Incomplete-Chineseization-of-disk-mount.patch b/Incomplete-Chineseization-of-disk-mount.patch index 5c37e0f5a97ca5725d634e88ec8904a8f9d1ea83..828431b872e431dcb1aaf95d1ecbc9c1e0043a2f 100644 --- a/Incomplete-Chineseization-of-disk-mount.patch +++ b/Incomplete-Chineseization-of-disk-mount.patch @@ -1,16 +1,8 @@ diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py -index efadd25..7b9243a 100644 +index b995cc2..ca816fc 100644 --- a/blivet/devicefactory.py +++ b/blivet/devicefactory.py -@@ -39,6 +39,7 @@ from .partitioning import TotalSizeSet - from .partitioning import do_partitioning - from .size import Size - from .static_data import luks_data -+from .i18n import _ - - import gi - gi.require_version("BlockDev", "2.0") -@@ -714,7 +715,7 @@ class DeviceFactory(object): +@@ -724,7 +724,7 @@ class DeviceFactory(object): # the container size = self._get_device_size() if size <= Size(0): @@ -19,7 +11,7 @@ index efadd25..7b9243a 100644 parents = self._get_parent_devices() -@@ -1322,7 +1323,7 @@ class LVMFactory(DeviceFactory): +@@ -1348,7 +1348,7 @@ class LVMFactory(DeviceFactory): self.size += self.device.size if self.size == Size(0): @@ -28,30 +20,33 @@ index efadd25..7b9243a 100644 else: super(LVMFactory, self)._handle_no_size() -diff --git a/po/blivet.pot b/po/blivet.pot -index 40ef843..7d49527 100644 ---- a/po/blivet.pot -+++ b/po/blivet.pot -@@ -126,6 +126,10 @@ msgstr "" - msgid "FCoE not available" - msgstr "" +@@ -2119,7 +2119,7 @@ class StratisFactory(DeviceFactory): + self.size += self.device.size -+#: ../blivet/devicefactory.py:718 ../blivet/devicefactory.py:1326 -+msgid "not enough free space for new device" -+msgstr "" -+ - #: ../blivet/iscsi.py:216 - msgid "Unable to change iSCSI initiator name once set" - msgstr "" + if self.size == Size(0): +- raise DeviceFactoryError("not enough free space for new device") ++ raise DeviceFactoryError(_("not enough free space for new device")) + else: + super(StratisFactory, self)._handle_no_size() + +@@ -2170,7 +2170,7 @@ class StratisFactory(DeviceFactory): + # the container + size = self._get_device_size() + if size <= Size(0): +- raise DeviceFactoryError("not enough free space for new device") ++ raise DeviceFactoryError(_("not enough free space for new device")) + + parents = self._get_parent_devices() + try: diff --git a/po/zh_CN.po b/po/zh_CN.po -index aad3d0f..31f7017 100644 +index 5b7ac92..21309ac 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po -@@ -150,6 +150,10 @@ msgstr "" +@@ -152,6 +152,10 @@ msgstr "" msgid "FCoE not available" msgstr "FCoE 不可用" -+#: ../blivet/devicefactory.py:718 ../blivet/devicefactory.py:1326 ++#: ../blivet/devicefactory.py:727 ../blivet/devicefactory.py:1351 ../blivet/devicefactory.py:2122 ../blivet/devicefactory.py:2173 +msgid "not enough free space for new device" +msgstr "新设备没有足够的剩余空间" + diff --git a/backport-Add-a-basic-read-only-support-for-UDF-filesystem.patch b/backport-Add-a-basic-read-only-support-for-UDF-filesystem.patch deleted file mode 100644 index 3b06ce3e9dd83f89e3ff0a88cf833a346b226ade..0000000000000000000000000000000000000000 --- a/backport-Add-a-basic-read-only-support-for-UDF-filesystem.patch +++ /dev/null @@ -1,79 +0,0 @@ -From bc7366a03e86a3ea0402dc34ddedbc971b82e2c1 Mon Sep 17 00:00:00 2001 -From: Vojtech Trefny -Date: Mon, 21 Nov 2022 11:04:40 +0100 -Subject: [PATCH] Add a basic read-only support for UDF filesystem - -Conflict:del doc and tests -Reference:https://github.com/storaged-project/blivet/commit/bc7366a03e86a3ea0402dc34ddedbc971b82e2c1 - ---- - blivet/formats/fs.py | 12 ++++++++++++ - blivet/populator/helpers/disklabel.py | 2 +- - blivet/populator/helpers/partition.py | 2 +- - blivet/tasks/fsmount.py | 4 ++++ - 4 files changed, 18 insertions(+), 2 deletions(-) - -diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py -index 8c346aa53..8df881b82 100644 ---- a/blivet/formats/fs.py -+++ b/blivet/formats/fs.py -@@ -1338,6 +1338,18 @@ class Iso9660FS(FS): - register_device_format(Iso9660FS) - - -+class UDFFS(FS): -+ -+ """ UDF filesystem. """ -+ _type = "udf" -+ _modules = ["udf"] -+ _supported = True -+ _mount_class = fsmount.UDFFSMount -+ -+ -+register_device_format(UDFFS) -+ -+ - class NoDevFS(FS): - - """ nodev filesystem base class """ -diff --git a/blivet/populator/helpers/disklabel.py b/blivet/populator/helpers/disklabel.py -index db10638ef..842cd3081 100644 ---- a/blivet/populator/helpers/disklabel.py -+++ b/blivet/populator/helpers/disklabel.py -@@ -42,7 +42,7 @@ def match(cls, data, device): - # XXX ignore disklabels on multipath or biosraid member disks - return (bool(udev.device_get_disklabel_type(data)) and - not udev.device_is_biosraid_member(data) and -- udev.device_get_format(data) != "iso9660" and -+ udev.device_get_format(data) not in ("iso9660", "udf") and - not (device.is_disk and udev.device_get_format(data) == "mpath_member")) - - def _get_kwargs(self): -diff --git a/blivet/populator/helpers/partition.py b/blivet/populator/helpers/partition.py -index 8659bd483..9257407e6 100644 ---- a/blivet/populator/helpers/partition.py -+++ b/blivet/populator/helpers/partition.py -@@ -75,7 +75,7 @@ def run(self): - # For partitions on disklabels parted cannot make sense of, go ahead - # and instantiate a PartitionDevice so our view of the layout is - # complete. -- if not disk.partitionable or disk.format.type == "iso9660" or disk.format.hidden: -+ if not disk.partitionable or disk.format.type in ("iso9660", "udf") or disk.format.hidden: - log.debug("ignoring partition %s on %s", name, disk.format.type) - return - -diff --git a/blivet/tasks/fsmount.py b/blivet/tasks/fsmount.py -index 65b2470ac..a7f493dd4 100644 ---- a/blivet/tasks/fsmount.py -+++ b/blivet/tasks/fsmount.py -@@ -163,6 +163,10 @@ class Iso9660FSMount(FSMount): - options = ["ro"] - - -+class UDFFSMount(FSMount): -+ options = ["ro"] -+ -+ - class NoDevFSMount(FSMount): - - @property diff --git a/backport-fix-setting-kickstart-data.patch b/backport-fix-setting-kickstart-data.patch deleted file mode 100644 index cc9987a7580b990a8f96d5671b8396869df94ac5..0000000000000000000000000000000000000000 --- a/backport-fix-setting-kickstart-data.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 96d44101dd324a0d2822fbebf875fdaa2987766b Mon Sep 17 00:00:00 2001 -From: Vojtech Trefny -Date: Fri, 1 Sep 2023 17:25:44 +0800 -Subject: [PATCH] 1 - -Signed-off-by: Vojtech Trefny - -Conflict:https://github.com/storaged-project/blivet/commit/8a860841489f02be33630e8d48911c5441891f0e -Reference:https://github.com/storaged-project/blivet/commit/8a860841489f02be33630e8d48911c5441891f0e - ---- - blivet/devices/btrfs.py | 4 ++-- - blivet/devices/lvm.py | 2 +- - blivet/devices/partition.py | 6 +++--- - 3 files changed, 6 insertions(+), 6 deletions(-) - -diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py -index edb8247..5da6538 100644 ---- a/blivet/devices/btrfs.py -+++ b/blivet/devices/btrfs.py -@@ -498,8 +498,8 @@ class BTRFSVolumeDevice(BTRFSDevice, ContainerDevice, RaidDevice): - - def populate_ksdata(self, data): - super(BTRFSVolumeDevice, self).populate_ksdata(data) -- data.data_level = self.data_level.name if self.data_level else None -- data.metadata_level = self.metadata_level.name if self.metadata_level else None -+ data.dataLevel = self.data_level.name if self.data_level else None -+ data.metaDataLevel = self.metadata_level.name if self.metadata_level else None - data.devices = ["btrfs.%d" % p.id for p in self.parents] - data.preexist = self.exists - -diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py -index 97de6ac..54eac75 100644 ---- a/blivet/devices/lvm.py -+++ b/blivet/devices/lvm.py -@@ -1151,7 +1151,7 @@ class LVMLogicalVolumeBase(DMDevice, RaidDevice): - - if self.req_grow: - # base size could be literal or percentage -- data.max_size_mb = self.req_max_size.convert_to(MiB) -+ data.maxSizeMB = self.req_max_size.convert_to(MiB) - elif data.resize: - data.size = self.target_size.convert_to(MiB) - -diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py -index c53e707..9e24a3c 100644 ---- a/blivet/devices/partition.py -+++ b/blivet/devices/partition.py -@@ -982,14 +982,14 @@ class PartitionDevice(StorageDevice): - data.size = self.req_base_size.round_to_nearest(MiB, rounding=ROUND_DOWN).convert_to(spec=MiB) - data.grow = self.req_grow - if self.req_grow: -- data.max_size_mb = self.req_max_size.convert_to(MiB) -+ data.maxSizeMB = self.req_max_size.convert_to(MiB) - - # data.disk = self.disk.name # by-id - if self.req_disks and len(self.req_disks) == 1: - data.disk = self.disk.name -- data.prim_only = self.req_primary -+ data.primOnly = self.req_primary - else: -- data.on_part = self.name # by-id -+ data.onPart = self.name # by-id - - if data.resize: - # on s390x in particular, fractional sizes are reported, which --- -2.27.0 - diff --git a/blivet-3.6.1.tar.gz b/blivet-3.6.1.tar.gz deleted file mode 100644 index 92d685ac53befb6ae7746a4b98fede2b49913dee..0000000000000000000000000000000000000000 Binary files a/blivet-3.6.1.tar.gz and /dev/null differ diff --git a/blivet-3.8.2.tar.gz b/blivet-3.8.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7fbfc2ea56cfa003e0d4b50b9871e873df49368d Binary files /dev/null and b/blivet-3.8.2.tar.gz differ diff --git a/python-blivet.spec b/python-blivet.spec index 597c0192c9a81086ca33a0b2b7a4c5b111918f36..aad965c3529615df6b56eac84d8a28dc2420c6ca 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -2,8 +2,8 @@ %bcond_without python3 Name: python-blivet -Version: 3.6.1 -Release: 4 +Version: 3.8.2 +Release: 1 Epoch: 1 Summary: A python module for system storage configuration License: LGPL-2.1-or-later @@ -19,16 +19,11 @@ BuildRequires: python2-devel python2-setuptools Patch0: 0001-force-lvm-plugin.patch Patch1: fix-the-long-hostname.patch -Patch2: backport-fix-setting-kickstart-data.patch -patch6001: backport-Add-a-basic-read-only-support-for-UDF-filesystem.patch %ifarch sw_64 patch9001: blivet-3.4.2-sw.patch %endif patch9002: Incomplete-Chineseization-of-disk-mount.patch -%if 0%(test `uname -m` == "loongarch64" && echo 1) -patch9003: 0001-add-loongarch64-support-for-blivet.patch -%endif %description The python-blivet package is a python module for examining and modifying @@ -45,14 +40,14 @@ Data packages for python-blivet. %package -n python3-blivet Summary: python3 package for blivet Requires: python3 python3-six python3-pyudev >= 0.18 python3-pyparted >= 3.10.4 -Requires: libselinux-python3 python3-blockdev >= 2.19 parted >= 1.8.1 +Requires: libselinux-python3 python3-blockdev >= 3.0 parted >= 1.8.1 Requires: python3-bytesize >= 0.3 util-linux >= 2.15.1 lsof python3-gobject-base Requires: systemd-udev blivet-data = %{epoch}:%{version}-%{release} -Recommends: libblockdev-btrfs >= 2.19 libblockdev-crypto >= 2.19 libblockdev-dm >= 2.19 -Recommends: libblockdev-lvm >= 2.19 libblockdev-mdraid >= 2.19 libblockdev-mpath >= 2.19 -Recommends: libblockdev-loop >= 2.19 libblockdev-swap >= 2.19 +Recommends: libblockdev-btrfs >= 3.0 libblockdev-crypto >= 3.0 libblockdev-dm >= 3.0 +Recommends: libblockdev-lvm >= 3.0 libblockdev-mdraid >= 3.0 libblockdev-mpath >= 3.0 +Recommends: libblockdev-loop >= 3.0 libblockdev-swap >= 3.0 %ifarch s390 s390x -Recommends: libblockdev-s390 >= 2.19 +Recommends: libblockdev-s390 >= 3.0 %endif %{?python_provide:%python_provide python3-blivet} Obsoletes: blivet-data < 1:2.0.0 @@ -130,6 +125,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install %doc README.md %changelog +* Sat Feb 17 2024 sunhai - 1:3.8.2-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:update to 3.8.2 + * Fri Sep 1 2023 Wanli Niu - 1:3.6.1-4 - Type:bugfix - ID:NA