From bc411a7d48fecb0f77d2e01d29e64fe9258c7cd0 Mon Sep 17 00:00:00 2001 From: Renbo Date: Thu, 6 Feb 2025 14:01:37 +0800 Subject: [PATCH 1/5] [BA] update to libdnf-0.63.0-21 to #IBKDPI update to libdnf-0.63.0-21 Signed-off-by: Renbo --- ...n-Calculate-RPM-difference-between-t.patch | 180 +++++++++++++ ...n-Fix-invalid-memory-access-when-dro.patch | 94 +++++++ 1000-anolis-fix-platform-compatibility.patch | 20 -- 1001-arch-add-loongarch64-to-arch_map.patch | 24 -- 1002-libdnf-add-sw.patch | 25 -- 9999-change-bugtracker.diff | 23 -- libdnf.spec | 249 +++++++++--------- 7 files changed, 396 insertions(+), 219 deletions(-) create mode 100644 0051-MergedTransaction-Calculate-RPM-difference-between-t.patch create mode 100644 0052-MergedTransaction-Fix-invalid-memory-access-when-dro.patch delete mode 100644 1000-anolis-fix-platform-compatibility.patch delete mode 100644 1001-arch-add-loongarch64-to-arch_map.patch delete mode 100644 1002-libdnf-add-sw.patch delete mode 100644 9999-change-bugtracker.diff diff --git a/0051-MergedTransaction-Calculate-RPM-difference-between-t.patch b/0051-MergedTransaction-Calculate-RPM-difference-between-t.patch new file mode 100644 index 0000000..1d00306 --- /dev/null +++ b/0051-MergedTransaction-Calculate-RPM-difference-between-t.patch @@ -0,0 +1,180 @@ +From 3dec8ebc9d1abc735de67cd5fd95677cfbfebc7d Mon Sep 17 00:00:00 2001 +From: Jan Kolarik +Date: Mon, 26 Feb 2024 09:58:33 +0000 +Subject: [PATCH 51/52] MergedTransaction: Calculate RPM difference between two + same versions as no-op +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream commit: 54823d82a1369c25ba1a68c18ea2a67c41f4fbe7 + +If a package of a particular version is installed and would still be installed after a list of transactions, it's more user friendly to treat the whole situation as "do nothing". + +Resolves: https://issues.redhat.com/browse/RHEL-68770 +Signed-off-by: Petr Písař +--- + libdnf/transaction/MergedTransaction.cpp | 38 ++++++++++++------- + libdnf/transaction/MergedTransaction.hpp | 6 +-- + .../transaction/MergedTransactionTest.cpp | 7 +--- + 3 files changed, 28 insertions(+), 23 deletions(-) + +diff --git a/libdnf/transaction/MergedTransaction.cpp b/libdnf/transaction/MergedTransaction.cpp +index a8d878cb..8f26882f 100644 +--- a/libdnf/transaction/MergedTransaction.cpp ++++ b/libdnf/transaction/MergedTransaction.cpp +@@ -192,7 +192,7 @@ static bool transaction_item_sort_function(const std::shared_ptr (new action) = (merged action) + * +- * Erase/Obsolete -> Install/Obsoleting = Reinstall/Downgrade/Upgrade ++ * Erase/Obsolete -> Install/Obsoleting = Downgrade/Upgrade + * + * Reinstall/Reason change -> (new action) = (new action) + * +@@ -210,6 +210,9 @@ static bool transaction_item_sort_function(const std::shared_ptr + MergedTransaction::getItems() +@@ -261,13 +264,16 @@ getItemIdentifier(ItemPtr item) + + /** + * Resolve the difference between RPMs in the first and second transaction item +- * and create a ItemPair of Upgrade, Downgrade or reinstall. ++ * and create a ItemPair of Upgrade, Downgrade or drop the item from the merged ++ * transaction set in case of both packages are of the same version. + * Method is called when original package is being removed and than installed again. ++ * \param itemPairMap merged transaction set + * \param previousItemPair original item pair + * \param mTransItem new transaction item + */ + void +-MergedTransaction::resolveRPMDifference(ItemPair &previousItemPair, ++MergedTransaction::resolveRPMDifference(ItemPairMap &itemPairMap, ++ ItemPair &previousItemPair, + TransactionItemBasePtr mTransItem) + { + auto firstItem = previousItemPair.first->getItem(); +@@ -277,11 +283,10 @@ MergedTransaction::resolveRPMDifference(ItemPair &previousItemPair, + auto secondRPM = std::dynamic_pointer_cast< RPMItem >(secondItem); + + if (firstRPM->getVersion() == secondRPM->getVersion() && +- firstRPM->getEpoch() == secondRPM->getEpoch()) { +- // reinstall +- mTransItem->setAction(TransactionItemAction::REINSTALL); +- previousItemPair.first = mTransItem; +- previousItemPair.second = nullptr; ++ firstRPM->getEpoch() == secondRPM->getEpoch() && ++ firstRPM->getRelease() == secondRPM->getRelease()) { ++ // Drop the item from merged transaction ++ itemPairMap.erase(getItemIdentifier(firstItem)); + return; + } else if ((*firstRPM) < (*secondRPM)) { + // Upgrade to secondRPM +@@ -296,7 +301,9 @@ MergedTransaction::resolveRPMDifference(ItemPair &previousItemPair, + } + + void +-MergedTransaction::resolveErase(ItemPair &previousItemPair, TransactionItemBasePtr mTransItem) ++MergedTransaction::resolveErase(ItemPairMap &itemPairMap, ++ ItemPair &previousItemPair, ++ TransactionItemBasePtr mTransItem) + { + /* + * The original item has been removed - it has to be installed now unless the rpmdb +@@ -306,7 +313,7 @@ MergedTransaction::resolveErase(ItemPair &previousItemPair, TransactionItemBaseP + if (mTransItem->getAction() == TransactionItemAction::INSTALL) { + if (mTransItem->getItem()->getItemType() == ItemType::RPM) { + // resolve the difference between RPM packages +- resolveRPMDifference(previousItemPair, mTransItem); ++ resolveRPMDifference(itemPairMap, previousItemPair, mTransItem); + } else { + // difference between comps can't be resolved + mTransItem->setAction(TransactionItemAction::REINSTALL); +@@ -323,11 +330,14 @@ MergedTransaction::resolveErase(ItemPair &previousItemPair, TransactionItemBaseP + * transaction - new package is used to complete the pair. Items are stored in pairs (Upgrade, + * Upgrade) or (Downgraded, Downgrade). With complete transaction pair we need to get the new + * Upgrade/Downgrade item and compare its version with the original item from the pair. ++ * \param itemPairMap merged transaction set + * \param previousItemPair original item pair + * \param mTransItem new transaction item + */ + void +-MergedTransaction::resolveAltered(ItemPair &previousItemPair, TransactionItemBasePtr mTransItem) ++MergedTransaction::resolveAltered(ItemPairMap &itemPairMap, ++ ItemPair &previousItemPair, ++ TransactionItemBasePtr mTransItem) + { + auto newState = mTransItem->getAction(); + auto firstState = previousItemPair.first->getAction(); +@@ -369,7 +379,7 @@ MergedTransaction::resolveAltered(ItemPair &previousItemPair, TransactionItemBas + } else { + if (mTransItem->getItem()->getItemType() == ItemType::RPM) { + // resolve the difference between RPM packages +- resolveRPMDifference(previousItemPair, mTransItem); ++ resolveRPMDifference(itemPairMap, previousItemPair, mTransItem); + } else { + // difference between comps can't be resolved + previousItemPair.second->setAction(TransactionItemAction::REINSTALL); +@@ -405,7 +415,7 @@ MergedTransaction::mergeItem(ItemPairMap &itemPairMap, TransactionItemBasePtr mT + switch (firstState) { + case TransactionItemAction::REMOVE: + case TransactionItemAction::OBSOLETED: +- resolveErase(previousItemPair, mTransItem); ++ resolveErase(itemPairMap, previousItemPair, mTransItem); + break; + case TransactionItemAction::INSTALL: + // the original package has been installed -> it may be either Removed, or altered +@@ -432,7 +442,7 @@ MergedTransaction::mergeItem(ItemPairMap &itemPairMap, TransactionItemBasePtr mT + case TransactionItemAction::UPGRADE: + case TransactionItemAction::UPGRADED: + case TransactionItemAction::OBSOLETE: +- resolveAltered(previousItemPair, mTransItem); ++ resolveAltered(itemPairMap, previousItemPair, mTransItem); + break; + case TransactionItemAction::REINSTALLED: + break; +diff --git a/libdnf/transaction/MergedTransaction.hpp b/libdnf/transaction/MergedTransaction.hpp +index dbb8af11..f85b133a 100644 +--- a/libdnf/transaction/MergedTransaction.hpp ++++ b/libdnf/transaction/MergedTransaction.hpp +@@ -76,9 +76,9 @@ protected: + typedef std::map< std::string, ItemPair > ItemPairMap; + + void mergeItem(ItemPairMap &itemPairMap, TransactionItemBasePtr transItem); +- void resolveRPMDifference(ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); +- void resolveErase(ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); +- void resolveAltered(ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); ++ void resolveRPMDifference(ItemPairMap &itemPairMap, ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); ++ void resolveErase(ItemPairMap &itemPairMap, ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); ++ void resolveAltered(ItemPairMap &itemPairMap, ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); + }; + + } // namespace libdnf +diff --git a/tests/libdnf/transaction/MergedTransactionTest.cpp b/tests/libdnf/transaction/MergedTransactionTest.cpp +index 52507700..35fb4250 100644 +--- a/tests/libdnf/transaction/MergedTransactionTest.cpp ++++ b/tests/libdnf/transaction/MergedTransactionTest.cpp +@@ -822,12 +822,7 @@ MergedTransactionTest::test_downgrade_upgrade_remove() + // test merging trans1, trans2 + merged.merge(trans2); + auto items2 = merged.getItems(); +- CPPUNIT_ASSERT_EQUAL(1, (int)items2.size()); +- auto item2 = items2.at(0); +- CPPUNIT_ASSERT_EQUAL(std::string("tour-4.8-1.noarch"), item2->getItem()->toStr()); +- CPPUNIT_ASSERT_EQUAL(std::string("repo1"), item2->getRepoid()); +- CPPUNIT_ASSERT_EQUAL(TransactionItemAction::REINSTALL, item2->getAction()); +- CPPUNIT_ASSERT_EQUAL(TransactionItemReason::USER, item2->getReason()); ++ CPPUNIT_ASSERT_EQUAL(0, (int)items2.size()); + + // test merging trans1, trans2, trans3 + merged.merge(trans3); +-- +2.47.1 + diff --git a/0052-MergedTransaction-Fix-invalid-memory-access-when-dro.patch b/0052-MergedTransaction-Fix-invalid-memory-access-when-dro.patch new file mode 100644 index 0000000..30b6397 --- /dev/null +++ b/0052-MergedTransaction-Fix-invalid-memory-access-when-dro.patch @@ -0,0 +1,94 @@ +From d3aed9b31495a4e10424a460f930f0678fb3688e Mon Sep 17 00:00:00 2001 +From: Jan Kolarik +Date: Tue, 23 Apr 2024 14:11:19 +0000 +Subject: [PATCH 52/52] MergedTransaction: Fix invalid memory access when + dropping items +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream commit: 90d2ffad964a91a7a798b81e15c16eb1e840f257 + +When an item is dropped from the merged transaction, the `ItemPair` reference becomes invalid and should no longer be used. + +Resolves: https://issues.redhat.com/browse/RHEL-68770 +Signed-off-by: Petr Písař +--- + libdnf/transaction/MergedTransaction.cpp | 18 +++++++++++------- + libdnf/transaction/MergedTransaction.hpp | 2 +- + 2 files changed, 12 insertions(+), 8 deletions(-) + +diff --git a/libdnf/transaction/MergedTransaction.cpp b/libdnf/transaction/MergedTransaction.cpp +index 8f26882f..75d2c1e7 100644 +--- a/libdnf/transaction/MergedTransaction.cpp ++++ b/libdnf/transaction/MergedTransaction.cpp +@@ -264,14 +264,15 @@ getItemIdentifier(ItemPtr item) + + /** + * Resolve the difference between RPMs in the first and second transaction item +- * and create a ItemPair of Upgrade, Downgrade or drop the item from the merged +- * transaction set in case of both packages are of the same version. +- * Method is called when original package is being removed and than installed again. ++ * and create a ItemPair of Upgrade, Downgrade or remove the item from the merged ++ * transaction set in case of both packages are the same. ++ * Method is called when original package is being removed and then installed again. + * \param itemPairMap merged transaction set + * \param previousItemPair original item pair + * \param mTransItem new transaction item ++ * \return true if the original and new transaction item differ + */ +-void ++bool + MergedTransaction::resolveRPMDifference(ItemPairMap &itemPairMap, + ItemPair &previousItemPair, + TransactionItemBasePtr mTransItem) +@@ -287,7 +288,7 @@ MergedTransaction::resolveRPMDifference(ItemPairMap &itemPairMap, + firstRPM->getRelease() == secondRPM->getRelease()) { + // Drop the item from merged transaction + itemPairMap.erase(getItemIdentifier(firstItem)); +- return; ++ return false; + } else if ((*firstRPM) < (*secondRPM)) { + // Upgrade to secondRPM + previousItemPair.first->setAction(TransactionItemAction::UPGRADED); +@@ -298,6 +299,7 @@ MergedTransaction::resolveRPMDifference(ItemPairMap &itemPairMap, + mTransItem->setAction(TransactionItemAction::DOWNGRADE); + } + previousItemPair.second = mTransItem; ++ return true; + } + + void +@@ -308,12 +310,14 @@ MergedTransaction::resolveErase(ItemPairMap &itemPairMap, + /* + * The original item has been removed - it has to be installed now unless the rpmdb + * has changed. Resolve the difference between packages and mark it as Upgrade, +- * Reinstall or Downgrade ++ * Downgrade or remove it from the transaction + */ + if (mTransItem->getAction() == TransactionItemAction::INSTALL) { + if (mTransItem->getItem()->getItemType() == ItemType::RPM) { + // resolve the difference between RPM packages +- resolveRPMDifference(itemPairMap, previousItemPair, mTransItem); ++ if (!resolveRPMDifference(itemPairMap, previousItemPair, mTransItem)) { ++ return; ++ } + } else { + // difference between comps can't be resolved + mTransItem->setAction(TransactionItemAction::REINSTALL); +diff --git a/libdnf/transaction/MergedTransaction.hpp b/libdnf/transaction/MergedTransaction.hpp +index f85b133a..50212159 100644 +--- a/libdnf/transaction/MergedTransaction.hpp ++++ b/libdnf/transaction/MergedTransaction.hpp +@@ -76,7 +76,7 @@ protected: + typedef std::map< std::string, ItemPair > ItemPairMap; + + void mergeItem(ItemPairMap &itemPairMap, TransactionItemBasePtr transItem); +- void resolveRPMDifference(ItemPairMap &itemPairMap, ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); ++ bool resolveRPMDifference(ItemPairMap &itemPairMap, ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); + void resolveErase(ItemPairMap &itemPairMap, ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); + void resolveAltered(ItemPairMap &itemPairMap, ItemPair &previousItemPair, TransactionItemBasePtr mTransItem); + }; +-- +2.47.1 + diff --git a/1000-anolis-fix-platform-compatibility.patch b/1000-anolis-fix-platform-compatibility.patch deleted file mode 100644 index b470693..0000000 --- a/1000-anolis-fix-platform-compatibility.patch +++ /dev/null @@ -1,20 +0,0 @@ -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 deleted file mode 100644 index be4e9b1..0000000 --- a/1001-arch-add-loongarch64-to-arch_map.patch +++ /dev/null @@ -1,24 +0,0 @@ -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/1002-libdnf-add-sw.patch b/1002-libdnf-add-sw.patch deleted file mode 100644 index 683fc36..0000000 --- a/1002-libdnf-add-sw.patch +++ /dev/null @@ -1,25 +0,0 @@ -From fc613dbf0418e13abb24c5f29ecef68e0c13ed71 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Tue, 8 Aug 2023 10:58:35 +0800 -Subject: [PATCH] add sw - -Signed-off-by: rpm-build ---- - libdnf/dnf-context.cpp | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp -index e663949..750b97f 100644 ---- a/libdnf/dnf-context.cpp -+++ b/libdnf/dnf-context.cpp -@@ -119,6 +119,7 @@ static const struct { - "sparcv9", "sparcv9v", NULL } }, - { "x86_64", { "x86_64", "amd64", "ia32e", NULL } }, - { "loongarch64",{ "loongarch64", NULL } }, -+ { "sw_64", { "sw_64", NULL } }, - { NULL, { NULL } } - }; - --- -2.31.1 - diff --git a/9999-change-bugtracker.diff b/9999-change-bugtracker.diff deleted file mode 100644 index 526d2c5..0000000 --- a/9999-change-bugtracker.diff +++ /dev/null @@ -1,23 +0,0 @@ -diff -aruN libdnf-0.63.0/docs/hawkey/conf.py libdnf-0.63.0-new/docs/hawkey/conf.py ---- libdnf-0.63.0/docs/hawkey/conf.py 2021-05-18 17:07:23.000000000 -0700 -+++ libdnf-0.63.0-new/docs/hawkey/conf.py 2022-03-29 11:03:39.000000000 -0700 -@@ -260,6 +260,6 @@ - rst_prolog = """ - .. default-domain:: py - .. _libsolv: https://github.com/openSUSE/libsolv --.. _bugzilla: https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=hawkey -+.. _bugzilla: https://bugs.rockylinux.org/ - - """ -diff -aruN libdnf-0.63.0/libdnf/conf/Const.hpp libdnf-0.63.0-new/libdnf/conf/Const.hpp ---- libdnf-0.63.0/libdnf/conf/Const.hpp 2021-05-18 17:07:23.000000000 -0700 -+++ libdnf-0.63.0-new/libdnf/conf/Const.hpp 2022-03-29 11:03:47.000000000 -0700 -@@ -41,7 +41,7 @@ - "installonlypkg(vm)", - "multiversion(kernel)"}; - --constexpr const char * BUGTRACKER="https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=dnf"; -+constexpr const char * BUGTRACKER="https://bugs.rockylinux.org/"; - - } - diff --git a/libdnf.spec b/libdnf.spec index 58c76c9..7764c31 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -1,4 +1,3 @@ -%define anolis_release .0.1 %global libsolv_version 0.7.20-3 %global libmodulemd_version 2.11.2-2 %global librepo_version 1.13.1 @@ -37,7 +36,7 @@ %bcond_without python2 %endif -%if 0%{?rhel} && ! 0%{?centos} && ! 0%{?anolis} +%if 0%{?rhel} && ! 0%{?centos} %bcond_without rhsm %else %bcond_with rhsm @@ -57,126 +56,124 @@ -DENABLE_RHSM_SUPPORT=%{?with_rhsm:ON}%{!?with_rhsm:OFF} \\\ %{nil} -Name: libdnf -Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version} -Release: 20%{anolis_release}%{?dist} -Summary: Library providing simplified C and Python API to libsolv -License: LGPLv2+ -URL: https://github.com/rpm-software-management/libdnf -Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz -Patch1: 0001-Revert-Improve-performance-for-module-query.patch -Patch2: 0002-Revert-Enhance-description-of-modular-solvables.patch -Patch3: 0003-Revert-Fix-typo-lates-latest.patch -Patch4: 0004-Revert-Remove-unused-code-bump-version.patch -Patch5: 0005-Revert-Report-a-new-type-of-the-module-resolve-error.patch -Patch6: 0006-Revert-Add-additional-fallback-for-module-resolve.patch -Patch7: 0007-Revert-Decide-how-to-handle-context-according-to-sta.patch -Patch8: 0008-Revert-Fix-load-update-FailSafe.patch -Patch9: 0009-Revert-Change-mechanism-of-module-conflicts.patch -Patch10: 0010-Revert-Call-addVersion2Modules-as-late-as-possible.patch -Patch11: 0011-Revert-Fix-modular-queries-with-the-new-solver.patch -Patch12: 0012-Revert-Add-compatible-layer-for-MdDocuments-v2.patch -Patch13: 0013-Revert-Add-an-alternative-constructor-for-ModulePack.patch -Patch14: 0014-Revert-Adjust-modular-solver-to-new-context-type.patch -Patch15: 0015-Revert-Change-usage-of-context-and-version-in-modula.patch -Patch16: 0016-Fix-failing-unittest-caused-by-the-revert-of-new-mod.patch -Patch17: 0017-Modify-unit-test-after-change-of-handling-advisories.patch -Patch18: 0018-Adjust-module-error-formatting-function-for-original.patch -Patch19: 0019-Remove-redundant-test.patch -Patch20: 0020-Fix-dnf_context_module_install-memory-leaks.patch -Patch21: 0021-covscan-remove-unused-vars-mark-private-func-static-return-values.patch -Patch22: 0022-hawkey-surrogateescape-error-handler-to-decode-UTF-8-strings-RhBug1893176.patch -Patch23: 0023-Turn-off-strict-validation-of-modulemd-documents-RhBug200485320071662007167.patch -Patch24: 0024-Add-unittest-for-setting-up-repo-with-empty-keyfile-RhBug1994614.patch -Patch25: 0025-Add-getLatestModules.patch -Patch26: 0026-context-Substitute-all-repository-config-options-RhB.patch -Patch27: 0027-Use-environment-variable-in-unittest-instead-of-ugly.patch -Patch28: 0028-Add-private-API-for-filling-reading-and-verifying-ne.patch -Patch29: 0029-Use-dnf-solv-userdata-to-check-versions-and-checksum.patch -Patch30: 0030-Update-unittest-to-test-the-new-private-dnf-solvfile.patch -Patch31: 0031-Increase-required-libsolv-version-for-cache-versioni.patch -Patch32: 0032-Add-more-specific-error-handling-for-loading-repomd-.patch -Patch33: 0033-libdnf-transaction-RPMItem-Fix-handling-transaction-.patch -Patch34: 0034-libdnf-transaction-TransactionItem-Set-short-action-.patch -Patch35: 0035-Do-not-print-errors-on-failovermethod-repo-option-Rh.patch -Patch36: 0036-sack-query.hpp-Add-a-missing-include.patch -Patch37: 0037-context-dnf_context_remove-accepts-package-spec-as-d.patch -Patch38: 0038-context-Fix-doc-dnf_context_install-remove-update-di.patch -Patch39: 0039-advisory-upgrade-filter-out-advPkgs-with-different-a.patch -Patch40: 0040-Add-obsoletes-to-filtering-for-advisory-candidates.patch -Patch41: 0041-Fix-listing-a-repository-without-cpeid-RhBug-2066334.patch -Patch42: 0042-Allow-change-of-arch-during-security-updates-with-no.patch -Patch43: 0043-Update-translations.patch -Patch44: 0044-Add_repoid_to_solver_error_messagase.patch -Patch45: 0045-conf-Support-proxy-_none_-in-main-config-RhBug-21557.patch -Patch46: 0046-Update-translations-RHEL-8.9.patch -Patch47: 0047-filterAdvisory-installed_solvables-sort-RhBug2212838.patch -Patch48: 0048-Avoid-reinstal-installonly-packages-marked-for-ERASE.patch -Patch49: 0049-PGP-Set-a-default-creation-SELinux-labels-on-GnuPG-d.patch -Patch50: 0050-repo-Don-t-try-to-perform-labeling-if-SELinux-is-dis.patch - - -Patch1000: 1000-anolis-fix-platform-compatibility.patch -Patch1001: 1001-arch-add-loongarch64-to-arch_map.patch -Patch1002: 1002-libdnf-add-sw.patch - -BuildRequires: cmake -BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: libsolv-devel >= %{libsolv_version} -BuildRequires: pkgconfig(librepo) >= %{librepo_version} -BuildRequires: pkgconfig(check) +Name: libdnf +Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version} +Release: 21%{?dist} +Summary: Library providing simplified C and Python API to libsolv +License: LGPLv2+ +URL: https://github.com/rpm-software-management/libdnf +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Patch1: 0001-Revert-Improve-performance-for-module-query.patch +Patch2: 0002-Revert-Enhance-description-of-modular-solvables.patch +Patch3: 0003-Revert-Fix-typo-lates-latest.patch +Patch4: 0004-Revert-Remove-unused-code-bump-version.patch +Patch5: 0005-Revert-Report-a-new-type-of-the-module-resolve-error.patch +Patch6: 0006-Revert-Add-additional-fallback-for-module-resolve.patch +Patch7: 0007-Revert-Decide-how-to-handle-context-according-to-sta.patch +Patch8: 0008-Revert-Fix-load-update-FailSafe.patch +Patch9: 0009-Revert-Change-mechanism-of-module-conflicts.patch +Patch10: 0010-Revert-Call-addVersion2Modules-as-late-as-possible.patch +Patch11: 0011-Revert-Fix-modular-queries-with-the-new-solver.patch +Patch12: 0012-Revert-Add-compatible-layer-for-MdDocuments-v2.patch +Patch13: 0013-Revert-Add-an-alternative-constructor-for-ModulePack.patch +Patch14: 0014-Revert-Adjust-modular-solver-to-new-context-type.patch +Patch15: 0015-Revert-Change-usage-of-context-and-version-in-modula.patch +Patch16: 0016-Fix-failing-unittest-caused-by-the-revert-of-new-mod.patch +Patch17: 0017-Modify-unit-test-after-change-of-handling-advisories.patch +Patch18: 0018-Adjust-module-error-formatting-function-for-original.patch +Patch19: 0019-Remove-redundant-test.patch +Patch20: 0020-Fix-dnf_context_module_install-memory-leaks.patch +Patch21: 0021-covscan-remove-unused-vars-mark-private-func-static-return-values.patch +Patch22: 0022-hawkey-surrogateescape-error-handler-to-decode-UTF-8-strings-RhBug1893176.patch +Patch23: 0023-Turn-off-strict-validation-of-modulemd-documents-RhBug200485320071662007167.patch +Patch24: 0024-Add-unittest-for-setting-up-repo-with-empty-keyfile-RhBug1994614.patch +Patch25: 0025-Add-getLatestModules.patch +Patch26: 0026-context-Substitute-all-repository-config-options-RhB.patch +Patch27: 0027-Use-environment-variable-in-unittest-instead-of-ugly.patch +Patch28: 0028-Add-private-API-for-filling-reading-and-verifying-ne.patch +Patch29: 0029-Use-dnf-solv-userdata-to-check-versions-and-checksum.patch +Patch30: 0030-Update-unittest-to-test-the-new-private-dnf-solvfile.patch +Patch31: 0031-Increase-required-libsolv-version-for-cache-versioni.patch +Patch32: 0032-Add-more-specific-error-handling-for-loading-repomd-.patch +Patch33: 0033-libdnf-transaction-RPMItem-Fix-handling-transaction-.patch +Patch34: 0034-libdnf-transaction-TransactionItem-Set-short-action-.patch +Patch35: 0035-Do-not-print-errors-on-failovermethod-repo-option-Rh.patch +Patch36: 0036-sack-query.hpp-Add-a-missing-include.patch +Patch37: 0037-context-dnf_context_remove-accepts-package-spec-as-d.patch +Patch38: 0038-context-Fix-doc-dnf_context_install-remove-update-di.patch +Patch39: 0039-advisory-upgrade-filter-out-advPkgs-with-different-a.patch +Patch40: 0040-Add-obsoletes-to-filtering-for-advisory-candidates.patch +Patch41: 0041-Fix-listing-a-repository-without-cpeid-RhBug-2066334.patch +Patch42: 0042-Allow-change-of-arch-during-security-updates-with-no.patch +Patch43: 0043-Update-translations.patch +Patch44: 0044-Add_repoid_to_solver_error_messagase.patch +Patch45: 0045-conf-Support-proxy-_none_-in-main-config-RhBug-21557.patch +Patch46: 0046-Update-translations-RHEL-8.9.patch +Patch47: 0047-filterAdvisory-installed_solvables-sort-RhBug2212838.patch +Patch48: 0048-Avoid-reinstal-installonly-packages-marked-for-ERASE.patch +Patch49: 0049-PGP-Set-a-default-creation-SELinux-labels-on-GnuPG-d.patch +Patch50: 0050-repo-Don-t-try-to-perform-labeling-if-SELinux-is-dis.patch +Patch51: 0051-MergedTransaction-Calculate-RPM-difference-between-t.patch +Patch52: 0052-MergedTransaction-Fix-invalid-memory-access-when-dro.patch + + +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: libsolv-devel >= %{libsolv_version} +BuildRequires: pkgconfig(librepo) >= %{librepo_version} +BuildRequires: pkgconfig(check) %if %{with valgrind} -BuildRequires: valgrind +BuildRequires: valgrind %endif -BuildRequires: pkgconfig(gio-unix-2.0) >= 2.46.0 -BuildRequires: pkgconfig(gtk-doc) -BuildRequires: rpm-devel >= 4.11.0 +BuildRequires: pkgconfig(gio-unix-2.0) >= 2.46.0 +BuildRequires: pkgconfig(gtk-doc) +BuildRequires: rpm-devel >= 4.11.0 %if %{with rhsm} -BuildRequires: pkgconfig(librhsm) >= 0.0.3 +BuildRequires: pkgconfig(librhsm) >= 0.0.3 %endif %if %{with zchunk} -BuildRequires: pkgconfig(zck) >= 0.9.11 +BuildRequires: pkgconfig(zck) >= 0.9.11 %endif -BuildRequires: pkgconfig(sqlite3) -BuildRequires: pkgconfig(json-c) -BuildRequires: pkgconfig(cppunit) -BuildRequires: pkgconfig(libcrypto) +BuildRequires: pkgconfig(sqlite3) +BuildRequires: pkgconfig(json-c) +BuildRequires: pkgconfig(cppunit) +BuildRequires: pkgconfig(libcrypto) %if %{with selinux} -BuildRequires: pkgconfig(libselinux) +BuildRequires: pkgconfig(libselinux) %endif -BuildRequires: pkgconfig(modulemd-2.0) >= %{libmodulemd_version} -BuildRequires: pkgconfig(smartcols) -BuildRequires: gettext -BuildRequires: gpgme-devel +BuildRequires: pkgconfig(modulemd-2.0) >= %{libmodulemd_version} +BuildRequires: pkgconfig(smartcols) +BuildRequires: gettext +BuildRequires: gpgme-devel %if %{with sanitizers} -BuildRequires: libasan -BuildRequires: liblsan -BuildRequires: libubsan +BuildRequires: libasan +BuildRequires: liblsan +BuildRequires: libubsan %endif -Requires: libmodulemd%{?_isa} >= %{libmodulemd_version} -Requires: libsolv%{?_isa} >= %{libsolv_version} -Requires: librepo%{?_isa} >= %{librepo_version} +Requires: libmodulemd%{?_isa} >= %{libmodulemd_version} +Requires: libsolv%{?_isa} >= %{libsolv_version} +Requires: librepo%{?_isa} >= %{librepo_version} %if %{without python2} # Obsoleted from here so we can track the fast growing version easily. # We intentionally only obsolete and not provide, this is a broken upgrade # prevention, not providing the removed functionality. -Obsoletes: python2-%{name} < %{version}-%{release} -Obsoletes: python2-hawkey < %{version}-%{release} -Obsoletes: python2-hawkey-debuginfo < %{version}-%{release} -Obsoletes: python2-libdnf-debuginfo < %{version}-%{release} +Obsoletes: python2-%{name} < %{version}-%{release} +Obsoletes: python2-hawkey < %{version}-%{release} +Obsoletes: python2-hawkey-debuginfo < %{version}-%{release} +Obsoletes: python2-libdnf-debuginfo < %{version}-%{release} %endif %description A Library providing simplified C and Python API to libsolv. %package devel -Summary: Development files for %{name} -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: libsolv-devel%{?_isa} >= %{libsolv_version} +Summary: Development files for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: libsolv-devel%{?_isa} >= %{libsolv_version} %description devel Development files for %{name}. @@ -184,16 +181,16 @@ Development files for %{name}. %if %{with python2} %package -n python2-%{name} %{?python_provide:%python_provide python2-%{name}} -Summary: Python 2 bindings for the libdnf library. -Requires: %{name}%{?_isa} = %{version}-%{release} -BuildRequires: python2-devel +Summary: Python 2 bindings for the libdnf library. +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: python2-devel %if !0%{?mageia} -BuildRequires: %{requires_python2_sphinx} +BuildRequires: %{requires_python2_sphinx} %endif %if 0%{?rhel} == 7 -BuildRequires: swig3 >= %{swig_version} +BuildRequires: swig3 >= %{swig_version} %else -BuildRequires: swig >= %{swig_version} +BuildRequires: swig >= %{swig_version} %endif %description -n python2-%{name} @@ -204,11 +201,11 @@ Python 2 bindings for the libdnf library. %if %{with python3} %package -n python3-%{name} %{?python_provide:%python_provide python3-%{name}} -Summary: Python 3 bindings for the libdnf library. -Requires: %{name}%{?_isa} = %{version}-%{release} -BuildRequires: python3-devel -BuildRequires: %{requires_python3_sphinx} -BuildRequires: swig >= %{swig_version} +Summary: Python 3 bindings for the libdnf library. +Requires: %{name}%{?_isa} = %{version}-%{release} +BuildRequires: python3-devel +BuildRequires: %{requires_python3_sphinx} +BuildRequires: swig >= %{swig_version} %description -n python3-%{name} Python 3 bindings for the libdnf library. @@ -216,15 +213,15 @@ Python 3 bindings for the libdnf library. %if %{with python2} %package -n python2-hawkey -Summary: Python 2 bindings for the hawkey library +Summary: Python 2 bindings for the hawkey library %{?python_provide:%python_provide python2-hawkey} -BuildRequires: python2-devel -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: python2-%{name} = %{version}-%{release} +BuildRequires: python2-devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python2-%{name} = %{version}-%{release} # Fix problem with hawkey - dnf version incompatibility # Can be deleted for distros where only python2-dnf >= 2.0.0 -Conflicts: python2-dnf < %{dnf_conflict} -Conflicts: python-dnf < %{dnf_conflict} +Conflicts: python2-dnf < %{dnf_conflict} +Conflicts: python-dnf < %{dnf_conflict} %description -n python2-hawkey Python 2 bindings for the hawkey library. @@ -233,16 +230,16 @@ Python 2 bindings for the hawkey library. %if %{with python3} %package -n python3-hawkey -Summary: Python 3 bindings for the hawkey library +Summary: Python 3 bindings for the hawkey library %{?python_provide:%python_provide python3-hawkey} -BuildRequires: python3-devel -Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: python3-%{name} = %{version}-%{release} +BuildRequires: python3-devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: python3-%{name} = %{version}-%{release} # Fix problem with hawkey - dnf version incompatibility # Can be deleted for distros where only python3-dnf >= 2.0.0 -Conflicts: python3-dnf < %{dnf_conflict} +Conflicts: python3-dnf < %{dnf_conflict} # Obsoletes F27 packages -Obsoletes: platform-python-hawkey < %{version}-%{release} +Obsoletes: platform-python-hawkey < %{version}-%{release} %description -n python3-hawkey Python 3 bindings for the hawkey library. @@ -368,11 +365,9 @@ popd %endif %changelog -* Mon Aug 19 2024 Liu Xiaoping - 0.63.0-20.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) -- cherry-pick `add sw arch #9c8c414fae68cb1faed14be823ab34eb6ff00028`. (nijie@wxiat.com) +* Fri Dec 06 2024 Petr Pisar - 0.63.0-21 +- Fix calculating a difference between two same-version RPM transactions + (RHEL-68770) * Mon Jun 24 2024 Petr Pisar - 0.63.0-20 - Do not set a default SELinux creation context if SELinux appears to be -- Gitee From 27e3e496a0c33d0eb170a8000d5ad8ae43729ff4 Mon Sep 17 00:00:00 2001 From: songmingliang Date: Tue, 17 May 2022 19:16:16 +0800 Subject: [PATCH 2/5] Disable rhsm support in Anolis --- libdnf.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libdnf.spec b/libdnf.spec index 7764c31..0b8db37 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -1,3 +1,4 @@ +%define anolis_release .0.1 %global libsolv_version 0.7.20-3 %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 @@ -58,7 +59,7 @@ Name: libdnf Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version} -Release: 21%{?dist} +Release: 21%{anolis_release}%{?dist} Summary: Library providing simplified C and Python API to libsolv License: LGPLv2+ URL: https://github.com/rpm-software-management/libdnf @@ -365,6 +366,9 @@ popd %endif %changelog +* Thu Feb 06 2025 Liu Xiaoping - 0.63.0-21.0.1 +- Disable rhsm support in Anolis (geliwei@openanolis.org) + * Fri Dec 06 2024 Petr Pisar - 0.63.0-21 - Fix calculating a difference between two same-version RPM transactions (RHEL-68770) -- Gitee From 366fa493748a2b16762fc2a7ff4d316d46df3689 Mon Sep 17 00:00:00 2001 From: songmingliang Date: Wed, 18 May 2022 14:02:51 +0800 Subject: [PATCH 3/5] module: fix platform compatibility with centos --- 1000-anolis-fix-platform-compatibility.patch | 20 ++++++++++++++++++++ libdnf.spec | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 1000-anolis-fix-platform-compatibility.patch diff --git a/1000-anolis-fix-platform-compatibility.patch b/1000-anolis-fix-platform-compatibility.patch new file mode 100644 index 0000000..b470693 --- /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/libdnf.spec b/libdnf.spec index 0b8db37..9341521 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -117,7 +117,7 @@ Patch50: 0050-repo-Don-t-try-to-perform-labeling-if-SELinux-is-dis.patch Patch51: 0051-MergedTransaction-Calculate-RPM-difference-between-t.patch Patch52: 0052-MergedTransaction-Fix-invalid-memory-access-when-dro.patch - +Patch1000: 1000-anolis-fix-platform-compatibility.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ @@ -368,6 +368,7 @@ popd %changelog * Thu Feb 06 2025 Liu Xiaoping - 0.63.0-21.0.1 - Disable rhsm support in Anolis (geliwei@openanolis.org) +- rebrand: fix platform compatibility (geliwei@openanolis.org) * Fri Dec 06 2024 Petr Pisar - 0.63.0-21 - Fix calculating a difference between two same-version RPM transactions -- Gitee From dc0e2cafea1693d2d1c54ecec96750dc15ecae91 Mon Sep 17 00:00:00 2001 From: Liwei Ge Date: Wed, 14 Sep 2022 15:15:37 +0800 Subject: [PATCH 4/5] arch: add loongarch64 to arch_map Signed-off-by: Liwei Ge --- 1001-arch-add-loongarch64-to-arch_map.patch | 24 +++++++++++++++++++++ libdnf.spec | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 1001-arch-add-loongarch64-to-arch_map.patch 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 0000000..be4e9b1 --- /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 9341521..92a9187 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -118,6 +118,7 @@ Patch51: 0051-MergedTransaction-Calculate-RPM-difference-between-t.patch Patch52: 0052-MergedTransaction-Fix-invalid-memory-access-when-dro.patch Patch1000: 1000-anolis-fix-platform-compatibility.patch +Patch1001: 1001-arch-add-loongarch64-to-arch_map.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ @@ -369,6 +370,7 @@ popd * Thu Feb 06 2025 Liu Xiaoping - 0.63.0-21.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) * Fri Dec 06 2024 Petr Pisar - 0.63.0-21 - Fix calculating a difference between two same-version RPM transactions -- Gitee From 6c26c14c5ef0f9866a6e5066d96e3ae1ce488745 Mon Sep 17 00:00:00 2001 From: wxiat Date: Tue, 8 Aug 2023 11:04:01 +0800 Subject: [PATCH 5/5] cherry-pick `add sw arch #9c8c414fae68cb1faed14be823ab34eb6ff00028`. Signed-off-by: wxiat Signed-off-by: Weisson --- 1002-libdnf-add-sw.patch | 25 +++++++++++++++++++++++++ libdnf.spec | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 1002-libdnf-add-sw.patch diff --git a/1002-libdnf-add-sw.patch b/1002-libdnf-add-sw.patch new file mode 100644 index 0000000..683fc36 --- /dev/null +++ b/1002-libdnf-add-sw.patch @@ -0,0 +1,25 @@ +From fc613dbf0418e13abb24c5f29ecef68e0c13ed71 Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Tue, 8 Aug 2023 10:58:35 +0800 +Subject: [PATCH] add sw + +Signed-off-by: rpm-build +--- + libdnf/dnf-context.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libdnf/dnf-context.cpp b/libdnf/dnf-context.cpp +index e663949..750b97f 100644 +--- a/libdnf/dnf-context.cpp ++++ b/libdnf/dnf-context.cpp +@@ -119,6 +119,7 @@ static const struct { + "sparcv9", "sparcv9v", NULL } }, + { "x86_64", { "x86_64", "amd64", "ia32e", NULL } }, + { "loongarch64",{ "loongarch64", NULL } }, ++ { "sw_64", { "sw_64", NULL } }, + { NULL, { NULL } } + }; + +-- +2.31.1 + diff --git a/libdnf.spec b/libdnf.spec index 92a9187..5a1672c 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -119,6 +119,7 @@ Patch52: 0052-MergedTransaction-Fix-invalid-memory-access-when-dro.patch Patch1000: 1000-anolis-fix-platform-compatibility.patch Patch1001: 1001-arch-add-loongarch64-to-arch_map.patch +Patch1002: 1002-libdnf-add-sw.patch BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ @@ -371,6 +372,7 @@ popd - 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) +- cherry-pick `add sw arch #9c8c414fae68cb1faed14be823ab34eb6ff00028`. (nijie@wxiat.com) * Fri Dec 06 2024 Petr Pisar - 0.63.0-21 - Fix calculating a difference between two same-version RPM transactions -- Gitee