The branch, master has been updated via dc0000e provision: when deriving netbiosname from hostname force the netbiosname to be compliant via edebb76 build: strip -single_module when doing bundle on mac OS X via 33b276c build: set shared libraries flags correctly on mac os X from 23b5880 talloc.3: Remove documentation for deprecated talloc_append_string, consistent with other deprecated functionality.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit dc0000e1a8f5233608d5bf59730200af3e041ce5 Author: Matthieu Patou <m...@matws.net> Date: Thu Oct 28 13:09:51 2010 +0400 provision: when deriving netbiosname from hostname force the netbiosname to be compliant It means no space/_/-/@.... and less than 16 chars. Autobuild-User: Matthieu Patou <m...@samba.org> Autobuild-Date: Sat Oct 30 14:26:22 UTC 2010 on sn-devel-104 commit edebb76a616c40565383363bc240c0df50a850f3 Author: Matthieu Patou <m...@matws.net> Date: Sat Oct 30 16:51:20 2010 +0400 build: strip -single_module when doing bundle on mac OS X commit 33b276c2f16c4ec70cf392e850558cfd6703d7e6 Author: Matthieu Patou <m...@matws.net> Date: Sat Oct 30 16:50:33 2010 +0400 build: set shared libraries flags correctly on mac os X ----------------------------------------------------------------------- Summary of changes: buildtools/wafsamba/samba_conftests.py | 21 +++++++++++++++++++++ buildtools/wafsamba/wafsamba.py | 12 ++++++++++++ buildtools/wafsamba/wscript | 2 -- source4/scripting/python/samba/provision.py | 16 +++++++++++++--- source4/wscript | 5 +++++ 5 files changed, 51 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py index 8a57d20..49cd4ff 100644 --- a/buildtools/wafsamba/samba_conftests.py +++ b/buildtools/wafsamba/samba_conftests.py @@ -93,6 +93,27 @@ def find_config_dir(conf): conf.fatal('cannot use the configuration test folder %r' % dir) return dir +...@conf +def CHECK_SHLIB_W_PYTHON(conf, msg): + '''check if we need -undefined dynamic_lookup''' + + dir = find_config_dir(conf) + + env = conf.env + + snip = ''' +#include <Python.h> +#include <crt_externs.h> +#define environ (*_NSGetEnviron()) + +static PyObject *ldb_module = NULL; +int foo(int v) { + extern char **environ; + environ[0] = 1; + ldb_module = PyImport_ImportModule("ldb"); + return v * 2; +}''' + return conf.check(features='cc cshlib',uselib='PYEMBED',fragment=snip,msg=msg) # 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/wafsamba.py b/buildtools/wafsamba/wafsamba.py index a9dfc40..35b39d3 100644 --- a/buildtools/wafsamba/wafsamba.py +++ b/buildtools/wafsamba/wafsamba.py @@ -972,3 +972,15 @@ def samba_display(self): Task.TaskBase.classes['Task'].old_display = Task.TaskBase.classes['Task'].display Task.TaskBase.classes['Task'].display = samba_display + + +...@after('apply_link') +...@feature('cshlib') +def apply_bundle_remove_dynamiclib_patch(self): + if self.env['MACBUNDLE'] or getattr(self,'mac_bundle',False): + if not getattr(self,'vnum',None): + try: + self.env['LINKFLAGS'].remove('-dynamiclib') + self.env['LINKFLAGS'].remove('-single_module') + except ValueError: + pass diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 49f1cf4..90aeb45 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -275,8 +275,6 @@ def configure(conf): else: conf.ADD_CFLAGS('-fPIC', testflags=True) - if sys.platform == 'darwin': - conf.ADD_LDFLAGS('-fno-common', testflags=True) conf.CHECK_INLINE() # check for pkgconfig diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 5205ba5..49ad5d7 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -443,6 +443,11 @@ def guess_names(lp=None, hostname=None, domain=None, dnsdomain=None, netbiosname = lp.get("netbios name") if netbiosname is None: netbiosname = hostname + # remove forbidden chars + for char in " !#$%&'()-...@^_{}~": + netbiosname = "".join(netbiosname.split(char)) + #force the length to be <16 + netbiosname = netbiosname[0:15] assert netbiosname is not None netbiosname = netbiosname.upper() if not valid_netbios_name(netbiosname): @@ -534,7 +539,14 @@ def make_smbconf(smbconf, setup_path, hostname, domain, realm, serverrole, assert smbconf is not None if hostname is None: hostname = socket.gethostname().split(".")[0] - netbiosname = hostname.upper() + netbiosname = hostname.upper() + # remove forbidden chars + for char in " !#$%&'()-...@^_{}~": + netbiosname = "".join(netbiosname.split(char)) + #force the length to be <16 + netbiosname = netbiosname[0:15] + else: + netbiosname = hostname.upper() if serverrole is None: serverrole = "standalone" @@ -1436,12 +1448,10 @@ def provision(setup_dir, logger, session_info, lp = samba.param.LoadParm() lp.load(smbconf) - names = guess_names(lp=lp, hostname=hostname, domain=domain, dnsdomain=realm, serverrole=serverrole, domaindn=domaindn, configdn=configdn, schemadn=schemadn, serverdn=serverdn, sitename=sitename) - paths = provision_paths_from_lp(lp, names.dnsdomain) paths.bind_gid = bind_gid diff --git a/source4/wscript b/source4/wscript index 45d147f..333079d 100644 --- a/source4/wscript +++ b/source4/wscript @@ -86,6 +86,11 @@ def configure(conf): conf.check_python_version((2,4,2)) conf.check_python_headers(mandatory=True) + if 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"): + conf.env.append_value('shlib_LINKFLAGS', ['-undefined', 'dynamic_lookup']) if int(conf.env['PYTHON_VERSION'][0]) >= 3: raise Utils.WafError('Python version 3.x is not supported by Samba yet') -- Samba Shared Repository