libsmb: Pull up wire_flags calculation from open_internal
[garming/samba-autobuild/.git] / source3 / wscript_build
index be0811f873719dd0a56ca0fc6caf2ea88e8175bd..aa8fdc175674d8caafb9d8b327072fabe424024a 100644 (file)
@@ -1,8 +1,5 @@
 #!/usr/bin/env python
 
-from samba_utils import *
-import samba_version, samba3
-
 LIBS='ICONV'
 
 config_h = "../include/config.h"
@@ -76,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
@@ -125,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
@@ -160,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='''
@@ -189,6 +178,7 @@ bld.SAMBA3_SUBSYSTEM('pdb',
                         LIBCLI_AUTH
                         flag_mapping
                         samba-credentials
+                        nscd
                         ''')
 
 bld.SAMBA3_LIBRARY('smbldaphelper',
@@ -276,7 +266,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',
@@ -284,6 +279,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')
@@ -303,8 +303,6 @@ bld.SAMBA3_SUBSYSTEM('samba3util',
                           lib/util_sock.c
                           lib/util_tsock.c
                           lib/util_transfer_file.c
-                          lib/sys_popen.c
-                          lib/sock_exec.c
                           ''',
                    deps='''
                         CHARSET3
@@ -400,16 +398,16 @@ 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
                           ''',
@@ -478,6 +476,7 @@ bld.SAMBA3_LIBRARY('libsmb',
                         LIBTSOCKET
                         KRBCLIENT
                         NDR_IOCTL
+                       NDR_QUOTA
                         cli_smb_common
                         util_cmdline
                         tevent
@@ -532,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
@@ -611,10 +611,11 @@ bld.SAMBA3_SUBSYSTEM('sysquotas',
                         lib/sysquotas_xfs.c
                         lib/sysquotas_4A.c
                         lib/sysquotas_4B.c
+                        lib/sysquotas_jfs2.c
                         lib/sysquotas_nfs.c
                      ''',
                      allow_warnings=True,
-                     deps='samba3-util samba-util')
+                     deps='samba3-util samba-util tirpc')
 
 NOTIFY_SOURCES=''
 NOTIFY_DEPS=''
@@ -713,7 +714,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
@@ -748,6 +748,7 @@ bld.SAMBA3_LIBRARY('smbd_base',
                         NDR_IOCTL
                         notifyd
                         vfs_acl_common
+                        NDR_QUOTA
                    ''' +
                    bld.env['dmapi_lib'] +
                    bld.env['legacy_quota_libs'] +
@@ -938,7 +939,6 @@ bld.SAMBA3_SUBSYSTEM('SLCACHE',
 bld.SAMBA3_SUBSYSTEM('DCUTIL',
                     source='''
                            libsmb/namequery_dc.c
-                           libsmb/trustdom_cache.c
                            libsmb/dsgetdcname.c
                            ''',
                     deps='''
@@ -969,6 +969,7 @@ bld.SAMBA3_LIBRARY('samba3-util',
                           lib/namearray.c
                           lib/file_id.c
                           lib/cbuf.c
+                          lib/per_thread_cwd.c
                           ''',
                    deps='''
                         samba-util
@@ -1101,7 +1102,7 @@ bld.SAMBA3_BINARY('client/smbclient',
                         ''',
                  deps='''
                       talloc
-                      popt_samba3
+                      popt_samba3_cmdline
                       smbconf
                       ndr-standard
                       SMBREADLINE
@@ -1154,6 +1155,7 @@ bld.SAMBA3_BINARY('smbstatus',
                       talloc
                       smbconf
                       popt_samba3
+                      cmdline_contexts
                       smbd_base
                       LOCKING
                       PROFILE
@@ -1189,11 +1191,14 @@ bld.SAMBA3_BINARY('smbtorture' + bld.env.suffix3,
                         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
@@ -1303,15 +1308,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'
                   )
 
@@ -1343,6 +1356,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')