mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
6107c79c90
Add new for_selftest option to SAMBA_BINARY() and SAMBA3_BINARY() This allows us to be much more consistent (at least in the core Samba) and documents clearly why the binary should not be installed. Not modified are - test_lp_load - notifyd-tests - gendrandperf - test* from examples/libsmbclient - dbwrap_torture - split_tokens - locktest2 - msgtest - msg_sink - msg_source - versiontest - rpc_open_tcp - test_headers As these are not tested in selftest so any change would also be untested. Of course they probably should be added in a different MR. Also not modified (because they are not tests, nor part of the build system) are: - smb2mount - notifydd - log2pacp - debug2html - smbfilter - destroy_netlogon_creds_cli - spotlight2* - tevent_glib_tracker These do however appear to be untested. For now, the source4 forked client tools are left unchanged: - smbclient4 - nmblookup4 Finally, the heimdal binaries are left as install=False as they are either part of the build system or end-user tools that we just don't want to install. These are however tested. The motivation is commit likec34ec003b7
andda87fa998a
, which are both totally correct but are not needed if the selftest is not run on MacOS. There are likely other platforms or build environments where building our test binaries is more pain than valuable, see for example also https://lists.samba.org/archive/samba/2019-November/227137.html Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Isaac Boukris <iboukris@samba.org> Autobuild-User(master): Isaac Boukris <iboukris@samba.org> Autobuild-Date(master): Fri Nov 22 11:48:59 UTC 2019 on sn-devel-184
131 lines
4.2 KiB
Python
131 lines
4.2 KiB
Python
#!/usr/bin/env python
|
|
from waflib import Utils
|
|
import sys
|
|
host_os = sys.platform
|
|
|
|
bld.SAMBA_LIBRARY('winbind-client',
|
|
source='wb_common.c',
|
|
deps='replace',
|
|
cflags='-DWINBINDD_SOCKET_DIR=\"%s\"' % bld.env.WINBINDD_SOCKET_DIR,
|
|
private_library=True
|
|
)
|
|
|
|
|
|
bld.SAMBA_BINARY('nsstest',
|
|
source='nsstest.c',
|
|
deps='replace dl',
|
|
for_selftest=True
|
|
)
|
|
|
|
if bld.CONFIG_SET('HAVE_PTHREAD'):
|
|
bld.SAMBA_BINARY('stress-nss-libwbclient',
|
|
source='stress-nss-libwbclient.c',
|
|
deps='wbclient pthread',
|
|
for_selftest=True
|
|
)
|
|
|
|
# The nss_wrapper code relies strictly on the linux implementation and
|
|
# name, so compile but do not install a copy under this name.
|
|
bld.SAMBA_LIBRARY('nss_wrapper_winbind',
|
|
source='winbind_nss_linux.c',
|
|
deps='winbind-client',
|
|
realname='libnss_wrapper_winbind.so.2',
|
|
install=False,
|
|
vnum='2')
|
|
|
|
# FIXME: original was *linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu)
|
|
# the search for .rfind('gnu') covers gnu* and *-gnu is that too broad?
|
|
|
|
if (Utils.unversioned_sys_platform() == 'linux' or (host_os.rfind('gnu') > -1)):
|
|
bld.SAMBA_LIBRARY('nss_winbind',
|
|
keep_underscore=True,
|
|
source='winbind_nss_linux.c',
|
|
deps='winbind-client',
|
|
public_headers=[],
|
|
public_headers_install=False,
|
|
pc_files=[],
|
|
vnum='2')
|
|
|
|
bld.SAMBA3_LIBRARY('nss_wins',
|
|
keep_underscore=True,
|
|
source='wins.c',
|
|
deps='wbclient replace',
|
|
public_headers=[],
|
|
public_headers_install=False,
|
|
pc_files=[],
|
|
vnum='2')
|
|
elif (host_os.rfind('freebsd') > -1):
|
|
# FreeBSD winbind client is implemented as a wrapper around
|
|
# the Linux version.
|
|
bld.SAMBA_LIBRARY('nss_winbind',
|
|
source='winbind_nss_linux.c winbind_nss_freebsd.c',
|
|
deps='winbind-client',
|
|
realname='nss_winbind.so.1',
|
|
vnum='1')
|
|
|
|
bld.SAMBA3_LIBRARY('nss_wins',
|
|
source='wins.c wins_freebsd.c',
|
|
deps='''wbclient''',
|
|
realname='nss_wins.so.1',
|
|
vnum='1')
|
|
|
|
elif (host_os.rfind('netbsd') > -1):
|
|
# NetBSD winbind client is implemented as a wrapper
|
|
# around the Linux version. It needs getpwent_r() to
|
|
# indicate libc's use of the correct nsdispatch API.
|
|
|
|
if bld.CONFIG_SET("HAVE_GETPWENT_R"):
|
|
bld.SAMBA_LIBRARY('nss_winbind',
|
|
source='winbind_nss_linux.c winbind_nss_netbsd.c',
|
|
deps='winbind-client',
|
|
realname='libnss_winbind.so')
|
|
elif Utils.unversioned_sys_platform() == 'sunos':
|
|
bld.SAMBA_LIBRARY('nss_winbind',
|
|
source='winbind_nss_solaris.c winbind_nss_linux.c',
|
|
deps='winbind-client',
|
|
realname='nss_winbind.so.1',
|
|
vnum='1')
|
|
elif (host_os.rfind('hpux') > -1):
|
|
bld.SAMBA_LIBRARY('nss_winbind',
|
|
source='winbind_nss_linux.c',
|
|
deps='winbind-client',
|
|
realname='libnss_winbind.so')
|
|
elif (host_os.rfind('aix') > -1):
|
|
bld.SAMBA_LIBRARY('nss_winbind',
|
|
source='winbind_nss_aix.c',
|
|
deps='winbind-client',
|
|
realname='WINBIND')
|
|
|
|
if bld.CONFIG_SET('WITH_PAM_MODULES') and bld.CONFIG_SET('HAVE_PAM_START'):
|
|
bld.SAMBA_LIBRARY('pamwinbind',
|
|
source='pam_winbind.c',
|
|
deps='talloc wbclient winbind-client tiniparser pam samba_intl',
|
|
cflags='-DLOCALEDIR=\"%s/locale\"' % bld.env.DATADIR,
|
|
realname='pam_winbind.so',
|
|
install_path='${PAMMODULESDIR}'
|
|
)
|
|
|
|
if bld.CONFIG_SET('HAVE_KRB5_LOCATE_PLUGIN_H'):
|
|
bld.SAMBA_LIBRARY('winbind_krb5_locator',
|
|
source='krb5_plugin/winbind_krb5_locator.c',
|
|
deps='wbclient krb5 com_err',
|
|
realname='winbind_krb5_locator.so',
|
|
install_path='${MODULESDIR}/krb5')
|
|
|
|
if bld.CONFIG_SET('HAVE_KRB5_LOCALAUTH_PLUGIN_H'):
|
|
bld.SAMBA_LIBRARY('winbind_krb5_localauth',
|
|
source='krb5_plugin/winbind_krb5_localauth.c',
|
|
deps='wbclient krb5 com_err',
|
|
realname='winbind_krb5_localauth.so',
|
|
install_path='${MODULESDIR}/krb5')
|
|
|
|
bld.SAMBA_SUBSYSTEM('WB_REQTRANS',
|
|
source='wb_reqtrans.c',
|
|
deps='talloc tevent LIBASYNC_REQ'
|
|
)
|
|
|
|
bld.SAMBA_BINARY('wbinfo',
|
|
source='wbinfo.c',
|
|
deps='samba-util LIBCLI_AUTH popt POPT_SAMBA wbclient LIBAFS_SETTOKEN'
|
|
)
|