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 0000000000000000000000000000000000000000..1d003062551981934b150b48423956bb8b347201 --- /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 0000000000000000000000000000000000000000..30b639701841378011c8f7b26237469f91e2a958 --- /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/9999-change-bugtracker.diff b/9999-change-bugtracker.diff deleted file mode 100644 index 526d2c51469a93bbcab394fc22de8a1eee8fa764..0000000000000000000000000000000000000000 --- 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 58c76c9315105c22cf2a0c4bcb6c367fa0ad0fde..5a1672c4a2f9d6469fee26d66952acd1aadccb4d 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -57,126 +57,126 @@ -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 - +Name: libdnf +Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version} +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 +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 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) +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) %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 +184,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 +204,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 +216,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 +233,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,12 +368,16 @@ popd %endif %changelog -* Mon Aug 19 2024 Liu Xiaoping - 0.63.0-20.0.1 +* 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) - 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 disabled (RHEL-43231)