From acf192e6ddac471a7b5540b85b65f1ab066383b5 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Wed, 29 Jul 2020 15:41:22 +0200 Subject: [PATCH] set allowed disk labels for s390x as standard ones (msdos + gpt) plus dasd --- 0001-set-allowed-disk-labels-for-s390x.patch | 39 ++++++++++++++++++++ python-blivet.spec | 6 ++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 0001-set-allowed-disk-labels-for-s390x.patch diff --git a/0001-set-allowed-disk-labels-for-s390x.patch b/0001-set-allowed-disk-labels-for-s390x.patch new file mode 100644 index 0000000..931fca0 --- /dev/null +++ b/0001-set-allowed-disk-labels-for-s390x.patch @@ -0,0 +1,39 @@ +From 462099a9137fb7997140360c07665a21615a0fea Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Dan=20Hor=C3=A1k?= +Date: Tue, 7 Jul 2020 13:19:02 +0200 +Subject: [PATCH] set allowed disk labels for s390x as standard ones (msdos + + gpt) plus dasd + +This will solve issues when a SCSI or NVMe disk with GPT partition table +is used with a s390x machine (rhbz#1827066, rhbz#1854110). +--- + blivet/formats/disklabel.py | 2 +- + tests/formats_test/disklabel_test.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/blivet/formats/disklabel.py b/blivet/formats/disklabel.py +index 3dcac12b..53e2c010 100644 +--- a/blivet/formats/disklabel.py ++++ b/blivet/formats/disklabel.py +@@ -230,7 +230,7 @@ def get_platform_label_types(cls): + elif arch.is_efi() and not arch.is_aarch64(): + label_types = ["gpt", "msdos"] + elif arch.is_s390(): +- label_types = ["msdos", "dasd"] ++ label_types += ["dasd"] + + return label_types + +diff --git a/tests/formats_test/disklabel_test.py b/tests/formats_test/disklabel_test.py +index 94f3775f..3068dc07 100644 +--- a/tests/formats_test/disklabel_test.py ++++ b/tests/formats_test/disklabel_test.py +@@ -95,7 +95,7 @@ def test_platform_label_types(self, arch): + arch.is_arm.return_value = False + + arch.is_s390.return_value = True +- self.assertEqual(disklabel_class.get_platform_label_types(), ["msdos", "dasd"]) ++ self.assertEqual(disklabel_class.get_platform_label_types(), ["msdos", "gpt", "dasd"]) + arch.is_s390.return_value = False + + def test_label_type_size_check(self): diff --git a/python-blivet.spec b/python-blivet.spec index 35c396c..54f959d 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -23,13 +23,14 @@ Version: 3.2.2 #%%global prerelease .b2 # prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2 -Release: 3%{?prerelease}%{?dist} +Release: 4%{?prerelease}%{?dist} Epoch: 1 License: LGPLv2+ %global realname blivet %global realversion %{version}%{?prerelease} Source0: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}.tar.gz Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realversion}-tests.tar.gz +Patch0: 0001-set-allowed-disk-labels-for-s390x.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -191,6 +192,9 @@ configuration. %endif %changelog +* Wed Jul 29 2020 Vojtech Trefny - 3.2.2-4 +- set allowed disk labels for s390x as standard ones (msdos + gpt) plus dasd + * Tue Jul 28 2020 Fedora Release Engineering - 1:3.2.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild