Revert "s3: vfs: add smb_vfs_ev_glue"
[samba.git] / source3 / wscript_build
index 2cc74e0f4ec3f497aaed94ae3c89cd772bd164f0..f25a27ba3a8fe87902427ddd3a1881d8ba93ed33 100644 (file)
@@ -1,22 +1,11 @@
 #!/usr/bin/env python
 
-from samba_utils import *
-import samba_version, samba3
-
 LIBS='ICONV'
 
 config_h = "../include/config.h"
 
 bld.SAMBA_BLDOPTIONS('smbd/build_options.c')
 
-t = bld.SAMBA_GENERATOR('build_env.h',
-                        source='script/build_env.sh',
-                        target='include/build_env.h',
-                        rule='${SRC} ${SRCDIR} ${BUILDDIR} ${CC} > ${TGT}')
-# todo: work out what is really wanted here
-t.env.SRCDIR = bld.path.abspath()
-t.env.BUILDDIR = bld.path.abspath()
-
 bld.SETUP_BUILD_GROUPS()
 
 ######################## SUBSYSTEMS #################################
@@ -84,25 +73,6 @@ bld.SAMBA3_LIBRARY('msrpc3',
                    ''',
                    private_library=True)
 
-bld.SAMBA3_LIBRARY('gpo',
-                   source='''
-                          ../libgpo/gpo_ldap.c
-                          ../libgpo/gpo_ini.c
-                          ../libgpo/gpo_util.c
-                          ../libgpo/gpo_fetch.c
-                          libgpo/gpo_filesync.c
-                          ../libgpo/gpo_sec.c
-                          libgpo/gpo_reg.c
-                          ''',
-                   deps='''
-                        talloc
-                        ads
-                        TOKEN_UTIL
-                        gpext
-                        auth
-                        ''',
-                   private_library=True)
-
 bld.SAMBA3_SUBSYSTEM('AVAHI',
                     source='''
                            lib/avahi.c
@@ -133,6 +103,17 @@ bld.SAMBA3_SUBSYSTEM('TLDAP',
                          samba3util
                          ''')
 
+bld.SAMBA3_BINARY('test_tldap',
+                  source='lib/test_tldap.c',
+                  deps='''
+                       asn1util
+                       LIBTSOCKET
+                       samba3util
+                       smbconf
+                       cmocka
+                       ''',
+                  install=False)
+
 # libpdb.so should not expose internal symbols that are only usable
 # to the statically linked modules that are merged into libpdb.
 # Note that we always filter these symbols out in libpdb, even
@@ -168,7 +149,7 @@ bld.SAMBA3_LIBRARY('samba-passdb',
                                   ''',
                    abi_match=private_pdb_match,
                    abi_directory='passdb/ABI',
-                   vnum='0.27.0')
+                   vnum='0.27.1')
 
 bld.SAMBA3_SUBSYSTEM('pdb',
                    source='''
@@ -284,7 +265,12 @@ bld.SAMBA3_SUBSYSTEM('REG_FULL',
 
 bld.SAMBA3_LIBRARY('popt_samba3',
                    source='lib/popt_common.c',
-                   deps='popt samba-util util_cmdline',
+                   deps='popt samba-util smbconf',
+                   private_library=True)
+
+bld.SAMBA3_LIBRARY('popt_samba3_cmdline',
+                   source='lib/popt_common_cmdline.c',
+                   deps='popt_samba3 util_cmdline cmdline_contexts',
                    private_library=True)
 
 bld.SAMBA3_LIBRARY('util_cmdline',
@@ -292,6 +278,11 @@ bld.SAMBA3_LIBRARY('util_cmdline',
                    deps='secrets3',
                    private_library=True)
 
+bld.SAMBA3_LIBRARY('cmdline_contexts',
+                   source='lib/cmdline_contexts.c',
+                   deps='samba3core',
+                   private_library=True)
+
 bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
                      source='libads/kerberos.c libads/ads_status.c',
                      public_deps='krb5samba asn1util k5crypto gssapi LIBTSOCKET CLDAP LIBNMB')
@@ -312,7 +303,6 @@ bld.SAMBA3_SUBSYSTEM('samba3util',
                           lib/util_tsock.c
                           lib/util_transfer_file.c
                           lib/sys_popen.c
-                          lib/sock_exec.c
                           ''',
                    deps='''
                         CHARSET3
@@ -330,7 +320,8 @@ if bld.env.with_ctdb:
     SAMBA_CLUSTER_SUPPORT_SOURCES='''
                      lib/cluster_support.c
                      lib/dbwrap/dbwrap_ctdb.c
-                     lib/messages_ctdbd.c
+                     lib/messages_ctdb.c
+                     lib/messages_ctdb_ref.c
                      lib/ctdbd_conn.c
                    '''
     SAMBA_CLUSTER_SUPPORT_DEPS='''
@@ -389,7 +380,6 @@ bld.SAMBA3_SUBSYSTEM('samba3core',
                           lib/messages.c
                           lib/util_cluster.c
                           lib/id_cache.c
-                          lib/talloc_dict.c
                           lib/serverid.c
                           lib/server_id_watch.c
                           lib/server_id_db_util.c
@@ -408,19 +398,18 @@ bld.SAMBA3_SUBSYSTEM('samba3core',
                           intl/lang_tdb.c
                           lib/gencache.c
                           lib/util_event.c
-                          lib/server_contexts.c
+                          lib/global_contexts.c
                           lib/server_prefork.c
                           lib/server_prefork_util.c
                           lib/ldap_escape.c
-                          lib/fncall.c
                           libads/krb5_errs.c
                           lib/system_smbd.c
                           lib/audit.c
                           lib/tevent_wait.c
                           lib/idmap_cache.c
+                          lib/namemap_cache.c
                           lib/util_ea.c
                           lib/background.c
-                          lib/cleanupdb.c
                           ''',
                    deps='''
                         samba3util
@@ -487,6 +476,7 @@ bld.SAMBA3_LIBRARY('libsmb',
                         LIBTSOCKET
                         KRBCLIENT
                         NDR_IOCTL
+                       NDR_QUOTA
                         cli_smb_common
                         util_cmdline
                         tevent
@@ -523,7 +513,7 @@ bld.SAMBA3_LIBRARY('smbldap',
                     abi_directory='lib/ABI',
                     abi_match='smbldap_*',
                     pc_files=[],
-                    vnum='1',
+                    vnum='2',
                     public_headers='include/smbldap.h include/smb_ldap.h')
 
 bld.SAMBA3_LIBRARY('ads',
@@ -541,6 +531,7 @@ bld.SAMBA3_LIBRARY('ads',
                           libads/ldap_schema.c
                           libads/util.c
                           libads/ndr.c
+                          libads/net_ads_setspn.c
                           ''',
                    deps='''
                         cli-ldap-common
@@ -623,7 +614,7 @@ bld.SAMBA3_SUBSYSTEM('sysquotas',
                         lib/sysquotas_nfs.c
                      ''',
                      allow_warnings=True,
-                     deps='samba3-util samba-util')
+                     deps='samba3-util samba-util tirpc')
 
 NOTIFY_SOURCES=''
 NOTIFY_DEPS=''
@@ -678,6 +669,7 @@ bld.SAMBA3_LIBRARY('smbd_base',
                           printing/printspoolss.c
                           lib/sessionid_tdb.c
                           lib/conn_tdb.c
+                          lib/cleanupdb.c
                           smbd/fake_file.c
                           smbd/quotas.c
                           smbd/ntquotas.c
@@ -721,7 +713,6 @@ bld.SAMBA3_LIBRARY('smbd_base',
                           smbd/mangle_hash.c
                           smbd/mangle_hash2.c
                           smbd/oplock.c
-                          smbd/oplock_irix.c
                           smbd/oplock_linux.c
                           smbd/notify.c
                           smbd/notify_msg.c
@@ -755,6 +746,8 @@ bld.SAMBA3_LIBRARY('smbd_base',
                         netapi
                         NDR_IOCTL
                         notifyd
+                        vfs_acl_common
+                        NDR_QUOTA
                    ''' +
                    bld.env['dmapi_lib'] +
                    bld.env['legacy_quota_libs'] +
@@ -880,19 +873,6 @@ bld.SAMBA3_SUBSYSTEM('LIBNET_DSSYNC',
                          RPC_NDR_DRSUAPI
                          ''')
 
-bld.SAMBA3_SUBSYSTEM('LIBNET_SAMSYNC',
-                    source='''
-                           libnet/libnet_samsync.c
-                           libnet/libnet_samsync_ldif.c
-                           libnet/libnet_samsync_passdb.c
-                           libnet/libnet_samsync_display.c
-                           libnet/libnet_samsync_keytab.c
-                           ''',
-                    deps='''
-                         LIBNET
-                         LIBCLI_SAMSYNC
-                         ''')
-
 bld.SAMBA3_SUBSYSTEM('LIBEVENTLOG',
                     source='lib/eventlog/eventlog.c',
                     deps='NDR_EVENTLOG tdb')
@@ -958,7 +938,6 @@ bld.SAMBA3_SUBSYSTEM('SLCACHE',
 bld.SAMBA3_SUBSYSTEM('DCUTIL',
                     source='''
                            libsmb/namequery_dc.c
-                           libsmb/trustdom_cache.c
                            libsmb/dsgetdcname.c
                            ''',
                     deps='''
@@ -989,6 +968,7 @@ bld.SAMBA3_LIBRARY('samba3-util',
                           lib/namearray.c
                           lib/file_id.c
                           lib/cbuf.c
+                          lib/per_thread_cwd.c
                           ''',
                    deps='''
                         samba-util
@@ -1121,7 +1101,7 @@ bld.SAMBA3_BINARY('client/smbclient',
                         ''',
                  deps='''
                       talloc
-                      popt_samba3
+                      popt_samba3_cmdline
                       smbconf
                       ndr-standard
                       SMBREADLINE
@@ -1174,6 +1154,7 @@ bld.SAMBA3_BINARY('smbstatus',
                       talloc
                       smbconf
                       popt_samba3
+                      cmdline_contexts
                       smbd_base
                       LOCKING
                       PROFILE
@@ -1203,16 +1184,20 @@ bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
                         torture/test_notify.c
                         lib/tevent_barrier.c
                         torture/test_dbwrap_watch.c
+                        torture/test_dbwrap_do_locked.c
                         torture/test_idmap_tdb_common.c
                         torture/test_dbwrap_ctdb.c
                         torture/test_buffersize.c
                         torture/test_messaging_read.c
                         torture/test_messaging_fd_passing.c
+                        torture/test_messaging_send_all.c
                         torture/test_oplock_cancel.c
                         torture/test_pthreadpool_tevent.c
                         torture/bench_pthreadpool.c
                         torture/wbc_async.c
                         torture/test_g_lock.c
+                        torture/test_namemap_cache.c
+                        torture/test_hidenewfiles.c
                         ''',
                  deps='''
                       talloc
@@ -1322,15 +1307,23 @@ bld.SAMBA3_BINARY('vlp',
                       ''',
                  install=False)
 
-bld.SAMBA3_PYTHON('pysmbd',
+
+for env in bld.gen_python_environments():
+    pyrpc_util = bld.pyembed_libname('pyrpc_util')
+    pytalloc_util = bld.pyembed_libname('pytalloc-util')
+    bld.SAMBA3_PYTHON('pysmbd',
                   source='smbd/pysmbd.c',
-                  deps='smbd_base pyrpc_util pytalloc-util',
+                  deps=' '.join(['smbd_base', pyrpc_util, pytalloc_util]),
                   realname='samba/samba3/smbd.so'
                   )
 
-bld.SAMBA3_PYTHON('pylibsmb',
+for env in bld.gen_python_environments():
+    pycredentials = 'pycredentials'
+    if bld.env['IS_EXTRA_PYTHON']:
+        pycredentials = 'extra-' + pycredentials
+    bld.SAMBA3_PYTHON('pylibsmb',
                   source='libsmb/pylibsmb.c',
-                  deps='smbclient samba-credentials pycredentials',
+                  deps='smbclient samba-credentials %s' % pycredentials,
                   realname='samba/samba3/libsmb_samba_internal.so'
                   )
 
@@ -1362,6 +1355,7 @@ bld.RECURSE('../examples/libsmbclient')
 bld.RECURSE('../examples/pdb')
 bld.RECURSE('../examples/VFS')
 bld.RECURSE('../examples/fuse')
+bld.RECURSE('../examples/winexe')
 bld.RECURSE('lib/netapi/tests')
 bld.RECURSE('lib/netapi/examples')
 bld.RECURSE('smbd/notifyd')