--- rpm-4.3/rpmdb/dbconfig.c.orig Fri Aug 30 18:12:30 2002 +++ rpm-4.3/rpmdb/dbconfig.c Wed Nov 26 12:57:29 2003 @@ -34,8 +34,16 @@ /*@unchecked@*/ struct poptOption rdbOptions[] = { /* XXX DB_CXX_NO_EXCEPTIONS */ +#if defined(DB_CLIENT) { "client", 0,POPT_BIT_SET, &db3dbi.dbi_ecflags, DB_CLIENT, NULL, NULL }, +#endif +#if defined(DB_RPCCLIENT) + { "client", 0,POPT_BIT_SET, &db3dbi.dbi_ecflags, DB_RPCCLIENT, + NULL, NULL }, + { "rpcclient", 0,POPT_BIT_SET, &db3dbi.dbi_ecflags, DB_RPCCLIENT, + NULL, NULL }, +#endif { "xa_create", 0,POPT_BIT_SET, &db3dbi.dbi_cflags, DB_XA_CREATE, NULL, NULL }, --- rpm-4.3/rpmdb/db3.c.orig Thu Feb 6 19:03:58 2003 +++ rpm-4.3/rpmdb/db3.c Wed Nov 26 13:02:06 2003 @@ -20,6 +20,10 @@ #include "debug.h" +#if !defined(DB_CLIENT) /* XXX db-4.2.42 retrofit */ +#define DB_CLIENT DB_RPCCLIENT +#endif + /*@access rpmdb @*/ /*@access dbiIndex @*/ /*@access dbiIndexSet @*/ @@ -453,7 +457,7 @@ if (db != NULL) rc = db->sync(db, flags); /* XXX DB_INCOMPLETE is returned occaisionally with multiple access. */ -#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1) +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) _printit = _debug; #else _printit = (rc == DB_INCOMPLETE ? 0 : _debug); @@ -690,13 +694,12 @@ { DB * db = dbi->dbi_db; DB * secondary = dbisecondary->dbi_db; -#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1) - DB_TXN * txnid = NULL; -#endif int rc; /*@-moduncon@*/ /* FIX: annotate db3 methods */ -#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1) +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) + DB_TXN * txnid = NULL; + rc = db->associate(db, txnid, secondary, callback, flags); #else rc = db->associate(db, secondary, callback, flags); @@ -892,7 +895,7 @@ DB * db = NULL; DB_ENV * dbenv = NULL; -#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1) +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) DB_TXN * txnid = NULL; #endif u_int32_t oflags; @@ -1254,7 +1257,7 @@ ? dbfullpath : dbfile; #endif -#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1) +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) rc = db->open(db, txnid, dbpath, dbsubfile, dbi->dbi_type, oflags, dbi->dbi_perms); #else --- rpm-4.3/rpmdb/tjfn.c.orig Tue Dec 31 12:58:54 2002 +++ rpm-4.3/rpmdb/tjfn.c Wed Nov 26 13:02:39 2003 @@ -69,7 +69,7 @@ goto err; } -#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 1) +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) ret = db->open(db, NULL, dbfn, NULL, DB_BTREE, DB_CREATE, 0664); #else ret = db->open(db, dbfn, NULL, DB_BTREE, DB_CREATE, 0664); --- rpm-4.3/python/_rpmdb.c.orig Tue May 6 17:44:12 2003 +++ rpm-4.3/python/_rpmdb.c Wed Nov 26 13:14:03 2003 @@ -4302,7 +4302,7 @@ ADD_INT(d, DB_MAX_PAGES); ADD_INT(d, DB_MAX_RECORDS); - ADD_INT(d, DB_CLIENT); + ADD_INT(d, DB_RPCCLIENT); ADD_INT(d, DB_XA_CREATE); ADD_INT(d, DB_CREATE); @@ -4451,9 +4451,6 @@ ADD_INT(d, DB_CHECKPOINT); ADD_INT(d, DB_CURLSN); #endif -#if (DBVER >= 33) - ADD_INT(d, DB_COMMIT); -#endif ADD_INT(d, DB_CONSUME); #if (DBVER >= 32) ADD_INT(d, DB_CONSUME_WAIT); --- rpm-4.3/configure.ac.orig Wed Nov 26 12:46:44 2003 +++ rpm-4.3/configure.ac Wed Nov 26 13:15:23 2003 @@ -502,6 +502,7 @@ dnl Check for Berkeley db3 API. AC_CHECK_FUNC(db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"], + AC_CHECK_LIB(db-4.2, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-4.2"], AC_CHECK_LIB(db-4.1, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-4.1"], AC_CHECK_LIB(db-3.2, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.2"], AC_CHECK_LIB(db-3.1, db_create, [DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb-3.1"], @@ -512,6 +513,7 @@ ) ) ) + ) ) if test X"$DBLIBSRCS" = X; then