From: Michael Tokarev Date: Thu, 19 May 2022 17:37:21 +0000 (+0300) Subject: specify some deps on private libs actually used directly X-Git-Tag: archive/raspbian/2%4.22.0+dfsg-1+rpi1^2^2^2~10 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a6f4d641a5fb59c89dcdeba0696fe2010babffb5;p=samba.git specify some deps on private libs actually used directly Updated: Thu, 28 Nov 2024 11:59:58 +0300 Forwarded: https://gitlab.com/samba-team/samba/-/merge_requests/3872 Lots of samba libraries has incomplete dependencies listed in wscript files. This usually is not a problem since the link line includes dependencies of their dependencies of their dependencies, and somewhere down that line all immediate dependencies which are missing are actually present. But sometimes this becomes a problem when a library does not declare direct dependency on at least one private library which it actually uses: in case no private library is listed as direct dependency, private library directory is not put into RUNPATH of the resulting binary, so the binary can not find its own dependencies. Fix a few such places, including some libraries which are a part of public abi (libsmbldap, libndr). Signed-off-by: Michael Tokarev Gbp-Pq: Name add-missing-libs-deps.diff --- diff --git a/lib/param/wscript_build b/lib/param/wscript_build index 864975a5..0ea874b9 100644 --- a/lib/param/wscript_build +++ b/lib/param/wscript_build @@ -32,7 +32,7 @@ bld.SAMBA_GENERATOR('param_table_gen.c', bld.SAMBA_LIBRARY('server-role', source='loadparm_server_role.c', - deps='samba-util samba-debug', + deps='samba-util time-basic samba-debug', private_library=True) bld.SAMBA_LIBRARY('samba-hostconfig', diff --git a/lib/util/wscript_build b/lib/util/wscript_build index b4fcfeab..38614702 100644 --- a/lib/util/wscript_build +++ b/lib/util/wscript_build @@ -243,7 +243,7 @@ else: bld.SAMBA_LIBRARY('samba-modules', source='modules.c', - deps='samba-errors samba-util', + deps='samba-errors samba-util samba-debug', local_include=False, private_library=True) @@ -277,7 +277,7 @@ else: tevent_req_profile.c ''', local_include=False, - public_deps='tevent samba-errors', + public_deps='tevent time-basic samba-errors', public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h', header_path=[ ('*', 'util') ], pc_files=[], diff --git a/librpc/wscript_build b/librpc/wscript_build index b1765863..e7e5eff5 100644 --- a/librpc/wscript_build +++ b/librpc/wscript_build @@ -672,6 +672,7 @@ bld.SAMBA_LIBRARY('ndr', source='ndr/ndr_string.c ndr/ndr_basic.c ndr/uuid.c ndr/ndr.c ndr/ndr_misc.c gen_ndr/ndr_misc.c ndr/util.c', pc_files='ndr.pc', public_deps='samba-errors talloc samba-util util_str_hex', + deps='genrand', public_headers='gen_ndr/misc.h gen_ndr/ndr_misc.h ndr/libndr.h:ndr.h', header_path= [('*gen_ndr*', 'gen_ndr')], vnum='5.0.0', diff --git a/source3/wscript_build b/source3/wscript_build index 824f961c..d966bf19 100644 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -191,7 +191,7 @@ bld.SAMBA3_LIBRARY('smbldaphelper', passdb/pdb_ldap_schema.c passdb/pdb_ldap_util.c ''', - deps='smbldap secrets3', + deps='smbldap secrets3 samba-security samba3-util', allow_undefined_symbols=True, enabled=bld.CONFIG_SET('HAVE_LDAP'), private_library=True) @@ -491,7 +491,7 @@ bld.SAMBA3_LIBRARY('secrets3', bld.SAMBA3_LIBRARY('smbldap', source='lib/smbldap.c', - deps='ldap lber samba-util smbconf', + deps='ldap lber samba-util smbconf samba-security genrand smbd_shim', enabled=bld.CONFIG_SET("HAVE_LDAP"), private_library=False, abi_directory='lib/ABI', diff --git a/source4/dsdb/samdb/ldb_modules/wscript_build_server b/source4/dsdb/samdb/ldb_modules/wscript_build_server index 9c1eb12a..1f706412 100644 --- a/source4/dsdb/samdb/ldb_modules/wscript_build_server +++ b/source4/dsdb/samdb/ldb_modules/wscript_build_server @@ -345,7 +345,7 @@ bld.SAMBA_MODULE('ldb_anr', init_function='ldb_anr_module_init', module_init_name='ldb_init_module', internal_module=False, - deps='talloc samba-util samdb' + deps='talloc samba-util samdb ldbsamba' ) @@ -385,7 +385,7 @@ bld.SAMBA_MODULE('ldb_resolve_oids', init_function='ldb_resolve_oids_module_init', module_init_name='ldb_init_module', internal_module=False, - deps='samdb talloc ndr' + deps='samdb talloc ndr ldbsamba' ) diff --git a/source4/param/wscript_build b/source4/param/wscript_build index d1b852c0..80341369 100644 --- a/source4/param/wscript_build +++ b/source4/param/wscript_build @@ -39,7 +39,7 @@ libpython = bld.pyembed_libname('LIBPYTHON') bld.SAMBA_PYTHON('pyparam', source='pyparam.c', - deps='samba-hostconfig %s' % pytalloc_util, + deps='samba-hostconfig server-role samba-util samba-debug %s' % pytalloc_util, realname='samba/param.so' )