libldb: upgrade 2.8.2 -> 2.9.2

Forward-port the configure-options patch to 2.9.2.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Khem Raj
2026-06-09 21:17:21 -07:00
parent 30f546b131
commit e4f43d7eee
2 changed files with 34 additions and 14 deletions
@@ -23,15 +23,15 @@ Rebase to 2.8.0
Remove libaio option Remove libaio option
Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
--- ---
lib/replace/wscript | 80 +++++++++++++++++++++++++++++++++------------ lib/replace/wscript | 100 +++++++++++++++++++++++++++++-------------
wscript | 8 +++++ wscript | 8 +++
2 files changed, 68 insertions(+), 20 deletions(-) 2 files changed, 78 insertions(+), 30 deletions(-)
diff --git a/lib/replace/wscript b/lib/replace/wscript diff --git a/lib/replace/wscript b/lib/replace/wscript
index 37d7759..d0d6bb0 100644 index 37d7759..d0d6bb0 100644
--- a/lib/replace/wscript --- a/lib/replace/wscript
+++ b/lib/replace/wscript +++ b/lib/replace/wscript
@@ -25,6 +25,34 @@ def options(opt): @@ -25,6 +25,34 @@
opt.PRIVATE_EXTENSION_DEFAULT('') opt.PRIVATE_EXTENSION_DEFAULT('')
opt.RECURSE('buildtools/wafsamba') opt.RECURSE('buildtools/wafsamba')
@@ -66,7 +66,7 @@ index 37d7759..d0d6bb0 100644
@Utils.run_once @Utils.run_once
def configure(conf): def configure(conf):
conf.RECURSE('buildtools/wafsamba') conf.RECURSE('buildtools/wafsamba')
@@ -38,12 +66,22 @@ def configure(conf): @@ -38,12 +66,22 @@
conf.DEFINE('HAVE_LIBREPLACE', 1) conf.DEFINE('HAVE_LIBREPLACE', 1)
conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1) conf.DEFINE('LIBREPLACE_NETWORK_CHECKS', 1)
@@ -93,7 +93,7 @@ index 37d7759..d0d6bb0 100644
conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h') conf.CHECK_HEADERS('sys/fcntl.h sys/filio.h sys/filsys.h sys/fs/s5param.h')
conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h') conf.CHECK_HEADERS('sys/id.h sys/ioctl.h sys/ipc.h sys/mman.h sys/mode.h sys/ndir.h sys/priv.h')
conf.CHECK_HEADERS('sys/resource.h sys/security.h sys/shm.h sys/statfs.h sys/statvfs.h sys/termio.h') conf.CHECK_HEADERS('sys/resource.h sys/security.h sys/shm.h sys/statfs.h sys/statvfs.h sys/termio.h')
@@ -113,8 +151,9 @@ def configure(conf): @@ -113,8 +151,9 @@
conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
@@ -105,7 +105,7 @@ index 37d7759..d0d6bb0 100644
conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h')
conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h')
@@ -443,20 +482,21 @@ def configure(conf): @@ -443,31 +482,32 @@
strlcpy_in_bsd = False strlcpy_in_bsd = False
@@ -114,28 +114,49 @@ index 37d7759..d0d6bb0 100644
- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', - if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
- checklibc=True): - checklibc=True):
- strlcpy_in_bsd = True - strlcpy_in_bsd = True
- elif conf.env.enable_fuzzing:
- # Just to complicate it more, some versions of Honggfuzz have
- # got strlcpy and strlcat in libc, but not in <string.h>
- # (unless it is there coincidentally, on a BSD). Therefore we
- # can't use CHECK_FUNCS alone to decide whether to add the
- # headers to replace.h.
- #
- # As this is only known to happen on a fuzzing compiler, we'll
- # skip the check when not in fuzzing mode.
- conf.CHECK_HEADERS('bsd/string.h')
-
- if not conf.CHECK_FUNCS('getpeereid'): - if not conf.CHECK_FUNCS('getpeereid'):
- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') - conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): - if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') - conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
- if not conf.CHECK_FUNCS('setproctitle_init'): - if not conf.CHECK_FUNCS('setproctitle_init'):
- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') - conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
-
- if not conf.CHECK_FUNCS('closefrom'):
- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ if Options.options.enable_libbsd: + if Options.options.enable_libbsd:
+ # libbsd on some platforms provides strlcpy and strlcat + # libbsd on some platforms provides strlcpy and strlcat
+ if not conf.CHECK_FUNCS('strlcpy strlcat'): + if not conf.CHECK_FUNCS('strlcpy strlcat'):
+ if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', + if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h',
+ checklibc=True): + checklibc=True):
+ strlcpy_in_bsd = True + strlcpy_in_bsd = True
+ elif conf.env.enable_fuzzing:
+ # Just to complicate it more, some versions of Honggfuzz have
+ # got strlcpy and strlcat in libc, but not in <string.h>
+ # (unless it is there coincidentally, on a BSD). Therefore we
+ # can't use CHECK_FUNCS alone to decide whether to add the
+ # headers to replace.h.
+ #
+ # As this is only known to happen on a fuzzing compiler, we'll
+ # skip the check when not in fuzzing mode.
+ conf.CHECK_HEADERS('bsd/string.h')
+
+ if not conf.CHECK_FUNCS('getpeereid'): + if not conf.CHECK_FUNCS('getpeereid'):
+ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') + conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
+ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): + if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') + conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
+ if not conf.CHECK_FUNCS('setproctitle_init'): + if not conf.CHECK_FUNCS('setproctitle_init'):
+ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') + conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h')
+
- if not conf.CHECK_FUNCS('closefrom'):
- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
+ if not conf.CHECK_FUNCS('closefrom'): + if not conf.CHECK_FUNCS('closefrom'):
+ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') + conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h')
@@ -145,7 +166,7 @@ diff --git a/wscript b/wscript
index ed5d45f..6bb0b37 100644 index ed5d45f..6bb0b37 100644
--- a/wscript --- a/wscript
+++ b/wscript +++ b/wscript
@@ -40,6 +40,14 @@ def options(opt): @@ -39,6 +39,14 @@
help='disable new LMDB backend for LDB', help='disable new LMDB backend for LDB',
action='store_true', dest='without_ldb_lmdb', default=False) action='store_true', dest='without_ldb_lmdb', default=False)
@@ -162,4 +183,3 @@ index ed5d45f..6bb0b37 100644
conf.RECURSE('lib/tdb') conf.RECURSE('lib/tdb')
-- --
2.25.1 2.25.1
@@ -35,7 +35,7 @@ LIC_FILES_CHKSUM = "file://pyldb.h;endline=24;md5=dfbd238cecad76957f7f860fbe9ada
file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \ file://man/ldb.3.xml;beginline=261;endline=262;md5=137f9fd61040c1505d1aa1019663fd08 \
file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42" file://tools/ldbdump.c;endline=19;md5=a7d4fc5d1f75676b49df491575a86a42"
SRC_URI[sha256sum] = "0e9aeb657aedbd048b1c0de4afe5b01a8dd33c24a6adb8361a0829374a2fc016" SRC_URI[sha256sum] = "d155884002c79dbb1c3d8642f8b1013f2e520b3aeefd6e96412adec5b8d6cbc0"
inherit pkgconfig waf-samba ptest inherit pkgconfig waf-samba ptest