[SCM] Samba Shared Repository - branch master updated
Matthieu Patou
mat at samba.org
Sat Oct 30 11:32:01 MDT 2010
The branch, master has been updated
via b548674 provision: fix wrong tests
via a509b93 build: Remove zlib from the cache if we failed to pass all the tests
via 4e30a5d build: make this test darwin only as it mess a bit more the freebsd build
from 4dee76f replace: Fix formatting.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit b548674c29aa04594e70599d9021182f9a69d753
Author: Matthieu Patou <mat at matws.net>
Date: Sat Oct 30 20:42:50 2010 +0400
provision: fix wrong tests
Autobuild-User: Matthieu Patou <mat at samba.org>
Autobuild-Date: Sat Oct 30 17:31:23 UTC 2010 on sn-devel-104
commit a509b93518b17309f401a6fd107c726c7ab7582f
Author: Matthieu Patou <mat at matws.net>
Date: Sat Oct 30 20:47:45 2010 +0400
build: Remove zlib from the cache if we failed to pass all the tests
This will avoid problems with redefinition of libs tests
commit 4e30a5dd0b3ca2b56d228730ad4d43f1986f39fa
Author: Matthieu Patou <mat at matws.net>
Date: Sat Oct 30 20:22:22 2010 +0400
build: make this test darwin only as it mess a bit more the freebsd build
-----------------------------------------------------------------------
Summary of changes:
lib/zlib/wscript | 6 ++++++
source4/scripting/python/samba/provision.py | 17 +++++++++++------
source4/wscript | 2 +-
3 files changed, 18 insertions(+), 7 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/zlib/wscript b/lib/zlib/wscript
index bc6de34..a091de6 100644
--- a/lib/zlib/wscript
+++ b/lib/zlib/wscript
@@ -15,6 +15,12 @@ def configure(conf):
msg='Checking for ZLIB_VERNUM >= 0x1230',
define='HAVE_ZLIB')
+ # If we don't do this then we will receive an error that lib 'z'
+ # is already declared as a system lib (for the cases where zlibVersion
+ # is defined
+ if not conf.env['HAVE_ZLIB']:
+ conf.LOCAL_CACHE_SET('TARGET_TYPE', 'z', 'EMPTY')
+
def build(bld):
if not bld.CONFIG_SET('HAVE_ZLIB'):
bld.SAMBA_LIBRARY('z',
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 49ad5d7..319b63d 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -61,6 +61,7 @@ import samba.registry
from samba.schema import Schema
from samba.samdb import SamDB
+VALID_NETBIOS_CHARS = " !#$%&'()-.@^_{}~"
__docformat__ = "restructuredText"
DEFAULT_POLICY_GUID = "31B2F340-016D-11D2-945F-00C04FB984F9"
DEFAULT_DC_POLICY_GUID = "6AC1786C-016F-11D2-945F-00C04fB984F9"
@@ -444,10 +445,12 @@ def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None,
if netbiosname is None:
netbiosname = hostname
# remove forbidden chars
- for char in " !#$%&'()-.@^_{}~":
- netbiosname = "".join(netbiosname.split(char))
+ newnbname = ""
+ for x in netbiosname:
+ if x.isalnum() or x in VALID_NETBIOS_CHARS:
+ newnbname = "%s%c" % (newnbname, x)
#force the length to be <16
- netbiosname = netbiosname[0:15]
+ netbiosname = newnbname[0:15]
assert netbiosname is not None
netbiosname = netbiosname.upper()
if not valid_netbios_name(netbiosname):
@@ -541,10 +544,12 @@ def make_smbconf(smbconf, setup_path, hostname, domain, realm, serverrole,
hostname = socket.gethostname().split(".")[0]
netbiosname = hostname.upper()
# remove forbidden chars
- for char in " !#$%&'()-.@^_{}~":
- netbiosname = "".join(netbiosname.split(char))
+ newnbname = ""
+ for x in netbiosname:
+ if x.isalnum() or x in VALID_NETBIOS_CHARS:
+ newnbname = "%s%c" % (newnbname, x)
#force the length to be <16
- netbiosname = netbiosname[0:15]
+ netbiosname = newnbname[0:15]
else:
netbiosname = hostname.upper()
diff --git a/source4/wscript b/source4/wscript
index 333079d..cbc0bf4 100644
--- a/source4/wscript
+++ b/source4/wscript
@@ -86,7 +86,7 @@ def configure(conf):
conf.check_python_version((2,4,2))
conf.check_python_headers(mandatory=True)
- if not conf.env['HAVE_ENVIRON_DECL']:
+ if sys.platform == 'darwin' and not conf.env['HAVE_ENVIRON_DECL']:
if not conf.CHECK_SHLIB_W_PYTHON("Checking if -single_module is not needed"):
conf.env.append_value('shlib_LINKFLAGS', ['-single_module'])
if not conf.CHECK_SHLIB_W_PYTHON("Checking if -undefined dynamic_lookup is not need"):
--
Samba Shared Repository
More information about the samba-cvs
mailing list