obv [PATCH] spec file fixes for debuginfod config/state files

Frank Ch. Eigler fche@redhat.com
Fri Oct 30 23:39:38 GMT 2020

Hi -

Pushing as obvious.

commit b256093ad9a8b4972ae02bece266adad8a3c6dbd (HEAD -> master)
Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Fri Oct 30 19:14:02 2020 -0400

    elfutils.spec.in: fix debuginfod state/config file flags
    During a test upgrade of an RPM based on this spec file, it was
    observed that, er, the /var/cache/.../debuginfod.sqlite file was
    zeroed.  Whoops!  We don't want to lose this data.  Removed the
    %verify attributes and added %ghost for the sqlite database.
    Signed-off-by: Frank Ch. Eigler <fche@redhat.com>

diff --git a/config/ChangeLog b/config/ChangeLog
index f93bbfd7615c..d280511d95ea 100644
--- a/config/ChangeLog
+++ b/config/ChangeLog
@@ -1,3 +1,8 @@
+2020-10-30  Frank Ch. Eigler  <fche@redhat.com>
+	* elfutils.spec.in: Fix debuginfod config/state file attributes
+	for non-lossy updates.
 2020-10-08  Frank Ch. Eigler  <fche@redhat.com>
 	* Makefile.am (uninstall-local): Uninstall the new profile.d files.
diff --git a/config/elfutils.spec.in b/config/elfutils.spec.in
index 170c95e560e0..3caca9a68fe4 100644
--- a/config/elfutils.spec.in
+++ b/config/elfutils.spec.in
@@ -191,6 +191,8 @@ mkdir -p ${RPM_BUILD_ROOT}%{_prefix}
 chmod +x ${RPM_BUILD_ROOT}%{_prefix}/%{_lib}/lib*.so*
+mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod
+touch ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod/debuginfod.sqlite
 # XXX Nuke unpackaged files
@@ -296,7 +298,7 @@ fi
-%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/profile.d/*
+%config(noreplace) %{_sysconfdir}/profile.d/*
 %files debuginfod-client-devel
@@ -308,13 +310,13 @@ fi
 %files debuginfod
-%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/sysconfig/debuginfod
+%config(noreplace) %{_sysconfdir}/sysconfig/debuginfod
 %dir %attr(0700,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod
-%verify(not md5 size mtime) %attr(0600,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod/debuginfod.sqlite
+%ghost %attr(0600,debuginfod,debuginfod) %{_localstatedir}/cache/debuginfod/debuginfod.sqlite
 %pre debuginfod
 getent group debuginfod >/dev/null || groupadd -r debuginfod

More information about the Elfutils-devel mailing list