commit c09c288f7c239ec0d73091061d417e1562825c64 Author: Andreas Schneider <asn@samba.org> AuthorDate: Mon Apr 16 17:07:05 2012 +0200 Commit: Andreas Schneider <asn@cryptomilk.org> CommitDate: Tue Apr 17 16:17:35 2012 +0200 s3-waf: Fix client/smbclient dependencies. --- source3/wscript_build | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) Index: samba-4.0.0alpha18/source3/wscript_build =================================================================== --- samba-4.0.0alpha18.orig/source3/wscript_build +++ samba-4.0.0alpha18/source3/wscript_build @@ -498,10 +498,10 @@ LIBNETAPI_SRC0 = '''lib/netapi/netapi.c LIBNETAPI_SRC = '''${LIBNETAPI_SRC0}''' -CLIENT_SRC1 = '''client/client.c client/clitar.c - client/dnsbrowse.c''' - -CLIENT_SRC = '''${CLIENT_SRC1}''' +CLIENT_SRC = ''' + client/client.c + client/clitar.c + client/dnsbrowse.c''' LIB_SMBCONF_SRC = 'lib/smbconf/smbconf_init.c lib/smbconf/smbconf_reg.c' @@ -1289,10 +1289,10 @@ bld.SAMBA3_BINARY('client/smbclient' + b param ndr-standard SMBREADLINE - smbclient + libsmb + msrpc3 RPC_NDR_SRVSVC - cli_smb_common''', - vars=locals()) + cli_smb_common''') bld.SAMBA3_BINARY('net', source=NET_SRC, Index: samba-4.0.0alpha18/nsswitch/libwbclient/wscript =================================================================== --- /dev/null +++ samba-4.0.0alpha18/nsswitch/libwbclient/wscript @@ -0,0 +1,31 @@ +#!/usr/bin/env python + +import Options, Logs + +# Remember to also update wbclient.h +VERSION="0.9" + +def configure(conf): + if conf.CHECK_BUNDLED_SYSTEM_PKG('wbclient', minversion=VERSION): + conf.define('USING_SYSTEM_LIBWBCLIENT', 1) + +def build(bld): + if bld.CONFIG_SET('USING_SYSTEM_LIBWBCLIENT'): + Logs.info("\tSelected system libwbclient build") + return + + Logs.info("\tSelected embedded libwbclient build") + + bld.SAMBA_LIBRARY('wbclient', + source=''' + wbc_guid.c + wbc_idmap.c + wbclient.c + wbc_pam.c + wbc_pwd.c + wbc_sid.c + wbc_util.c''', + deps='winbind-client', + pc_files='wbclient.pc', + public_headers='wbclient.h', + vnum=VERSION) Index: samba-4.0.0alpha18/nsswitch/libwbclient/wscript_build =================================================================== --- samba-4.0.0alpha18.orig/nsswitch/libwbclient/wscript_build +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python - -bld.SAMBA_LIBRARY('wbclient', - source='wbc_guid.c wbc_idmap.c wbclient.c wbc_pam.c wbc_pwd.c wbc_sid.c wbc_util.c', - deps='winbind-client', - pc_files='wbclient.pc', - public_headers='wbclient.h', - vnum='0' - ) Index: samba-4.0.0alpha18/wscript =================================================================== --- samba-4.0.0alpha18.orig/wscript +++ samba-4.0.0alpha18/wscript @@ -93,6 +93,7 @@ def configure(conf): conf.RECURSE('source4/auth') conf.RECURSE('lib/nss_wrapper') conf.RECURSE('nsswitch') + conf.RECURSE('nsswitch/libwbclient') conf.RECURSE('lib/socket_wrapper') conf.RECURSE('lib/uid_wrapper') conf.RECURSE('lib/popt') Index: samba-4.0.0alpha18/nsswitch/libwbclient/wbclient.h =================================================================== --- samba-4.0.0alpha18.orig/nsswitch/libwbclient/wbclient.h +++ samba-4.0.0alpha18/nsswitch/libwbclient/wbclient.h @@ -68,9 +68,10 @@ const char *wbcErrorString(wbcErr error) * 0.6: Made struct wbcInterfaceDetails char* members non-const * 0.7: Added wbcSidToStringBuf() * 0.8: Added wbcSidsToUnixIds() and wbcLookupSids() + * 0.9: Added support for WBC_ID_TYPE_BOTH **/ #define WBCLIENT_MAJOR_VERSION 0 -#define WBCLIENT_MINOR_VERSION 8 +#define WBCLIENT_MINOR_VERSION 9 #define WBCLIENT_VENDOR_VERSION "Samba libwbclient" struct wbcLibraryDetails { uint16_t major_version; Index: samba-4.0.0alpha18/buildtools/wafsamba/samba_bundled.py =================================================================== --- samba-4.0.0alpha18.orig/buildtools/wafsamba/samba_bundled.py +++ samba-4.0.0alpha18/buildtools/wafsamba/samba_bundled.py @@ -81,6 +81,10 @@ def LIB_MUST_BE_BUNDLED(conf, libname): return ('ALL' in conf.env.BUNDLED_LIBS or libname in conf.env.BUNDLED_LIBS) +@conf +def LIB_MUST_BE_PRIVATE(conf, libname): + return ('ALL' in conf.env.PRIVATE_LIBS or + libname in conf.env.PRIVATE_LIBS) @conf def CHECK_PREREQUISITES(conf, prereqs): Index: samba-4.0.0alpha18/buildtools/wafsamba/wafsamba.py =================================================================== --- samba-4.0.0alpha18.orig/buildtools/wafsamba/wafsamba.py +++ samba-4.0.0alpha18/buildtools/wafsamba/wafsamba.py @@ -132,6 +132,9 @@ def SAMBA_LIBRARY(bld, libname, source, enabled=True): '''define a Samba library''' + if LIB_MUST_BE_PRIVATE(bld, libname): + private_library=True + if not enabled: SET_TARGET_TYPE(bld, libname, 'DISABLED') return Index: samba-4.0.0alpha18/buildtools/wafsamba/wscript =================================================================== --- samba-4.0.0alpha18.orig/buildtools/wafsamba/wscript +++ samba-4.0.0alpha18/buildtools/wafsamba/wscript @@ -27,6 +27,10 @@ def set_options(opt): help=("comma separated list of bundled libraries. May include !LIBNAME to disable bundling a library. Can be 'NONE' or 'ALL' [auto]"), action="store", dest='BUNDLED_LIBS', default='') + gr.add_option('--private-libraries', + help=("comma separated list of normally public libraries to build instead as private libraries. May include !LIBNAME to disable making a library private. Can be 'NONE' or 'ALL' [auto]"), + action="store", dest='PRIVATE_LIBS', default='') + extension_default = Options.options['PRIVATE_EXTENSION_DEFAULT'] gr.add_option('--private-library-extension', help=("name extension for private libraries [%s]" % extension_default), @@ -230,6 +234,7 @@ def configure(conf): conf.env.MODULESDIR = Options.options.MODULESDIR conf.env.PRIVATELIBDIR = Options.options.PRIVATELIBDIR conf.env.BUNDLED_LIBS = Options.options.BUNDLED_LIBS.split(',') + conf.env.PRIVATE_LIBS = Options.options.PRIVATE_LIBS.split(',') conf.env.BUILTIN_LIBRARIES = Options.options.BUILTIN_LIBRARIES.split(',') conf.env.DISABLE_SHARED = Options.options.disable_shared conf.env.NONSHARED_BINARIES = Options.options.NONSHARED_BINARIES.split(',')