1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

specify some deps on private libs actually used directly

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 <mjt@tls.msk.ru>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
This commit is contained in:
Michael Tokarev 2022-05-19 20:37:21 +03:00 committed by Pavel Filipensky
parent 2b2f06ee6e
commit bf239def4f
6 changed files with 9 additions and 8 deletions

View File

@ -32,7 +32,7 @@ bld.SAMBA_GENERATOR('param_table_gen.c',
bld.SAMBA_LIBRARY('server-role', bld.SAMBA_LIBRARY('server-role',
source='loadparm_server_role.c', source='loadparm_server_role.c',
deps='samba-util samba-debug', deps='samba-util time-basic samba-debug',
private_library=True) private_library=True)
bld.SAMBA_LIBRARY('samba-hostconfig', bld.SAMBA_LIBRARY('samba-hostconfig',

View File

@ -243,7 +243,7 @@ else:
bld.SAMBA_LIBRARY('samba-modules', bld.SAMBA_LIBRARY('samba-modules',
source='modules.c', source='modules.c',
deps='samba-errors samba-util', deps='samba-errors samba-util samba-debug',
local_include=False, local_include=False,
private_library=True) private_library=True)
@ -283,7 +283,7 @@ else:
tevent_req_profile.c tevent_req_profile.c
''', ''',
local_include=False, 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', public_headers='tevent_ntstatus.h tevent_unix.h tevent_werror.h',
header_path=[ ('*', 'util') ], header_path=[ ('*', 'util') ],
pc_files=[], pc_files=[],

View File

@ -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', 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', pc_files='ndr.pc',
public_deps='samba-errors talloc samba-util util_str_hex', 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', public_headers='gen_ndr/misc.h gen_ndr/ndr_misc.h ndr/libndr.h:ndr.h',
header_path= [('*gen_ndr*', 'gen_ndr')], header_path= [('*gen_ndr*', 'gen_ndr')],
vnum='6.0.0', vnum='6.0.0',

View File

@ -192,7 +192,7 @@ bld.SAMBA3_LIBRARY('smbldaphelper',
passdb/pdb_ldap_schema.c passdb/pdb_ldap_schema.c
passdb/pdb_ldap_util.c passdb/pdb_ldap_util.c
''', ''',
deps='smbldap secrets3', deps='smbldap secrets3 samba-security samba3-util',
allow_undefined_symbols=True, allow_undefined_symbols=True,
enabled=bld.CONFIG_SET('HAVE_LDAP'), enabled=bld.CONFIG_SET('HAVE_LDAP'),
private_library=True) private_library=True)
@ -500,7 +500,7 @@ bld.SAMBA3_LIBRARY('secrets3',
bld.SAMBA3_LIBRARY('smbldap', bld.SAMBA3_LIBRARY('smbldap',
source='lib/smbldap.c', 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"), enabled=bld.CONFIG_SET("HAVE_LDAP"),
private_library=False, private_library=False,
abi_directory='lib/ABI', abi_directory='lib/ABI',

View File

@ -345,7 +345,7 @@ bld.SAMBA_MODULE('ldb_anr',
init_function='ldb_anr_module_init', init_function='ldb_anr_module_init',
module_init_name='ldb_init_module', module_init_name='ldb_init_module',
internal_module=False, 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', init_function='ldb_resolve_oids_module_init',
module_init_name='ldb_init_module', module_init_name='ldb_init_module',
internal_module=False, internal_module=False,
deps='samdb talloc ndr' deps='samdb talloc ndr ldbsamba'
) )

View File

@ -39,7 +39,7 @@ libpython = bld.pyembed_libname('LIBPYTHON')
bld.SAMBA_PYTHON('pyparam', bld.SAMBA_PYTHON('pyparam',
source='pyparam.c', 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' realname='samba/param.so'
) )