public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/setup] update_services: Move yum/dnf protection removal config file under /usr
Date: Mon, 22 Jun 2026 15:56:23 GMT [thread overview]
Message-ID: <178214378390.1.14163109798507156453.rpms-setup-d96f3846c1a4@fedoraproject.org> (raw)
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
reply other threads:[~2026-06-22 15:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178214378390.1.14163109798507156453.rpms-setup-d96f3846c1a4@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox