added upstream patch to fix dnf problem with sqlite 3.42.0 ( https://github.com/rpm-software-management/rpm/pull/2553 ) [release 4.18.1-3mamba;Sun Jul 02 2023]
This commit is contained in:
parent
c794a3d04b
commit
e2bf4b3d33
48
rpm-4.18.1-sqlite-3.42.0.patch
Normal file
48
rpm-4.18.1-sqlite-3.42.0.patch
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
From ea3187cfcf9cac87e5bc5e7db79b0338da9e355e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Panu Matilainen <pmatilai@redhat.com>
|
||||||
|
Date: Mon, 26 Jun 2023 12:45:09 +0300
|
||||||
|
Subject: [PATCH] Don't muck with per-process global sqlite configuration from
|
||||||
|
the db backend
|
||||||
|
|
||||||
|
sqlite3_config() affects all in-process uses of sqlite. librpm being a
|
||||||
|
low-level library, it has no business whatsoever making such decisions
|
||||||
|
for the applications running on top of it. Besides that, the callback can
|
||||||
|
easily end up pointing to an already closed database, causing an
|
||||||
|
innocent API user to crash in librpm on an entirely unrelated error on
|
||||||
|
some other database. "Oops."
|
||||||
|
|
||||||
|
The sqlite API doesn't seem to provide any per-db or non-global context
|
||||||
|
for logging errors, thus we can only remove the call and let sqlite output
|
||||||
|
errors the way it pleases (print through stderr, presumably).
|
||||||
|
|
||||||
|
Thanks to Jan Palus for spotting and reporting!
|
||||||
|
---
|
||||||
|
lib/backend/sqlite.c | 8 --------
|
||||||
|
1 file changed, 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/backend/sqlite.c b/lib/backend/sqlite.c
|
||||||
|
index 5a029d575a..b612732267 100644
|
||||||
|
--- a/lib/backend/sqlite.c
|
||||||
|
+++ b/lib/backend/sqlite.c
|
||||||
|
@@ -44,13 +44,6 @@ static void rpm_match3(sqlite3_context *sctx, int argc, sqlite3_value **argv)
|
||||||
|
sqlite3_result_int(sctx, match);
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void errCb(void *data, int err, const char *msg)
|
||||||
|
-{
|
||||||
|
- rpmdb rdb = data;
|
||||||
|
- rpmlog(RPMLOG_WARNING, "%s: %s: %s\n",
|
||||||
|
- rdb->db_descr, sqlite3_errstr(err), msg);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static int dbiCursorReset(dbiCursor dbc)
|
||||||
|
{
|
||||||
|
if (dbc->stmt) {
|
||||||
|
@@ -170,7 +163,6 @@ static int sqlite_init(rpmdb rdb, const char * dbhome)
|
||||||
|
* the "database is locked" errors at every cost
|
||||||
|
*/
|
||||||
|
sqlite3_busy_timeout(sdb, 10000);
|
||||||
|
- sqlite3_config(SQLITE_CONFIG_LOG, errCb, rdb);
|
||||||
|
|
||||||
|
sqlexec(sdb, "PRAGMA secure_delete = OFF");
|
||||||
|
sqlexec(sdb, "PRAGMA case_sensitive_like = ON");
|
7
rpm.spec
7
rpm.spec
@ -17,7 +17,7 @@
|
|||||||
Name: rpm
|
Name: rpm
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 4.18.1
|
Version: 4.18.1
|
||||||
Release: 2mamba
|
Release: 3mamba
|
||||||
Summary: The RPM Package Manager (RPM) is a powerful package management system
|
Summary: The RPM Package Manager (RPM) is a powerful package management system
|
||||||
Group: System/Management
|
Group: System/Management
|
||||||
Vendor: openmamba
|
Vendor: openmamba
|
||||||
@ -46,6 +46,7 @@ Patch12: rpm-4.17.0-find-lang-qt-fix.patch
|
|||||||
Patch13: rpm-4.16.1.3-pythondistdeps-no-richdeps.patch
|
Patch13: rpm-4.16.1.3-pythondistdeps-no-richdeps.patch
|
||||||
Patch14: rpm-4.18.0-brp-strip-fix-for-plus-in-buildroot.patch
|
Patch14: rpm-4.18.0-brp-strip-fix-for-plus-in-buildroot.patch
|
||||||
Patch15: rpm-4.18.0-allow-disabling-rmbuild.patch
|
Patch15: rpm-4.18.0-allow-disabling-rmbuild.patch
|
||||||
|
Patch16: rpm-4.18.1-sqlite-3.42.0.patch
|
||||||
License: LGPL
|
License: LGPL
|
||||||
## AUTOBUILDREQ-BEGIN
|
## AUTOBUILDREQ-BEGIN
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
@ -147,6 +148,7 @@ This package should be installed if you want to develop Python programs that wil
|
|||||||
#%patch 13 -p1
|
#%patch 13 -p1
|
||||||
%patch 14 -p1
|
%patch 14 -p1
|
||||||
%patch 15 -p1
|
%patch 15 -p1
|
||||||
|
%patch 16 -p1 -b .sqlite-3.42.0
|
||||||
|
|
||||||
#sed -i "s|/usr/bin/python$|%{__python3}|" scripts/pythondistdeps.py
|
#sed -i "s|/usr/bin/python$|%{__python3}|" scripts/pythondistdeps.py
|
||||||
|
|
||||||
@ -327,6 +329,9 @@ rm -f %{buildroot}%{_libdir}/librpm*.la
|
|||||||
%{python310_sitearch}/rpm/*
|
%{python310_sitearch}/rpm/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jul 02 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 4.18.1-3mamba
|
||||||
|
- added upstream patch to fix dnf problem with sqlite 3.42.0 ( https://github.com/rpm-software-management/rpm/pull/2553 )
|
||||||
|
|
||||||
* Thu Mar 23 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 4.18.1-2mamba
|
* Thu Mar 23 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 4.18.1-2mamba
|
||||||
- rebuilt with python 3.10 subpackage
|
- rebuilt with python 3.10 subpackage
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user