Date: Tue, 2 Jul 2019 19:07:55 +0000 (UTC) From: "Timur I. Bakeyev" <timur@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r505699 - in head/net/samba48: . files Message-ID: <201907021907.x62J7tvi092965@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: timur Date: Tue Jul 2 19:07:54 2019 New Revision: 505699 URL: https://svnweb.freebsd.org/changeset/ports/505699 Log: Another attempt to work around the t{alloc,db,event}1 <-> t{alloc,db,event} conflict if there are installations of samba48 and other consumers of those libs. With /etc/make.conf settings of: SAMBA4_BUNDLED_TALLOC= yes SAMBA4_BUNDLED_TEVENT= yes SAMBA4_BUNDLED_TDB= yes the samba48 port will be statically linked with bundled libraries and won't depend on any external t{alloc,db,event}. Ldb here stands out, as even with bundled version same binaries are installed where the ldb13 installs them. For this situation it's adviced to set: SAMBA4_BUNDLED_LDB= no and make sure that all LDB dependant ports use the same ldb13 dependency. PR: 238790 Added: head/net/samba48/files/patch-lib_ldb_wscript (contents, props changed) Modified: head/net/samba48/Makefile head/net/samba48/pkg-plist Modified: head/net/samba48/Makefile ============================================================================== --- head/net/samba48/Makefile Tue Jul 2 18:55:38 2019 (r505698) +++ head/net/samba48/Makefile Tue Jul 2 19:07:54 2019 (r505699) @@ -161,7 +161,6 @@ SAMBA4_BUNDLED_TALLOC?= no SAMBA4_BUNDLED_TEVENT?= no SAMBA4_BUNDLED_TDB?= no SAMBA4_BUNDLED_LDB?= yes -SAMBA4_LDB= 13 # cmocka .if defined(SAMBA4_BUNDLED_CMOCKA) && ${SAMBA4_BUNDLED_CMOCKA} == yes SAMBA4_BUNDLED_LIBS+= cmocka @@ -178,7 +177,6 @@ SUB_LIST+= SAMBA4_BUNDLED_CMOCKA="@comment " # talloc .if defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes SAMBA4_BUNDLED_LIBS+= talloc -CONFLICTS+= talloc1-2.* PLIST_SUB+= SAMBA4_BUNDLED_TALLOC="" SUB_LIST+= SAMBA4_BUNDLED_TALLOC="" .else @@ -191,7 +189,6 @@ SUB_LIST+= SAMBA4_BUNDLED_TALLOC="@comment " # tevent .if defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes SAMBA4_BUNDLED_LIBS+= tevent -CONFLICTS+= tevent1-0.* PLIST_SUB+= SAMBA4_BUNDLED_TEVENT="" SUB_LIST+= SAMBA4_BUNDLED_TEVENT="" .else @@ -204,7 +201,6 @@ SUB_LIST+= SAMBA4_BUNDLED_TEVENT="@comment " # tdb .if defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes SAMBA4_BUNDLED_LIBS+= tdb -CONFLICTS+= tdb1-1.* PLIST_SUB+= SAMBA4_BUNDLED_TDB="" SUB_LIST+= SAMBA4_BUNDLED_TDB="" .else @@ -215,30 +211,23 @@ PLIST_SUB+= SAMBA4_BUNDLED_TDB="@comment " SUB_LIST+= SAMBA4_BUNDLED_TDB="@comment " .endif # ldb -.if (defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes) || !defined(SAMBA4_LDB) +.if defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes SAMBA4_BUNDLED_LDB= yes SAMBA4_BUNDLED_LIBS+= ldb CONFLICTS+= ldb-1.* ldb1[23]-1.* PLIST_SUB+= SAMBA4_BUNDLED_LDB="" SUB_LIST+= SAMBA4_BUNDLED_LDB="" .else -. if ${SAMBA4_LDB} == 13 -BUILD_DEPENDS+= ldb13>=1.3.6:databases/ldb13 -RUN_DEPENDS+= ldb13>=1.3.6:databases/ldb13 -. elif ${SAMBA4_LDB} == 12 -BUILD_DEPENDS+= ldb12>=1.2.3:databases/ldb12 -RUN_DEPENDS+= ldb12>=1.2.3:databases/ldb12 -. elif ${SAMBA4_LDB} == 11 -BUILD_DEPENDS+= ldb>=1.1.29:databases/ldb -RUN_DEPENDS+= ldb>=1.1.29:databases/ldb -. endif SAMBA4_BUNDLED_LIBS+= !ldb +BUILD_DEPENDS+= ldb13>=1.3.8:databases/ldb13 +RUN_DEPENDS+= ldb13>=1.3.8:databases/ldb13 PLIST_SUB+= SAMBA4_BUNDLED_LDB="@comment " SUB_LIST+= SAMBA4_BUNDLED_LDB="@comment " .endif .if (defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TEVENT} == yes) \ || (defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes) \ + || (defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes) \ || (defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes) SAMBA4_BUNDLED_LIBS+= replace .endif @@ -392,22 +381,6 @@ SAMBA4_MODULES+= auth_skel pdb_test gpext_security gp vfs_nfs4acl_xattr vfs_error_inject vfs_delay_inject .endif -.if defined(WANT_EXP_MODULES) && !empty(WANT_EXP_MODULES) -SAMBA4_MODULES+= ${WANT_EXP_MODULES} -.endif - -.if defined(SAMBA4_BUNDLED_LIBS) && !empty(SAMBA4_BUNDLED_LIBS) -CONFIGURE_ARGS+= --bundled-libraries="${SAMBA4_BUNDLED_LIBS:Q:C|(\\\\ )+|,|g:S|\\||g}" -.endif - -.if defined(SAMBA4_MODULES) && !empty(SAMBA4_MODULES) -CONFIGURE_ARGS+= --with-shared-modules="${SAMBA4_MODULES:C|-|_|:Q:C|(\\\\ )+|,|g:S|\\||g}" -.endif -# XXX: Hack for nss-info_* -> nss_info/* modules -# Add selected modules to the plist -.for module in ${SAMBA4_MODULES} -PLIST_FILES+= lib/shared-modules/${module:C|_|/|:C|-|_|}.so -.endfor # Python bindings .if defined(NO_PYTHON) USES+= python:2.7,build,test @@ -421,15 +394,23 @@ SUB_LIST+= SAMBA4_PYTHON2="" .if !defined(SAMBA4_BUNDLED_TALLOC) SAMBA4_BUNDLED_LIBS+= !pytalloc-util +.else +SAMBA4_BUNDLED_LIBS+= pytalloc-util .endif .if !defined(SAMBA4_BUNDLED_TEVENT) SAMBA4_BUNDLED_LIBS+= !pytevent +.else +SAMBA4_BUNDLED_LIBS+= pytevent .endif .if !defined(SAMBA4_BUNDLED_TDB) SAMBA4_BUNDLED_LIBS+= !pytdb +.else +SAMBA4_BUNDLED_LIBS+= pytdb .endif .if !defined(SAMBA4_BUNDLED_LDB) -SAMBA4_BUNDLED_LIBS+= !pyldb,!pyldb-util +SAMBA4_BUNDLED_LIBS+= !pyldb !pyldb-util +.else +SAMBA4_BUNDLED_LIBS+= pyldb pyldb-util .endif # External Python modules BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dnspython>=1.15.0:dns/py-dnspython@${PY_FLAVOR} @@ -468,6 +449,24 @@ PLIST_SUB+= SAMBA4_PYTHON3="@comment " SUB_LIST+= SAMBA4_PYTHON3="@comment " .endif .endif + +.if defined(WANT_EXP_MODULES) && !empty(WANT_EXP_MODULES) +SAMBA4_MODULES+= ${WANT_EXP_MODULES} +.endif + +.if defined(SAMBA4_BUNDLED_LIBS) && !empty(SAMBA4_BUNDLED_LIBS) +CONFIGURE_ARGS+= --bundled-libraries="${SAMBA4_BUNDLED_LIBS:Q:C|(\\\\ )+|,|g:S|\\||g}" +CONFIGURE_ARGS+= --builtin-libraries="${SAMBA4_BUNDLED_LIBS:Q:C|(\\\\ )+|,|g:S|\\||g}" +.endif + +.if defined(SAMBA4_MODULES) && !empty(SAMBA4_MODULES) +CONFIGURE_ARGS+= --with-shared-modules="${SAMBA4_MODULES:C|-|_|:Q:C|(\\\\ )+|,|g:S|\\||g}" +.endif +# XXX: Hack for nss-info_* -> nss_info/* modules +# Add selected modules to the plist +.for module in ${SAMBA4_MODULES} +PLIST_FILES+= lib/shared-modules/${module:C|_|/|:C|-|_|}.so +.endfor # !SAMBA4_SUBPORT .endif Added: head/net/samba48/files/patch-lib_ldb_wscript ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/samba48/files/patch-lib_ldb_wscript Tue Jul 2 19:07:54 2019 (r505699) @@ -0,0 +1,53 @@ +--- lib/ldb/wscript.orig 2019-02-26 17:14:29 UTC ++++ lib/ldb/wscript +@@ -139,9 +139,15 @@ def build(bld): + bld.RECURSE('lib/tdb') + + if bld.env.standalone_ldb: ++ if not 'PACKAGE_VERSION' in bld.env: ++ bld.env.PACKAGE_VERSION = VERSION ++ bld.env.PKGCONFIGDIR = '%%PKGCONFIGDIR%%' + private_library = False + else: + private_library = True ++ # we're not currently linking against the ldap libs, but ldb.pc.in ++ # has @LDAP_LIBS@ ++ bld.env.LDAP_LIBS = '' + + LDB_MAP_SRC = bld.SUBDIR('ldb_map', + 'ldb_map.c ldb_map_inbound.c ldb_map_outbound.c') +@@ -162,13 +168,6 @@ def build(bld): + if bld.PYTHON_BUILD_IS_ENABLED(): + if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'): + for env in bld.gen_python_environments(['PKGCONFIGDIR']): +- # we're not currently linking against the ldap libs, but ldb.pc.in +- # has @LDAP_LIBS@ +- bld.env.LDAP_LIBS = '' +- +- if not 'PACKAGE_VERSION' in bld.env: +- bld.env.PACKAGE_VERSION = VERSION +- bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' + + name = bld.pyembed_libname('pyldb-util') + bld.SAMBA_LIBRARY(name, +@@ -364,10 +363,6 @@ def build(bld): + deps='cmocka ldb', + install=False) + +- bld.SAMBA_BINARY('ldb_match_test', +- source='tests/ldb_match_test.c', +- deps='cmocka ldb', +- install=False) + + def test(ctx): + '''run ldb testsuite''' +@@ -397,8 +392,7 @@ def test(ctx): + + cmocka_ret = 0 + for test_exe in ['ldb_tdb_mod_op_test', +- 'ldb_msg_test', +- 'ldb_match_test']: ++ 'ldb_msg_test']: + cmd = os.path.join(Utils.g_module.blddir, test_exe) + cmocka_ret = cmocka_ret or samba_utils.RUN_COMMAND(cmd) + Modified: head/net/samba48/pkg-plist ============================================================================== --- head/net/samba48/pkg-plist Tue Jul 2 18:55:38 2019 (r505698) +++ head/net/samba48/pkg-plist Tue Jul 2 19:07:54 2019 (r505699) @@ -258,7 +258,6 @@ lib/samba4/private/libpopt-samba3-samba4.so lib/samba4/private/libpopt-samba3-cmdline-samba4.so lib/samba4/private/libprinting-migrate-samba4.so lib/samba4/private/libregistry-samba4.so -lib/samba4/private/libreplace-samba4.so %%GSSAPI_BUILTIN%%lib/samba4/private/libroken-samba4.so.19 lib/samba4/private/libsamba-cluster-support-samba4.so lib/samba4/private/libsamba-debug-samba4.so @@ -1303,27 +1302,15 @@ man/man8/winbindd.8.gz %%SAMBA4_BUNDLED_LDB%%%%SAMBA4_PYTHON2%%%%PYTHON_SITELIBDIR%%/_ldb_text.py %%SAMBA4_BUNDLED_TDB%%%%SAMBA4_PYTHON2%%%%PYTHON_SITELIBDIR%%/_tdb_text.py %%SAMBA4_BUNDLED_TEVENT%%%%SAMBA4_PYTHON2%%%%PYTHON_SITELIBDIR%%/_tevent.so -%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_PYTHON2%%%%PYTHON_SITELIBDIR%%/ldb.so %%SAMBA4_BUNDLED_TALLOC%%%%SAMBA4_PYTHON2%%%%PYTHON_SITELIBDIR%%/talloc.so -%%SAMBA4_BUNDLED_TDB%%%%SAMBA4_PYTHON2%%%%PYTHON_SITELIBDIR%%/tdb.so %%SAMBA4_BUNDLED_TEVENT%%%%SAMBA4_PYTHON2%%%%PYTHON_SITELIBDIR%%/tevent.py %%SAMBA4_BUNDLED_LDB%%%%SAMBA4_PYTHON3%%%%SAMBA4_PYTHON3_SITELIBDIR%%/_ldb_text.py %%SAMBA4_BUNDLED_TDB%%%%SAMBA4_PYTHON3%%%%SAMBA4_PYTHON3_SITELIBDIR%%/_tdb_text.py %%SAMBA4_BUNDLED_TEVENT%%%%SAMBA4_PYTHON3%%%%SAMBA4_PYTHON3_SITELIBDIR%%/_tevent.cpython-36m.so -%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_PYTHON3%%%%SAMBA4_PYTHON3_SITELIBDIR%%/ldb.cpython-36m.so %%SAMBA4_BUNDLED_TALLOC%%%%SAMBA4_PYTHON3%%%%SAMBA4_PYTHON3_SITELIBDIR%%/talloc.cpython-36m.so -%%SAMBA4_BUNDLED_TDB%%%%SAMBA4_PYTHON3%%%%SAMBA4_PYTHON3_SITELIBDIR%%/tdb.cpython-36m.so %%SAMBA4_BUNDLED_TEVENT%%%%SAMBA4_PYTHON3%%%%SAMBA4_PYTHON3_SITELIBDIR%%/tevent.py %%SAMBA4_BUNDLED_CMOCKA%%lib/samba4/private/libcmocka-samba4.so %%SAMBA4_BUNDLED_LDB%%lib/samba4/private/libldb-cmdline-samba4.so -%%SAMBA4_BUNDLED_LDB%%lib/samba4/private/libldb.so.1 -%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_PYTHON3%%lib/samba4/private/libpyldb-util.cpython-36m.so.1 -%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_PYTHON2%%lib/samba4/private/libpyldb-util.so.1 -%%SAMBA4_BUNDLED_TALLOC%%%%SAMBA4_PYTHON3%%lib/samba4/private/libpytalloc-util.cpython-36m.so.2 -%%SAMBA4_BUNDLED_TALLOC%%%%SAMBA4_PYTHON2%%lib/samba4/private/libpytalloc-util.so.2 -%%SAMBA4_BUNDLED_TALLOC%%lib/samba4/private/libtalloc.so.2 -%%SAMBA4_BUNDLED_TDB%%lib/samba4/private/libtdb.so.1 -%%SAMBA4_BUNDLED_TEVENT%%lib/samba4/private/libtevent.so.0 %%SAMBA4_BUNDLED_LDB%%lib/shared-modules/ldb/asq.so %%SAMBA4_BUNDLED_LDB%%lib/shared-modules/ldb/paged_results.so %%SAMBA4_BUNDLED_LDB%%lib/shared-modules/ldb/paged_searches.so @@ -1338,8 +1325,6 @@ man/man8/winbindd.8.gz %%SAMBA4_BUNDLED_LDB%%man/man1/ldbmodify.1.gz %%SAMBA4_BUNDLED_LDB%%man/man1/ldbrename.1.gz %%SAMBA4_BUNDLED_LDB%%man/man1/ldbsearch.1.gz -%%SAMBA4_BUNDLED_LDB%%man/man3/ldb.3.gz -%%SAMBA4_BUNDLED_TALLOC%%man/man3/talloc.3.gz %%SAMBA4_BUNDLED_TDB%%man/man8/tdbbackup.8.gz %%SAMBA4_BUNDLED_TDB%%man/man8/tdbdump.8.gz %%SAMBA4_BUNDLED_TDB%%man/man8/tdbrestore.8.gz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907021907.x62J7tvi092965>