New version 3.4.1

- pylint: Ignore deprecation warning about threading.currentThread (vtrefny)
- Fix getting PV info in LVMPhysicalVolume from the cache (vtrefny)
- Fix ActionRemoveMember requires check (#1993655) (vtrefny)
- util: Ignore false positive assignment-from-no-return warning in ObjectID (vtrefny)
- tasks: Ignore pylint arguments-differ warning for do_tasks (vtrefny)
- Remove unused __save_passphrase member from LUKS_Data (vtrefny)
- size: Ignore new pylint warning "arguments-renamed" (vtrefny)
- Do not use deprecated (vtrefny)
- Remove unused member __names from DeviceFactory (vtrefny)
- Improve error message printed for missing dependecies (vtrefny)
- tests: Print version and blivet location when running tests (vtrefny)
- tests: Allow running tests without the tests directory in PYTHONPATH (vtrefny)
- edd_test: Locate the edd_data based on the test file location (vtrefny)
- Run Anaconda tests on blivet pull requests (jkonecny)
- Do not set chunk size for RAID 1 (vtrefny)
- When sorting devices make sure partitions are sorted correctly (vtrefny)
- Make sure LVM config is updated before running pvcreate (vtrefny)
- Tell LVM to ignore the new devices file for now (vtrefny)
- Revert "Use PARTITION_ESP flag for EFIFS partitions (#1930486)" (vtrefny)
- Fix resolving devices with names that look like BIOS drive number (vtrefny)
- Ignore pylint false positive no-member warning (vtrefny)
- Fix util.virt_detect on Xen (vtrefny)
- Fix/unify importing mock module in tests (vtrefny)
- Convert LVM filter lists to sets (vtrefny)
- Remove action device from LVM reject list (vtrefny)
- Fix activating old style LVM snapshots (vtrefny)
- Make sure the device is setup before configuring its format (vtrefny)
- Remove RHEL 9 specific patch from SPEC (vtrefny)
- Use package list instead of cycle in our dependencies Ansible playbook (vtrefny)
- Add vagrant file for running tests and development in a VM (vtrefny)
- Update our playbook for installing test dependencies (vtrefny)
- Add example for working with actions (vtrefny)
- Add LUKS encrypted LV to LVM example (vtrefny)
- Add example for LVM thin provisioning (vtrefny)
- Squashed 'translation-canary/' changes from 3bc2ad68..4d4e65b8 (vtrefny)
This commit is contained in:
Vojtech Trefny 2021-08-19 11:58:09 +02:00
parent af577b935a
commit bf2361d0c6
6 changed files with 44 additions and 180 deletions

2
.gitignore vendored
View File

@ -135,3 +135,5 @@
/blivet-3.3.3.tar.gz
/blivet-3.4.0.tar.gz
/blivet-3.4.0-tests.tar.gz
/blivet-3.4.1.tar.gz
/blivet-3.4.1-tests.tar.gz

View File

@ -1,38 +0,0 @@
From bf70f3625e517b73ed45c0d5d40c210124ccd4bc Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Tue, 6 Apr 2021 14:59:41 +0200
Subject: [PATCH] Avoid AttributeError for DiskLabel formats without disklabel
type
Simple instance of DiskLabel without label_type specified in the
constructor results in a AttributeError when trying to print the
format name. This makes sure the name is always valid.
Resolves: rhbz#1945914
---
blivet/formats/disklabel.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/blivet/formats/disklabel.py b/blivet/formats/disklabel.py
index 7102457b..c8148309 100644
--- a/blivet/formats/disklabel.py
+++ b/blivet/formats/disklabel.py
@@ -313,13 +313,13 @@ def sector_size(self):
@property
def name(self):
- if self.supported:
- _str = "%(name)s (%(type)s)"
+ if self.label_type is None:
+ return "%(name)s" % {"name": _(self._name)}
+ elif self.supported:
+ return "%(name)s (%(type)s)" % {"name": _(self._name), "type": self.label_type.upper()}
else:
# Translators: Name for an unsupported disklabel; e.g. "Unsupported partition table"
- _str = _("Unsupported %(name)s")
-
- return _str % {"name": _(self._name), "type": self.label_type.upper()}
+ return _("Unsupported %(name)s") % {"name": _(self._name)}
@property
def size(self):

View File

@ -1,75 +0,0 @@
From 344e624f91010b6041c22ee8a24c9305b82af969 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Tue, 18 May 2021 12:54:02 +0200
Subject: [PATCH] Fix resolving devices with names that look like BIOS drive
number
A RAID array named "10" will not be resolved because we try to
resolve it using EDD data and after this lookup fails, we don't
try the name.
Resolves: rhbz#1960798
---
blivet/devicetree.py | 18 +++++++++---------
tests/devicetree_test.py | 4 ++++
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/blivet/devicetree.py b/blivet/devicetree.py
index 88e9f0e5..f4ae1968 100644
--- a/blivet/devicetree.py
+++ b/blivet/devicetree.py
@@ -634,20 +634,20 @@ class DeviceTreeBase(object):
(label.startswith("'") and label.endswith("'"))):
label = label[1:-1]
device = self.labels.get(label)
- elif re.match(r'(0x)?[A-Fa-f0-9]{2}(p\d+)?$', devspec):
- # BIOS drive number
- (drive, _p, partnum) = devspec.partition("p")
- spec = int(drive, 16)
- for (edd_name, edd_number) in self.edd_dict.items():
- if edd_number == spec:
- device = self.get_device_by_name(edd_name + partnum)
- break
elif options and "nodev" in options.split(","):
device = self.get_device_by_name(devspec)
if not device:
device = self.get_device_by_path(devspec)
else:
- if not devspec.startswith("/dev/"):
+ if re.match(r'(0x)?[A-Fa-f0-9]{2}(p\d+)?$', devspec):
+ # BIOS drive number
+ (drive, _p, partnum) = devspec.partition("p")
+ spec = int(drive, 16)
+ for (edd_name, edd_number) in self.edd_dict.items():
+ if edd_number == spec:
+ device = self.get_device_by_name(edd_name + partnum)
+ break
+ if not device and not devspec.startswith("/dev/"):
device = self.get_device_by_name(devspec)
if not device:
devspec = "/dev/" + devspec
diff --git a/tests/devicetree_test.py b/tests/devicetree_test.py
index 11f8469d..b033343d 100644
--- a/tests/devicetree_test.py
+++ b/tests/devicetree_test.py
@@ -49,6 +49,9 @@ class DeviceTreeTestCase(unittest.TestCase):
dev3 = StorageDevice("sdp2", exists=True)
dt._add_device(dev3)
+ dev4 = StorageDevice("10", exists=True)
+ dt._add_device(dev4)
+
dt.edd_dict.update({"dev1": 0x81,
"dev2": 0x82})
@@ -62,6 +65,7 @@ class DeviceTreeTestCase(unittest.TestCase):
self.assertEqual(dt.resolve_device("0x82"), dev2)
self.assertEqual(dt.resolve_device(dev3.name), dev3)
+ self.assertEqual(dt.resolve_device(dev4.name), dev4)
def test_device_name(self):
# check that devicetree.names property contains all device's names
--
2.31.1

