From 5820c74ab6f56311f28713a730ae83496d956fde Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 22 May 2013 17:23:30 +1000 Subject: [PATCH 1/5] lib/replace: Set BROKEN_STRNLEN and BROKEN_STRNDUP on all AIX The background is in https://bugzilla.samba.org/show_bug.cgi?id=1097 and wider reports are at http://stackoverflow.com/questions/2091460/strndup-call-is-currupting-stack-frames Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Thu May 23 03:52:10 CEST 2013 on sn-devel-104 (cherry picked from commit 9ddfd7d8784e6f546628f48990b69ee2850be52d) --- lib/replace/wscript | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/replace/wscript b/lib/replace/wscript index c08dfb7..951b791 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -212,6 +212,19 @@ struct foo bar = { .y = 'X', .x = 1 }; # these may be builtins, so we need the link=False strategy conf.CHECK_FUNCS('strdup memmem printf memset memcpy memmove strcpy strncpy bzero', link=False) + # See https://bugzilla.samba.org/show_bug.cgi?id=1097 + # + # Ported in from autoconf where it was added with this commit: + # commit 804cfb20a067b4b687089dc72a8271b3abf20f31 + # Author: Simo Sorce + # Date: Wed Aug 25 14:24:16 2004 +0000 + # r2070: Let's try to overload srnlen and strndup for AIX where they are natly broken. + + host_os = sys.platform + if host_os.rfind('aix') > -1: + conf.DEFINE('BROKEN_STRNLEN', 1) + conf.DEFINE('BROKEN_STRNDUP', 1) + conf.CHECK_FUNCS('shl_load shl_unload shl_findsym') conf.CHECK_FUNCS('pipe strftime srandom random srand rand usleep setbuffer') conf.CHECK_FUNCS('lstat getpgrp utime utimes setuid seteuid setreuid setresuid setgid setegid') -- 1.7.11.7 From 806a3a0b3ccc7c28380210031d554a393d9a6ecc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 22 May 2013 00:14:29 +1000 Subject: [PATCH 2/5] build: Rework BSD_STYLE_STATVFS check to match autoconf build Reviewed-by: Jelmer Vernooij (cherry picked from commit 2a4eaa3241fc4ccb79359ea4e4d511754a84d46b) --- lib/util/wscript_configure | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/util/wscript_configure b/lib/util/wscript_configure index 3cb2ffc..1270ab3 100644 --- a/lib/util/wscript_configure +++ b/lib/util/wscript_configure @@ -58,18 +58,16 @@ if not found_statfs: print("FATAL: Failed to find a statfs method") raise -if conf.CONFIG_SET('STAT_STATFS2_BSIZE'): - conf.CHECK_CODE("""#ifdef HAVE_SYS_PARAM_H - #include - #endif - #ifdef HAVE_SYS_MOUNT_H - #include - #endif - struct statfs fsd; fsd.f_iosize = 0;""", - define='BSD_STYLE_STATVFS', - msg='Checking for *bsd style statfs with statfs.f_iosize', - execute=False, - local_include=False) +conf.CHECK_CODE("""struct statfs fsd; + fsd.f_bsize = 0; + fsd.f_iosize = 0; + return (statfs (".", &fsd)); + """, + headers='sys/param.h sys/mount.h sys/vfs.h', + define='BSD_STYLE_STATVFS', + msg='Checking for *bsd style statfs with statfs.f_iosize', + execute=True, + local_include=False) conf.CHECK_CODE('struct statvfs buf; buf.f_fsid = 0', define='HAVE_FSID_INT', -- 1.7.11.7 From 601a1f0f06f2e2d2c871c6236579e3e9f57414ab Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 8 May 2013 12:59:05 +1200 Subject: [PATCH 3/5] build: Do not set PATH in install_with_python now we set $PYTHON This will ensure that the scripts get rewritten to use this specific python, as it will not be found in the path by the waf scripts. Andrew Bartlett Reviewed-by: Stefan Metzmacher (cherry picked from commit 20445415307ae3d6524995d0128862dcbc119684) --- install_with_python.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install_with_python.sh b/install_with_python.sh index 7b51e5c..e545ecc 100755 --- a/install_with_python.sh +++ b/install_with_python.sh @@ -12,8 +12,6 @@ fi PREFIX="$1" shift -PATH=$PREFIX/python/bin:$PATH -export PATH LD_LIBRARY_PATH=$PREFIX/python/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH -- 1.7.11.7 From 31d2fa88c62b7047d0f16252f6978c44625f5f79 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 26 Apr 2013 16:44:00 +1000 Subject: [PATCH 4/5] build: Blacklist the release-4-0-0 provision as well This reduces the size of the published tarball while ensuring we test with it during autobuild. Andrew Bartlett Reviewed-by: Stefan Metzmacher (cherry picked from commit 768c3bb16ae8aac2d96d4fa0d8a7593fc9be6ca8) --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wscript b/wscript index de518ac..38400e0 100644 --- a/wscript +++ b/wscript @@ -12,7 +12,7 @@ import wafsamba, Options, samba_dist, Scripting, Utils, samba_version samba_dist.DIST_DIRS('.') -samba_dist.DIST_BLACKLIST('.gitignore .bzrignore source4/selftest/provisions/alpha13') +samba_dist.DIST_BLACKLIST('.gitignore .bzrignore source4/selftest/provisions/alpha13 source4/selftest/provisions/release-4-0-0/') # install in /usr/local/samba by default Options.default_prefix = '/usr/local/samba' -- 1.7.11.7 From f9a2376275d39ce182a69fe57bf54fed13eed962 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 26 May 2013 21:05:12 +1000 Subject: [PATCH 5/5] build: Install smbtar in waf build Reviewed-by: Kai Blin Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Mon May 27 12:55:05 CEST 2013 on sn-devel-104 (cherry picked from commit 1754b52204563a722920805b76e6c571d0268434) --- source3/script/wscript_build | 7 +++++++ source3/wscript_build | 1 + 2 files changed, 8 insertions(+) create mode 100644 source3/script/wscript_build diff --git a/source3/script/wscript_build b/source3/script/wscript_build new file mode 100644 index 0000000..fc59a65 --- /dev/null +++ b/source3/script/wscript_build @@ -0,0 +1,7 @@ +#!/usr/bin/env python + +from samba_utils import MODE_755 + +bld.INSTALL_FILES('${BINDIR}', + 'smbtar', + chmod=MODE_755, flat=True) diff --git a/source3/wscript_build b/source3/wscript_build index 02040bf..55d8bbd 100755 --- a/source3/wscript_build +++ b/source3/wscript_build @@ -1653,6 +1653,7 @@ bld.RECURSE('modules') bld.RECURSE('pam_smbpass') bld.RECURSE('passdb') bld.RECURSE('rpc_server') +bld.RECURSE('script') bld.RECURSE('winbindd') bld.RECURSE('../examples/auth') bld.RECURSE('../examples/libsmbclient') -- 1.7.11.7