public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/setup] update_services: Move yum/dnf protection removal config file under /usr
@ 2026-06-22 15:56
0 siblings, 0 replies; only message in thread
From: @ 2026-06-22 15:56 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/setup
Branch : update_services
Commit : d96f3846c1a4e9e9d1a85d528da7fc7285797aa2
Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date : 2024-09-24T16:39:03+02:00
Stats : +11/-2 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/setup/c/d96f3846c1a4e9e9d1a85d528da7fc7285797aa2?branch=update_services
Log:
Move yum/dnf protection removal config file under /usr
https://github.com/uapi-group/specifications/issues/76
Actually, add a new file under /usr, but keep the old file in /etc
because it's still needed for dnf. The new file in the new location
is useful because it means that we get the correct behaviour even when
/etc is emptied (on systems with new dnf version).
dnf5 reads the new location:
https://github.com/rpm-software-management/dnf5/issues/1107
https://github.com/rpm-software-management/dnf5/pull/1110
---
diff --git a/setup.spec b/setup.spec
index 264129e..dd2fd9a 100644
--- a/setup.spec
+++ b/setup.spec
@@ -100,9 +100,15 @@ echo "f /run/motd 0644 root root -" >%{buildroot}%{_tmpfilesdir}/%{name}.conf
echo "d /run/motd.d 0755 root root -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf
chmod 0644 %{buildroot}%{_tmpfilesdir}/%{name}.conf
-# make setup a protected package
-install -p -d -m 755 %{buildroot}/etc/dnf/protected.d/
+# Install yum protection config. Old location in /etc.
+mkdir -p %{buildroot}/etc/dnf/protected.d/
echo "setup" >%{buildroot}/etc/dnf/protected.d/setup.conf
+# Install dnf5 protection config. New location under /usr.
+mkdir -p %{buildroot}/usr/share/dnf5/libdnf.conf.d/
+cat >%{buildroot}/usr/share/dnf5/libdnf.conf.d/protect-setup.conf <<EOF
+[main]
+protected_packages = setup
+EOF
#throw away useless and dangerous update stuff until rpm will be able to
#handle it ( http://rpm.org/ticket/6 )
@@ -161,6 +167,9 @@ end
%{_sysusersdir}/20-setup-groups.conf
%{_sysusersdir}/20-setup-users.conf
/etc/dnf/protected.d/%{name}.conf
+%dir /usr/share/dnf5
+%dir /usr/share/dnf5/libdnf.conf.d
+/usr/share/dnf5/libdnf.conf.d/protect-setup.conf
%changelog
%autochangelog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-22 15:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-22 15:56 [rpms/setup] update_services: Move yum/dnf protection removal config file under /usr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox