RPM Community Forums

Mailing List Message of <rpm-devel>

Re: status on porting rpm5 to qnx

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 25 Jan 2008 - 19:37:39 CET
Message-Id: <566777C3-D5EC-41FF-A520-4468DF20C351@mac.com>

On Jan 25, 2008, at 1:10 PM, Peter Kalbus wrote:

> cool, only i issue is open. the changes are working (at least  
> compilation).
>

greate.

Here's the first step at using db-4.6.21 with non-functional mmap on  
QNX.

Note that changing rpm (and using rpmdb with DB_PRIVATE) is not at  
all the right
way to fix this problem. So I have negative interest in adding this  
patch to
rpm5.org sources.

Likely, using sqlite3 instead of Berkeley DB 4.6.21 is the best fix for
your company.

Meanwhile the patch below achieves what Oracle said to do: Use  
DB_PRIVATE.

The remaining piece of the puzzle (for you and QNX) will be to get a  
global shared/exclusive fcntl
lock in place and testing that the lock is effective.

73 de Jeff

Index: macros.in
===================================================================
RCS file: /v/rpm/cvs/rpm/macros.in,v
retrieving revision 1.227.2.1
diff -u -b -B -w -p -r1.227.2.1 macros.in
--- macros.in   15 Jan 2008 14:19:18 -0000      1.227.2.1
+++ macros.in   25 Jan 2008 18:29:36 -0000
@@ -632,7 +632,7 @@ print (t)\
  %__dbi_cdb                     create cdb mpool mp_mmapsize=16Mb  
mp_size=1Mb \
                                 thread_count=64

-%__dbi_other                   %{?_tmppath:tmpdir=%{_tmppath}} %{? 
__dbi_cdb}
+%__dbi_other                   %{?_tmppath:tmpdir=%{_tmppath}} private

  # Note: adding nofsync here speeds up --rebuilddb a lot.
  %__dbi_rebuild                 nofsync !log !txn !cdb
Index: rpmdb/dbconfig.c
===================================================================
RCS file: /v/rpm/cvs/rpm/rpmdb/dbconfig.c,v
retrieving revision 1.51
diff -u -b -B -w -p -r1.51 dbconfig.c
--- rpmdb/dbconfig.c    22 Nov 2007 18:50:27 -0000      1.51
+++ rpmdb/dbconfig.c    25 Jan 2008 18:29:41 -0000
@@ -820,12 +820,14 @@ dbiIndex db3New(rpmdb rpmdb, rpmTag rpmt
      dbi->dbi_byteswapped = -1; /* -1 unknown, 0 native order, 1  
alien order */

  #if defined(WITH_DB)
+#if 0
      if (!dbi->dbi_use_dbenv) {         /* db3 dbenv is always used  
now. */
         dbi->dbi_use_dbenv = 1;
         dbi->dbi_eflags |= (DB_INIT_MPOOL|DB_JOINENV);
         dbi->dbi_mmapsize = 16 * 1024 * 1024;
         dbi->dbi_cachesize = 1 * 1024 * 1024;
      }
+#endif

      if ((dbi->dbi_bt_flags | dbi->dbi_h_flags) & DB_DUP)
         dbi->dbi_permit_dups = 1;
Received on Fri Jan 25 19:37:47 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.