FreeBSD Bugzilla – Attachment 231569 Details for
Bug 261523
Mk/bsd.default-versions.mk: Change default db5 (deprecated and EoL) to db18
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch file
Mk_bsd.default-versions.mk.bdb.patch (text/plain), 7.17 KB, created by
Yasuhiro Kimura
on 2022-02-05 21:16:13 UTC
(
hide
)
Description:
Patch file
Filename:
MIME Type:
Creator:
Yasuhiro Kimura
Created:
2022-02-05 21:16:13 UTC
Size:
7.17 KB
patch
obsolete
>From 60a003740fd5ba86efb25a8dc3c03520a4e307f1 Mon Sep 17 00:00:00 2001 >From: Rafael Grether <devnull@apt322.org> >Date: Fri, 28 Jan 2022 16:34:08 +0900 >Subject: [PATCH] Mk/bsd.default-versions.mk: Change default of BDB to db18 > >* Remove codes related to WITH_BDB6_PERMITTED from > Mk/Uses/bdb.mk.Currently user needs to set 'WITH_BDB6_PERMITTED=yes' > in /etc/make.conf to use db18 as default version of BDB. The > variable is introduced for user who doesn't want to accept AGPLv3 > when upstream changed license with the release of 6.0. However, > after db5 will be removed it will become meaningless as db18 will be > the only available version of BDB. Moreover it makes it impossible > to change default version BDB to 18. So remove them. >* Fix build of ports that are broken with db18. > >PR: 261523 >--- > Mk/Uses/bdb.mk | 10 +------ > Mk/bsd.default-versions.mk | 2 +- > databases/py-berkeleydb/Makefile | 2 ++ > databases/py-bsddb3/files/patch-setup3.py | 29 ++++++++++++++++--- > .../files/patch-dns-terror__DatedStringDb.cc | 12 +++++++- > .../files/patch-src_tm_dump__legacy__tm.cpp | 18 ++++++++++++ > 6 files changed, 58 insertions(+), 15 deletions(-) > >diff --git a/Mk/Uses/bdb.mk b/Mk/Uses/bdb.mk >index c80db16b58a2..1a2d36dfda62 100644 >--- a/Mk/Uses/bdb.mk >+++ b/Mk/Uses/bdb.mk >@@ -58,14 +58,6 @@ BDB_UNIQUENAME?= ${PKGNAMEPREFIX}${PORTNAME} > _BDB_DEFAULT_save:=${BDB_DEFAULT} > > _DB_PORTS= 5 18 >-_DB_DEFAULTS= 5 >-# >-# Since 2020-12-02, this name is not fitting too much but >-# retained for now for compatibility. The name of this variable >-# is subject to change especially once db6 were removed. >-. if defined(WITH_BDB6_PERMITTED) >-_DB_DEFAULTS+= 18 >-. endif > > # Dependency lines for different db versions > db5_DEPENDS= libdb-5.3.so:databases/db5 >@@ -148,7 +140,7 @@ _ELIGIBLE_BDB_VER:=${_INST_BDB_VER} > > # 3b. if there is no usable version installed, check defaults > .if empty(_INST_BDB_VER) >-_DFLT_BDB_VER:=${_DB_DEFAULTS} >+_DFLT_BDB_VER:=${_DB_PORTS} > # make sure we use a reasonable version for package builds > _WITH_BDB_HIGHEST=yes > . for i in ${_DFLT_BDB_VER} >diff --git a/Mk/bsd.default-versions.mk b/Mk/bsd.default-versions.mk >index 42322a77cb9a..dc4b40a47918 100644 >--- a/Mk/bsd.default-versions.mk >+++ b/Mk/bsd.default-versions.mk >@@ -34,7 +34,7 @@ ${_l:tu}_DEFAULT= ${lang:C/.*=//g} > # Possible values: 2.4 > APACHE_DEFAULT?= 2.4 > # Possible values: 5, 18 >-BDB_DEFAULT?= 5 >+BDB_DEFAULT?= 18 > # Possible values: 2, 3 > COROSYNC_DEFAULT?= 2 > # Possible_values: full canna nox devel_full devel_nox >diff --git a/databases/py-berkeleydb/Makefile b/databases/py-berkeleydb/Makefile >index a3c4e26d6558..fca379f1a54f 100644 >--- a/databases/py-berkeleydb/Makefile >+++ b/databases/py-berkeleydb/Makefile >@@ -19,6 +19,8 @@ PYDISTUTILS_CONFIGUREARGS=--libs="-l${BDB_LIB_NAME}" --berkeley-db=${LOCALBASE} > PYDISTUTILS_BUILDARGS= --libs="-l${BDB_LIB_NAME}" --berkeley-db=${LOCALBASE} > PYDISTUTILS_INSTALLARGS=-c -O1 --prefix=${PREFIX} --berkeley-db=${LOCALBASE} > >+MAKE_ENV= YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION=yes >+ > PORTDOCS= * > DOCSDIR= ${PREFIX}/share/doc/${PYTHON_PKGNAMEPREFIX}${PORTNAME} > >diff --git a/databases/py-bsddb3/files/patch-setup3.py b/databases/py-bsddb3/files/patch-setup3.py >index 3ff9359b825d..12b55a60b6d0 100644 >--- a/databases/py-bsddb3/files/patch-setup3.py >+++ b/databases/py-bsddb3/files/patch-setup3.py >@@ -1,6 +1,6 @@ >---- setup3.py.orig 2016-02-08 21:18:47 UTC >+--- setup3.py.orig 2020-11-26 15:38:58 UTC > +++ setup3.py >-@@ -81,11 +81,7 @@ if (sys.version_info[0] < 3) and (sys.ve >+@@ -81,11 +81,7 @@ if (sys.version_info[0] < 3) and (sys.version_info >= > category=DeprecationWarning) > > >@@ -13,7 +13,17 @@ > from distutils.dep_util import newer > import distutils.ccompiler > >-@@ -288,8 +284,8 @@ if os.name == 'posix': >+@@ -152,7 +148,8 @@ if os.name == 'posix': >+ lflags_arg = LFLAGS + LIBS >+ >+ # Supported Berkeley DB versions, in order of preference. >+- db_ver_list = ((6, 2), (6, 1), >++ db_ver_list = ((18, 1), (18, 0), >++ (6, 2), (6, 1), >+ (5, 3), (5, 1), >+ (4, 8), (4, 7)) >+ db_ver = None >+@@ -298,8 +295,8 @@ if os.name == 'posix': > incdir = os.path.join(BERKELEYDB_DIR, 'include') > if not libdir: > libdir = os.path.join(BERKELEYDB_DIR, 'lib') >@@ -24,7 +34,7 @@ > else: > if debug: print("LIBS already contains '-ldb' not adding our own", "'-l"+dblib+"'") > libname = [] >-@@ -328,7 +324,7 @@ if os.name == 'posix': >+@@ -338,7 +335,7 @@ if os.name == 'posix': > > # read db.h to figure out what version of Berkeley DB this is > ver = None >@@ -33,3 +43,14 @@ > db_h_lines = f.readlines() > db_ver_re = re.compile( > r'^#define\s+DB_VERSION_STRING\s.*Berkeley DB (\d+\.\d+).*') >+@@ -350,8 +347,8 @@ if os.name == 'posix': >+ if not match: >+ continue >+ fullverstr = match.group(1) >+- ver = fullverstr[0] + fullverstr[2] # 31 == 3.1, 32 == 3.2, etc. >+- db_ver = (int(fullverstr[0]), int(fullverstr[2])) >++ ver = fullverstr.split('.') >++ db_ver = (int(ver[0]), int(ver[1])) >+ if (db_ver2 is not None) and (db_ver != db_ver2) : >+ raise AssertionError("Detected Berkeley DB version is inconsistent") >+ if db_ver not in db_ver_list: >diff --git a/dns/fastresolve/files/patch-dns-terror__DatedStringDb.cc b/dns/fastresolve/files/patch-dns-terror__DatedStringDb.cc >index 53d15eff0c29..dd2bde9c77a9 100644 >--- a/dns/fastresolve/files/patch-dns-terror__DatedStringDb.cc >+++ b/dns/fastresolve/files/patch-dns-terror__DatedStringDb.cc >@@ -1,6 +1,16 @@ > --- dns-terror/DatedStringDb.cc.orig 2003-05-17 18:14:35 UTC > +++ dns-terror/DatedStringDb.cc >-@@ -69,7 +69,11 @@ DatedStringDb::DatedStringDb(const char >+@@ -63,13 +63,21 @@ using namespace std; >+ DatedStringDb::DatedStringDb(const char *dbhome, const char *storename) >+ { >+ #if DB_VERSION_MAJOR >= 3 >++#if DB_VERSION_MAJOR >= 5 >++ env = new DbEnv((u_int32_t) 0); >++#else >+ env = new DbEnv(0); >++#endif >+ env->set_error_stream(&cerr); >+ env->set_errpfx(storename ? storename : "DatedStringDb"); > env->set_cachesize(0, MPOOL_SIZE, 0); > env->open(dbhome, DB_CREATE|DB_INIT_MPOOL|DB_PRIVATE, 0644); > db = new Db(env, 0); >diff --git a/editors/poedit/files/patch-src_tm_dump__legacy__tm.cpp b/editors/poedit/files/patch-src_tm_dump__legacy__tm.cpp >index 0bade0d17730..33deec5298e8 100644 >--- a/editors/poedit/files/patch-src_tm_dump__legacy__tm.cpp >+++ b/editors/poedit/files/patch-src_tm_dump__legacy__tm.cpp >@@ -8,3 +8,21 @@ > #include <string.h> > > #ifdef DB_HEADER >+@@ -305,7 +306,7 @@ std::unique_ptr<DbEnv> CreateDbEnv(const char *path) >+ DB_RECOVER | >+ DB_CREATE; >+ >+- std::unique_ptr<DbEnv> env(new DbEnv(0)); >++ std::unique_ptr<DbEnv> env(new DbEnv((u_int32_t)0)); >+ env->open(path, flags, 0600); >+ >+ // This prevents the log from growing indefinitely >+@@ -324,7 +325,7 @@ void DestroyDbEnv(std::unique_ptr<DbEnv>& env) >+ env->close(0); >+ >+ // Clean up temporary environment files (unless they're still in use): >+- DbEnv env2(0); >++ DbEnv env2((u_int32_t)0); >+ env2.remove(dbpath.c_str(), 0); >+ >+ env.reset(); >-- >2.35.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261523
:
231394
|
231406
|
231569
|
231617
|
235409
|
235422
|
236499
|
237252