!100 add loongarch64 support for blivet
From: @zhangwenlong01 Reviewed-by: @t_feng Signed-off-by: @t_feng
This commit is contained in:
commit
2740f7e527
34
0001-add-loongarch64-support-for-blivet.patch
Normal file
34
0001-add-loongarch64-support-for-blivet.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From 26d7d0228dff985138593ef085b5f22bfabee0b7 Mon Sep 17 00:00:00 2001
|
||||
From: Wenlong Zhang <zhangwenlong@loongson.cn>
|
||||
Date: Sat, 11 Feb 2023 16:28:21 +0800
|
||||
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
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
Name: python-blivet
|
||||
Version: 3.6.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
Epoch: 1
|
||||
Summary: A python module for system storage configuration
|
||||
License: LGPL-2.1-or-later
|
||||
@ -23,6 +23,9 @@ Patch1: fix-the-long-hostname.patch
|
||||
patch9001: blivet-3.4.2-sw.patch
|
||||
%endif
|
||||
patch9002: Incomplete-Chineseization-of-disk-mount.patch
|
||||
%if 0%(test `uname -m` == "loongarch64" && echo 1)
|
||||
patch9003: 0001-add-loongarch64-support-for-blivet.patch
|
||||
%endif
|
||||
|
||||
%description
|
||||
The python-blivet package is a python module for examining and modifying
|
||||
@ -124,6 +127,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
* Sat Feb 11 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 1:3.6.1-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:add loongarch64 support for blivet
|
||||
|
||||
* Mon Jan 30 2023 hanhuihui<hanhuihui5@huawei.com> - 1:3.6.1-1
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user