From 87dadf1c5ed7dde42965ed56ca50d0582bb5d8ac Mon Sep 17 00:00:00 2001 From: zhuhongbo Date: Fri, 21 Mar 2025 17:46:30 +0800 Subject: [PATCH] blivet uos add sw64 support --- 0002-blivet-uos-add-sw64-support.patch | 40 ++++++++++++++++++++++++++ python-blivet.spec | 6 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 0002-blivet-uos-add-sw64-support.patch diff --git a/0002-blivet-uos-add-sw64-support.patch b/0002-blivet-uos-add-sw64-support.patch new file mode 100644 index 0000000..4b3a308 --- /dev/null +++ b/0002-blivet-uos-add-sw64-support.patch @@ -0,0 +1,40 @@ +From 341f518145f5dcce381cef9cd68c8c3f94cda2b9 Mon Sep 17 00:00:00 2001 +From: zhuhongbo +Date: Fri, 21 Mar 2025 17:42:07 +0800 +Subject: [PATCH] blivet uos add sw64 support + +--- + blivet/arch.py | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/blivet/arch.py b/blivet/arch.py +index bc76031..87a330b 100644 +--- a/blivet/arch.py ++++ b/blivet/arch.py +@@ -303,6 +303,14 @@ def is_ia64(): + """ + return os.uname()[4] == 'ia64' + ++def is_sw_64(): ++ """ ++ :return: True if the hardware supports Sw_64, False otherwise. ++ :rtype: boolean ++ ++ """ ++ return os.uname()[4].startswith('sw_64') ++ + + def is_alpha(): + """ +@@ -355,6 +363,8 @@ def get_arch(): + return os.uname()[4] + elif is_aarch64(): + return 'aarch64' ++ elif is_sw_64(): ++ return 'sw_64' + elif is_alpha(): + return 'alpha' + elif is_arm(): +-- +2.39.3 + diff --git a/python-blivet.spec b/python-blivet.spec index 3b5147f..a31883b 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -1,4 +1,4 @@ -%define anolis_release 3 +%define anolis_release 4 Summary: A python module for system storage configuration Name: python-blivet Url: https://storageapis.wordpress.com/projects/blivet @@ -16,6 +16,7 @@ Source1: https://github.com/storaged-project/%{realname}/releases/download/%{rea Patch1001: 1001-remove-mpath-plugin.patch Patch1002: 0001-add-loongarch64-support-for-blivet.patch # End +Patch1003: 0002-blivet-uos-add-sw64-support.patch # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -125,6 +126,9 @@ make PYTHON=%{__python3} DESTDIR=%{buildroot} install %doc README.md ChangeLog examples %changelog +* Fri Mar 21 2025 zhuhongbo - 3.6.1-4 +- blivet uos add sw64 support + * Wed Mar 13 2024 Zhao Hang - 3.6.1-3 - Rebuild with python3.11 -- Gitee