[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Mon Jun 8 07:52:05 MDT 2015


The branch, master has been updated
       via  a84e982 ctdb-build: only use ctdb/packaging/mkversion.sh for the standalone build.
       via  3863c0a ctdb-build: fix version handling in standalone build
       via  62d4136 selftest: Remove binary mappings from the build system.
       via  47ad5d2 selftest: Apply rename filepath arguments so binary mapping doesn't have to.
      from  873d3cc s3:smb2_tcon: require a signed request when authentication is used for SMB >= 3.11

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a84e982bebbd1c21eba70f2d4873a4a1f3b0f58e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 28 16:17:15 2015 +0200

    ctdb-build: only use ctdb/packaging/mkversion.sh for the standalone build.
    
    This avoids rebuilding ctdb after each commit, instead we're using
    SAMBA_VERSION_STRING, which may contain "4.3.0pre1-DEVELOPERBUILD",
    instead of "4.3.0pre1.GIT.4ccdd39" for the non-install build.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Mon Jun  8 15:51:46 CEST 2015 on sn-devel-104

commit 3863c0aa7100ac2e663b128ad115f44764f11d71
Author: Michael Adam <obnox at samba.org>
Date:   Mon Jun 8 12:47:34 2015 +0200

    ctdb-build: fix version handling in standalone build
    
    Pair-Programmed-With: Stefan Metzmacher <metze at samba.org>
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 62d413675589be921dbee4337399c948680f6bc3
Author: Adrian Cochrane <adrianc at catalyst.net.nz>
Date:   Fri Jun 5 12:22:45 2015 +1200

    selftest: Remove binary mappings from the build system.
    
    Signed-off-by: Adrian Cochrane <adrianc at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

commit 47ad5d27eb2ec3ec660a91658afd599df8570562
Author: Adrian Cochrane <adrianc at catalyst.net.nz>
Date:   Fri Jun 5 15:18:19 2015 +1200

    selftest: Apply rename filepath arguments so binary mapping doesn't have to.
    
    Signed-off-by: Adrian Cochrane <adrianc at catalyst.net.nz>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 ctdb/wscript                 | 34 +++++++++++++++++++---------------
 selftest/selftest.pl         | 17 ++---------------
 selftest/selftest.py         | 12 ++----------
 selftest/selftesthelpers.py  | 19 +++----------------
 selftest/target/Samba.pm     | 10 +++-------
 selftest/target/Samba3.pm    |  5 ++---
 selftest/target/Samba4.pm    |  5 ++---
 selftest/target/samba.py     |  4 +---
 selftest/tests/test_samba.py | 12 ++++++------
 selftest/wscript             | 10 +---------
 10 files changed, 41 insertions(+), 87 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/wscript b/ctdb/wscript
index cd02262..b5c6087 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -225,24 +225,28 @@ def build(bld):
         # enable building of public headers in the build tree
         bld.env.build_public_headers = 'include/public'
 
+    version_h = samba_utils.os_path_relpath(os.path.join(Options.launch_dir,
+                                                         "version.h"),
+                                            bld.curdir)
+
     if bld.env.standalone_ctdb:
         ctdb_mkversion = '../packaging/mkversion.sh'
-    else:
-        ctdb_mkversion = '../ctdb/packaging/mkversion.sh'
-    t = bld.SAMBA_GENERATOR('ctdb-version-header',
-                            target='include/ctdb_version.h',
-                            rule='%s ${TGT} %s' % (ctdb_mkversion, VERSION),
-                            dep_vars=['VERSION'])
-    t.env.VERSION = VERSION
+        t = bld.SAMBA_GENERATOR('ctdb-version-header',
+                                target='include/ctdb_version.h',
+                                rule='%s ${TGT} %s' % (ctdb_mkversion, VERSION),
+                                dep_vars=['VERSION'])
+        t.env.VERSION = VERSION
 
-    if bld.env.standalone_ctdb:
-        version_h = samba_utils.os_path_relpath(os.path.join(Options.launch_dir,
-                                                             "version.h"),
-                                                bld.curdir)
-        t.bld.SAMBA_GENERATOR('ctdb-samba-version-header',
-                              target=version_h,
-                              rule='printf "#include \\"ctdb_version.h\\" \\n#define SAMBA_VERSION_STRING CTDB_VERSION_STRING\\n" > ${TGT}',
-                              dep_vars=['VERSION'])
+        t = bld.SAMBA_GENERATOR('ctdb-samba-version-header',
+                                target=version_h,
+                                rule='printf "#include \\"ctdb_version.h\\" \\n#define SAMBA_VERSION_STRING CTDB_VERSION_STRING\\n" > ${TGT}',
+                                dep_vars=['VERSION'])
+        t.env.VERSION = VERSION
+    else:
+        t = bld.SAMBA_GENERATOR('ctdb-samba-version-header',
+                                target='include/ctdb_version.h',
+                                rule='printf "#include \\"%s\\" \\n#define CTDB_VERSION_STRING SAMBA_VERSION_STRING\\n" > ${TGT}' % version_h,
+                                dep_vars=['VERSION'])
         t.env.VERSION = VERSION
 
     bld.RECURSE('lib/replace')
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 1b22d61..bbd81d6 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -50,7 +50,6 @@ my $opt_testenv = 0;
 my $opt_list = 0;
 my $ldap = undef;
 my $opt_resetup_env = undef;
-my $opt_binary_mapping = "";
 my $opt_load_list = undef;
 my $opt_libnss_wrapper_so_path = "";
 my $opt_libresolv_wrapper_so_path = "";
@@ -248,7 +247,6 @@ my $result = GetOptions (
 		'testlist=s' => \@testlists,
 		'random-order' => \$opt_random_order,
 		'load-list=s' => \$opt_load_list,
-		'binary-mapping=s' => \$opt_binary_mapping,
 		'nss_wrapper_so_path=s' => \$opt_libnss_wrapper_so_path,
 		'resolv_wrapper_so_path=s' => \$opt_libresolv_wrapper_so_path,
 		'socket_wrapper_so_path=s' => \$opt_libsocket_wrapper_so_path,
@@ -413,17 +411,6 @@ if ($opt_use_dns_faking) {
 my $target;
 my $testenv_default = "none";
 
-my %binary_mapping = ();
-if ($opt_binary_mapping) {
-    my @binmapping_list = split(/,/, $opt_binary_mapping);
-    foreach my $mapping (@binmapping_list) {
-	my ($bin, $map) = split(/\:/, $mapping);
-	$binary_mapping{$bin} = $map;
-    }
-}
-
-$ENV{BINARY_MAPPING} = $opt_binary_mapping;
-
 # After this many seconds, the server will self-terminate.  All tests
 # must terminate in this time, and testenv will only stay alive this
 # long
@@ -437,11 +424,11 @@ unless ($opt_list) {
 	if ($opt_target eq "samba") {
 		$testenv_default = "ad_dc_ntvfs";
 		require target::Samba;
-		$target = new Samba($bindir, \%binary_mapping, $ldap, $srcdir, $server_maxtime);
+		$target = new Samba($bindir, $ldap, $srcdir, $server_maxtime);
 	} elsif ($opt_target eq "samba3") {
 		$testenv_default = "nt4_member";
 		require target::Samba3;
-		$target = new Samba3($bindir, \%binary_mapping, $srcdir_abs, $server_maxtime);
+		$target = new Samba3($bindir, $srcdir_abs, $server_maxtime);
 	}
 }
 
diff --git a/selftest/selftest.py b/selftest/selftest.py
index ec6f89c..ef2278d 100755
--- a/selftest/selftest.py
+++ b/selftest/selftest.py
@@ -70,7 +70,6 @@ parser.add_option("--exclude", action="callback", help="Add file to exclude file
 parser.add_option("--include", action="callback", help="Add file to include files", callback=read_includes)
 parser.add_option("--testenv", help="run a shell in the requested test environment", action="store_true", default=False)
 parser.add_option("--resetup-environment", help="Re-setup environment", action="store_true", default=False)
-parser.add_option("--binary-mapping", help="Map binaries to use", type=str)
 parser.add_option("--load-list", help="Load list of tests to load from a file", type=str)
 parser.add_option("--prefix", help="prefix to run tests in", type=str, default="./st")
 parser.add_option("--srcdir", type=str, default=".", help="source directory")
@@ -232,13 +231,6 @@ elif not opts.list:
 
 testenv_default = "none"
 
-if opts.binary_mapping:
-    binary_mapping = dict([l.split(":") for l in opts.binary_mapping.split(",")])
-    os.environ["BINARY_MAPPING"] = opts.binary_mapping
-else:
-    binary_mapping = {}
-    os.environ["BINARY_MAPPING"] = ""
-
 # After this many seconds, the server will self-terminate.  All tests
 # must terminate in this time, and testenv will only stay alive this
 # long
@@ -267,14 +259,14 @@ if not opts.list:
             sys.exit(1)
         testenv_default = "ad_dc_ntvfs"
         from selftest.target.samba import Samba
-        target = Samba(opts.bindir, binary_mapping, ldap, opts.srcdir, server_maxtime)
+        target = Samba(opts.bindir, ldap, opts.srcdir, server_maxtime)
     elif opts.target == "samba3":
         if opts.socket_wrapper and not has_socket_wrapper(opts.bindir):
             sys.stderr.write("You must include --enable-socket-wrapper when compiling Samba in order to execute 'make test'.  Exiting....\n")
             sys.exit(1)
         testenv_default = "member"
         from selftest.target.samba3 import Samba3
-        target = Samba3(opts.bindir, binary_mapping, srcdir_abs, server_maxtime)
+        target = Samba3(opts.bindir, srcdir_abs, server_maxtime)
     elif opts.target == "none":
         testenv_default = "none"
         target = NoneTarget()
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py
index fc2937c..0dfcf54 100644
--- a/selftest/selftesthelpers.py
+++ b/selftest/selftesthelpers.py
@@ -34,22 +34,9 @@ def source3dir():
 def bindir():
     return os.path.normpath(os.getenv("BINDIR", "./bin"))
 
-binary_mapping = {}
-
 def binpath(name):
-    if name in binary_mapping:
-        name = binary_mapping[name]
     return os.path.join(bindir(), name)
 
-binary_mapping_string = os.getenv("BINARY_MAPPING", None)
-if binary_mapping_string is not None:
-    for binmapping_entry in binary_mapping_string.split(','):
-        try:
-            (from_path, to_path) = binmapping_entry.split(':', 1)
-        except ValueError:
-            continue
-        binary_mapping[from_path] = to_path
-
 # Split perl variable to allow $PERL to be set to e.g. "perl -W"
 perl = os.getenv("PERL", "perl").split()
 
@@ -161,7 +148,7 @@ samba3srcdir = source3dir()
 bbdir = os.path.join(srcdir(), "testprogs/blackbox")
 configuration = "--configfile=$SMB_CONF_PATH"
 
-smbtorture4 = binpath("smbtorture4")
+smbtorture4 = binpath("smbtorture")
 smbtorture4_testsuite_list = subprocess.Popen([smbtorture4, "--list-suites"], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate("")[0].splitlines()
 
 smbtorture4_options = [
@@ -187,9 +174,9 @@ def smbtorture4_testsuites(prefix):
     return filter(lambda x: x.startswith(prefix), smbtorture4_testsuite_list)
 
 
-smbclient3 = binpath('smbclient3')
+smbclient3 = binpath('smbclient')
 smbtorture3 = binpath('smbtorture3')
-ntlm_auth3 = binpath('ntlm_auth3')
+ntlm_auth3 = binpath('ntlm_auth')
 net = binpath('net')
 scriptdir = os.path.join(srcdir(), "script/tests")
 
diff --git a/selftest/target/Samba.pm b/selftest/target/Samba.pm
index 4b7313b..4949086 100644
--- a/selftest/target/Samba.pm
+++ b/selftest/target/Samba.pm
@@ -12,11 +12,11 @@ use POSIX;
 use Cwd qw(abs_path);
 
 sub new($$$$$) {
-	my ($classname, $bindir, $binary_mapping,$ldap, $srcdir, $server_maxtime) = @_;
+	my ($classname, $bindir, $ldap, $srcdir, $server_maxtime) = @_;
 
 	my $self = {
-	    samba3 => new Samba3($bindir,$binary_mapping, $srcdir, $server_maxtime),
-	    samba4 => new Samba4($bindir,$binary_mapping, $ldap, $srcdir, $server_maxtime),
+	    samba3 => new Samba3($bindir, $srcdir, $server_maxtime),
+	    samba4 => new Samba4($bindir, $ldap, $srcdir, $server_maxtime),
 	};
 	bless $self;
 	return $self;
@@ -55,10 +55,6 @@ sub setup_env($$$)
 sub bindir_path($$) {
 	my ($object, $path) = @_;
 
-	if (defined($object->{binary_mapping}->{$path})) {
-	    $path = $object->{binary_mapping}->{$path};
-	}
-
 	my $valpath = "$object->{bindir}/$path";
 
 	return $valpath if (-f $valpath);
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index bc52263..50898f2 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -49,10 +49,9 @@ sub get_fs_specific_conf($$)
 }
 
 sub new($$) {
-	my ($classname, $bindir, $binary_mapping, $srcdir, $server_maxtime) = @_;
+	my ($classname, $bindir, $srcdir, $server_maxtime) = @_;
 	my $self = { vars => {},
 		     bindir => $bindir,
-		     binary_mapping => $binary_mapping,
 		     srcdir => $srcdir,
 		     server_maxtime => $server_maxtime
 	};
@@ -1558,7 +1557,7 @@ sub wait_for_start($$$$$)
 
 	    my $count = 0;
 	    do {
-		$ret = system(Samba::bindir_path($self, "smbclient3") ." $envvars->{CONFIGURATION} -L $envvars->{SERVER} -U% -p 139");
+		$ret = system(Samba::bindir_path($self, "smbclient") ." $envvars->{CONFIGURATION} -L $envvars->{SERVER} -U% -p 139");
 		if ($ret != 0) {
 		    sleep(2);
 		}
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 8d16cf6..3a5b409 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -14,16 +14,15 @@ use target::Samba;
 use target::Samba3;
 
 sub new($$$$$) {
-	my ($classname, $bindir, $binary_mapping, $ldap, $srcdir, $server_maxtime) = @_;
+	my ($classname, $bindir, $ldap, $srcdir, $server_maxtime) = @_;
 
 	my $self = {
 		vars => {},
 		ldap => $ldap,
 		bindir => $bindir,
-		binary_mapping => $binary_mapping,
 		srcdir => $srcdir,
 		server_maxtime => $server_maxtime,
-		target3 => new Samba3($bindir, $binary_mapping, $srcdir, $server_maxtime)
+		target3 => new Samba3($bindir, $srcdir, $server_maxtime)
 	};
 	bless $self;
 	return $self;
diff --git a/selftest/target/samba.py b/selftest/target/samba.py
index 460e0c8..95ce1eb 100644
--- a/selftest/target/samba.py
+++ b/selftest/target/samba.py
@@ -7,15 +7,13 @@ import os
 import sys
 
 
-def bindir_path(binary_mapping, bindir, path):
+def bindir_path(bindir, path):
     """Find the executable to use.
 
-    :param binary_mapping: Dictionary mapping binary names
     :param bindir: Directory with binaries
     :param path: Name of the executable to run
     :return: Full path to the executable to run
     """
-    path = binary_mapping.get(path, path)
     valpath = os.path.join(bindir, path)
     if os.path.isfile(valpath):
         return valpath
diff --git a/selftest/tests/test_samba.py b/selftest/tests/test_samba.py
index 23de0d3..4bcfcba 100644
--- a/selftest/tests/test_samba.py
+++ b/selftest/tests/test_samba.py
@@ -34,15 +34,15 @@ from selftest.target.samba import (
 class BinDirPathTests(TestCase):
 
     def test_mapping(self):
-        self.assertEquals("exe4",
-            bindir_path({"exe": "exe4"}, "/some/path", "exe"))
-        self.assertEquals("/bin/ls",
-            bindir_path({"exe": "ls"}, "/bin", "exe"))
+        self.assertEquals("exe",
+            bindir_path("/some/path", "exe"))
+        self.assertEquals("/bin/exe",
+            bindir_path("/bin", "/bin/exe"))
 
     def test_no_mapping(self):
-        self.assertEqual("exe", bindir_path({}, "/some/path", "exe"))
+        self.assertEqual("exe", bindir_path("/some/path", "exe"))
         self.assertEqual("/bin/ls",
-            bindir_path({}, "/bin", "ls"))
+            bindir_path("/bin", "ls"))
 
 
 class MkRealmsStanzaTests(TestCase):
diff --git a/selftest/wscript b/selftest/wscript
index df4a8c7..61ca0bd 100644
--- a/selftest/wscript
+++ b/selftest/wscript
@@ -130,15 +130,7 @@ def cmd_testonly(opt):
                     and not issubclass(type(val), types.MethodType):
                 os.environ['TESTENV_%s' % o.upper()] = str(getattr(Options.options, o, ''))
 
-
-    binary_mapping = ('nmblookup3:nmblookup,' +
-                      'nmblookup4:nmblookup4,' +
-                      'smbclient3:smbclient,' +
-                      'smbclient4:smbclient4,' +
-                      'smbtorture4:smbtorture,' +
-                      'ntlm_auth3:ntlm_auth')
-
-    env.OPTIONS = '--binary-mapping=%s' % binary_mapping
+    env.OPTIONS = ''
     if not Options.options.SLOWTEST:
         env.OPTIONS += ' --exclude=${srcdir}/selftest/slow'
     if Options.options.QUICKTEST:


-- 
Samba Shared Repository


More information about the samba-cvs mailing list