[SCM] Samba Shared Repository - branch v3-6-test updated
Stefan Metzmacher
metze at samba.org
Wed Jan 5 06:02:19 MST 2011
The branch, v3-6-test has been updated
via f8d2e95 s3-waf: convert SAMBA_VERSION into a subsystem.
via 36e7bf9 s3-waf: convert PASSCHANGE into a subsystem.
via e28717c s3-waf: add UTIL_TDB subsystem.
via 539a966 s3-waf: fixed version number handling (cherry picked from commit 16c36a8cb56f3a74927cdb7c46dfb6158f328beb)
via 58687c8 s3/selftest: add some FIXMEs
via 02e743f tests: avoid bash in shebang and fix wrong "==" in test (cherry picked from commit eeade1596df7bd52fab3b3a4b39266f39ffa6fb1)
from 52a2dd8 s3:build: don't use cli_dssetup.c any more
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit f8d2e9564261bfaeec901ab7d43c3ca6a8d545e0
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 4 13:11:35 2011 +0100
s3-waf: convert SAMBA_VERSION into a subsystem.
Guenther
Autobuild-User: Günther Deschner <gd at samba.org>
Autobuild-Date: Tue Jan 4 15:10:52 CET 2011 on sn-devel-104
(cherry picked from commit 4ebf2f97459b4214748255aa1f40015f8dc511cc)
Signed-off-by: Stefan Metzmacher <metze at samba.org>
commit 36e7bf9b0b0be8a8776163f7f7d1f9a7f869627f
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 4 13:05:51 2011 +0100
s3-waf: convert PASSCHANGE into a subsystem.
Guenther
(cherry picked from commit 589d1bf57eb8f561de3cf2a05990a5d2edf69095)
Signed-off-by: Stefan Metzmacher <metze at samba.org>
commit e28717c3cdcae114fd7bbe63adcaf46c03a73d25
Author: Günther Deschner <gd at samba.org>
Date: Tue Jan 4 12:56:29 2011 +0100
s3-waf: add UTIL_TDB subsystem.
Guenther
(cherry picked from commit 34596493bada8ce9fb00fd7d4d60ac245a71d5e6)
Signed-off-by: Stefan Metzmacher <metze at samba.org>
commit 539a9669e94e607a7bb07174697077e5662ec0d0
Author: Andrew Tridgell <tridge at samba.org>
Date: Wed Dec 8 14:58:12 2010 +1100
s3-waf: fixed version number handling
(cherry picked from commit 16c36a8cb56f3a74927cdb7c46dfb6158f328beb)
Signed-off-by: Stefan Metzmacher <metze at samba.org>
commit 58687c8fda2c12052104c76127570adf87968f3d
Author: Björn Jacke <bj at sernet.de>
Date: Thu Dec 2 10:24:52 2010 +0100
s3/selftest: add some FIXMEs
this needs some rework. Sourced shell code cannot take arguments, at least no
portable shell. This generates errors on the buildfarm sind quite a while.
(cherry picked from commit 72a322ed9c2dd3eb0177f91fac8b4368938695ac)
Signed-off-by: Stefan Metzmacher <metze at samba.org>
commit 02e743f0dff7a5180e54ff78c5d87f5a15c95b8c
Author: Björn Jacke <bj at sernet.de>
Date: Thu Dec 2 10:20:59 2010 +0100
tests: avoid bash in shebang and fix wrong "==" in test
(cherry picked from commit eeade1596df7bd52fab3b3a4b39266f39ffa6fb1)
Signed-off-by: Stefan Metzmacher <metze at samba.org>
-----------------------------------------------------------------------
Summary of changes:
lib/subunit/shell/tests/test_function_output.sh | 10 +++---
lib/subunit/shell/tests/test_source_library.sh | 14 ++++----
source3/script/tests/test_smbclient_s3.sh | 2 +-
source3/selftest/tests.sh | 7 ++++
source3/wscript | 15 +-------
source3/wscript_build | 42 ++++++++++++++++-------
6 files changed, 51 insertions(+), 39 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/subunit/shell/tests/test_function_output.sh b/lib/subunit/shell/tests/test_function_output.sh
index b78eee6..6e500cf 100755
--- a/lib/subunit/shell/tests/test_function_output.sh
+++ b/lib/subunit/shell/tests/test_function_output.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# subunit shell bindings.
# Copyright (C) 2006 Robert Collins <robertc at robertcollins.net>
#
@@ -29,7 +29,7 @@
echo 'test: subunit_start_test output'
func_output=$(subunit_start_test "foo bar")
func_status=$?
-if [ $func_status == 0 -a "x$func_output" = "xtest: foo bar" ]; then
+if [ $func_status -eq 0 -a "x$func_output" = "xtest: foo bar" ]; then
echo 'success: subunit_start_test output'
else
echo 'failure: subunit_start_test output ['
@@ -42,7 +42,7 @@ fi
subunit_start_test "subunit_pass_test output"
func_output=$(subunit_pass_test "foo bar")
func_status=$?
-if [ $func_status == 0 -a "x$func_output" = "xsuccess: foo bar" ]; then
+if [ $func_status -eq 0 -a "x$func_output" = "xsuccess: foo bar" ]; then
subunit_pass_test "subunit_pass_test output"
else
echo 'failure: subunit_pass_test output ['
@@ -60,7 +60,7 @@ here
END
)
func_status=$?
-if [ $func_status == 0 -a "x$func_output" = "xfailure: foo bar [
+if [ $func_status -eq 0 -a "x$func_output" = "xfailure: foo bar [
something
wrong
here
@@ -82,7 +82,7 @@ here
END
)
func_status=$?
-if [ $func_status == 0 -a "x$func_output" = "xerror: foo bar [
+if [ $func_status -eq 0 -a "x$func_output" = "xerror: foo bar [
something
died
here
diff --git a/lib/subunit/shell/tests/test_source_library.sh b/lib/subunit/shell/tests/test_source_library.sh
index 699f128..3ef6ffe 100755
--- a/lib/subunit/shell/tests/test_source_library.sh
+++ b/lib/subunit/shell/tests/test_source_library.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# subunit shell bindings.
# Copyright (C) 2006 Robert Collins <robertc at robertcollins.net>
#
@@ -24,7 +24,7 @@
echo 'test: shell bindings can be sourced'
# if any output occurs, this has failed to source cleanly
source_output=$(. ${SHELL_SHARE}subunit.sh 2>&1)
-if [ $? == 0 -a "x$source_output" = "x" ]; then
+if [ $? -eq 0 -a "x$source_output" = "x" ]; then
echo 'success: shell bindings can be sourced'
else
echo 'failure: shell bindings can be sourced ['
@@ -40,7 +40,7 @@ fi
echo 'test: subunit_start_test exists'
found_type=$(type -t subunit_start_test)
status=$?
-if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
echo 'success: subunit_start_test exists'
else
echo 'failure: subunit_start_test exists ['
@@ -54,7 +54,7 @@ fi
echo 'test: subunit_pass_test exists'
found_type=$(type -t subunit_pass_test)
status=$?
-if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
echo 'success: subunit_pass_test exists'
else
echo 'failure: subunit_pass_test exists ['
@@ -68,7 +68,7 @@ fi
echo 'test: subunit_fail_test exists'
found_type=$(type -t subunit_fail_test)
status=$?
-if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
echo 'success: subunit_fail_test exists'
else
echo 'failure: subunit_fail_test exists ['
@@ -82,7 +82,7 @@ fi
echo 'test: subunit_error_test exists'
found_type=$(type -t subunit_error_test)
status=$?
-if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
echo 'success: subunit_error_test exists'
else
echo 'failure: subunit_error_test exists ['
@@ -96,7 +96,7 @@ fi
echo 'test: subunit_skip_test exists'
found_type=$(type -t subunit_skip_test)
status=$?
-if [ $status == 0 -a "x$found_type" = "xfunction" ]; then
+if [ $status -eq 0 -a "x$found_type" = "xfunction" ]; then
echo 'success: subunit_skip_test exists'
else
echo 'failure: subunit_skip_test exists ['
diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh
index 2260903..a567274 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -380,7 +380,7 @@ test_ccache_access()
-c quit 2>&1
ret=$?
- if [ $ret == 0 ] ; then
+ if [ $ret -eq 0 ] ; then
echo "smbclient succeeded with wrong cached credentials"
false
return
diff --git a/source3/selftest/tests.sh b/source3/selftest/tests.sh
index 1a9c5ea..9457207 100755
--- a/source3/selftest/tests.sh
+++ b/source3/selftest/tests.sh
@@ -1,4 +1,5 @@
#!/bin/bash
+### ^^^FIXME -> sh ... breaks testing on *BSD etc. ... see FIXME's below
# This script generates a list of testsuites that should be run as part of
# the Samba 3 test suite.
@@ -89,6 +90,7 @@ export LOCAL_PATH
shift $#
testitprefix="smbtorture_s3.plain."
testitenv="dc"
+#FIXME: shell sourcing with ARGS is just supported by bash but bash isn't everywhere.
. $SCRIPTDIR/test_smbtorture_s3.sh //\$SERVER_IP/tmp \$USERNAME \$PASSWORD "" "" "-l \$LOCAL_PATH"
)
@@ -96,6 +98,7 @@ export LOCAL_PATH
shift $#
testitprefix="smbtorture_s3.crypt."
testitenv="dc"
+#FIXME: shell sourcing with ARGS is just supported by bash but bash isn't everywhere.
. $SCRIPTDIR/test_smbtorture_s3.sh //\$SERVER_IP/tmp \$USERNAME \$PASSWORD "" "-e" "-l \$LOCAL_PATH"
)
@@ -103,6 +106,7 @@ export LOCAL_PATH
shift $#
testitprefix="wbinfo_s3."
testitenv="dc:local"
+#FIXME: shell sourcing with ARGS is just supported by bash but bash isn't everywhere.
. $SCRIPTDIR/test_wbinfo_s3.sh \$DOMAIN \$SERVER \$USERNAME \$PASSWORD
)
@@ -110,6 +114,7 @@ export LOCAL_PATH
shift $#
testitprefix="wbinfo_s3."
testitenv="dc:local"
+#FIXME: shell sourcing with ARGS is just supported by bash but bash isn't everywhere.
. $SCRIPTDIR/test_wbinfo_s3.sh \$DOMAIN \$SERVER \$DOMAIN\\\\\$USERNAME \$PASSWORD
)
@@ -117,6 +122,7 @@ export LOCAL_PATH
shift $#
testitprefix="wbinfo_s3."
testitenv="member:local"
+#FIXME: shell sourcing with ARGS is just supported by bash but bash isn't everywhere.
. $SCRIPTDIR/test_wbinfo_s3.sh \$DOMAIN \$SERVER \$DOMAIN\\\\\$USERNAME \$PASSWORD
)
@@ -179,6 +185,7 @@ plantest "blackbox.testparm_s3" dc:local LOCAL_PATH="$LOCAL_PATH" BINDIR="$BINDI
if [ -n "$SMBTORTURE4" -a -n "$SMBTORTURE4VERSION" ];then
echo "Using SMBTORTURE4: $SMBTORTURE4BINARY"
echo "Version: $SMBTORTURE4VERSION"
+#FIXME: shell sourcing with ARGS is just supported by bash but bash isn't everywhere.
. $SCRIPTDIR/test_posix_s3.sh //\$SERVER_IP/tmp \$USERNAME \$PASSWORD "" ""
else
echo "Skip Tests with Samba4's smbtorture"
diff --git a/source3/wscript b/source3/wscript
index 9cf8dc4..dfb9929 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -11,20 +11,9 @@ from optparse import SUPPRESS_HELP
sys.path.insert(0, srcdir+"/buildtools/wafsamba")
import wafsamba, Options
import build.charset
-import samba_utils
+import samba_utils, samba_version
import samba3
-def load_version(env=None):
- '''load samba versions either from ./VERSION or git
- return a version object for detailed breakdown'''
- import samba_utils, Utils
- if not env:
- env = samba_utils.LOAD_ENVIRONMENT()
-
- version = wafsamba.samba_version_file("./VERSION", "..", env=env)
- Utils.g_module.VERSION = version.STRING
- return version
-
def set_options(opt):
opt.BUILTIN_DEFAULT('NONE')
opt.PRIVATE_EXTENSION_DEFAULT('s3')
@@ -68,7 +57,7 @@ def set_options(opt):
def configure(conf):
from samba_utils import TO_LIST
- version = load_version(env=conf.env)
+ version = samba_version.load_version(env=conf.env)
conf.DEFINE('CONFIG_H_IS_FROM_SAMBA', 1)
conf.DEFINE('_SAMBA_BUILD_', version.MAJOR, add_to_cflags=True)
diff --git a/source3/wscript_build b/source3/wscript_build
index 78da067..af7c6cb 100644
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -1,8 +1,9 @@
#!/usr/bin/env python
from samba_utils import *
+import samba_version
-TDB_LIB_SRC = '''../lib/util/util_tdb.c
+TDB_LIB_SRC = '''
lib/dbwrap.c lib/dbwrap_tdb.c
lib/dbwrap_ctdb.c
lib/g_lock.c
@@ -86,7 +87,7 @@ LIB_SRC = '''${LIBSAMBAUTIL_SRC}
lib/serverid.c
lib/util_transfer_file.c
${TDB_LIB_SRC}
- ${VERSION_SRC} lib/debug.c lib/fault.c
+ lib/debug.c lib/fault.c
lib/interface.c lib/pidfile.c
lib/system.c lib/sendfile.c lib/recvfile.c lib/time.c
lib/username.c
@@ -475,8 +476,7 @@ NMBD_SRC = '${NMBD_SRC1}'
SWAT_SRC1 = '''web/cgi.c web/diagnose.c web/startstop.c web/statuspage.c
web/swat.c web/neg_lang.c'''
-SWAT_SRC = '''${SWAT_SRC1}
- ${PASSCHANGE_SRC}'''
+SWAT_SRC = '''${SWAT_SRC1}'''
STATUS_SRC = '''utils/status.c utils/status_profile.c'''
@@ -492,7 +492,7 @@ TEST_LP_LOAD_SRC = '''param/test_lp_load.c'''
PASSWD_UTIL_SRC = 'utils/passwd_util.c'
-SMBPASSWD_SRC = '''utils/smbpasswd.c ${PASSCHANGE_SRC}'''
+SMBPASSWD_SRC = '''utils/smbpasswd.c'''
PDBEDIT_SRC = '''utils/pdbedit.c'''
@@ -672,9 +672,7 @@ NTLM_AUTH_SRC = '''${NTLM_AUTH_SRC1}
libsmb/clikrb5.c libads/kerberos.c'''
-VLP_SRC = '''printing/tests/vlp.c
- ../lib/util/util_tdb.c
- ${LIBSAMBAUTIL_SRC}'''
+VLP_SRC = '''printing/tests/vlp.c'''
RPC_OPEN_TCP_SRC = 'torture/rpc_open_tcp.c'
@@ -702,6 +700,8 @@ t.env.BUILDDIR = bld.path.abspath()
bld.SETUP_BUILD_GROUPS()
+samba_version.load_version(bld.env)
+
bld.SAMBA_MKVERSION('include/version.h')
bld.RECURSE('../lib/replace')
@@ -863,7 +863,7 @@ bld.SAMBA_SUBSYSTEM('KRBCLIENT',
bld.SAMBA_SUBSYSTEM('LIBS',
source=LIB_SRC,
- deps='LIBCRYPTO ndr security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap samba-util CHARSET',
+ deps='LIBCRYPTO ndr security NDR_SECURITY charset NDR_MESSAGING LIBASYNC_REQ tdb-wrap samba-util CHARSET UTIL_TDB SAMBA_VERSION',
vars=locals())
bld.SAMBA_SUBSYSTEM('LIB_NONSMBD',
@@ -978,6 +978,12 @@ bld.SAMBA_SUBSYSTEM('FNAME_UTIL',
source=FNAME_UTIL_SRC,
vars=locals())
+bld.SAMBA_SUBSYSTEM('UTIL_TDB',
+ source='../lib/util/util_tdb.c',
+ local_include=False,
+ public_deps='tdb talloc'
+ )
+
bld.SAMBA_SUBSYSTEM('LIBNET',
source=LIBNET_SRC,
deps='NDR_LIBNET_JOIN',
@@ -1016,6 +1022,15 @@ bld.SAMBA_SUBSYSTEM('PLAINTEXT_AUTH',
deps='pam',
vars=locals())
+bld.SAMBA_SUBSYSTEM('PASSCHANGE',
+ source=PASSCHANGE_SRC,
+ deps='LIBCLI_SAMR',
+ vars=locals())
+
+bld.SAMBA_SUBSYSTEM('SAMBA_VERSION',
+ source=VERSION_SRC,
+ vars=locals())
+
bld.SAMBA_SUBSYSTEM('SLCACHE',
source=SLCACHE_SRC,
vars=locals())
@@ -1204,7 +1219,7 @@ bld.SAMBA_BINARY('web/swat',
deps='''talloc tevent cap LIBS LIBSMB wbclient PARAM
LIB_NONSMBD resolv PASSDB POPT_SAMBA KRBCLIENT cups
LIBMSRPC_GEN LIBMSRPC LOCKING PLAINTEXT_AUTH PRINTBASE PRINTING FNAME_UTIL
- LIBCLI_SAMR INIT_LSA''',
+ LIBCLI_SAMR INIT_LSA PASSCHANGE''',
enabled=bld.env.build_swat,
install_path='${SBINDIR}',
vars=locals())
@@ -1289,7 +1304,7 @@ bld.SAMBA_BINARY('smbpasswd',
source=SMBPASSWD_SRC,
deps='''talloc tdb tevent cap resolv wbclient PARAM LIB_NONSMBD
LIBSMB LIBSMB_ERR POPT_SAMBA KRBCLIENT PASSDB SMBLDAP GROUPDB LIBMSRPC_GEN LIBMSRPC PASSWD_UTIL
- LIBCLI_SAMR INIT_LSA''',
+ LIBCLI_SAMR INIT_LSA PASSCHANGE''',
vars=locals())
bld.SAMBA_BINARY('pdbedit',
@@ -1406,7 +1421,8 @@ bld.SAMBA_BINARY('smbfilter',
vars=locals())
bld.SAMBA_BINARY('versiontest',
- source='lib/version_test.c ${VERSION_SRC}',
+ source='lib/version_test.c',
+ deps='SAMBA_VERSION',
vars=locals())
bld.SAMBA_BINARY('wbinfo',
@@ -1458,7 +1474,7 @@ bld.SAMBA_BINARY('split_tokens',
bld.SAMBA_BINARY('vlp',
source=VLP_SRC,
- deps='''talloc tdb PARAM_UTIL''',
+ deps='''talloc tdb PARAM_UTIL UTIL_TDB''',
vars=locals())
swat_files=recursive_dirlist('../swat', '../swat', '*')
--
Samba Shared Repository
More information about the samba-cvs
mailing list