[SCM] Samba Shared Repository - branch master updated
Andrew Bartlett
abartlet at samba.org
Mon Nov 16 13:51:04 UTC 2015
The branch, master has been updated
via db99742 build:wafsamba: Waf 1.8 compatible declaration of 'mandatory' configuration tests
via 7c0575d build:wafsamba: Install named.conf only once
via cfe8bec build:wafsamba: Replace Options.is_install by bld.is_install
from 44bf7c2 ctdb-recoverd: Factor out recovery master validation
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit db99742d8b15cc1c48421a4720a43dff72c6ba1b
Author: Thomas Nagy <tnagy at waf.io>
Date: Thu Nov 12 00:27:31 2015 +0100
build:wafsamba: Waf 1.8 compatible declaration of 'mandatory' configuration tests
The configuration tests raise exceptions by default in later Waf versions,
but the samba tests do not specify whether the errors should be raised or
not. This changes lifts the ambiguity.
Signed-off-by: Thomas Nagy <tnagy at waf.io>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
Autobuild-Date(master): Mon Nov 16 14:50:39 CET 2015 on sn-devel-104
commit 7c0575d7ba29d79d8d287a862d6c88a4c5e65631
Author: Thomas Nagy <tnagy at waf.io>
Date: Sun Nov 8 18:50:55 2015 +0100
build:wafsamba: Install named.conf only once
The wildcard *.conf already lists named.conf. Adding files
more than once will cause unnecessary rebuilds and raise
errors in later Waf versions.
Signed-off-by: Thomas Nagy <tnagy at waf.io>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
commit cfe8becb9e62b9e15119107d186628c784a3d38c
Author: Thomas Nagy <tnagy at waf.io>
Date: Sat Nov 7 00:57:36 2015 +0100
build:wafsamba: Replace Options.is_install by bld.is_install
Options.is_install is a deprecated module variable that is more
verbose than bld.is_install and complicates the Waf 1.8 upgrade.
Signed-off-by: Thomas Nagy <tnagy at waf.io>
Reviewed-by: Andrew Bartlett <abartlet at samba.org>
Reviewed-by: Michael Adam <obnox at samba.org>
-----------------------------------------------------------------------
Summary of changes:
buildtools/wafsamba/samba_autoconf.py | 7 +++++--
buildtools/wafsamba/samba_conftests.py | 4 ++--
buildtools/wafsamba/samba_install.py | 6 +++---
buildtools/wafsamba/samba_patterns.py | 3 +--
buildtools/wafsamba/samba_python.py | 9 +++++++--
buildtools/wafsamba/samba_wildcard.py | 1 -
buildtools/wafsamba/wafsamba.py | 2 +-
dynconfig/wscript | 4 ++--
lib/ldb/wscript | 4 ++--
source4/setup/wscript_build | 2 +-
10 files changed, 24 insertions(+), 18 deletions(-)
Changeset truncated at 500 lines:
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
index 99ceb77..09ce218 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -100,6 +100,7 @@ def CHECK_HEADER(conf, h, add_headers=False, lib=None):
type='nolink',
execute=0,
ccflags=ccflags,
+ mandatory=False,
includes=cpppath,
uselib=lib.upper(),
msg="Checking for header %s" % h)
@@ -485,6 +486,7 @@ def CHECK_LDFLAGS(conf, ldflags):
return conf.check(fragment='int main(void) { return 0; }\n',
execute=0,
ldflags=ldflags,
+ mandatory=False,
msg="Checking linker accepts %s" % ldflags)
@@ -568,9 +570,9 @@ int foo()
(ccflags, ldflags, cpppath) = library_flags(conf, lib)
if shlib:
- res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags, uselib=lib.upper())
+ res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
else:
- res = conf.check(lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags, uselib=lib.upper())
+ res = conf.check(lib=lib, uselib_store=lib, ccflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
if not res:
if mandatory:
@@ -670,6 +672,7 @@ def SAMBA_CONFIG_H(conf, path=None):
execute=0,
ccflags='-fstack-protector',
ldflags='-fstack-protector',
+ mandatory=False,
msg='Checking if toolchain accepts -fstack-protector'):
conf.ADD_CFLAGS('-fstack-protector')
conf.ADD_LDFLAGS('-fstack-protector')
diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py
index b4e44c5..045f858 100644
--- a/buildtools/wafsamba/samba_conftests.py
+++ b/buildtools/wafsamba/samba_conftests.py
@@ -196,7 +196,7 @@ int foo(int v) {
return v * 2;
}
'''
- return conf.check(features='c cshlib',vnum="1",fragment=snip,msg=msg)
+ return conf.check(features='c cshlib',vnum="1",fragment=snip,msg=msg, mandatory=False)
@conf
def CHECK_NEED_LC(conf, msg):
@@ -258,7 +258,7 @@ int foo(int v) {
ldb_module = PyImport_ImportModule("ldb");
return v * 2;
}'''
- return conf.check(features='c cshlib',uselib='PYEMBED',fragment=snip,msg=msg)
+ return conf.check(features='c cshlib',uselib='PYEMBED',fragment=snip,msg=msg, mandatory=False)
# this one is quite complex, and should probably be broken up
# into several parts. I'd quite like to create a set of CHECK_COMPOUND()
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
index 5f399f9..8297ce4 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -4,7 +4,7 @@
# library use
import os
-import Options, Utils
+import Utils
from TaskGen import feature, before, after
from samba_utils import LIB_PATH, MODE_755, install_rpath, build_rpath
@@ -19,7 +19,7 @@ def install_binary(self):
install_ldflags = install_rpath(self)
build_ldflags = build_rpath(bld)
- if not Options.is_install:
+ if not self.bld.is_install:
# just need to set rpath if we are not installing
self.env.RPATH = build_ldflags
return
@@ -68,7 +68,7 @@ def install_library(self):
install_ldflags = install_rpath(self)
build_ldflags = build_rpath(bld)
- if not Options.is_install or not getattr(self, 'samba_install', True):
+ if not self.bld.is_install or not getattr(self, 'samba_install', True):
# just need to set the build rpath if we are not installing
self.env.RPATH = build_ldflags
return
diff --git a/buildtools/wafsamba/samba_patterns.py b/buildtools/wafsamba/samba_patterns.py
index 9c6d499..ceca2cc 100644
--- a/buildtools/wafsamba/samba_patterns.py
+++ b/buildtools/wafsamba/samba_patterns.py
@@ -7,7 +7,7 @@ def write_version_header(task):
'''print version.h contents'''
src = task.inputs[0].srcpath(task.env)
- version = samba_version_file(src, task.env.srcdir, env=task.env, is_install=task.env.is_install)
+ version = samba_version_file(src, task.env.srcdir, env=task.env, is_install=task.generator.bld.is_install)
string = str(version)
task.outputs[0].write(string)
@@ -25,7 +25,6 @@ def SAMBA_MKVERSION(bld, target):
source= 'VERSION',
target=target,
always=bld.is_install)
- t.env.is_install = bld.is_install
Build.BuildContext.SAMBA_MKVERSION = SAMBA_MKVERSION
diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py
index 6f94350..8075381 100644
--- a/buildtools/wafsamba/samba_python.py
+++ b/buildtools/wafsamba/samba_python.py
@@ -1,7 +1,7 @@
# waf build tool for building IDL files with pidl
import os
-import Build, Logs, Utils
+import Build, Logs, Utils, Configure
from Configure import conf
@conf
@@ -63,7 +63,12 @@ def SAMBA_CHECK_PYTHON_HEADERS(conf, mandatory=True):
del(conf.env.defines['PYTHONARCHDIR'])
def _check_python_headers(conf, mandatory):
- conf.check_python_headers(mandatory=mandatory)
+ try:
+ Configure.ConfigurationError
+ conf.check_python_headers(mandatory=mandatory)
+ except Configure.ConfigurationError:
+ if mandatory:
+ raise
if conf.env['PYTHON_VERSION'] > '3':
abi_pattern = os.path.splitext(conf.env['pyext_PATTERN'])[0]
diff --git a/buildtools/wafsamba/samba_wildcard.py b/buildtools/wafsamba/samba_wildcard.py
index 3d87481..ed3e0c2 100644
--- a/buildtools/wafsamba/samba_wildcard.py
+++ b/buildtools/wafsamba/samba_wildcard.py
@@ -130,7 +130,6 @@ def fake_build_environment(info=True, flush=False):
Options.commands['install'] = False
Options.commands['uninstall'] = False
- Options.is_install = False
bld.is_install = 0 # False
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index a8e122c..a17b609 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -282,7 +282,7 @@ def SAMBA_LIBRARY(bld, libname, source,
if not vscriptpath:
raise Utils.WafError("unable to find vscript path for %s" % vscript)
bld.add_manual_dependency(fullpath, vscriptpath)
- if Options.is_install:
+ if bld.is_install:
# also make the .inst file depend on the vscript
instname = apply_pattern(bundled_name + '.inst', bld.env.shlib_PATTERN)
bld.add_manual_dependency(bld.path.find_or_declare(instname), bld.path.find_or_declare(vscript))
diff --git a/dynconfig/wscript b/dynconfig/wscript
index d76b6de..dba74f6 100755
--- a/dynconfig/wscript
+++ b/dynconfig/wscript
@@ -374,7 +374,7 @@ def dynconfig_cflags(bld, list=None):
if list and not varname in list:
continue
value = bld.env[varname]
- if not Options.is_install:
+ if not bld.is_install:
override = get_override(bld)
if varname in override:
value = os.path.join(bld.env.srcdir, override[varname])
@@ -399,7 +399,7 @@ def pathconfig_entities(bld, list=None):
if list and not varname in list:
continue
value = bld.env[varname]
- if not Options.is_install:
+ if not bld.is_install:
override = get_override(bld)
if varname in override:
value = os.path.join(bld.env.srcdir, override[varname])
diff --git a/lib/ldb/wscript b/lib/ldb/wscript
index 662bec9..41eca8a 100755
--- a/lib/ldb/wscript
+++ b/lib/ldb/wscript
@@ -13,7 +13,7 @@ while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
srcdir = srcdir + '/..'
sys.path.insert(0, srcdir + '/buildtools/wafsamba')
-import wafsamba, samba_dist, Options, Utils
+import wafsamba, samba_dist, Utils
samba_dist.DIST_DIRS('''lib/ldb:. lib/replace:lib/replace lib/talloc:lib/talloc
lib/tdb:lib/tdb lib/tdb:lib/tdb lib/tevent:lib/tevent
@@ -150,7 +150,7 @@ def build(bld):
bld.INSTALL_FILES('${PYTHONARCHDIR}', '_ldb_text.py')
if not bld.CONFIG_SET('USING_SYSTEM_LDB'):
- if Options.is_install:
+ if bld.is_install:
modules_dir = bld.EXPAND_VARIABLES('${LDB_MODULESDIR}')
else:
# when we run from the source directory, we want to use
diff --git a/source4/setup/wscript_build b/source4/setup/wscript_build
index cb83e3e..2717986 100644
--- a/source4/setup/wscript_build
+++ b/source4/setup/wscript_build
@@ -7,6 +7,6 @@ bld.INSTALL_FILES('${SETUPDIR}', 'dns_update_list')
bld.INSTALL_FILES('${SETUPDIR}', 'spn_update_list')
for p in '''schema-map-* DB_CONFIG *.inf *.ldif *.reg *.zone *.conf *.php *.txt
- named.conf named.conf.update named.conf.dlz'''.split():
+ named.conf.update named.conf.dlz'''.split():
bld.INSTALL_WILDCARD('${SETUPDIR}', p)
--
Samba Shared Repository
More information about the samba-cvs
mailing list