public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/dnf5] f44: spec: Mark all /etc configuration files as noreplacible
Date: Fri, 04 Sep 2026 12:33:21 GMT	[thread overview]
Message-ID: <178852520139.1.15391573545501228900.rpms-dnf5-fff1c57b7fc5@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/dnf5
Branch : f44
Commit : fff1c57b7fc500ce9da0c87465f472d9cecd460b
Author : Petr Písař <ppisar@redhat.com>
Date   : 2026-09-04T14:33:09+02:00
Stats  : +94/-7 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/dnf5/c/fff1c57b7fc500ce9da0c87465f472d9cecd460b?branch=f44

Log:
spec: Mark all /etc configuration files as noreplacible

---
diff --git a/0003-spec-Mark-all-etc-configuration-files-as-noreplacibl.patch b/0003-spec-Mark-all-etc-configuration-files-as-noreplacibl.patch
new file mode 100644
index 0000000..c65f09c
--- /dev/null
+++ b/0003-spec-Mark-all-etc-configuration-files-as-noreplacibl.patch
@@ -0,0 +1,85 @@
+From 6e4848b7f9434d0238b4da8d1afe506a16645264 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Mon, 31 Aug 2026 13:18:25 +0200
+Subject: [PATCH] spec: Mark all /etc configuration files as noreplacible
+
+Configuration files in /etc can be modified by a local superuser and
+the modifications should survive updating the dnf5 RPM package.
+
+Therefore this fix adds "noreplace" attribute to the packages
+configuration files. The attribute causes preserving the old content
+and adding a new content into *.rpmnew file.
+---
+ dnf5.spec | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/dnf5.spec b/dnf5.spec
+index 4e7904c05..580cbaa48 100644
+--- a/dnf5.spec
++++ b/dnf5.spec
+@@ -727,7 +727,7 @@ Libdnf5 plugin that allows to run actions (external executables) on hooks.
+ 
+ %files -n libdnf5-plugin-actions -f libdnf5-plugin-actions.lang
+ %{_libdir}/libdnf5/plugins/actions.*
+-%config %{_sysconfdir}/dnf/libdnf5-plugins/actions.conf
++%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/actions.conf
+ %dir %{_sysconfdir}/dnf/libdnf5-plugins/actions.d
+ %if %{with man}
+ %{_mandir}/man8/libdnf5-actions.8.*
+@@ -749,7 +749,7 @@ Libdnf5 plugin that installs repository's AppStream data, for repositories which
+ 
+ %files -n libdnf5-plugin-appstream
+ %{_libdir}/libdnf5/plugins/appstream.so
+-%config %{_sysconfdir}/dnf/libdnf5-plugins/appstream.conf
++%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/appstream.conf
+ 
+ %endif
+ 
+@@ -770,7 +770,7 @@ Libdnf5 plugin for detecting and removing expired PGP keys.
+ 
+ %files -n libdnf5-plugin-expired-pgp-keys -f libdnf5-plugin-expired-pgp-keys.lang
+ %{_libdir}/libdnf5/plugins/expired-pgp-keys.*
+-%config %{_sysconfdir}/dnf/libdnf5-plugins/expired-pgp-keys.conf
++%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/expired-pgp-keys.conf
+ %if %{with man}
+ %{_mandir}/man8/libdnf5-expired-pgp-keys.8.*
+ %endif
+@@ -792,7 +792,7 @@ to the subscription levels.
+ 
+ %files -n libdnf5-plugin-rhsm -f libdnf5-plugin-rhsm.lang
+ %{_libdir}/libdnf5/plugins/rhsm.*
+-%config %{_sysconfdir}/dnf/libdnf5-plugins/rhsm.conf
++%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/rhsm.conf
+ %endif
+ 
+ 
+@@ -810,7 +810,7 @@ Libdnf5 plugin that allows loading Python plugins.
+ 
+ %files -n python3-libdnf5-python-plugins-loader
+ %{_libdir}/libdnf5/plugins/python_plugins_loader.*
+-%config %{_sysconfdir}/dnf/libdnf5-plugins/python_plugins_loader.conf
++%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/python_plugins_loader.conf
+ %dir %{_sysconfdir}/dnf/libdnf5-plugins/python_plugins_loader.d
+ %dir %{python3_sitelib}/libdnf_plugins/
+ %doc %{python3_sitelib}/libdnf_plugins/README
+@@ -830,7 +830,7 @@ Libdnf5 plugin that automatically copies all downloaded packages to a repository
+ 
+ %files -n libdnf5-plugin-local
+ %{_libdir}/libdnf5/plugins/local.*
+-%config %{_sysconfdir}/dnf/libdnf5-plugins/local.conf
++%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/local.conf
+ %if %{with man}
+ %{_mandir}/man8/libdnf5-local.8.*
+ %endif
+@@ -852,7 +852,7 @@ installed, removed, or updated.
+ 
+ %files -n libdnf5-plugin-systemd-inhibit
+ %{_libdir}/libdnf5/plugins/systemd-inhibit.*
+-%config %{_sysconfdir}/dnf/libdnf5-plugins/00-systemd-inhibit.conf
++%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/00-systemd-inhibit.conf
+ %endif
+ 
+ 
+-- 
+2.55.0
+

