Compare commits
No commits in common. "5d057b21b72f74651240e34808aa8c216812490a" and "fb0235e24662d52c1a1ebc44cafadd678805ea70" have entirely different histories.
5d057b21b7
...
fb0235e246
@ -1,34 +0,0 @@
|
||||
From c946520bc7917ee5b1c01c49ce7c866b7faf8eb0 Mon Sep 17 00:00:00 2001
|
||||
From: Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||
Date: Sat, 11 Feb 2023 06:48:05 +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.33.0
|
||||
|
||||
@ -1,60 +0,0 @@
|
||||
diff --git a/blivet/devicefactory.py b/blivet/devicefactory.py
|
||||
index efadd25..7b9243a 100644
|
||||
--- a/blivet/devicefactory.py
|
||||
+++ b/blivet/devicefactory.py
|
||||
@@ -39,6 +39,7 @@ from .partitioning import TotalSizeSet
|
||||
from .partitioning import do_partitioning
|
||||
from .size import Size
|
||||
from .static_data import luks_data
|
||||
+from .i18n import _
|
||||
|
||||
import gi
|
||||
gi.require_version("BlockDev", "2.0")
|
||||
@@ -714,7 +715,7 @@ class DeviceFactory(object):
|
||||
# the container
|
||||
size = self._get_device_size()
|
||||
if size <= Size(0):
|
||||
- raise DeviceFactoryError("not enough free space for new device")
|
||||
+ raise DeviceFactoryError(_("not enough free space for new device"))
|
||||
|
||||
parents = self._get_parent_devices()
|
||||
|
||||
@@ -1322,7 +1323,7 @@ class LVMFactory(DeviceFactory):
|
||||
self.size += self.device.size
|
||||
|
||||
if self.size == Size(0):
|
||||
- raise DeviceFactoryError("not enough free space for new device")
|
||||
+ raise DeviceFactoryError(_("not enough free space for new device"))
|
||||
else:
|
||||
super(LVMFactory, self)._handle_no_size()
|
||||
|
||||
diff --git a/po/blivet.pot b/po/blivet.pot
|
||||
index 40ef843..7d49527 100644
|
||||
--- a/po/blivet.pot
|
||||
+++ b/po/blivet.pot
|
||||
@@ -126,6 +126,10 @@ msgstr ""
|
||||
msgid "FCoE not available"
|
||||
msgstr ""
|
||||
|
||||
+#: ../blivet/devicefactory.py:718 ../blivet/devicefactory.py:1326
|
||||
+msgid "not enough free space for new device"
|
||||
+msgstr ""
|
||||
+
|
||||
#: ../blivet/iscsi.py:217
|
||||
msgid "Unable to change iSCSI initiator name once set"
|
||||
msgstr ""
|
||||
diff --git a/po/zh_CN.po b/po/zh_CN.po
|
||||
index aad3d0f..31f7017 100644
|
||||
--- a/po/zh_CN.po
|
||||
+++ b/po/zh_CN.po
|
||||
@@ -150,6 +150,10 @@ msgstr ""
|
||||
msgid "FCoE not available"
|
||||
msgstr "FCoE 不可用"
|
||||
|
||||
+#: ../blivet/devicefactory.py:718 ../blivet/devicefactory.py:1326
|
||||
+msgid "not enough free space for new device"
|
||||
+msgstr "新设备没有足够的剩余空间"
|
||||
+
|
||||
#: ../blivet/iscsi.py:217
|
||||
msgid "Unable to change iSCSI initiator name once set"
|
||||
msgstr "设定后就无法更改 iSCSI 启动程序名称"
|
||||
@ -1,79 +0,0 @@
|
||||
From bc7366a03e86a3ea0402dc34ddedbc971b82e2c1 Mon Sep 17 00:00:00 2001
|
||||
From: Vojtech Trefny <vtrefny@redhat.com>
|
||||
Date: Mon, 21 Nov 2022 11:04:40 +0100
|
||||
Subject: [PATCH] Add a basic read-only support for UDF filesystem
|
||||
|
||||
Conflict:del doc and tests
|
||||
Reference:https://github.com/storaged-project/blivet/commit/bc7366a03e86a3ea0402dc34ddedbc971b82e2c1
|
||||
|
||||
---
|
||||
blivet/formats/fs.py | 12 ++++++++++++
|
||||
blivet/populator/helpers/disklabel.py | 2 +-
|
||||
blivet/populator/helpers/partition.py | 2 +-
|
||||
blivet/tasks/fsmount.py | 4 ++++
|
||||
4 files changed, 18 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/blivet/formats/fs.py b/blivet/formats/fs.py
|
||||
index 8c346aa53..8df881b82 100644
|
||||
--- a/blivet/formats/fs.py
|
||||
+++ b/blivet/formats/fs.py
|
||||
@@ -1338,6 +1338,18 @@ class Iso9660FS(FS):
|
||||
register_device_format(Iso9660FS)
|
||||
|
||||
|
||||
+class UDFFS(FS):
|
||||
+
|
||||
+ """ UDF filesystem. """
|
||||
+ _type = "udf"
|
||||
+ _modules = ["udf"]
|
||||
+ _supported = True
|
||||
+ _mount_class = fsmount.UDFFSMount
|
||||
+
|
||||
+
|
||||
+register_device_format(UDFFS)
|
||||
+
|
||||
+
|
||||
class NoDevFS(FS):
|
||||
|
||||
""" nodev filesystem base class """
|
||||
diff --git a/blivet/populator/helpers/disklabel.py b/blivet/populator/helpers/disklabel.py
|
||||
index db10638ef..842cd3081 100644
|
||||
--- a/blivet/populator/helpers/disklabel.py
|
||||
+++ b/blivet/populator/helpers/disklabel.py
|
||||
@@ -42,7 +42,7 @@ def match(cls, data, device):
|
||||
# XXX ignore disklabels on multipath or biosraid member disks
|
||||
return (bool(udev.device_get_disklabel_type(data)) and
|
||||
not udev.device_is_biosraid_member(data) and
|
||||
- udev.device_get_format(data) != "iso9660" and
|
||||
+ udev.device_get_format(data) not in ("iso9660", "udf") and
|
||||
not (device.is_disk and udev.device_get_format(data) == "mpath_member"))
|
||||
|
||||
def _get_kwargs(self):
|
||||
diff --git a/blivet/populator/helpers/partition.py b/blivet/populator/helpers/partition.py
|
||||
index 8659bd483..9257407e6 100644
|
||||
--- a/blivet/populator/helpers/partition.py
|
||||
+++ b/blivet/populator/helpers/partition.py
|
||||
@@ -77,7 +77,7 @@ class PartitionDevicePopulator(DevicePopulator):
|
||||
# For partitions on disklabels parted cannot make sense of, go ahead
|
||||
# and instantiate a PartitionDevice so our view of the layout is
|
||||
# complete.
|
||||
- if not disk.partitionable or disk.format.type == "iso9660" or disk.format.hidden:
|
||||
+ if not disk.partitionable or disk.format.type in ("iso9660", "udf") or disk.format.hidden:
|
||||
# there's no need to filter partitions on members of multipaths or
|
||||
# fwraid members from lvm since multipath and dmraid are already
|
||||
# active and lvm should therefore know to ignore them
|
||||
diff --git a/blivet/tasks/fsmount.py b/blivet/tasks/fsmount.py
|
||||
index 65b2470ac..a7f493dd4 100644
|
||||
--- a/blivet/tasks/fsmount.py
|
||||
+++ b/blivet/tasks/fsmount.py
|
||||
@@ -163,6 +163,10 @@ class Iso9660FSMount(FSMount):
|
||||
options = ["ro"]
|
||||
|
||||
|
||||
+class UDFFSMount(FSMount):
|
||||
+ options = ["ro"]
|
||||
+
|
||||
+
|
||||
class NoDevFSMount(FSMount):
|
||||
|
||||
@property
|
||||
@ -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:
|
||||
@ -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[:]
|
||||
|
||||
26
fix-allocate-partitions-threw-exception-when-raid.patch
Normal file
26
fix-allocate-partitions-threw-exception-when-raid.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From c9ddcf46a10738017fb442025c25863c25c20142 Mon Sep 17 00:00:00 2001
|
||||
From: bitcoffeeiux <liuxin264@huawei.com>
|
||||
Date: Fri, 4 Jun 2021 04:27:53 +0800
|
||||
Subject: [PATCH] function allocate_partitions threw an exception
|
||||
while adding /boot partitions to a RAID disk
|
||||
|
||||
---
|
||||
blivet/partitioning.py | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/blivet/partitioning.py b/blivet/partitioning.py
|
||||
index 53f9cc3..0b544be 100644
|
||||
--- a/blivet/partitioning.py
|
||||
+++ b/blivet/partitioning.py
|
||||
@@ -764,6 +764,8 @@ def allocate_partitions(storage, disks, partitions, freespace, boot_disk=None):
|
||||
growth = 0 # in sectors
|
||||
# loop through disks
|
||||
for _disk in req_disks:
|
||||
+ if _disk.path not in disklabels:
|
||||
+ continue
|
||||
disklabel = disklabels[_disk.path]
|
||||
best = None
|
||||
current_free = free
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
Name: python-blivet
|
||||
Version: 3.4.2
|
||||
Release: 8
|
||||
Release: 3
|
||||
Epoch: 1
|
||||
Summary: A python module for system storage configuration
|
||||
License: LGPLv2+
|
||||
@ -19,16 +19,14 @@ BuildRequires: python2-devel python2-setuptools
|
||||
|
||||
Patch0: 0001-force-lvm-plugin.patch
|
||||
Patch1: fix-the-long-hostname.patch
|
||||
|
||||
patch1000: 1000-add-loongarch64-support-not-upstream-modified-files.patch
|
||||
patch1001: 1001-add-sw_64-support-not-upstream-modified-files.patch
|
||||
|
||||
patch6001: backport-Exclude-unusable-disks-from-PartitionFactory-1.patch
|
||||
patch6002: backport-Exclude-unusable-disks-from-PartitionFactory-2.patch
|
||||
patch6003: backport-Add-a-basic-read-only-support-for-UDF-filesystem.patch
|
||||
|
||||
Patch9000: fix-allocate-partitions-threw-exception-when-raid.patch
|
||||
Patch9001: 0001-Make-sure-we-mount-the-top-level-subvolume-when-moun.patch
|
||||
patch9002: Incomplete-Chineseization-of-disk-mount.patch
|
||||
%ifarch sw_64
|
||||
Patch9002: blivet-3.4.2-sw.patch
|
||||
%endif
|
||||
|
||||
|
||||
|
||||
%description
|
||||
The python-blivet package is a python module for examining and modifying
|
||||
storage configuration.
|
||||
@ -128,33 +126,6 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
* Sat Aug 12 2023 panchenbo <panchenbo@kylinsec.com.cn> - 1:3.4.2-8
|
||||
- turn on sw_64 loongarch for all arch reorder patchs
|
||||
|
||||
* Mon Feb 13 2023 hanhuihui<hanhuihui5@huawei.com> - 1:3.4.2-7
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:add udf-filesystem support
|
||||
|
||||
* Sat Feb 11 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 1:3.4.2-6
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:add loongarch64 support for blivet
|
||||
|
||||
* Tue Dec 27 2022 hanhuihui<hanhuihui5@huawei.com> - 1:3.4.2-5
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:Exclude unusable disks from PartitionFactory
|
||||
|
||||
* Fri Dec 09 2022 wanglimin<wanglimin@xfusion.com> - 1:3.4.2-4
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC: Incomplete Chineseization of disk mount
|
||||
|
||||
* Tue Oct 18 2022 wuzx<wuzx1226@qq.com> - 3.4.2-3
|
||||
- add sw64 patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user