diff --git a/0001-add-loongarch64-support-for-blivet.patch b/0001-add-loongarch64-support-for-blivet.patch new file mode 100644 index 0000000000000000000000000000000000000000..3025863bfe9efb422d5a541057268c05b04c4f16 --- /dev/null +++ b/0001-add-loongarch64-support-for-blivet.patch @@ -0,0 +1,34 @@ +From c946520bc7917ee5b1c01c49ce7c866b7faf8eb0 Mon Sep 17 00:00:00 2001 +From: Wenlong Zhang +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 + diff --git a/python-blivet.spec b/python-blivet.spec index b611b30ed1d950a2cb439c168b69e0017e0672a4..692e8c288cdb326397be306d2203858488f0b218 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -3,7 +3,7 @@ Name: python-blivet Version: 3.4.2 -Release: 5 +Release: 6 Epoch: 1 Summary: A python module for system storage configuration License: LGPLv2+ @@ -27,6 +27,9 @@ 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 +%if 0%(test `uname -m` == "loongarch64" && echo 1) +Patch6003: 0001-add-loongarch64-support-for-blivet.patch +%endif %description The python-blivet package is a python module for examining and modifying @@ -127,6 +130,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install %doc README.md %changelog +* Sat Feb 11 2023 Wenlong Zhang - 1:3.4.2-6 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add loongarch64 support for blivet + * Tue Dec 27 2022 hanhuihui - 1:3.4.2-5 - Type:bugfix - ID:NA