Skip to content

Commit

Permalink
archivers/rpm4: Backport an upstream bugfix
Browse files Browse the repository at this point in the history
The following upstream commit addresses a problem where librpmio.so's
sqlite error handler can interfere with other sqlite consumers and cause
a crash:
rpm-software-management/rpm@ea3187c

Backport the patch now since it's affecting at least one rpm4 user on
FreeBSD.  This can be dropped once rpm 4.19 is imported.

PR:		273614
Approved by:	maintainer timeout (4 weeks)
Sponsored by:	Klara, Inc.
  • Loading branch information
markjdb committed Oct 12, 2023
1 parent ed41e59 commit 294f4c2
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions archivers/rpm4/files/patch-lib_backend_sqlite.c
@@ -0,0 +1,24 @@
--- lib/backend/sqlite.c.orig 2023-09-06 20:53:16 UTC
+++ lib/backend/sqlite.c
@@ -44,13 +44,6 @@ static void rpm_match3(sqlite3_context *sctx, int argc
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");

0 comments on commit 294f4c2

Please sign in to comment.