From e91962e098e13884e4f47da6aa98d78e60797d62 Mon Sep 17 00:00:00 2001 From: wxiat Date: Wed, 28 Jun 2023 11:10:28 +0800 Subject: [PATCH] cherry-pick: `Add sw patch #f1e5c59e210a01d3d330807c68dbf22b922470fd`. Signed-off-by: wxiat Signed-off-by: Weisson --- blivet-3.6.0-sw.patch | 28 ++++++++++++++++++++++++++++ python-blivet.spec | 8 +++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 blivet-3.6.0-sw.patch diff --git a/blivet-3.6.0-sw.patch b/blivet-3.6.0-sw.patch new file mode 100644 index 0000000..8faa6d5 --- /dev/null +++ b/blivet-3.6.0-sw.patch @@ -0,0 +1,28 @@ +diff -Naur blivet-3.6.0.org/blivet/arch.py blivet-3.6.0.sw/blivet/arch.py +--- blivet-3.6.0.org/blivet/arch.py 2023-06-13 08:39:39.473429075 +0800 ++++ blivet-3.6.0.sw/blivet/arch.py 2023-06-15 16:44:20.913961862 +0800 +@@ -297,6 +297,15 @@ + return os.uname()[4].startswith('s390') + + ++def is_sw_64(): ++ """ ++ :return: True if the hardware supports Sw_64, False otherwise. ++ :rtype: boolean ++ ++ """ ++ return os.uname()[4] == 'sw_64' ++ ++ + def is_ia64(): + """ + :return: True if the hardware supports IA64, False otherwise. +@@ -344,6 +353,8 @@ + """ + if is_x86(bits=32): + return 'i386' ++ elif is_sw_64(): ++ return 'sw_64' + elif is_x86(bits=64): + return 'x86_64' + elif is_ppc(bits=32): diff --git a/python-blivet.spec b/python-blivet.spec index 0b7868d..b7bbcdb 100644 --- a/python-blivet.spec +++ b/python-blivet.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 %define is_rhel 0%{?rhel} != 0 @@ -50,6 +50,9 @@ Patch14: 0015-Add-support-for-filesystem-online-resize.patch Patch15: 0016-Backport-iSCSI-initiator-name-related-fixes.patch Patch16: 1001-blivet-anolis-add-loongarch-support.patch +# Add by Anolis +Patch1002: blivet-3.6.0-sw.patch +# End # Versions of required components (done so we make sure the buildrequires # match the requires versions of things). @@ -212,6 +215,9 @@ configuration. %endif %changelog +* Wed Mar 20 2024 wxiat - 3.6.0-7.0.2 +- cherry-pick: `Add sw patch #f1e5c59e210a01d3d330807c68dbf22b922470fd`. + * Fri Dec 08 2023 liuzhilin - 3.6.0-7.0.1 - Add loongarch64 support -- Gitee