add %config(noreplace) to avoid clean up databases on upgrades and to be

compliant with silverblue
epel9
Sérgio M. Basto 3 years ago
parent 6665ba72d3
commit e1905ec1e8

@ -3,7 +3,7 @@
Name: dpkg
Version: 1.20.9
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Package maintenance system for Debian Linux
# The entire source code is GPLv2+ with exception of the following
# lib/dpkg/md5.c, lib/dpkg/md5.h - Public domain
@ -224,7 +224,7 @@ install -pm0644 debian/dpkg.logrotate %{buildroot}/%{_sysconfdir}/logrotate.d/%{
# from dpkg.postinst
# Create the database files if they don't already exist
create_database() {
admindir=${DPKG_ADMINDIR:-%{buildroot}/var/lib/dpkg}
admindir=${DPKG_ADMINDIR:-%{buildroot}%{_localstatedir}/lib/dpkg}
for file in diversions statoverride status; do
if [ ! -f "$admindir/$file" ]; then
@ -235,8 +235,8 @@ create_database() {
# Create log file and set default permissions if possible
create_logfile() {
logfile=%{buildroot}/var/log/dpkg.log
mkdir -p %{buildroot}/var/log/
logfile=%{buildroot}%{_localstatedir}/log/dpkg.log
mkdir -p %{buildroot}%{_localstatedir}/log/
touch $logfile
chmod 644 $logfile
#chown root:root $logfile 2>/dev/null || chown 0:0 $logfile
@ -327,8 +327,11 @@ make VERBOSE=1 TESTSUITEFLAGS=--verbose \
%{_datadir}/polkit-1/actions/org.dpkg.pkexec.update-alternatives.policy
%{_datadir}/doc/dpkg/*
%{_datadir}/dpkg/sh/dpkg-error.sh
%{_localstatedir}/log/%{name}.log
%{_localstatedir}/lib/dpkg
%config(noreplace) %{_localstatedir}/log/%{name}.log
%dir %{_localstatedir}/lib/dpkg
%config(noreplace) %{_localstatedir}/lib/dpkg/diversions
%config(noreplace) %{_localstatedir}/lib/dpkg/statoverride
%config(noreplace) %{_localstatedir}/lib/dpkg/status
%files devel
%{_libdir}/libdpkg.a
@ -468,6 +471,10 @@ make VERBOSE=1 TESTSUITEFLAGS=--verbose \
%changelog
* Wed Nov 17 2021 Sérgio Basto <sergio@serjux.com> - 1.20.9-4
- add %config(noreplace) to avoid clean up databases on upgrades and to be
compliant with silverblue
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
@ -481,7 +488,7 @@ make VERBOSE=1 TESTSUITEFLAGS=--verbose \
- Update to 1.20.9 (#1949336)
- flex is not required anymore, doxygen is only needed if you call make doc
- The dpkg-gettext.pl and controllib.pl are long obsolete, can be removed.
- dpkg has not shipped install-info for a long while now.
- dpkg hasn't package install-info for a long time.
- and others reviews
* Sat May 01 2021 Sérgio Basto <sergio@serjux.com> - 1.20.7.1-2

Loading…
Cancel
Save