Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Unprotect dnf and yum, protect python3-dnf" #1983

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions dnf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,10 @@ popd
%dir %{confdir}/aliases.d
%exclude %{confdir}/aliases.d/zypper.conf
%if %{without dnf5_obsoletes_dnf}
# If DNF5 does not obsolete DNF ownership of dnf.conf should be DNF's
%config(noreplace) %{confdir}/%{name}.conf
%endif

# No longer using `noreplace` here. Older versions of DNF 4 marked `dnf` as a
# protected package, but since Fedora 39, DNF needs to be able to update itself
# to DNF 5, so we need to replace the old /etc/dnf/protected.d/dnf.conf.
%config %{confdir}/protected.d/%{name}.conf
# Protect python3-dnf instead, which does not conflict with DNF 5
%config(noreplace) %{confdir}/protected.d/python3-%{name}.conf
%config(noreplace) %{confdir}/protected.d/%{name}.conf
evan-goode marked this conversation as resolved.
Show resolved Hide resolved
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%ghost %attr(644,-,-) %{_localstatedir}/log/hawkey.log
%ghost %attr(644,-,-) %{_localstatedir}/log/%{name}.log
Expand All @@ -333,10 +328,16 @@ popd
%{_mandir}/man5/yum.conf.5.*
%{_mandir}/man8/yum-shell.8*
%{_mandir}/man1/yum-aliases.1*
%if %{without dnf5_obsoletes_dnf}
# If DNF5 does not obsolete DNF, protected.d/yum.conf should be owned by DNF
%config(noreplace) %{confdir}/protected.d/yum.conf
%else
# If DNF5 obsoletes DNF
# No longer using `noreplace` here. Older versions of DNF 4 marked `yum` as a
# protected package, but since Fedora 39, DNF needs to be able to update itself
# to DNF 5, so we need to replace the old /etc/dnf/protected.d/yum.conf.
%config %{confdir}/protected.d/yum.conf
%endif
%else
%exclude %{_sysconfdir}/yum.conf
%exclude %{_sysconfdir}/yum/pluginconf.d
Expand Down
2 changes: 1 addition & 1 deletion etc/dnf/protected.d/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
4 changes: 1 addition & 3 deletions etc/dnf/protected.d/dnf.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# DNF is obsoleted in Fedora 39 by DNF 5 and should no longer be marked as protected.

# dnf
dnf
1 change: 0 additions & 1 deletion etc/dnf/protected.d/python3-dnf.conf

This file was deleted.

5 changes: 1 addition & 4 deletions etc/dnf/protected.d/yum.conf
Original file line number Diff line number Diff line change
@@ -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
Loading