public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Add rpmdb-rebuild systemd service
@ 2026-11-23  9:33 Panu Matilainen
  0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23  9:33 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : c091c2fcdcd40897604c45fa51720746703d2a5b
            Author : Panu Matilainen <pmatilai@redhat.com>
            Date   : 2020-04-22T12:00:38+03:00
            Stats  : +12/-2 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/c091c2fcdcd40897604c45fa51720746703d2a5b?branch=pmatilai-v6

            Log:
            Add rpmdb-rebuild systemd service

This can be activated with 'touch /var/lib/rpm/.rebuilddb' to perform
rpmdb rebuild on next reboot. The immediate motivation is having a place
to perform automatic database format conversion in a reasonably safe
manner, but could also serve recovery purposes.

---
diff --git a/rpm.spec b/rpm.spec
index a2f2181..a4a44f4 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -25,7 +25,7 @@
 
 %global rpmver 4.15.90
 %global snapver git14971
-%global rel 6
+%global rel 7
 
 %global srcver %{version}%{?snapver:-%{snapver}}
 %global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@@ -47,6 +47,8 @@ Source0: http://ftp.rpm.org/releases/%{srcdir}/%{name}-%{srcver}.tar.bz2
 Source1: db-%{bdbver}.tar.gz
 %endif
 
+Source10: rpmdb-rebuild.service
+
 # Disable autoconf config.site processing (#962837)
 Patch1: rpm-4.15.x-siteconfig.patch
 # In current Fedora, man-pages pkg owns all the localized man directories
@@ -89,6 +91,7 @@ BuildRequires: fakechroot gnupg2
 # XXX generally assumed to be installed but make it explicit as rpm
 # is a bit special...
 BuildRequires: redhat-rpm-config >= 94
+BuildRequires: systemd-rpm-macros
 BuildRequires: gcc make
 BuildRequires: gawk
 BuildRequires: elfutils-devel >= 0.112
@@ -354,6 +357,8 @@ pushd python
 %py3_install
 popd
 
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
+install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/%{_unitdir}
 
 # Save list of packages through cron
 mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily
@@ -398,6 +403,8 @@ make check || (cat tests/rpmtests.log; exit 1)
 %{_tmpfilesdir}/rpm.conf
 %endif
 
+%{_unitdir}/rpmdb-rebuild.service
+
 %dir %{_sysconfdir}/rpm
 
 %attr(0755, root, root) %dir /var/lib/rpm
@@ -526,7 +533,10 @@ make check || (cat tests/rpmtests.log; exit 1)
 %doc doc/librpm/html/*
 
 %changelog
-* Fri Apr 20 2020 Panu Matilainen <pmatilai@redhat.com> - 4.15.90-0.git14971.6
+* Wed Apr 22 2020 Panu Matilainen <pmatilai@redhat.com> - 4.15.90-0.git14971.7
+- Add rpmdb-rebuild systemd service
+
+* Fri Apr 17 2020 Panu Matilainen <pmatilai@redhat.com> - 4.15.90-0.git14971.6
 - Warn on undefined macros in buildtree setup macros (#1820349)
 
 * Thu Apr 09 2020 Panu Matilainen <pmatilai@redhat.com> - 4.15.90-0.git14971.5

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  9:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:33 [rpms/rpm] pmatilai-v6: Add rpmdb-rebuild systemd service Panu Matilainen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox