pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ldb: version 2.4.2 for samba 4.15



Module Name:	pkgsrc-wip
Committed By:	Dr. Thomas Orgis <thomas.orgis%uni-hamburg.de@localhost>
Pushed By:	thor
Date:		Fri Jan 28 19:01:39 2022 +0100
Changeset:	8ef565ef36faa9750d1a163db0e5f0f8e0195d60

Modified Files:
	Makefile
Added Files:
	ldb/DESCR
	ldb/Makefile
	ldb/PLIST
	ldb/buildlink3.mk
	ldb/distinfo
	ldb/options.mk
	ldb/patches/patch-buildtools_wafsamba_samba__conftests.py
	ldb/patches/patch-buildtools_wafsamba_samba__install.py
	ldb/patches/patch-buildtools_wafsamba_samba__utils.py
	ldb/patches/patch-wscript

Log Message:
ldb: version 2.4.2 for samba 4.15

This is an updated ldb in preparation to build the newer samba. Nothing
more to see here. It needs to be 2.4, not 2.5!

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8ef565ef36faa9750d1a163db0e5f0f8e0195d60

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 Makefile                                           |  1 +
 ldb/DESCR                                          | 22 +++++++
 ldb/Makefile                                       | 74 ++++++++++++++++++++++
 ldb/PLIST                                          | 45 +++++++++++++
 ldb/buildlink3.mk                                  | 18 ++++++
 ldb/distinfo                                       |  9 +++
 ldb/options.mk                                     | 21 ++++++
 .../patch-buildtools_wafsamba_samba__conftests.py  | 19 ++++++
 .../patch-buildtools_wafsamba_samba__install.py    | 15 +++++
 .../patch-buildtools_wafsamba_samba__utils.py      | 18 ++++++
 ldb/patches/patch-wscript                          | 35 ++++++++++
 11 files changed, 277 insertions(+)

diffs:
diff --git a/Makefile b/Makefile
index 90ee1d1eb1..57c28c6774 100644
--- a/Makefile
+++ b/Makefile
@@ -1993,6 +1993,7 @@ SUBDIR+=	lcov-git
 SUBDIR+=	ldapbrowser
 SUBDIR+=	ldapdns
 SUBDIR+=	ldapuseradd
+SUBDIR+=	ldb
 SUBDIR+=	ldc
 SUBDIR+=	ldc-git
 SUBDIR+=	ldc017
diff --git a/ldb/DESCR b/ldb/DESCR
new file mode 100644
index 0000000000..1c9f085ba5
--- /dev/null
+++ b/ldb/DESCR
@@ -0,0 +1,22 @@
+ldb is a LDAP-like embedded database. It is not at all LDAP standards
+compliant, so if you want a standards compliant database then please see the
+excellent OpenLDAP project.
+
+What ldb does is provide a fast database with an LDAP-like API designed to be
+used within an application. In some ways it can be seen as a intermediate
+solution between key-value pair databases and a real LDAP database.
+
+ldb is the database engine used in Samba4.
+
+Features:
+* The main features that separate ldb from other solutions are:
+* Safe multi-reader, multi-writer, using byte range locking
+* LDAP-like API
+* fast operation
+* choice of local tdb or remote LDAP backends
+* integration with talloc
+* schema-less operation, for trivial setup
+* modules for extensions (such as schema support)
+* easy setup of indexes and attribute properties
+* LDIF for import/export
+* ldbedit tool for database (via LDIF) editing (reminiscent of 'vipw')
diff --git a/ldb/Makefile b/ldb/Makefile
new file mode 100644
index 0000000000..35089fbef6
--- /dev/null
+++ b/ldb/Makefile
@@ -0,0 +1,74 @@
+# $NetBSD: Makefile,v 1.24 2021/11/10 13:32:10 adam Exp $
+
+# Before updating, make sure net/samba4 supports the newer version.
+DISTNAME=	ldb-2.4.2
+CATEGORIES=	databases
+MASTER_SITES=	https://www.samba.org/ftp/ldb/
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://ldb.samba.org/
+COMMENT=	LDAP-like embedded database
+LICENSE=	gnu-gpl-v3
+
+BUILD_DEPENDS+=	libxslt-[0-9]*:../../textproc/libxslt
+BUILD_DEPENDS+=	docbook-xsl-[0-9]*:../../textproc/docbook-xsl
+
+PYTHON_VERSIONS_INCOMPATIBLE=	27
+
+USE_TOOLS+=		gmake pkg-config
+HAS_CONFIGURE=		yes
+CONFIG_SHELL=		${PYTHONBIN}
+CONFIGURE_SCRIPT=	${WRKSRC}/buildtools/bin/waf
+CONFIGURE_ARGS+=	configure
+CONFIGURE_ARGS+=	--mandir=${PREFIX}/${PKGMANDIR}
+CONFIGURE_ARGS+=	--abi-check-disable
+CONFIGURE_ARGS+=	--disable-symbol-versions
+CONFIGURE_ARGS+=	--with-libiconv=${BUILDLINK_PREFIX.iconv}
+.if defined(MAKE_JOBS) && !empty(MAKE_JOBS) && !(defined(MAKE_JOBS_SAFE) && !empty(MAKE_JOBS_SAFE:M[nN][oO]))
+CONFIGURE_ARGS+=	--jobs=${MAKE_JOBS}
+.else
+CONFIGURE_ARGS+=	--jobs=1
+.endif
+TEST_TARGET=		test
+
+USE_GCC_RUNTIME=	yes
+
+PY_PATCHPLIST=		yes
+REPLACE_PYTHON+=	buildtools/bin/waf
+MAKE_FLAGS+=		WAF_BINARY=${PYTHONBIN}\ ${WRKSRC}/buildtools/bin/waf
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${SHLIB_TYPE} == "dylib"
+PLIST_SUBST+=	SOEXT=dylib
+.else
+PLIST_SUBST+=	SOEXT=so
+.endif
+
+SUBST_CLASSES+=		docbook
+SUBST_MESSAGE.docbook=	Fixing docbook URLs.
+SUBST_FILES.docbook+=	buildtools/wafsamba/samba_conftests.py
+SUBST_FILES.docbook+=	buildtools/wafsamba/wafsamba.py
+SUBST_STAGE.docbook=	pre-configure
+SUBST_SED.docbook+=	-e 's,http://docbook.sourceforge.net/release/xsl/current,${PREFIX}/share/xsl/docbook,g'
+
+PLIST_VARS+=	64bit
+.if !empty(LP64PLATFORMS:@.PLAT.@${MACHINE_PLATFORM:M${.PLAT.}}@) || \
+	(defined(ABI) && ${ABI} == "64")
+PLIST.64bit=		yes
+.include "../../databases/lmdb/buildlink3.mk"
+.else
+CONFIGURE_ARGS+=	--without-ldb-lmdb
+.endif
+
+.include "options.mk"
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../databases/tdb/buildlink3.mk"
+.include "../../devel/cmocka/buildlink3.mk"
+.include "../../devel/popt/buildlink3.mk"
+.include "../../devel/talloc/buildlink3.mk"
+.include "../../devel/tevent/buildlink3.mk"
+.include "../../lang/python/application.mk"
+.include "../../lang/python/extension.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/ldb/PLIST b/ldb/PLIST
new file mode 100644
index 0000000000..4e03719edd
--- /dev/null
+++ b/ldb/PLIST
@@ -0,0 +1,45 @@
+@comment $NetBSD: PLIST,v 1.3 2020/03/18 00:29:38 tnn Exp $
+bin/ldbadd
+bin/ldbdel
+bin/ldbedit
+bin/ldbmodify
+bin/ldbrename
+bin/ldbsearch
+include/ldb.h
+include/ldb_errors.h
+include/ldb_handlers.h
+include/ldb_module.h
+include/ldb_version.h
+include/pyldb.h
+lib/ldb/libldb-cmdline.so
+lib/ldb/libldb-key-value.so
+${PLIST.64bit}lib/ldb/libldb-mdb-int.so
+lib/ldb/libldb-tdb-err-map.so
+lib/ldb/libldb-tdb-int.so
+lib/libldb.so
+lib/libldb.so.${PKGVERSION}
+lib/libldb.so.2
+lib/libpyldb-util.so
+lib/libpyldb-util.so.${PKGVERSION}
+lib/libpyldb-util.so.2
+lib/pkgconfig/ldb.pc
+lib/pkgconfig/pyldb-util.pc
+${PYSITELIB}/_ldb_text.py
+${PYSITELIB}/ldb.so
+man/man1/ldbadd.1
+man/man1/ldbdel.1
+man/man1/ldbedit.1
+man/man1/ldbmodify.1
+man/man1/ldbrename.1
+man/man1/ldbsearch.1
+man/man3/ldb.3
+modules/ldb/asq.${SOEXT}
+${PLIST.ldap}modules/ldb/ldap.${SOEXT}
+modules/ldb/ldb.${SOEXT}
+${PLIST.64bit}modules/ldb/mdb.${SOEXT}
+modules/ldb/paged_searches.${SOEXT}
+modules/ldb/rdn_name.${SOEXT}
+modules/ldb/sample.${SOEXT}
+modules/ldb/server_sort.${SOEXT}
+modules/ldb/skel.${SOEXT}
+modules/ldb/tdb.${SOEXT}
diff --git a/ldb/buildlink3.mk b/ldb/buildlink3.mk
new file mode 100644
index 0000000000..a7a6eba99f
--- /dev/null
+++ b/ldb/buildlink3.mk
@@ -0,0 +1,18 @@
+# $NetBSD: buildlink3.mk,v 1.3 2019/11/10 16:58:06 adam Exp $
+
+BUILDLINK_TREE+=	ldb
+
+.if !defined(LDB_BUILDLINK3_MK)
+LDB_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.ldb+=	ldb>=2.4.0
+BUILDLINK_PKGSRCDIR.ldb?=	../../wip/ldb
+
+.include "../../converters/libiconv/buildlink3.mk"
+.include "../../databases/tdb/buildlink3.mk"
+.include "../../devel/popt/buildlink3.mk"
+.include "../../devel/talloc/buildlink3.mk"
+.include "../../devel/tevent/buildlink3.mk"
+.endif	# LDB_BUILDLINK3_MK
+
+BUILDLINK_TREE+=	-ldb
diff --git a/ldb/distinfo b/ldb/distinfo
new file mode 100644
index 0000000000..5923857c19
--- /dev/null
+++ b/ldb/distinfo
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.17 2021/11/10 13:32:10 adam Exp $
+
+BLAKE2s (ldb-2.4.2.tar.gz) = 710d6614f1ffcc61735f96fae6495be90b185f0bbd19e8c293650ae73e9dee00
+SHA512 (ldb-2.4.2.tar.gz) = 77705ad284eed9105c9aba0459d2e48cd66ca19b657a55f7513e10281dd2e96540d24d1c8df53adc84109a918900687dc75b635cda05c4e788424ed71b5ff989
+Size (ldb-2.4.2.tar.gz) = 1720169 bytes
+SHA1 (patch-buildtools_wafsamba_samba__conftests.py) = 813c639e404e3b301444decae318c702c87f0cc1
+SHA1 (patch-buildtools_wafsamba_samba__install.py) = d801340617da325e3bb70a90350e45cc8e383c2d
+SHA1 (patch-buildtools_wafsamba_samba__utils.py) = 0a587421870c1974175fadbb02dde215f35938f2
+SHA1 (patch-wscript) = ad5dd815e97e29e5c19e5f45165cac490d01492d
diff --git a/ldb/options.mk b/ldb/options.mk
new file mode 100644
index 0000000000..8db76cb353
--- /dev/null
+++ b/ldb/options.mk
@@ -0,0 +1,21 @@
+# $NetBSD: options.mk,v 1.4 2021/05/11 10:57:34 hauke Exp $
+
+PKG_OPTIONS_VAR=	PKG_OPTIONS.ldb
+PKG_SUPPORTED_OPTIONS=	ldap
+PKG_SUGGESTED_OPTIONS=	ldap
+
+.include "../../mk/bsd.options.mk"
+
+PLIST_VARS+=		ldap
+
+.if !empty(PKG_OPTIONS:Mldap)
+.  include "../../databases/openldap-client/buildlink3.mk"
+PLIST.ldap=		yes
+.else
+# No official way to configure without ldap
+WSCRIPT=	${WRKSRC}/wscript
+pre-configure:
+	${MV} ${WSCRIPT} ${WSCRIPT}.old
+	${SED} -E -e 's/(ENABLE_LDAP_BACKEND =) True/\1 False/g' \
+		${WSCRIPT}.old > ${WSCRIPT}
+.endif
diff --git a/ldb/patches/patch-buildtools_wafsamba_samba__conftests.py b/ldb/patches/patch-buildtools_wafsamba_samba__conftests.py
new file mode 100644
index 0000000000..19c85ae99c
--- /dev/null
+++ b/ldb/patches/patch-buildtools_wafsamba_samba__conftests.py
@@ -0,0 +1,19 @@
+$NetBSD: patch-buildtools_wafsamba_samba__conftests.py,v 1.2 2019/11/10 16:58:06 adam Exp $
+
+Ensure defines are strings to avoid assertion failure, some
+returned values are unicode.
+
+--- buildtools/wafsamba/samba_conftests.py.orig	2019-03-21 10:12:32.000000000 +0000
++++ buildtools/wafsamba/samba_conftests.py
+@@ -97,9 +97,9 @@ def CHECK_LARGEFILE(conf, define='HAVE_L
+                 if flag[:2] == "-D":
+                     flag_split = flag[2:].split('=')
+                     if len(flag_split) == 1:
+-                        conf.DEFINE(flag_split[0], '1')
++                        conf.DEFINE(str(flag_split[0]), '1')
+                     else:
+-                        conf.DEFINE(flag_split[0], flag_split[1])
++                        conf.DEFINE(str(flag_split[0]), str(flag_split[1]))
+ 
+     if conf.CHECK_CODE('if (sizeof(off_t) < 8) return 1',
+                        define,
diff --git a/ldb/patches/patch-buildtools_wafsamba_samba__install.py b/ldb/patches/patch-buildtools_wafsamba_samba__install.py
new file mode 100644
index 0000000000..91702aaa25
--- /dev/null
+++ b/ldb/patches/patch-buildtools_wafsamba_samba__install.py
@@ -0,0 +1,15 @@
+$NetBSD: patch-buildtools_wafsamba_samba__install.py,v 1.1 2019/03/20 19:06:17 adam Exp $
+
+Apply correct install_name on Darwin.
+
+--- buildtools/wafsamba/samba_install.py.orig	2019-01-14 22:24:44.000000000 +0000
++++ buildtools/wafsamba/samba_install.py
+@@ -151,6 +151,8 @@ def install_library(self):
+             bld.symlink_as(os.path.join(install_path, install_link), os.path.basename(install_name))
+         if dev_link:
+             bld.symlink_as(os.path.join(install_path, dev_link), os.path.basename(install_name))
++        if getattr(self, 'samba_type', None) != 'PYTHON' and self.env.MACOSX_DEPLOYMENT_TARGET:
++            self.env.append_value('LINKFLAGS', ['-install_name', os.path.join(install_path, install_name)])
+     finally:
+         bld.all_envs['default'] = default_env
+ 
diff --git a/ldb/patches/patch-buildtools_wafsamba_samba__utils.py b/ldb/patches/patch-buildtools_wafsamba_samba__utils.py
new file mode 100644
index 0000000000..a876de4e7e
--- /dev/null
+++ b/ldb/patches/patch-buildtools_wafsamba_samba__utils.py
@@ -0,0 +1,18 @@
+$NetBSD: patch-buildtools_wafsamba_samba__utils.py,v 1.1 2019/06/22 12:56:31 jmcneill Exp $
+
+Fixes a build failure when the letter 'j' appears in MAKEFLAGS.
+
+--- buildtools/wafsamba/samba_utils.py.orig	2019-03-21 10:12:32.000000000 +0000
++++ buildtools/wafsamba/samba_utils.py
+@@ -519,10 +519,7 @@ def CHECK_MAKEFLAGS(options):
+             setattr(options, opt[0:loc], opt[loc+1:])
+         elif opt[0] != '-':
+             for v in opt:
+-                if re.search(r'j[0-9]*$', v):
+-                    jobs_set = True
+-                    jobs = opt.strip('j')
+-                elif v == 'k':
++                if v == 'k':
+                     options.keep = True
+         elif re.search(r'-j[0-9]*$', opt):
+             jobs_set = True
diff --git a/ldb/patches/patch-wscript b/ldb/patches/patch-wscript
new file mode 100644
index 0000000000..c3e904402d
--- /dev/null
+++ b/ldb/patches/patch-wscript
@@ -0,0 +1,35 @@
+$NetBSD: patch-wscript,v 1.1 2021/05/11 10:57:34 hauke Exp $
+
+Since the build system does not provide an ldap switch, we patch this script
+from options.mk with sed(1) to disable building with ldap support
+
+Changes make sure not to build any ldap dependencies when that is what we want.
+
+--- wscript.orig	2020-07-09 12:04:50.000000000 +0000
++++ wscript
+@@ -148,6 +148,8 @@ def configure(conf):
+         # we need this for the ldap backend
+         if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
+             conf.env.ENABLE_LDAP_BACKEND = True
++        else:
++            conf.env.ENABLE_LDAP_BACKEND = False
+ 
+         # we don't want any libraries or modules to rely on runtime
+         # resolution of symbols
+@@ -534,6 +536,7 @@ def build(bld):
+             bld.SAMBA_BINARY('lldb_ldap_test',
+                              source='tests/lldb_ldap.c',
+                              deps='cmocka talloc lber ldap ldb',
++                             enabled=bld.env.ENABLE_LDAP_BACKEND,
+                              install=False)
+ 
+         if bld.CONFIG_SET('HAVE_LMDB'):
+@@ -640,7 +643,7 @@ def test(ctx):
+ 
+     # if LIB_LDAP and LIB_LBER defined, then we can test ldb_ldap backend
+     # behavior regression for bz#14413
+-    if env.LIB_LDAP and env.LIB_LBER:
++    if bld.env.ENABLE_LDAP_BACKEND and env.LIB_LDAP and env.LIB_LBER:
+         test_exes += ["lldb_ldap_test"]
+ 
+     if env.HAVE_LMDB:


Home | Main Index | Thread Index | Old Index