[packages/rpm/dev-5.4.17] - added DB_RDONLY patch (fixes regression which prevented to use database in read-only mode) - updat

qboosh qboosh at pld-linux.org
Fri Feb 24 23:50:12 CET 2017


commit 610299ec914af21e892ade5422b3f2ca5eb62f83
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Feb 24 23:52:04 2017 +0100

    - added DB_RDONLY patch (fixes regression which prevented to use database in read-only mode)
    - updated DB_CONFIG patch

 rpm-DB_CONFIG.patch | 18 +++++++++---------
 rpm-DB_RDONLY.patch | 14 ++++++++++++++
 rpm.spec            |  4 ++--
 3 files changed, 25 insertions(+), 11 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index 7c5d407..a5b23cc 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -136,7 +136,7 @@ Patch34:	%{name}-libmagic-locale.patch
 Patch35:	%{name}-namespace-compare.patch
 Patch36:	%{name}-popt-coreutils.patch
 Patch37:	%{name}-postun-nofail.patch
-
+Patch38:	%{name}-DB_RDONLY.patch
 Patch39:	%{name}-fix-missing-types-in-headers.patch
 Patch40:	%{name}-fix--p-interpreter-and-empty-script.patch
 Patch41:	%{name}-db_buffer_small.patch
@@ -916,7 +916,7 @@ cd -
 %patch35 -p1
 %patch36 -p1
 %patch37 -p1
-
+%patch38 -p1
 %patch39 -p1
 %patch40 -p1
 %{?with_db61:%patch41 -p1}
diff --git a/rpm-DB_CONFIG.patch b/rpm-DB_CONFIG.patch
index 238c385..6039393 100644
--- a/rpm-DB_CONFIG.patch
+++ b/rpm-DB_CONFIG.patch
@@ -1,13 +1,13 @@
---- rpm-5.4.10/rpmdb/DB_CONFIG.in~	2012-02-18 20:19:37.000000000 +0100
-+++ rpm-5.4.10/rpmdb/DB_CONFIG.in	2012-11-22 17:32:56.647805060 +0100
-@@ -5,6 +5,10 @@
- set_lg_dir ./log
- set_tmp_dir ./tmp
+--- rpm-5.4.17/rpmdb/DB_CONFIG.in.orig	2016-05-08 20:36:21.000000000 +0200
++++ rpm-5.4.17/rpmdb/DB_CONFIG.in	2017-02-24 23:48:50.487953949 +0100
+@@ -31,7 +31,9 @@
+ #set_verbose DB_VERB_WAITSFOR
  
+ # ================ Logging
+-#log_set_config DB_LOG_AUTO_REMOVE  on
 +# prevent recovery logs (log/log.*) from growing forever and keep only active log by default
 +# this makes BDB "catastrophic" (re-creation of db from logs) recovery impossible
-+log_set_config DB_LOG_AUTO_REMOVE
-+
- # -- thread_count must be >= 8
- set_thread_count 64
++log_set_config DB_LOG_AUTO_REMOVE on
  
+ # ================ Memory Pool
+ #XXX initializing dbenv with set_cachesize has unimplemented prerequsites
diff --git a/rpm-DB_RDONLY.patch b/rpm-DB_RDONLY.patch
new file mode 100644
index 0000000..42f6747
--- /dev/null
+++ b/rpm-DB_RDONLY.patch
@@ -0,0 +1,14 @@
+DB_RDONLY DB->open flag has the same value as DB_READ_COMMITTED DB->cursor flag,
+but DB_READ_COMMITTED cannot be used with read-only database.
+
+--- rpm-5.4.17/rpmdb/db3.c.orig	2017-02-21 22:16:39.337643373 +0100
++++ rpm-5.4.17/rpmdb/db3.c	2017-02-24 23:44:44.324623426 +0100
+@@ -1459,7 +1459,7 @@
+ 	flags |= DB_WRITECURSOR;
+     } else
+     if (dbi->dbi_eflags & DB_INIT_TXN) {
+-#define	FMASK	(DB_READ_UNCOMMITTED|DB_READ_COMMITTED)
++#define	FMASK	(DB_READ_UNCOMMITTED)
+ 	flags |= (dbi->dbi_oflags & FMASK);
+ #undef	FMASK
+ 	if (dbi->dbi_oflags & DB_MULTIVERSION)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/610299ec914af21e892ade5422b3f2ca5eb62f83



More information about the pld-cvs-commit mailing list