diff --git a/1000-anolis-fix-platform-compatibility.patch b/1000-anolis-fix-platform-compatibility.patch new file mode 100644 index 0000000000000000000000000000000000000000..b4706934b9a84accdffda6d4fd14abe1dcfdfdbd --- /dev/null +++ b/1000-anolis-fix-platform-compatibility.patch @@ -0,0 +1,20 @@ +diff -Nur libdnf-0.55.0/libdnf/module/ModulePackage.cpp libdnf-0.55.0.new/libdnf/module/ModulePackage.cpp +--- libdnf-0.55.0/libdnf/module/ModulePackage.cpp 2020-11-09 22:42:13.000000000 +0800 ++++ libdnf-0.55.0.new/libdnf/module/ModulePackage.cpp 2021-07-08 16:40:15.635247194 +0800 +@@ -580,6 +580,16 @@ + Id id = repo_add_solvable(repo); + Solvable *solvable = pool_id2solvable(pool, id); + setSovable(pool, solvable, name, stream, version, context, "noarch"); ++ if (name == "platform" and stream == "an8") ++ { ++ std::string compatible_stream = "el8"; ++ setSovable(pool, solvable, name, compatible_stream, version, context, "noarch"); ++ } ++ if (name == "platform" and stream == "el8") ++ { ++ std::string compatible_stream = "an8"; ++ setSovable(pool, solvable, name, compatible_stream, version, context, "noarch"); ++ } + repoImpl->needs_internalizing = 1; + dnf_sack_set_provides_not_ready(moduleSack); + dnf_sack_set_considered_to_update(moduleSack); diff --git a/1001-arch-add-loongarch64-to-arch_map.patch b/1001-arch-add-loongarch64-to-arch_map.patch new file mode 100644 index 0000000000000000000000000000000000000000..be4e9b11c434d56305c394802ecd753fde50a576 --- /dev/null +++ b/1001-arch-add-loongarch64-to-arch_map.patch @@ -0,0 +1,24 @@ +From 9753114b8aaf03ef2bb30d02cf20275836f1d4ed Mon Sep 17 00:00:00 2001 +From: Liwei Ge +Date: Wed, 14 Sep 2022 15:09:32 +0800 +Subject: [PATCH] arch: add loongarch64 to arch_map + +--- + libdnf/dnf-context.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp +index d119e7d..4de4333 100644 +--- a/libdnf/dnf-context.cpp ++++ b/libdnf/dnf-context.cpp +@@ -115,6 +115,7 @@ static const struct { + { "sparc", { "sparc", "sparc64", "sparc64v", "sparcv8", + "sparcv9", "sparcv9v", NULL } }, + { "x86_64", { "x86_64", "amd64", "ia32e", NULL } }, ++ { "loongarch64",{ "loongarch64", NULL } }, + { NULL, { NULL } } + }; + +-- +2.27.0 + diff --git a/libdnf.spec b/libdnf.spec index 795e8f2b60db891f72217b3b33ba12346bb71f46..5c3d69efdb7e12ecce62582bec7bf7060a68ceb4 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %global libsolv_version 0.7.17 %global libmodulemd_version 2.11.2-2 %global librepo_version 1.13.1 @@ -36,7 +37,7 @@ %bcond_without python2 %endif -%if 0%{?rhel} && ! 0%{?centos} +%if 0%{?rhel} && ! 0%{?centos} && ! 0%{?anolis} %bcond_without rhsm %else %bcond_with rhsm @@ -56,7 +57,7 @@ Name: libdnf Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version} -Release: 8.2%{?dist} +Release: 8.2%{anolis_release}%{?dist} Summary: Library providing simplified C and Python API to libsolv License: LGPLv2+ URL: https://github.com/rpm-software-management/libdnf @@ -90,6 +91,9 @@ Patch26: 0026-Update-translations-RhBug-2017272.patch Patch27: 0027-advisory-upgrade-filter-out-advPkgs-with-different-a.patch Patch28: 0028-Add-obsoletes-to-filtering-for-advisory-candidates.patch +Patch1000: 1000-anolis-fix-platform-compatibility.patch +Patch1001: 1001-arch-add-loongarch64-to-arch_map.patch + BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ @@ -333,6 +337,11 @@ popd %endif %changelog +* Fri Sep 16 2022 Liu Xiaoping - 0.63.0-8.2.0.1 +- Disable rhsm support in Anolis (geliwei@openanolis.org) +- rebrand: fix platform compatibility (geliwei@openanolis.org) +- Add loongarch64 to arch_map (liwei.glw@alibaba-inc.com) + * Wed Aug 17 2022 Lukas Hrazky - 0.63.0-8.2 - Add obsoletes to filtering for advisory candidates