View File

@ -1,59 +0,0 @@
From 639153117b9981b7b38480a7dbadb22725798f50 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
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

View File

@ -19,11 +19,11 @@
Summary: A python module for system storage configuration
Name: python-blivet
Url: https://storageapis.wordpress.com/projects/blivet
Version: 3.4.0
Version: 3.4.1
#%%global prerelease .b2
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
Release: 5%{?prerelease}%{?dist}
Release: 1%{?prerelease}%{?dist}
Epoch: 1
License: LGPLv2+
%global realname blivet
@ -35,12 +35,9 @@ Source1: http://github.com/storaged-project/blivet/archive/%{realname}-%{realver
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).
%global partedver 3.2
%global partedver 1.8.1
%global pypartedver 3.10.4
%global utillinuxver 2.15.1
%global libblockdevver 2.24
@ -199,6 +196,43 @@ configuration.
%endif
%changelog
* Thu Aug 19 2021 Vojtech Trefny <vtrefny@redhat.com> - 3.4.1-1
- pylint: Ignore deprecation warning about threading.currentThread (vtrefny)
- Fix getting PV info in LVMPhysicalVolume from the cache (vtrefny)
- Fix ActionRemoveMember requires check (#1993655) (vtrefny)
- util: Ignore false positive assignment-from-no-return warning in ObjectID (vtrefny)
- tasks: Ignore pylint arguments-differ warning for do_tasks (vtrefny)
- Remove unused __save_passphrase member from LUKS_Data (vtrefny)
- size: Ignore new pylint warning "arguments-renamed" (vtrefny)
- Do not use deprecated (vtrefny)
- Remove unused member __names from DeviceFactory (vtrefny)
- Improve error message printed for missing dependecies (vtrefny)
- tests: Print version and blivet location when running tests (vtrefny)
- tests: Allow running tests without the tests directory in PYTHONPATH (vtrefny)
- edd_test: Locate the edd_data based on the test file location (vtrefny)
- Run Anaconda tests on blivet pull requests (jkonecny)
- Do not set chunk size for RAID 1 (vtrefny)
- When sorting devices make sure partitions are sorted correctly (vtrefny)
- Make sure LVM config is updated before running pvcreate (vtrefny)
- Tell LVM to ignore the new devices file for now (vtrefny)
- Revert "Use PARTITION_ESP flag for EFIFS partitions (#1930486)" (vtrefny)
- Fix resolving devices with names that look like BIOS drive number (vtrefny)
- Ignore pylint false positive no-member warning (vtrefny)
- Fix util.virt_detect on Xen (vtrefny)
- Fix/unify importing mock module in tests (vtrefny)
- Convert LVM filter lists to sets (vtrefny)
- Remove action device from LVM reject list (vtrefny)
- Fix activating old style LVM snapshots (vtrefny)
- Make sure the device is setup before configuring its format (vtrefny)
- Remove RHEL 9 specific patch from SPEC (vtrefny)
- Use package list instead of cycle in our dependencies Ansible playbook (vtrefny)
- Add vagrant file for running tests and development in a VM (vtrefny)
- Update our playbook for installing test dependencies (vtrefny)
- Add example for working with actions (vtrefny)
- Add LUKS encrypted LV to LVM example (vtrefny)
- Add example for LVM thin provisioning (vtrefny)
- Squashed 'translation-canary/' changes from 3bc2ad68..4d4e65b8 (vtrefny)
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:3.4.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

View File

@ -1,2 +1,2 @@
SHA512 (blivet-3.4.0.tar.gz) = c6797765b82313c55157169489be3e52d03f7656978c6c75bb87c6f1715ceb2447f9fe79cbc3d1d2d00c56329fabca524e1ab7ab074877f6edc8daf62f524038
SHA512 (blivet-3.4.0-tests.tar.gz) = 98351de3a3121d777b644537fedd24596843e609b9e8d9fa6f61729d6bf726bc343c2bb7712ba41138f82738235654756122a290645293df6c2a22944e0a08f7
SHA512 (blivet-3.4.1.tar.gz) = 175e5745fb309eba917df26730ee9523441186912469c437db2ac5af5510fd6fbeea8db854c3fac4bb20f1f4f5cd407da433481213919bd3c0b8acf999e20c7c
SHA512 (blivet-3.4.1-tests.tar.gz) = 761dae71e46b877c81f077efd367b14433a4235101239d4b351b60e74efc99e403b446ea07fda5e9d1693a8010c28fb9b54ac9cafe193a53202acc23052efff8