--- rpm-4.14.2.1/config.h.in.orig 2018-10-22 09:23:50.537387460 +0000 +++ rpm-4.14.2.1/config.h.in 2019-06-26 17:43:25.432000000 +0000 @@ -9,6 +9,9 @@ /* Build with systemd inhibit plugin? */ #undef ENABLE_INHIBIT_PLUGIN +/* Enable Berkeley DB rpmdb support */ +#undef ENABLE_BDB + /* Enable new rpm database format? */ #undef ENABLE_NDB --- rpm-4.14.2.1/configure.orig 2018-10-22 09:23:38.409409243 +0000 +++ rpm-4.14.2.1/configure 2019-06-26 17:43:25.432000000 +0000 @@ -717,6 +717,8 @@ LMDB_CFLAGS NDB_FALSE NDB_TRUE +BDB_FALSE +BDB_TRUE WITH_DB_LIB HAVE_LIBDW_STRTAB_FALSE HAVE_LIBDW_STRTAB_TRUE @@ -961,6 +963,7 @@ with_beecrypt with_internal_beecrypt with_archive +enable_bdb with_external_db enable_ndb enable_lmdb @@ -1643,6 +1646,8 @@ --disable-largefile omit support for large files --enable-zstd=[yes/no/auto] build without zstd support (default=auto) + --enable-bdb=[yes/no] build with Berkeley DB rpm database format support + (default=yes) --enable-ndb (EXPERIMENTAL) enable the new rpm database format --enable-lmdb=[yes/no/auto] (EXPERIMENTAL) @@ -21973,6 +21978,23 @@ #================= +# Enable Berkeley DB rpmdb backend +# Check whether --enable-bdb was given. +if test "${enable_bdb+set}" = set; then : + enableval=$enable_bdb; enable_bdb="$enableval" +else + enable_bdb=yes +fi + + +if test "$enable_bdb" = "yes"; then : + + + +$as_echo "#define ENABLE_BDB /**/" >>confdefs.h + + +#================= # Process --with/without-external-db # Check whether --with-external_db was given. @@ -22080,6 +22102,16 @@ +fi + if test "$enable_bdb" = yes; then + BDB_TRUE= + BDB_FALSE='#' +else + BDB_TRUE='#' + BDB_FALSE= +fi + + #================= # Process --enable-ndb # Check whether --enable-ndb was given. @@ -26743,6 +26775,10 @@ as_fn_error $? "conditional \"HAVE_LIBDW_STRTAB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BDB_TRUE}" && test -z "${BDB_FALSE}"; then + as_fn_error $? "conditional \"BDB\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${NDB_TRUE}" && test -z "${NDB_FALSE}"; then as_fn_error $? "conditional \"NDB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 --- rpm-4.14.2.1/lib/backend/dbi.c.orig 2017-10-05 10:04:56.946602155 +0000 +++ rpm-4.14.2.1/lib/backend/dbi.c 2019-06-26 17:43:25.432000000 +0000 @@ -50,11 +50,13 @@ } else #endif { +#ifdef ENABLE_BDB rdb->db_ops = &db3_dbops; if (*db_backend == '\0') { free(db_backend); db_backend = xstrdup("bdb"); } +#endif } #if defined(WITH_LMDB) @@ -75,12 +77,14 @@ free(path); #endif +#ifdef ENABLE_BDB path = rstrscat(NULL, dbhome, "/Packages", NULL); if (access(path, F_OK) == 0 && rdb->db_ops != &db3_dbops) { rdb->db_ops = &db3_dbops; rpmlog(RPMLOG_WARNING, _("Found BDB Packages database while attempting %s backend: using bdb backend.\n"), db_backend); } free(path); +#endif if (db_backend) free(db_backend); --- rpm-4.14.2.1/lib/Makefile.in.orig 2018-10-22 09:23:38.884408390 +0000 +++ rpm-4.14.2.1/lib/Makefile.in 2019-06-26 17:43:25.432000000 +0000 @@ -96,9 +96,12 @@ @WITH_LUA_TRUE@am__append_1 = @LUA_CFLAGS@ @WITH_LUA_TRUE@am__append_2 = @LUA_LIBS@ @WITH_LUA_TRUE@am__append_3 = rpmliblua.c rpmliblua.h -@WITH_INTERNAL_DB_TRUE@am__append_4 = $(libdb_la) -@WITH_INTERNAL_DB_FALSE@am__append_5 = @WITH_DB_LIB@ -@NDB_TRUE@am__append_6 = \ +@BDB_TRUE@am__append_4 = \ +@BDB_TRUE@ backend/db3.c + +@BDB_TRUE@@WITH_INTERNAL_DB_TRUE@am__append_5 = $(libdb_la) +@BDB_TRUE@@WITH_INTERNAL_DB_FALSE@am__append_6 = @WITH_DB_LIB@ +@NDB_TRUE@am__append_7 = \ @NDB_TRUE@ backend/ndb/glue.c \ @NDB_TRUE@ backend/ndb/rpmpkg.c \ @NDB_TRUE@ backend/ndb/rpmpkg.h \ @@ -107,12 +110,12 @@ @NDB_TRUE@ backend/ndb/rpmxdb.c \ @NDB_TRUE@ backend/ndb/rpmxdb.h -@LMDB_TRUE@am__append_7 = $(LMDB_CFLAGS) -@LMDB_TRUE@am__append_8 = $(LMDB_LIBS) -@LMDB_TRUE@am__append_9 = \ +@LMDB_TRUE@am__append_8 = $(LMDB_CFLAGS) +@LMDB_TRUE@am__append_9 = $(LMDB_LIBS) +@LMDB_TRUE@am__append_10 = \ @LMDB_TRUE@ backend/lmdb.c -@WITH_INTERNAL_DB_TRUE@am__append_10 = $(libdb_la) +@WITH_INTERNAL_DB_TRUE@am__append_11 = $(libdb_la) @WITH_INTERNAL_DB_TRUE@rpmlibexec_PROGRAMS = rpmdb_dump$(EXEEXT) \ @WITH_INTERNAL_DB_TRUE@ rpmdb_load$(EXEEXT) \ @WITH_INTERNAL_DB_TRUE@ rpmdb_recover$(EXEEXT) \ @@ -169,9 +172,9 @@ am__DEPENDENCIES_1 = @LMDB_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) librpm_la_DEPENDENCIES = $(top_builddir)/rpmio/librpmio.la \ - $(am__DEPENDENCIES_1) $(am__append_4) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) $(am__append_5) $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_2) -am__librpm_la_SOURCES_DIST = backend/db3.c backend/dbi.c backend/dbi.h \ +am__librpm_la_SOURCES_DIST = backend/dbi.c backend/dbi.h \ backend/dbiset.c backend/dbiset.h headerutil.c header.c \ headerfmt.c header_internal.h rpmdb.c rpmdb_internal.h \ fprint.c fprint.h tagname.c rpmtd.c cpio.c cpio.h depends.c \ @@ -185,25 +188,27 @@ rpmlock.h misc.h relocation.c rpmscript.h rpmscript.c \ rpmchroot.c rpmchroot.h rpmplugins.c rpmplugins.h rpmplugin.h \ rpmug.c rpmug.h rpmtriggers.h rpmtriggers.c rpmvs.c rpmvs.h \ - rpmliblua.c rpmliblua.h backend/ndb/glue.c \ + rpmliblua.c rpmliblua.h backend/db3.c backend/ndb/glue.c \ backend/ndb/rpmpkg.c backend/ndb/rpmpkg.h backend/ndb/rpmidx.c \ backend/ndb/rpmidx.h backend/ndb/rpmxdb.c backend/ndb/rpmxdb.h \ backend/lmdb.c am__dirstamp = $(am__leading_dot)dirstamp @WITH_LUA_TRUE@am__objects_1 = rpmliblua.lo -@NDB_TRUE@am__objects_2 = backend/ndb/glue.lo backend/ndb/rpmpkg.lo \ +@BDB_TRUE@am__objects_2 = backend/db3.lo +@NDB_TRUE@am__objects_3 = backend/ndb/glue.lo backend/ndb/rpmpkg.lo \ @NDB_TRUE@ backend/ndb/rpmidx.lo backend/ndb/rpmxdb.lo -@LMDB_TRUE@am__objects_3 = backend/lmdb.lo -am_librpm_la_OBJECTS = backend/db3.lo backend/dbi.lo backend/dbiset.lo \ - headerutil.lo header.lo headerfmt.lo rpmdb.lo fprint.lo \ - tagname.lo rpmtd.lo cpio.lo depends.lo order.lo formats.lo \ - tagexts.lo fsm.lo manifest.lo package.lo poptALL.lo poptI.lo \ - poptQV.lo psm.lo query.lo rpmal.lo rpmchecksig.lo rpmds.lo \ - rpmfi.lo rpmgi.lo rpminstall.lo rpmlead.lo rpmps.lo rpmprob.lo \ - rpmrc.lo rpmte.lo rpmts.lo rpmfs.lo rpmvercmp.lo signature.lo \ - transaction.lo verify.lo rpmlock.lo relocation.lo rpmscript.lo \ - rpmchroot.lo rpmplugins.lo rpmug.lo rpmtriggers.lo rpmvs.lo \ - $(am__objects_1) $(am__objects_2) $(am__objects_3) +@LMDB_TRUE@am__objects_4 = backend/lmdb.lo +am_librpm_la_OBJECTS = backend/dbi.lo backend/dbiset.lo headerutil.lo \ + header.lo headerfmt.lo rpmdb.lo fprint.lo tagname.lo rpmtd.lo \ + cpio.lo depends.lo order.lo formats.lo tagexts.lo fsm.lo \ + manifest.lo package.lo poptALL.lo poptI.lo poptQV.lo psm.lo \ + query.lo rpmal.lo rpmchecksig.lo rpmds.lo rpmfi.lo rpmgi.lo \ + rpminstall.lo rpmlead.lo rpmps.lo rpmprob.lo rpmrc.lo rpmte.lo \ + rpmts.lo rpmfs.lo rpmvercmp.lo signature.lo transaction.lo \ + verify.lo rpmlock.lo relocation.lo rpmscript.lo rpmchroot.lo \ + rpmplugins.lo rpmug.lo rpmtriggers.lo rpmvs.lo \ + $(am__objects_1) $(am__objects_2) $(am__objects_3) \ + $(am__objects_4) librpm_la_OBJECTS = $(am_librpm_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -596,18 +601,18 @@ -DLOCALSTATEDIR="\"$(localstatedir)\"" \ -DLIBRPMALIAS_FILENAME="\"rpmpopt-${VERSION}\"" \ -DLIBRPMALIAS_EXECPATH="\"$(bindir)\"" $(am__append_1) \ - $(am__append_7) + $(am__append_8) usrlibdir = $(libdir) -CLEANFILES = $(am__append_10) $(BUILT_SOURCES) +CLEANFILES = $(am__append_11) $(BUILT_SOURCES) EXTRA_DIST = gentagtbl.sh tagtbl.C rpmhash.C rpmhash.H usrlib_LTLIBRARIES = librpm.la -librpm_la_SOURCES = backend/db3.c backend/dbi.c backend/dbi.h \ - backend/dbiset.c backend/dbiset.h headerutil.c header.c \ - headerfmt.c header_internal.h rpmdb.c rpmdb_internal.h \ - fprint.c fprint.h tagname.c rpmtd.c cpio.c cpio.h depends.c \ - order.c formats.c tagexts.c fsm.c fsm.h manifest.c manifest.h \ - package.c poptALL.c poptI.c poptQV.c psm.c query.c rpmal.c \ - rpmal.h rpmchecksig.c rpmds.c rpmds_internal.h rpmfi.c \ +librpm_la_SOURCES = backend/dbi.c backend/dbi.h backend/dbiset.c \ + backend/dbiset.h headerutil.c header.c headerfmt.c \ + header_internal.h rpmdb.c rpmdb_internal.h fprint.c fprint.h \ + tagname.c rpmtd.c cpio.c cpio.h depends.c order.c formats.c \ + tagexts.c fsm.c fsm.h manifest.c manifest.h package.c \ + poptALL.c poptI.c poptQV.c psm.c query.c rpmal.c rpmal.h \ + rpmchecksig.c rpmds.c rpmds_internal.h rpmfi.c \ rpmfi_internal.h rpmgi.h rpmgi.c rpminstall.c rpmts_internal.h \ rpmlead.c rpmlead.h rpmps.c rpmprob.c rpmrc.c rpmte.c \ rpmte_internal.h rpmts.c rpmfs.h rpmfs.c rpmvercmp.c \ @@ -615,11 +620,12 @@ rpmlock.h misc.h relocation.c rpmscript.h rpmscript.c \ rpmchroot.c rpmchroot.h rpmplugins.c rpmplugins.h rpmplugin.h \ rpmug.c rpmug.h rpmtriggers.h rpmtriggers.c rpmvs.c rpmvs.h \ - $(am__append_3) $(am__append_6) $(am__append_9) + $(am__append_3) $(am__append_4) $(am__append_7) \ + $(am__append_10) librpm_la_LDFLAGS = -version-info $(rpm_version_info) librpm_la_LIBADD = $(top_builddir)/rpmio/librpmio.la @WITH_POPT_LIB@ \ @WITH_CAP_LIB@ @WITH_ACL_LIB@ @LIBINTL@ $(am__append_2) \ - $(am__append_4) $(am__append_5) $(am__append_8) + $(am__append_5) $(am__append_6) $(am__append_9) BUILT_SOURCES = tagtbl.C # XXX watchout, $(top_builddir)/db3/libdb.la created by this Makefile may surprise --- rpm-4.14.2.1/macros.in.orig 2018-10-22 09:22:55.901485593 +0000 +++ rpm-4.14.2.1/macros.in 2019-06-26 17:43:25.432000000 +0000 @@ -621,7 +621,7 @@ # lmdb Lightning Memory-mapped Database # ndb new data base format # -%_db_backend bdb +%_db_backend lmdb # # Macros used to configure Berkley db parameters. --- rpm-4.14.2.1/rpmio/digest_openssl.c.orig 2018-09-13 12:52:37.324274216 +0000 +++ rpm-4.14.2.1/rpmio/digest_openssl.c 2019-06-26 17:43:25.432000000 +0000 @@ -175,8 +175,10 @@ case PGPHASHALGO_RIPEMD160: return EVP_ripemd160(); +#ifndef LIBRESSL_VERSION_NUMBER case PGPHASHALGO_MD2: return EVP_md2(); +#endif case PGPHASHALGO_SHA256: return EVP_sha256();