update to 3.6.1

This commit is contained in:
han_hui_hui 2023-01-30 06:06:12 +00:00
parent d9d2a68dee
commit 37a5871a71
7 changed files with 16 additions and 131 deletions

View File

@ -1,36 +0,0 @@
From 0b672ff4527ccbb7b7527f1ab2394fa36738b27f Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Thu, 27 Jan 2022 17:53:06 +0100
Subject: [PATCH 1/1] Make sure we mount the top level subvolume when mounting
btrfs
If we don't specify the subvolid=5 we end up mounting the default
subvolume and if it isn't the top volume one, we can't remove
other subvolumes "higher" in the hierarchy.
This makes the installer crash when reinstalling over a preexisting
btrfs installation, for example the default openSUSE installation
where the default subvolume is a post installation snapshot.
Resolves: rhbz#2026205
---
blivet/devices/btrfs.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
index 3b9374fc..6629ba95 100644
--- a/blivet/devices/btrfs.py
+++ b/blivet/devices/btrfs.py
@@ -123,7 +123,8 @@ class BTRFSDevice(StorageDevice):
else:
tmpdir = tempfile.mkdtemp(prefix=self._temp_dir_prefix)
try:
- util.mount(device=fmt.device, mountpoint=tmpdir, fstype=fmt.type)
+ util.mount(device=fmt.device, mountpoint=tmpdir, fstype=fmt.type,
+ options=fmt.mountopts)
except errors.FSError as e:
log.debug("btrfs temp mount failed: %s", e)
raise
--
2.33.0

View File

@ -40,7 +40,7 @@ index 40ef843..7d49527 100644
+msgid "not enough free space for new device"
+msgstr ""
+
#: ../blivet/iscsi.py:217
#: ../blivet/iscsi.py:216
msgid "Unable to change iSCSI initiator name once set"
msgstr ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
@ -55,6 +55,6 @@ index aad3d0f..31f7017 100644
+msgid "not enough free space for new device"
+msgstr "新设备没有足够的剩余空间"
+
#: ../blivet/iscsi.py:217
#: ../blivet/iscsi.py:216
msgid "Unable to change iSCSI initiator name once set"
msgstr "设定后就无法更改 iSCSI 启动程序名称"

View File

@ -1,33 +0,0 @@
From b20753ac6db14999270d71387309baa9270aa927 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Thu, 13 Jan 2022 17:27:08 +0100
Subject: [PATCH] Show better error when using unitialized disk in
do_partitioning
Now all we get is "KeyError: '/dev/sda'" for example.
Related: rhbz#2017432
Conflict:NA
Reference:https://github.com/storaged-project/blivet/commit/b20753ac6db14999270d71387309baa9270aa927
---
blivet/partitioning.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/blivet/partitioning.py b/blivet/partitioning.py
index f12ec3c9e..ce77e4eb7 100644
--- a/blivet/partitioning.py
+++ b/blivet/partitioning.py
@@ -764,7 +764,10 @@ def allocate_partitions(storage, disks, partitions, freespace, boot_disk=None):
growth = 0 # in sectors
# loop through disks
for _disk in req_disks:
- disklabel = disklabels[_disk.path]
+ try:
+ disklabel = disklabels[_disk.path]
+ except KeyError:
+ raise PartitioningError("Requested disk %s doesn't have a usable disklabel for partitioning" % _disk.name)
best = None
current_free = free
try:

View File

@ -1,49 +0,0 @@
From 61c09c6922748877595272479d68270fe442f3d4 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Thu, 13 Jan 2022 16:53:30 +0100
Subject: [PATCH] Exclude unusable disks from PartitionFactory
We already remove disks that are too small or not partitionable
in the PartitionSetFactory which allows us to create partitions
on multipath devices where Anaconda tells us to use both the mpath
device and the backing disks, we should do the same for the
PartitionFactory.
Resolves: rhbz#2017432
Conflict:NA
Reference:https://github.com/storaged-project/blivet/commit/61c09c6922748877595272479d68270fe442f3d4
---
blivet/devicefactory.py | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
index e6b8c1fad..2499484bf 100644
--- a/blivet/devicefactory.py
+++ b/blivet/devicefactory.py
@@ -1065,6 +1065,24 @@ def _get_new_device(self, *args, **kwargs):
**kwargs)
return device
+ def _configure(self):
+ disks = []
+ for disk in self.disks:
+ if not disk.partitioned:
+ log.debug("removing unpartitioned disk %s", disk.name)
+ elif not disk.format.supported:
+ log.debug("removing disk with unsupported format %s", disk.name)
+ else:
+ disks.append(disk)
+
+ if not disks:
+ raise DeviceFactoryError("no usable disks specified for partition")
+
+ log.debug("setting new factory disks to %s", [d.name for d in disks])
+ self.disks = disks # pylint: disable=attribute-defined-outside-init
+
+ super(PartitionFactory, self)._configure()
+
def _set_disks(self):
self.raw_device.req_disks = self.disks[:]

Binary file not shown.

BIN
blivet-3.6.1.tar.gz Normal file

Binary file not shown.

View File

@ -2,11 +2,11 @@
%bcond_without python3
Name: python-blivet
Version: 3.4.2
Release: 5
Version: 3.6.1
Release: 1
Epoch: 1
Summary: A python module for system storage configuration
License: LGPLv2+
License: LGPL-2.1-or-later
URL: https://storageapis.wordpress.com/projects/blivet
Source0: http://github.com/storaged-project/blivet/releases/download/blivet-%{version}/blivet-%{version}.tar.gz
@ -19,14 +19,10 @@ BuildRequires: python2-devel python2-setuptools
Patch0: 0001-force-lvm-plugin.patch
Patch1: fix-the-long-hostname.patch
Patch9001: 0001-Make-sure-we-mount-the-top-level-subvolume-when-moun.patch
%ifarch sw_64
Patch9002: blivet-3.4.2-sw.patch
patch9001: blivet-3.4.2-sw.patch
%endif
patch9003: Incomplete-Chineseization-of-disk-mount.patch
patch6001: backport-Exclude-unusable-disks-from-PartitionFactory-1.patch
patch6002: backport-Exclude-unusable-disks-from-PartitionFactory-2.patch
patch9002: Incomplete-Chineseization-of-disk-mount.patch
%description
The python-blivet package is a python module for examining and modifying
@ -47,10 +43,11 @@ Requires: libselinux-python3 python3-blockdev >= 2.19 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-fs >= 2.19 libblockdev-kbd >= 2.19 libblockdev-loop >= 2.19
Recommends: libblockdev-lvm >= 2.19 libblockdev-mdraid >= 2.19 libblockdev-mpath >= 2.19
Recommends: libblockdev-nvdimm >= 2.19 libblockdev-part >= 2.19 libblockdev-swap >= 2.19
Recommends: libblockdev-loop >= 2.19 libblockdev-swap >= 2.19
%ifarch s390 s390x
Recommends: libblockdev-s390 >= 2.19
%endif
%{?python_provide:%python_provide python3-blivet}
Obsoletes: blivet-data < 1:2.0.0
%if %{without enable_python2}
@ -127,6 +124,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
%doc README.md
%changelog
* Mon Jan 30 2023 hanhuihui<hanhuihui5@huawei.com> - 1:3.6.1-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update to 3.6.1
* Tue Dec 27 2022 hanhuihui<hanhuihui5@huawei.com> - 1:3.4.2-5
- Type:bugfix
- ID:NA