diff --git a/0001-add-loongarch64-support-for-blivet.patch b/0001-add-loongarch64-support-for-blivet.patch new file mode 100644 index 0000000000000000000000000000000000000000..490624886a6b115ba70a925b68164f76edec7c75 --- /dev/null +++ b/0001-add-loongarch64-support-for-blivet.patch @@ -0,0 +1,34 @@ +From eb09799f88ac34011854556406fd13d59299ed75 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +Date: Thu, 31 Aug 2023 07:38:53 +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.40.1 + diff --git a/python-blivet.spec b/python-blivet.spec index c114b9c65dd81e6507e61d77aa02642ab816f3e8..2b376f498b44c6e2ca286c8513fef6f63bb9c775 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 Summary: A python module for system storage configuration Name: python-blivet Url: https://storageapis.wordpress.com/projects/blivet @@ -14,6 +14,7 @@ Source1: https://github.com/storaged-project/%{realname}/releases/download/%{rea # Add by Anolis-23 Patch1001: 1001-remove-mpath-plugin.patch +Patch1002: 0001-add-loongarch64-support-for-blivet.patch # End # Versions of required components (done so we make sure the buildrequires @@ -124,6 +125,9 @@ make PYTHON=%{__python3} DESTDIR=%{buildroot} install %doc README.md ChangeLog examples %changelog +* Wed Aug 30 2023 Wenlong Zhang - 3.6.1-2 +- add loongarch64 support for python-blivet + * Fri Dec 30 2022 mgb01105731 - 3.6.1-1 - update to version 3.6.1