diff --git a/0001-add-loongarch64-support-for-blivet.patch b/0001-add-loongarch64-support-for-blivet.patch deleted file mode 100644 index 490624886a6b115ba70a925b68164f76edec7c75..0000000000000000000000000000000000000000 --- a/0001-add-loongarch64-support-for-blivet.patch +++ /dev/null @@ -1,34 +0,0 @@ -From eb09799f88ac34011854556406fd13d59299ed75 Mon Sep 17 00:00:00 2001 -From: Wenlong Zhang -Date: Thu, 31 Aug 2023 07:38:53 +0000 -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.40.1 - diff --git a/1001-remove-mpath-plugin.patch b/0001-remove-btrfs-plugin.patch similarity index 31% rename from 1001-remove-mpath-plugin.patch rename to 0001-remove-btrfs-plugin.patch index daa4a6a27a19fcccf3defdb768c1f50bdebee29d..554fef8227e95f36dbf5b46498b05b8dc80fbcd7 100644 --- a/1001-remove-mpath-plugin.patch +++ b/0001-remove-btrfs-plugin.patch @@ -1,13 +1,25 @@ ---- blivet-3.4.3/blivet/__init__.py 2022-04-06 15:42:19.789225445 +0800 -+++ blivet-3.4.3-an23/blivet/__init__.py 2022-04-06 15:41:05.131080309 +0800 -@@ -65,7 +65,8 @@ +From 8b527ee85b6594d506d445ff4c30579cccef8ae6 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 11 Nov 2020 13:24:55 +0100 +Subject: [PATCH] Remove btrfs from requested libblockdev plugins + +--- + blivet/__init__.py | 2 +- + 1 file changed, 1 insertions(+), 1 deletions(-) + +diff --git a/blivet/__init__.py b/blivet/__init__.py +index 14bd5c61..1410d78e 100644 +--- a/blivet/__init__.py ++++ b/blivet/__init__.py +@@ -65,7 +65,7 @@ from gi.repository import BlockDev as bl if arch.is_s390(): - _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvdimm")) + _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "s390", "nvme", "fs")) else: -- _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) -+ # _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvdimm")) -+ _REQUESTED_PLUGIN_NAMES = set(("lvm", "swap", "crypto", "loop", "mdraid", "dm", "nvdimm")) - +- _REQUESTED_PLUGIN_NAMES = set(("lvm", "btrfs", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvme", "fs")) ++ _REQUESTED_PLUGIN_NAMES = set(("lvm", "swap", "crypto", "loop", "mdraid", "mpath", "dm", "nvme", "fs")) + _requested_plugins = blockdev.plugin_specs_from_names(_REQUESTED_PLUGIN_NAMES) try: +-- +2.26.2 diff --git a/0002-Fix-skipping-btrfs-calls-when-libblockdev-btrfs-plugin-is-missing.patch b/0002-Fix-skipping-btrfs-calls-when-libblockdev-btrfs-plugin-is-missing.patch new file mode 100644 index 0000000000000000000000000000000000000000..cd9bf02d6f385fce2f858a0cb9f2d348d42b74de --- /dev/null +++ b/0002-Fix-skipping-btrfs-calls-when-libblockdev-btrfs-plugin-is-missing.patch @@ -0,0 +1,49 @@ +From 95f565d56d21dd7e0d9033236a20be735665e0af Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 14 May 2024 12:35:12 +0200 +Subject: [PATCH] Fix skipping btrfs calls when libblockdev btrfs plugin is + missing + +We need to check for the btrfs plugin in the set of available +plugins, not in the missing plugins, because on RHEL the plugin is +not missing, it's not even requested. +--- + blivet/devices/btrfs.py | 4 ++-- + tests/unit_tests/devices_test/btrfs_test.py | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py +index c446e7e59..0cbaa44d9 100644 +--- a/blivet/devices/btrfs.py ++++ b/blivet/devices/btrfs.py +@@ -40,7 +40,7 @@ + from ..formats import get_format, DeviceFormat + from ..size import Size + from ..mounts import mounts_cache +-from .. import missing_plugs ++from .. import avail_plugs + + import logging + log = logging.getLogger("blivet") +@@ -382,7 +382,7 @@ def _list_subvolumes(self, mountpoint, snapshots_only=False): + def list_subvolumes(self, snapshots_only=False): + subvols = [] + +- if "btrfs" in missing_plugs: ++ if "btrfs" not in avail_plugs: + log.debug("not listing btrfs subvolumes, libblockdev btrfs plugin is missing") + return subvols + +diff --git a/tests/unit_tests/devices_test/btrfs_test.py b/tests/unit_tests/devices_test/btrfs_test.py +index 785afd209..41731e91e 100644 +--- a/tests/unit_tests/devices_test/btrfs_test.py ++++ b/tests/unit_tests/devices_test/btrfs_test.py +@@ -83,7 +83,7 @@ def test_btrfs_list_subvolumes(self): + + # mounted but libblockdev btrfs plugin not available + blockdev.reset_mock() +- with patch("blivet.devices.btrfs.missing_plugs", new={"btrfs"}): ++ with patch("blivet.devices.btrfs.avail_plugs", new={"lvm"}): + vol.list_subvolumes() + blockdev.list_subvolumes.assert_not_called() + blockdev.get_default_subvolume_id.assert_not_called() diff --git a/0003-XFS-resize-test-fix.patch b/0003-XFS-resize-test-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..b36d8c64cfc5d7063f0a8d0f1fa3b0220a32ed98 --- /dev/null +++ b/0003-XFS-resize-test-fix.patch @@ -0,0 +1,32 @@ +From b7940496b4f8efdccb9b4097b496b0d9b2af1eea Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 18 Jun 2024 14:47:39 +0200 +Subject: [PATCH] tests: Try waiting after partition creation for XFS resize + test + +The test randomly fails to find the newly created partition so +lets try waiting a bit with udev settle. +--- + tests/storage_tests/formats_test/fs_test.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/storage_tests/formats_test/fs_test.py b/tests/storage_tests/formats_test/fs_test.py +index f3c9fef5a..5da4a9339 100644 +--- a/tests/storage_tests/formats_test/fs_test.py ++++ b/tests/storage_tests/formats_test/fs_test.py +@@ -11,6 +11,7 @@ + from blivet.devices import PartitionDevice, DiskDevice + from blivet.flags import flags + from blivet.util import capture_output ++from blivet import udev + + from .loopbackedtestcase import LoopBackedTestCase + +@@ -149,6 +150,7 @@ def _create_partition(self, disk, size): + pend = pstart + int(Size(size) / disk.format.parted_device.sectorSize) + disk.format.add_partition(pstart, pend, parted.PARTITION_NORMAL) + disk.format.parted_disk.commit() ++ udev.settle() + part = disk.format.parted_disk.getPartitionBySector(pstart) + + device = PartitionDevice(os.path.basename(part.path)) diff --git a/0004-Run-mkfs-xfs-with-force-option-by-default.patch b/0004-Run-mkfs-xfs-with-force-option-by-default.patch new file mode 100644 index 0000000000000000000000000000000000000000..5473e0504b4e8b89e6d94d660193d0e67c9a9392 --- /dev/null +++ b/0004-Run-mkfs-xfs-with-force-option-by-default.patch @@ -0,0 +1,43 @@ +From 52c9699ecad592e35e0cd3841744f8cb8e2b2364 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 12 Jun 2024 16:51:43 +0200 +Subject: [PATCH] Run mkfs.xfs with the force (-f) option by default + +We stopped adding the force option when switching to libblockdev +in fa3add214ba8edf1965bc851b85f2f2a6a3ea107. This was not +intentional and the missing force option is already causing issues +when running mkfs.xfs on misaligned devices. +--- + blivet/tasks/fsmkfs.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/blivet/tasks/fsmkfs.py b/blivet/tasks/fsmkfs.py +index 096b02295..45314ea89 100644 +--- a/blivet/tasks/fsmkfs.py ++++ b/blivet/tasks/fsmkfs.py +@@ -241,6 +241,7 @@ class FSBlockDevMkfs(task.BasicApplication, FSMkfsTask, metaclass=abc.ABCMeta): + can_set_uuid = False + can_label = False + fstype = None ++ force = False + + def do_task(self, options=None, label=False, set_uuid=False, nodiscard=False): + """Create the format on the device and label if possible and desired. +@@ -277,7 +278,8 @@ def do_task(self, options=None, label=False, set_uuid=False, nodiscard=False): + try: + bd_options = BlockDev.FSMkfsOptions(label=self.fs.label if label else None, + uuid=self.fs.uuid if set_uuid else None, +- no_discard=self.fs._mkfs_nodiscard if nodiscard else False) ++ no_discard=self.fs._mkfs_nodiscard if nodiscard else False, ++ force=self.force) + BlockDev.fs.mkfs(self.fs.device, self.fstype, bd_options, extra={k: '' for k in create_options}) + except BlockDev.FSError as e: + raise FSError(str(e)) +@@ -331,6 +333,7 @@ class XFSMkfs(FSBlockDevMkfs): + can_nodiscard = True + can_set_uuid = True + can_label = True ++ force = True + + + class F2FSMkfs(FSBlockDevMkfs): diff --git a/0007-Fix-checking-for-NVMe-plugin-availability.patch b/0007-Fix-checking-for-NVMe-plugin-availability.patch new file mode 100644 index 0000000000000000000000000000000000000000..55fb74015bc04eb04f8f878325d8b93f880c2119 --- /dev/null +++ b/0007-Fix-checking-for-NVMe-plugin-availability.patch @@ -0,0 +1,27 @@ +From 7677fc312b821a9c67750220f2494d06f2357780 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Wed, 18 Sep 2024 15:30:05 +0200 +Subject: [PATCH] Fix checking for NVMe plugin availability + +--- + blivet/nvme.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/blivet/nvme.py b/blivet/nvme.py +index 4309dea3..72a47070 100644 +--- a/blivet/nvme.py ++++ b/blivet/nvme.py +@@ -76,6 +76,10 @@ class NVMe(object): + return False + if not hasattr(blockdev.NVMETech, "FABRICS"): + return False ++ try: ++ blockdev.nvme.is_tech_avail(blockdev.NVMETech.FABRICS, 0) # pylint: disable=no-member ++ except (blockdev.BlockDevNotImplementedError, blockdev.NVMEError): ++ return False + return True + + def startup(self): +-- +2.46.1 + diff --git a/0008-Align-sizes-up-for-growable-LVs.patch b/0008-Align-sizes-up-for-growable-LVs.patch new file mode 100644 index 0000000000000000000000000000000000000000..dba8652643bffe53ef77e710139e2e0fa1c4123d --- /dev/null +++ b/0008-Align-sizes-up-for-growable-LVs.patch @@ -0,0 +1,30 @@ +From ad7966a456224f22729c55616f2c8c73321654c7 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Thu, 24 Oct 2024 12:18:58 +0200 +Subject: [PATCH] Align sizes up for growable LVs + +Growable LVs usually start at minimum size so adjusting it down +can change the size below allowed minimum. + +Resolves: RHEL-45180 +Resolves: RHEL-45181 +--- + blivet/devices/lvm.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py +index 661881ea..661dc6e0 100644 +--- a/blivet/devices/lvm.py ++++ b/blivet/devices/lvm.py +@@ -2673,7 +2673,7 @@ class LVMLogicalVolumeDevice(LVMLogicalVolumeBase, LVMInternalLogicalVolumeMixin + if not isinstance(newsize, Size): + raise AttributeError("new size must be of type Size") + +- newsize = self.vg.align(newsize) ++ newsize = self.vg.align(newsize, roundup=self.growable) + log.debug("trying to set lv %s size to %s", self.name, newsize) + # Don't refuse to set size if we think there's not enough space in the + # VG for an existing LV, since it's existence proves there is enough +-- +2.47.0 + diff --git a/0009-mod_pass_in_stratis_test.patch b/0009-mod_pass_in_stratis_test.patch new file mode 100644 index 0000000000000000000000000000000000000000..67bb1c0c003e53ad66550eed11bb65c6b540de57 --- /dev/null +++ b/0009-mod_pass_in_stratis_test.patch @@ -0,0 +1,32 @@ +From c2177aa362d20278a0ebd5c25a776f952d83e5b1 Mon Sep 17 00:00:00 2001 +From: Jan Pokorny +Date: Fri, 11 Oct 2024 17:17:41 +0200 +Subject: [PATCH] Modified passphrase in stratis test + +FIPS requires at least 8 chars long passphrase. Dummy passphrase used +in stratis test was too short causing encryption +tests with FIPS enabled to fail. + +Changed passphrase. + +fixes RHEL-45173, RHEL-8029 +--- + tests/storage_tests/devices_test/stratis_test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/storage_tests/devices_test/stratis_test.py b/tests/storage_tests/devices_test/stratis_test.py +index 5aaa12d4..21c4d0f5 100644 +--- a/tests/storage_tests/devices_test/stratis_test.py ++++ b/tests/storage_tests/devices_test/stratis_test.py +@@ -230,7 +230,7 @@ class StratisTestCaseClevis(StratisTestCaseBase): + blivet.partitioning.do_partitioning(self.storage) + + pool = self.storage.new_stratis_pool(name="blivetTestPool", parents=[bd], +- encrypted=True, passphrase="abcde", ++ encrypted=True, passphrase="fipsneeds8chars", + clevis=StratisClevisConfig(pin="tang", + tang_url=self._tang_server, + tang_thumbprint=None)) +-- +2.45.0 + diff --git a/0010-Fix_running_tests_in_FIPS_mode.patch b/0010-Fix_running_tests_in_FIPS_mode.patch new file mode 100644 index 0000000000000000000000000000000000000000..b6bee25544db30d4e6daaba28146466f63db8ce9 --- /dev/null +++ b/0010-Fix_running_tests_in_FIPS_mode.patch @@ -0,0 +1,58 @@ +From cd9e137a2e33165a8af3a7e4a3d2615adcabf659 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 8 Nov 2024 09:19:45 +0100 +Subject: [PATCH 1/2] Fix "Modified passphrase in stratis test" + +Follow up for 68708e347ef7b2f98312c76aa80366091dd4aade, two more +places where the passphrase is too short for FIPS mode. + +Resolves: RHEL-45173 +--- + tests/storage_tests/devices_test/stratis_test.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/storage_tests/devices_test/stratis_test.py b/tests/storage_tests/devices_test/stratis_test.py +index 21c4d0f50..9792e0618 100644 +--- a/tests/storage_tests/devices_test/stratis_test.py ++++ b/tests/storage_tests/devices_test/stratis_test.py +@@ -105,7 +105,7 @@ def test_stratis_encrypted(self): + blivet.partitioning.do_partitioning(self.storage) + + pool = self.storage.new_stratis_pool(name="blivetTestPool", parents=[bd], +- encrypted=True, passphrase="abcde") ++ encrypted=True, passphrase="fipsneeds8chars") + self.storage.create_device(pool) + + self.storage.do_it() +@@ -260,7 +260,7 @@ def test_stratis_encrypted_clevis_tpm(self): + blivet.partitioning.do_partitioning(self.storage) + + pool = self.storage.new_stratis_pool(name="blivetTestPool", parents=[bd], +- encrypted=True, passphrase="abcde", ++ encrypted=True, passphrase="fipsneeds8chars", + clevis=StratisClevisConfig(pin="tpm2")) + self.storage.create_device(pool) + + +From ed10d97a5257c0f4fe8a2f53b0b2f787de91c355 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Fri, 8 Nov 2024 10:02:47 +0100 +Subject: [PATCH 2/2] tests: Fix writing key file for LUKS tests + +Related: RHEL-45173 +--- + tests/storage_tests/formats_test/luks_test.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/storage_tests/formats_test/luks_test.py b/tests/storage_tests/formats_test/luks_test.py +index 93c8d7524..b8ec229ba 100644 +--- a/tests/storage_tests/formats_test/luks_test.py ++++ b/tests/storage_tests/formats_test/luks_test.py +@@ -99,6 +99,7 @@ def test_setup_keyfile(self): + + with tempfile.NamedTemporaryFile(prefix="blivet_test") as temp: + temp.write(b"password2") ++ temp.flush() + + # create the luks format with both passphrase and keyfile + self.fmt._key_file = temp.name diff --git a/0011-Make-GPT-default-label-type-on-all-architectures.patch b/0011-Make-GPT-default-label-type-on-all-architectures.patch new file mode 100644 index 0000000000000000000000000000000000000000..7fba7a39c3ad408ae47f1f4deefe0137b6435a64 --- /dev/null +++ b/0011-Make-GPT-default-label-type-on-all-architectures.patch @@ -0,0 +1,122 @@ +From c8eff25e4c25183a76e97108d4607455cfc96ae2 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Thu, 14 Nov 2024 14:53:28 +0100 +Subject: [PATCH] Make GPT default label type on all architectures + +Exceptions are DASD drives on s390 and 32bit ARM. Everywhere else +GPT will be default. + +Resolves: RHEL-52200 +--- + blivet/formats/disklabel.py | 11 +++++----- + .../formats_tests/disklabel_test.py | 20 +++++++++---------- + 2 files changed, 16 insertions(+), 15 deletions(-) + +diff --git a/blivet/formats/disklabel.py b/blivet/formats/disklabel.py +index f2857f07..8b39dc79 100644 +--- a/blivet/formats/disklabel.py ++++ b/blivet/formats/disklabel.py +@@ -220,12 +220,13 @@ class DiskLabel(DeviceFormat): + + @classmethod + def get_platform_label_types(cls): +- label_types = ["msdos", "gpt"] ++ # always prefer gpt except for configurations below ++ label_types = ["gpt", "msdos"] + if arch.is_pmac(): + label_types = ["mac"] +- # always prefer gpt on aarch64, x86_64, and EFI plats except 32-bit ARM +- elif arch.is_aarch64() or arch.is_x86(bits=64) or (arch.is_efi() and not arch.is_arm()): +- label_types = ["gpt", "msdos"] ++ # prefet msdos on 32-bit ARM ++ elif arch.is_arm(): ++ label_types = ["msdos", "gpt"] + elif arch.is_s390(): + label_types += ["dasd"] + +@@ -254,7 +255,7 @@ class DiskLabel(DeviceFormat): + if arch.is_s390(): + if blockdev.s390.dasd_is_fba(self.device): + # the device is FBA DASD +- return "msdos" ++ return "gpt" + elif self.parted_device.type == parted.DEVICE_DASD: + # the device is DASD + return "dasd" +diff --git a/tests/unit_tests/formats_tests/disklabel_test.py b/tests/unit_tests/formats_tests/disklabel_test.py +index 9f6e4542..823a3663 100644 +--- a/tests/unit_tests/formats_tests/disklabel_test.py ++++ b/tests/unit_tests/formats_tests/disklabel_test.py +@@ -71,7 +71,7 @@ class DiskLabelTestCase(unittest.TestCase): + arch.is_pmac.return_value = False + arch.is_x86.return_value = False + +- self.assertEqual(disklabel_class.get_platform_label_types(), ["msdos", "gpt"]) ++ self.assertEqual(disklabel_class.get_platform_label_types(), ["gpt", "msdos"]) + + arch.is_pmac.return_value = True + self.assertEqual(disklabel_class.get_platform_label_types(), ["mac"]) +@@ -100,7 +100,7 @@ class DiskLabelTestCase(unittest.TestCase): + arch.is_efi.return_value = False + + arch.is_s390.return_value = True +- self.assertEqual(disklabel_class.get_platform_label_types(), ["msdos", "gpt", "dasd"]) ++ self.assertEqual(disklabel_class.get_platform_label_types(), ["gpt", "msdos", "dasd"]) + arch.is_s390.return_value = False + + def test_label_type_size_check(self): +@@ -121,14 +121,14 @@ class DiskLabelTestCase(unittest.TestCase): + + with patch.object(blivet.formats.disklabel.DiskLabel, "parted_device", new=PropertyMock(return_value=None)): + # no parted device -> no passing size check +- self.assertEqual(dl._label_type_size_check("msdos"), False) ++ self.assertEqual(dl._label_type_size_check("gpt"), False) + + @patch("blivet.formats.disklabel.arch") + def test_best_label_type(self, arch): + """ + 1. is always in _disklabel_types + 2. is the default unless the device is too long for the default +- 3. is msdos for fba dasd on S390 ++ 3. is gpt for fba dasd on S390 + 4. is dasd for non-fba dasd on S390 + """ + dl = blivet.formats.disklabel.DiskLabel() +@@ -144,17 +144,17 @@ class DiskLabelTestCase(unittest.TestCase): + arch.is_x86.return_value = False + + with patch.object(dl, '_label_type_size_check') as size_check: +- # size check passes for first type ("msdos") ++ # size check passes for first type ("gpt") + size_check.return_value = True +- self.assertEqual(dl._get_best_label_type(), "msdos") ++ self.assertEqual(dl._get_best_label_type(), "gpt") + + # size checks all fail -> label type is None + size_check.return_value = False + self.assertEqual(dl._get_best_label_type(), None) + +- # size check passes on second call -> label type is "gpt" (second in platform list) ++ # size check passes on second call -> label type is "msdos" (second in platform list) + size_check.side_effect = [False, True] +- self.assertEqual(dl._get_best_label_type(), "gpt") ++ self.assertEqual(dl._get_best_label_type(), "msdos") + + arch.is_pmac.return_value = True + with patch.object(dl, '_label_type_size_check') as size_check: +@@ -175,10 +175,10 @@ class DiskLabelTestCase(unittest.TestCase): + size_check.return_value = True + with patch("blivet.formats.disklabel.blockdev.s390") as _s390: + _s390.dasd_is_fba.return_value = False +- self.assertEqual(dl._get_best_label_type(), "msdos") ++ self.assertEqual(dl._get_best_label_type(), "gpt") + + _s390.dasd_is_fba.return_value = True +- self.assertEqual(dl._get_best_label_type(), "msdos") ++ self.assertEqual(dl._get_best_label_type(), "gpt") + + _s390.dasd_is_fba.return_value = False + dl._parted_device.type = parted.DEVICE_DASD +-- +2.47.0 + diff --git a/blivet-3.10.0-tests.tar.gz b/blivet-3.10.0-tests.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..bd473a2adbeb47098f2159786fb181d53d33344c Binary files /dev/null and b/blivet-3.10.0-tests.tar.gz differ diff --git a/blivet-3.10.0.tar.gz b/blivet-3.10.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..bdaeede357d6e705e5db9d37fb052934c2f458cd Binary files /dev/null and b/blivet-3.10.0.tar.gz differ diff --git a/blivet-3.6.1-tests.tar.gz b/blivet-3.6.1-tests.tar.gz deleted file mode 100644 index b5ce82f993cb6518886e49219201963c3ad6a2eb..0000000000000000000000000000000000000000 Binary files a/blivet-3.6.1-tests.tar.gz and /dev/null differ 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/python-blivet.spec b/python-blivet.spec index 3b5147f0b8e12f1fd2e3180819ca480e027cdf3a..cbc2392abfacb01d5fa4b1bc74a92bf9ba7e8a8c 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -1,28 +1,34 @@ -%define anolis_release 3 +%define anolis_release 1 Summary: A python module for system storage configuration Name: python-blivet Url: https://storageapis.wordpress.com/projects/blivet -Version: 3.6.1 +Version: 3.10.0 Release: %{anolis_release}%{?dist} Epoch: 1 -License: LGPLv2+ +License: LGPL-2.1-or-later %global realname blivet %global realversion %{version} Source0: https://github.com/storaged-project/%{realname}/releases/download/%{realname}-%{realversion}/%{realname}-%{realversion}.tar.gz Source1: https://github.com/storaged-project/%{realname}/releases/download/%{realname}-%{realversion}/%{realname}-%{realversion}-tests.tar.gz -# Add by Anolis-23 -Patch1001: 1001-remove-mpath-plugin.patch -Patch1002: 0001-add-loongarch64-support-for-blivet.patch -# End +Patch0: 0001-remove-btrfs-plugin.patch + +Patch1: 0002-Fix-skipping-btrfs-calls-when-libblockdev-btrfs-plugin-is-missing.patch +Patch2: 0003-XFS-resize-test-fix.patch +Patch3: 0004-Run-mkfs-xfs-with-force-option-by-default.patch +Patch4: 0007-Fix-checking-for-NVMe-plugin-availability.patch +Patch5: 0008-Align-sizes-up-for-growable-LVs.patch +Patch6: 0009-mod_pass_in_stratis_test.patch +Patch7: 0010-Fix_running_tests_in_FIPS_mode.patch +Patch8: 0011-Make-GPT-default-label-type-on-all-architectures.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). %global partedver 3.2 %global pypartedver 3.10.4 %global utillinuxver 2.15.1 -%global libblockdevver 2.24 +%global libblockdevver 3.0 %global libbytesizever 0.3 %global pyudevver 0.18 @@ -69,20 +75,18 @@ Requires: python3-pyudev >= %{pyudevver} Requires: parted >= %{partedver} Requires: python3-pyparted >= %{pypartedver} Requires: libselinux-python3 +Requires: python3-libmount Requires: python3-blockdev >= %{libblockdevver} Recommends: libblockdev-btrfs >= %{libblockdevver} Recommends: libblockdev-crypto >= %{libblockdevver} Recommends: libblockdev-dm >= %{libblockdevver} Recommends: libblockdev-fs >= %{libblockdevver} -Recommends: libblockdev-kbd >= %{libblockdevver} Recommends: libblockdev-loop >= %{libblockdevver} Recommends: libblockdev-lvm >= %{libblockdevver} Recommends: libblockdev-mdraid >= %{libblockdevver} Recommends: libblockdev-mpath >= %{libblockdevver} -Recommends: libblockdev-nvdimm >= %{libblockdevver} -Recommends: libblockdev-part >= %{libblockdevver} +Recommends: libblockdev-nvme >= %{libblockdevver} Recommends: libblockdev-swap >= %{libblockdevver} -Recommends: libblockdev-s390 >= %{libblockdevver} Requires: python3-bytesize >= %{libbytesizever} Requires: util-linux >= %{utillinuxver} Requires: lsof @@ -125,6 +129,14 @@ make PYTHON=%{__python3} DESTDIR=%{buildroot} install %doc README.md ChangeLog examples %changelog +* Wed Mar 26 2025 Xiaoping Liu - 3.10.0-1 +- update to 3.10.0 from 3.6.1 +- Migrated to SPDX license +- Remove the patch because the changes already exist upstream +- Add patches to fix some bugs + [Patches cherry-pick from c10s. Original changelog: + - Make GPT default label type on all architectures. ( 3.10.0-13 )] + * Wed Mar 13 2024 Zhao Hang - 3.6.1-3 - Rebuild with python3.11