From 04329bae4de39f356a73134295d48d06bda3b957 Mon Sep 17 00:00:00 2001 From: zhangqiumiao Date: Fri, 9 Dec 2022 18:12:54 +0800 Subject: [PATCH] add sw64 and loongarch support for dnf --- 0001-Add-loongarch-architecture-support.patch | 25 +++++++++++++++++++ dnf-4.10.0-sw.patch | 11 ++++++++ dnf.spec | 11 +++++++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 0001-Add-loongarch-architecture-support.patch create mode 100644 dnf-4.10.0-sw.patch diff --git a/0001-Add-loongarch-architecture-support.patch b/0001-Add-loongarch-architecture-support.patch new file mode 100644 index 0000000..22a128e --- /dev/null +++ b/0001-Add-loongarch-architecture-support.patch @@ -0,0 +1,25 @@ +From 77d9646088647ae2bbecb70248701458662ebf48 Mon Sep 17 00:00:00 2001 +From: Sun Haiyong +Date: Wed, 22 Dec 2021 14:37:16 +0800 +Subject: [PATCH] Add loongarch architecture support. + +--- + dnf/rpm/__init__.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/dnf/rpm/__init__.py b/dnf/rpm/__init__.py +index 696e594..0db8e95 100644 +--- a/dnf/rpm/__init__.py ++++ b/dnf/rpm/__init__.py +@@ -97,6 +97,8 @@ _BASEARCH_MAP = _invert({ + 'mipsel': ('mipsel',), + 'mips64': ('mips64',), + 'mips64el': ('mips64el',), ++ 'loongarch32' : ('loongarch32',), ++ 'loongarch64' : ('loongarch64',), + 'noarch': ('noarch',), + 'ppc': ('ppc',), + 'ppc64': ('ppc64', 'ppc64iseries', 'ppc64p7', 'ppc64pseries'), +-- +2.30.0 + diff --git a/dnf-4.10.0-sw.patch b/dnf-4.10.0-sw.patch new file mode 100644 index 0000000..aea3851 --- /dev/null +++ b/dnf-4.10.0-sw.patch @@ -0,0 +1,11 @@ +diff -Naur dnf-4.10.0.org/dnf/rpm/__init__.py dnf-4.10.0.sw/dnf/rpm/__init__.py +--- dnf-4.10.0.org/dnf/rpm/__init__.py 2022-02-27 01:21:45.610000000 +0000 ++++ dnf-4.10.0.sw/dnf/rpm/__init__.py 2022-02-27 01:22:17.040000000 +0000 +@@ -87,6 +87,7 @@ + + _BASEARCH_MAP = _invert({ + 'aarch64': ('aarch64',), ++ 'sw_64': ('sw_64',), + 'alpha': ('alpha', 'alphaev4', 'alphaev45', 'alphaev5', 'alphaev56', + 'alphaev6', 'alphaev67', 'alphaev68', 'alphaev7', 'alphapca56'), + 'arm': ('armv5tejl', 'armv5tel', 'armv5tl', 'armv6l', 'armv7l', 'armv8l'), \ No newline at end of file diff --git a/dnf.spec b/dnf.spec index f850218..8bc612c 100644 --- a/dnf.spec +++ b/dnf.spec @@ -3,7 +3,7 @@ Name: dnf Version: 4.14.0 -Release: 3 +Release: 4 Summary: A software package manager that manages packages on Linux distributions. License: GPLv2+ and GPLv2 and GPL URL: https://github.com/rpm-software-management/dnf @@ -15,6 +15,12 @@ Patch9002: add-rpm-transaction-debuginfo.patch Patch9003: adapt-test-another-process.patch Patch9004: fix-dnf-history-undo-error-when-history-sqlite-missing.patch +%ifarch sw_64 +Patch6000: dnf-4.10.0-sw.patch +%endif +%ifarch loongarch64 +Patch6001: 0001-Add-loongarch-architecture-support.patch +%endif BuildArch: noarch BuildRequires: cmake gettext systemd bash-completion python3-sphinx @@ -237,6 +243,9 @@ popd %{_mandir}/man8/%{name}-automatic.8* %changelog +* Fri Dec 9 2022 chenhaixing - 4.14.0-4 +- DESC:add sw64 and loongarch support for dnf + * Fri Dec 9 2022 chenhaixing - 4.14.0-3 - DESC:enable DT