diff --git a/dnf5.spec b/dnf5.spec
index 9128be1..8a6443f 100644
--- a/dnf5.spec
+++ b/dnf5.spec
@@ -84,6 +84,7 @@ URL:            https://github.com/rpm-software-management/dnf5
 Source0:        %{url}/archive/%{version}/dnf5-%{version}.tar.gz
 Patch1:         0001-spec-Fix-bcond-ordering-so-plugin_systemd_inhibit-is.patch
 Patch2:         0002-libdnf5-Fix-dangling-reference-bug-in-is_vendor_chan.patch
+Patch3:         0003-spec-Mark-all-etc-configuration-files-as-noreplacibl.patch
 
 Requires:       libdnf5%{?_isa} = %{version}-%{release}
 Requires:       libdnf5-cli%{?_isa} = %{version}-%{release}
@@ -730,7 +731,7 @@ Libdnf5 plugin that allows to run actions (external executables) on hooks.
 
 %files -n libdnf5-plugin-actions -f libdnf5-plugin-actions.lang
 %{_libdir}/libdnf5/plugins/actions.*
-%config %{_sysconfdir}/dnf/libdnf5-plugins/actions.conf
+%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/actions.conf
 %dir %{_sysconfdir}/dnf/libdnf5-plugins/actions.d
 %if %{with man}
 %{_mandir}/man8/libdnf5-actions.8.*
@@ -752,7 +753,7 @@ Libdnf5 plugin that installs repository's AppStream data, for repositories which
 
 %files -n libdnf5-plugin-appstream
 %{_libdir}/libdnf5/plugins/appstream.so
-%config %{_sysconfdir}/dnf/libdnf5-plugins/appstream.conf
+%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/appstream.conf
 
 %endif
 
@@ -773,7 +774,7 @@ Libdnf5 plugin for detecting and removing expired PGP keys.
 
 %files -n libdnf5-plugin-expired-pgp-keys -f libdnf5-plugin-expired-pgp-keys.lang
 %{_libdir}/libdnf5/plugins/expired-pgp-keys.*
-%config %{_sysconfdir}/dnf/libdnf5-plugins/expired-pgp-keys.conf
+%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/expired-pgp-keys.conf
 %if %{with man}
 %{_mandir}/man8/libdnf5-expired-pgp-keys.8.*
 %endif
@@ -795,7 +796,7 @@ to the subscription levels.
 
 %files -n libdnf5-plugin-rhsm -f libdnf5-plugin-rhsm.lang
 %{_libdir}/libdnf5/plugins/rhsm.*
-%config %{_sysconfdir}/dnf/libdnf5-plugins/rhsm.conf
+%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/rhsm.conf
 %endif
 
 
@@ -813,7 +814,7 @@ Libdnf5 plugin that allows loading Python plugins.
 
 %files -n python3-libdnf5-python-plugins-loader
 %{_libdir}/libdnf5/plugins/python_plugins_loader.*
-%config %{_sysconfdir}/dnf/libdnf5-plugins/python_plugins_loader.conf
+%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/python_plugins_loader.conf
 %dir %{_sysconfdir}/dnf/libdnf5-plugins/python_plugins_loader.d
 %dir %{python3_sitelib}/libdnf_plugins/
 %doc %{python3_sitelib}/libdnf_plugins/README
@@ -833,7 +834,7 @@ Libdnf5 plugin that automatically copies all downloaded packages to a repository
 
 %files -n libdnf5-plugin-local
 %{_libdir}/libdnf5/plugins/local.*
-%config %{_sysconfdir}/dnf/libdnf5-plugins/local.conf
+%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/local.conf
 %if %{with man}
 %{_mandir}/man8/libdnf5-local.8.*
 %endif
@@ -855,7 +856,7 @@ installed, removed, or updated.
 
 %files -n libdnf5-plugin-systemd-inhibit
 %{_libdir}/libdnf5/plugins/systemd-inhibit.*
-%config %{_sysconfdir}/dnf/libdnf5-plugins/00-systemd-inhibit.conf
+%config(noreplace) %{_sysconfdir}/dnf/libdnf5-plugins/00-systemd-inhibit.conf
 %endif
 
 
@@ -1209,6 +1210,7 @@ mkdir -p %{buildroot}%{_libdir}/libdnf5/plugins
 - Correct libdnf5-cli license to "GPL-2.0-or-later AND LGPL-2.1-or-later"
 - spec: Fix bcond ordering so plugin_systemd_inhibit is enabled
 - libdnf5: Fix dangling reference bug in is_vendor_change_allowed
+- spec: Mark all /etc configuration files as noreplacible
 
 * Wed Aug 19 2026 Petr Pisar <ppisar@redhat.com> - 5.4.3.0-2
 - Restore ABI (upstream GH#2869)

                 reply	other threads:[~2026-09-04 12:33 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=178852520139.1.15391573545501228900.rpms-dnf5-fff1c57b7fc5@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