public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Switch default database to sqlite (#1818910)
Date: Mon, 23 Nov 2026 09:33:20 GMT [thread overview]
Message-ID: <179542640084.1.14495442462137942383.rpms-rpm-d451552090cd@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : d451552090cd0f5399a09f6ece982f62d85c37d0
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2020-05-07T09:15:38+03:00
Stats : +15/-1 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/d451552090cd0f5399a09f6ece982f62d85c37d0?branch=pmatilai-v6
Log:
Switch default database to sqlite (#1818910)
Newly created databases will be sqlite unless overridden in configuration.
If BDB database is detected at %posttrans of rpm itself, it's flagged
for rebuild in the next reboot. This will serve two purposes: the primary
objective is obviously to convert to configured (ie sqlite) format,
but as a secondary side-effect, any remaining BDB databases will get
a much needed maintenance rebuild from time to time.
---
diff --git a/rpm.spec b/rpm.spec
index e8e2e38..cd7bd1a 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -25,7 +25,7 @@
%global rpmver 4.15.90
%global snapver git14971
-%global rel 10
+%global rel 11
%global srcver %{rpmver}%{?snapver:-%{snapver}}
%global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{rpmver} | cut -d'.' -f1-2).x}
@@ -307,6 +307,11 @@ Requires: rpm-libs%{_isa} = %{version}-%{release}
ln -s db-%{bdbver} db
%endif
+# switch to sqlite db by default, including during build-time tests
+%if %{with sqlite}
+sed -i -e "/_db_backend/ s/ bdb/ sqlite/g" macros.in
+%endif
+
%build
%set_build_flags
@@ -459,6 +464,11 @@ if [ -x /usr/bin/systemctl ]; then
systemctl --no-reload preset rpmdb-rebuild ||:
fi
+%posttrans
+if [ -f /var/lib/rpm/Packages ]; then
+ touch /var/lib/rpm/.rebuilddb
+fi
+
%files libs
%{_libdir}/librpmio.so.*
%{_libdir}/librpm.so.*
@@ -541,6 +551,10 @@ fi
%doc doc/librpm/html/*
%changelog
+* Thu May 7 2020 Panu Matilainen <pmatilai@redhat.com> - 4.15.90-0.git14971.11
+- Flag BDB databases for rebuild on next reboot whenever rpm is updated
+- Switch default database to sqlite (#1818910)
+
* Mon May 4 2020 Panu Matilainen <pmatilai@redhat.com> - 4.15.90-0.git14971.10
- Handle rpmdb-rebuild service enablement for upgrades
reply other threads:[~2026-11-23 9: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=179542640084.1.14495442462137942383.rpms-rpm-d451552090cd@fedoraproject.org \
--to=pmatilai@redhat.com \
--cc=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