[SCM] Samba Shared Repository - branch master updated

Christian Ambach ambi at samba.org
Fri Nov 9 12:58:02 MST 2012


The branch, master has been updated
       via  01f188a build: add DMAPI configure option and checks
       via  3712de7 build(waf): support AIX 6.1
      from  5205747 doc: list arguments for rpcclient FSRVP commands

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 01f188a3f0725f42ce4f17621985abe4ab5a54c2
Author: Christian Ambach <ambi at samba.org>
Date:   Wed Nov 7 18:40:07 2012 +0100

    build: add DMAPI configure option and checks
    
    the waf build was missing the --with-dmapi option
    and configure checks that are necessary to build the
    source3 parts that need DMAPI (e.g. vfs_tsmsm)
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=9178
    
    Signed-off-by: Christian Ambach <ambi at samba.org>
    
    Autobuild-User(master): Christian Ambach <ambi at samba.org>
    Autobuild-Date(master): Fri Nov  9 20:57:31 CET 2012 on sn-devel-104

commit 3712de7b9c494f6e01782e837f369e8beb5a054e
Author: Christian Ambach <ambi at samba.org>
Date:   Fri Nov 9 18:58:43 2012 -0600

    build(waf): support AIX 6.1
    
    on AIX6.1, we need to define _ALL_SOURCE as well, otherwise
    system headers with BSD types like u_int cannot be used

-----------------------------------------------------------------------

Summary of changes:
 buildtools/wafsamba/wscript |    2 +-
 source3/wscript             |   64 +++++++++++++++++++++++++++++++++++++++++++
 source3/wscript_build       |    2 +-
 3 files changed, 66 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 441e727..17aef27 100755
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -322,7 +322,7 @@ def configure(conf):
     else:
         conf.env.HAVE_LD_VERSION_SCRIPT = False
 
-    if sys.platform == "aix5":
+    if sys.platform == "aix5" or sys.platform == "aix6":
         conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True)
         # Might not be needed if ALL_SOURCE is defined
         # conf.DEFINE('_XOPEN_SOURCE', 600, add_to_cflags=True)
diff --git a/source3/wscript b/source3/wscript
index 96ab4de..92dcd18 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -41,6 +41,7 @@ def set_options(opt):
     opt.SAMBA3_ADD_OPTION('syslog')
     opt.SAMBA3_ADD_OPTION('automount')
     opt.SAMBA3_ADD_OPTION('aio-support')
+    opt.SAMBA3_ADD_OPTION('dmapi', default=False, help="build with DMAPI support")
     opt.SAMBA3_ADD_OPTION('profiling-data', default=False)
 
     opt.SAMBA3_ADD_OPTION('cluster-support', default=None)
@@ -162,6 +163,69 @@ main() {
 }''', 'HAVE_KERNEL_SHARE_MODES', addmain=False, execute=True,
         msg="Checking for krenel share modes")
 
+    # check for DMAPI libs
+    Logs.info("Checking for DMAPI library existence")
+    conf.env['dmapi_lib'] = ''
+    samba_dmapi_lib = ''
+    if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'dm'):
+        samba_dmapi_lib = 'dm'
+    else:
+        if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'jfsdm'):
+            samba_dmapi_lib = 'jfsdm'
+        else:
+            if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'dmapi'):
+                samba_dmapi_lib = 'dmapi'
+            else:
+                if conf.CHECK_FUNCS_IN('dm_get_eventlist', 'xdsm'):
+                    samba_dmapi_lib = 'xdsm'
+    # only bother to test headers and compilation when a candidate
+    # library has been found
+    if Options.options.with_dmapi == True and samba_dmapi_lib == '':
+        conf.fatal('DMAPI support requested, but no suitable DMAPI library found')
+    else:
+        conf.CHECK_HEADERS('sys/dmi.h xfs/dmapi.h sys/jfsdmapi.h sys/dmapi.h dmapi.h')
+        conf.CHECK_CODE('''
+#include <time.h>      /* needed by Tru64 */
+#include <sys/types.h> /* needed by AIX */
+#ifdef HAVE_XFS_DMAPI_H
+#include <xfs/dmapi.h>
+#elif defined(HAVE_SYS_DMI_H)
+#include <sys/dmi.h>
+#elif defined(HAVE_SYS_JFSDMAPI_H)
+#include <sys/jfsdmapi.h>
+#elif defined(HAVE_SYS_DMAPI_H)
+#include <sys/dmapi.h>
+#elif defined(HAVE_DMAPI_H)
+#include <dmapi.h>
+#endif
+
+/* This link test is designed to fail on IRI 6.4, but should
+ * succeed on Linux, IRIX 6.5 and AIX.
+ */
+int main(int argc, char **argv)
+{
+	char * version;
+	dm_eventset_t events;
+	/* This doesn't take an argument on IRIX 6.4. */
+	dm_init_service(&version);
+	/* IRIX 6.4 expects events to be a pointer. */
+	DMEV_ISSET(DM_EVENT_READ, events);
+
+	return 0;
+}
+''',
+        'USE_DMAPI',
+        addmain=False,
+        execute=False,
+        lib=samba_dmapi_lib,
+        msg='Checking whether DMAPI lib '+samba_dmapi_lib+' can be used')
+
+        if conf.CONFIG_SET('USE_DMAPI'):
+            conf.env['dmapi_lib'] = samba_dmapi_lib
+        else:
+            if Options.options.with_dmapi == True:
+                conf.fatal('DMAPI support requested but not found');
+
     # Check for various members of the stat structure
     conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_blocks', define='HAVE_STAT_ST_BLOCKS',
                                 headers='sys/stat.h')
diff --git a/source3/wscript_build b/source3/wscript_build
index 0634b8d..351d22d 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -980,7 +980,7 @@ bld.SAMBA3_LIBRARY('smbd_base',
                     ccan-hash
                     NDR_SMB_ACL
                     netapi
-                    ''',
+                    ''' + bld.env['dmapi_lib'],
                     private_library=True,
                     vars=locals())
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list