From e3e8c56009978a870c30950cc9273142064150ed Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Wed, 21 Jul 2021 14:33:29 +0200 Subject: [PATCH] Revert "Use PARTITION_ESP flag for EFIFS partitions" (#1975375) --- ...TITION_ESP-flag-for-EFIFS-partitions.patch | 59 +++++++++++++++++++ python-blivet.spec | 6 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 0003-Revert-Use-PARTITION_ESP-flag-for-EFIFS-partitions.patch diff --git a/0003-Revert-Use-PARTITION_ESP-flag-for-EFIFS-partitions.patch b/0003-Revert-Use-PARTITION_ESP-flag-for-EFIFS-partitions.patch new file mode 100644 index 0000000..5228671 --- /dev/null +++ b/0003-Revert-Use-PARTITION_ESP-flag-for-EFIFS-partitions.patch @@ -0,0 +1,59 @@ +From 639153117b9981b7b38480a7dbadb22725798f50 Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Mon, 19 Jul 2021 10:57:55 +0200 +Subject: [PATCH] Revert "Use PARTITION_ESP flag for EFIFS partitions + (#1930486)" + +This reverts commit aeffc4d50d5059e6a782ee41ccd49061d28996ab. + +Using the correct 0xef partition type for EFI System Partition +unfortunately doesn't work with RaspberryPi so we need to keep +using 0x06 with "normal" boot flag to make it boot. + +Resolves: rhbz#1975375 +--- + blivet/formats/fs.py | 10 ++-------- + python-blivet.spec | 2 +- + 2 files changed, 3 insertions(+), 9 deletions(-) + +diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py +index d75a34eb2..23c6f968a 100644 +--- a/blivet/formats/fs.py ++++ b/blivet/formats/fs.py +@@ -29,13 +29,7 @@ + import random + import stat + +-from parted import fileSystemType +- +-try: +- from parted import PARTITION_ESP +-except ImportError: +- # this flag is sometimes not available in pyparted, see https://github.com/dcantrell/pyparted/issues/80 +- PARTITION_ESP = 18 ++from parted import fileSystemType, PARTITION_BOOT + + from ..tasks import fsck + from ..tasks import fsinfo +@@ -948,7 +942,7 @@ class EFIFS(FATFS): + _min_size = Size("50 MiB") + _check = True + _mount_class = fsmount.EFIFSMount +- parted_flag = PARTITION_ESP ++ parted_flag = PARTITION_BOOT + + @property + def supported(self): +diff --git a/python-blivet.spec b/python-blivet.spec +index c0cb91c95..3a18ca7fa 100644 +--- a/python-blivet.spec ++++ b/python-blivet.spec +@@ -33,7 +33,7 @@ Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realver + + # Versions of required components (done so we make sure the buildrequires + # match the requires versions of things). +-%global partedver 3.2 ++%global partedver 1.8.1 + %global pypartedver 3.10.4 + %global utillinuxver 2.15.1 + %global libblockdevver 2.24 diff --git a/python-blivet.spec b/python-blivet.spec index 5a147c3..75aa817 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -23,7 +23,7 @@ Version: 3.4.0 #%%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 @@ -36,6 +36,7 @@ Patch0: 0001-remove-btrfs-plugin.patch %endif Patch1: 0002-Fix-resolving-devices-with-names-that-look-like-BIOS.patch +Patch2: 0003-Revert-Use-PARTITION_ESP-flag-for-EFIFS-partitions.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -198,6 +199,9 @@ configuration. %endif %changelog +* Wed Jul 21 2021 Vojtech Trefny - 3.4.0-4 +- Revert "Use PARTITION_ESP flag for EFIFS partitions" (#1975375) + * Wed Jun 30 2021 Vojtech Trefny - 3.4.0-3 - Fix resolving devices with names that look like BIOS drive number (#1960798)