s4:rpc_server: add dcesrv_call_session_info()
[samba.git] / dynconfig / wscript
old mode 100755 (executable)
new mode 100644 (file)
index dba74f6..e352712
@@ -1,6 +1,10 @@
 #!/usr/bin/env python
 
-import string, Logs, Utils, Options, Build, os, optparse, textwrap
+import string
+import os
+import optparse
+import textwrap
+from waflib import Logs, Errors, Options, Build, Context
 from samba_utils import EXPAND_VARIABLES, os_path_relpath
 
 class SambaIndentedHelpFormatter (optparse.IndentedHelpFormatter):
@@ -42,7 +46,7 @@ class SambaIndentedHelpFormatter (optparse.IndentedHelpFormatter):
         result.append(opts)
         if option.help:
             help_text = self.expand_default(option)
-            if string.find(help_text, '\n') == -1:
+            if help_text.find('\n') == -1:
                 help_lines = textwrap.wrap(help_text, self.help_width)
             else:
                 help_lines = help_text.splitlines()
@@ -174,6 +178,12 @@ dynconfig = {
          'OPTION':    '--with-privatedir',
          'HELPTEXT':  'Where to put sam.ldb and other private files',
     },
+    'BINDDNS_DIR' : {
+         'STD-PATH':  '${PREFIX}/bind-dns',
+         'FHS-PATH':  '${LOCALSTATEDIR}/lib/samba/bind-dns',
+         'OPTION':    '--with-bind-dns-dir',
+         'HELPTEXT':  'bind-dns config directory',
+    },
     'LOCKDIR' : {
          'STD-PATH':  '${LOCALSTATEDIR}/lock',
          'FHS-PATH':  '${LOCALSTATEDIR}/lock/samba',
@@ -221,11 +231,6 @@ dynconfig = {
          'FHS-PATH':  '${SOCKET_DIR}/winbindd',
          'DELAY':     True,
     },
-    'WINBINDD_PRIVILEGED_SOCKET_DIR' : {
-         'STD-PATH':  '${PRIVILEGED_SOCKET_DIR}/winbindd_privileged',
-         'FHS-PATH':  '${PRIVILEGED_SOCKET_DIR}/winbindd_privileged',
-         'DELAY':     True,
-    },
     'NMBDSOCKETDIR' : {
          'STD-PATH':  '${SOCKET_DIR}/nmbd',
          'FHS-PATH':  '${SOCKET_DIR}/nmbd',
@@ -254,13 +259,15 @@ dynconfig = {
     'SMB_PASSWD_FILE' : {
          'STD-PATH':  '${PRIVATE_DIR}/smbpasswd',
          'FHS-PATH':  '${PRIVATE_DIR}/smbpasswd',
+         'OPTION':    '--with-smbpasswd-file',
+         'HELPTEXT':  'Where to put the smbpasswd file',
          'DELAY':     True,
     },
 }
 
-def set_options(opt):
+def options(opt):
     opt.parser.formatter = SambaIndentedHelpFormatter()
-    opt.parser.formatter.width=Utils.get_term_cols()
+    opt.parser.formatter.width=Logs.get_term_cols()
 
     for k in ('--with-privatelibdir', '--with-modulesdir'):
         option = opt.parser.get_option(k)
@@ -302,7 +309,7 @@ def configure(conf):
         flavor = 'STD-PATH'
         if conf.env.PREFIX == '/usr' or conf.env.PREFIX == '/usr/local':
            Logs.error("Don't install directly under /usr or /usr/local without using the FHS option (--enable-fhs)")
-           raise Utils.WafError("ERROR: invalid --prefix=%s value" % (conf.env.PREFIX))
+           raise Errors.WafError("ERROR: invalid --prefix=%s value" % (conf.env.PREFIX))
 
     explicit_set ={}
 
@@ -413,14 +420,18 @@ def build(bld):
     bld.SAMBA_SUBSYSTEM('DYNCONFIG',
                         'dynconfig.c',
                         deps='replace',
-                        public_headers=os_path_relpath(os.path.join(Options.launch_dir, version_header), bld.curdir),
+                        public_headers=os_path_relpath(os.path.join(Context.launch_dir, version_header), bld.path.abspath()),
                         header_path='samba',
                         cflags=cflags)
 
     # install some extra empty directories
-    bld.INSTALL_DIRS("", "${CONFIGDIR} ${PRIVATE_DIR} ${LOGFILEBASE}");
-    bld.INSTALL_DIRS("", "${PRIVATE_DIR} ${PRIVILEGED_SOCKET_DIR}")
-    bld.INSTALL_DIRS("", "${STATEDIR} ${CACHEDIR}");
+    bld.INSTALL_DIR("${CONFIGDIR}")
+    bld.INSTALL_DIR("${LOGFILEBASE}")
+    bld.INSTALL_DIR("${PRIVILEGED_SOCKET_DIR}")
+    bld.INSTALL_DIR("${PRIVATE_DIR}", 0o700)
+    bld.INSTALL_DIR("${BINDDNS_DIR}", 0o770)
+    bld.INSTALL_DIR("${STATEDIR}")
+    bld.INSTALL_DIR("${CACHEDIR}")
 
     # these might be on non persistent storage
     bld.INSTALL_DIRS("", "${LOCKDIR} ${PIDDIR} ${SOCKET_DIR}")