From e73ebd46772cd13944c802a32c9980e8a0570053 Mon Sep 17 00:00:00 2001 From: banjiuqingshan Date: Tue, 16 Sep 2025 10:16:20 +0800 Subject: [PATCH] Revert "Unprotect dnf and yum, protect python3-dnf --- ...tect-dnf-and-yum-protect-python3-dnf.patch | 54 +++++++++++++++++++ dnf.spec | 11 ++-- 2 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 backport-Revert-Unprotect-dnf-and-yum-protect-python3-dnf.patch diff --git a/backport-Revert-Unprotect-dnf-and-yum-protect-python3-dnf.patch b/backport-Revert-Unprotect-dnf-and-yum-protect-python3-dnf.patch new file mode 100644 index 0000000..198449f --- /dev/null +++ b/backport-Revert-Unprotect-dnf-and-yum-protect-python3-dnf.patch @@ -0,0 +1,54 @@ +From 0f15b2d04ed895fa1a5763c722b1d318b20b9ff0 Mon Sep 17 00:00:00 2001 +From: Nicola Sella +Date: Mon, 28 Aug 2023 13:07:18 +0200 +Subject: [PATCH] Revert "Unprotect dnf and yum, protect python3-dnf" + +This reverts commit 352b174a0b4ce2048ef1a25b785f20449e2addc2. +adding the condition %{witout dnf5_obsoletes_dnf} to keep the +unprotected directive for chroots that build dnf with rpm +option with=dnf5_obsoletes_dnf +--- + etc/dnf/protected.d/CMakeLists.txt | 2 +- + etc/dnf/protected.d/dnf.conf | 4 +--- + etc/dnf/protected.d/python3-dnf.conf | 1 - + etc/dnf/protected.d/yum.conf | 5 +---- + 4 files changed, 3 insertions(+), 9 deletions(-) + delete mode 100644 etc/dnf/protected.d/python3-dnf.conf + +Conflict:NA +Reference:https://github.com/rpm-software-management/dnf/commit/0f15b2d04ed895fa1a5763c722b1d318b20b9ff0 +diff --git a/etc/dnf/protected.d/CMakeLists.txt b/etc/dnf/protected.d/CMakeLists.txt +index d58d805f..d368f146 100644 +--- a/etc/dnf/protected.d/CMakeLists.txt ++++ b/etc/dnf/protected.d/CMakeLists.txt +@@ -1 +1 @@ +-INSTALL (FILES "dnf.conf" "yum.conf" "python3-dnf.conf" DESTINATION ${SYSCONFDIR}/dnf/protected.d) ++INSTALL (FILES "dnf.conf" "yum.conf" DESTINATION ${SYSCONFDIR}/dnf/protected.d) +diff --git a/etc/dnf/protected.d/dnf.conf b/etc/dnf/protected.d/dnf.conf +index c2b5885c..6148f6c9 100644 +--- a/etc/dnf/protected.d/dnf.conf ++++ b/etc/dnf/protected.d/dnf.conf +@@ -1,3 +1 @@ +-# DNF is obsoleted in Fedora 39 by DNF 5 and should no longer be marked as protected. +- +-# dnf ++dnf +diff --git a/etc/dnf/protected.d/python3-dnf.conf b/etc/dnf/protected.d/python3-dnf.conf +deleted file mode 100644 +index f3cce4b0..00000000 +--- a/etc/dnf/protected.d/python3-dnf.conf ++++ /dev/null +@@ -1 +0,0 @@ +-python3-dnf +diff --git a/etc/dnf/protected.d/yum.conf b/etc/dnf/protected.d/yum.conf +index 4f1d0b5a..f42afee9 100644 +--- a/etc/dnf/protected.d/yum.conf ++++ b/etc/dnf/protected.d/yum.conf +@@ -1,4 +1 @@ +-# In Fedora 39, yum is obsoleted/provided by the dnf5 package rather than dnf, +-# and DNF cannot replace itself with DNF5 if yum is marked as protected. +- +-# yum ++yum +-- +2.33.0 \ No newline at end of file diff --git a/dnf.spec b/dnf.spec index 6a9f774..0962324 100644 --- a/dnf.spec +++ b/dnf.spec @@ -4,7 +4,7 @@ Name: dnf Version: 4.16.2 -Release: 10 +Release: 11 Summary: A software package manager that manages packages on Linux distributions. License: GPL-2.0-or-later AND GPL-1.0-only URL: https://github.com/rpm-software-management/dnf @@ -20,6 +20,7 @@ Patch6006: backport-Limit-queries-to-nevra-forms-when-provided-by-com Patch6007: backport-doc-Remove-provide-of-spec-definition-for-repoquery-command.patch Patch6008: backport-Update-the-man-page-entry-for-the-countme-option.patch Patch6009: backport-Allow-local-downloads-to-same-downloaddir.patch +Patch6010: backport-Revert-Unprotect-dnf-and-yum-protect-python3-dnf.patch Patch9001: bugfix-automatic-Use-add_security_filters-not-_update_secur.patch Patch9002: add-rpm-transaction-debuginfo.patch @@ -186,7 +187,7 @@ export TERM=linux %{_sysconfdir}/yum.conf %{_sysconfdir}/yum/pluginconf.d %{_sysconfdir}/yum/protected.d -%config %{_sysconfdir}/%{name}/protected.d/yum.conf +%config(noreplace) %{_sysconfdir}/%{name}/protected.d/yum.conf %files -n python3-%{name} %{_bindir}/%{name}-3 @@ -208,8 +209,7 @@ export TERM=linux %dir %{_sysconfdir}/%{name}/aliases.d %exclude %{_sysconfdir}/%{name}/aliases.d/zypper.conf %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf -%config %{_sysconfdir}/%{name}/protected.d/%{name}.conf -%config(noreplace) %{_sysconfdir}/%{name}/protected.d/python3-%{name}.conf +%config(noreplace) %{_sysconfdir}/%{name}/protected.d/%{name}.conf %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %ghost %attr(644,-,-) %{_localstatedir}/log/hawkey.log %ghost %attr(644,-,-) %{_localstatedir}/log/%{name}.log @@ -251,6 +251,9 @@ export TERM=linux %{_mandir}/man8/%{name}-automatic.8* %changelog +* Tue Sep 16 2025 hanhuihui - 4.16.2-11 +- DESC:Revert "Unprotect dnf and yum, protect python3-dnf" + * Fri Mar 14 2025 Funda Wang - 4.16.2-10 - fix build with cmake 4.0 - make all patches included -- Gitee