[SCM] Samba Shared Repository - branch v4-5-test updated

[email protected] (Karolin Seeger)
Newsgroups gmane.network.samba.cvs
Message-ID <[email protected]>
The branch, v4-5-test has been updated
       via  0d7a65c build: Fix build with perl on debian sid.
       via  e118001 ctdb-tests: Add tests for updated Debian style Samba start/stop
       via  9cc435f ctdb-scripts: Fix Debian init in samba eventscript
      from  71aa6de s3-printing: Allow printer names longer than 16 chars

https://git.samba.org/?p=samba.git;a=shortlog;h=v4-5-test


- Log -----------------------------------------------------------------
commit 0d7a65c42ac44b651ec557cd90b0b3b4629760c5
Author: Andrew Bartlett <[email protected]>
Date:   Wed Oct 26 00:06:12 2016 +1300

    build: Fix build with perl on debian sid.
    
    build: Fix build with perl on debian sid.
    
    It appears that "." is no longer in perl_inc
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12395
    Signed-off-by: Andrew Bartlett <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>
    
    Autobuild-User(master): Martin Schwenke <[email protected]>
    Autobuild-Date(master): Sat Oct 29 09:32:37 CEST 2016 on sn-devel-144
    
    (cherry picked from commit da67acbcfe2167fce9c360a55416ab10e9537a2a)
    
    Autobuild-User(v4-5-test): Karolin Seeger <[email protected]>
    Autobuild-Date(v4-5-test): Wed Nov 16 12:36:38 CET 2016 on sn-devel-144

commit e118001d52cb29132251499838eecbe0efc93e16
Author: Martin Schwenke <[email protected]>
Date:   Fri Nov 4 11:47:18 2016 +1100

    ctdb-tests: Add tests for updated Debian style Samba start/stop
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12371
    
    Signed-off-by: Martin Schwenke <[email protected]>
    Reviewed-by: Amitay Isaacs <[email protected]>
    
    Autobuild-User(master): Amitay Isaacs <[email protected]>
    Autobuild-Date(master): Mon Nov  7 08:01:28 CET 2016 on sn-devel-144
    
    (cherry picked from commit 5c53d50784b2d7883f3e1d9ac48bb1fd56ba7f42)

commit 9cc435fdd602a5e2dee26e106e874e5c2ae5b8b5
Author: Mathieu Parent <[email protected]>
Date:   Mon Oct 31 15:17:34 2016 +0100

    ctdb-scripts: Fix Debian init in samba eventscript
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12371
    
    Signed-off-by: Mathieu Parent <[email protected]>
    Signed-off-by: Stefan Kania <[email protected]>
    Reviewed-by: Martin Schwenke <[email protected]>
    Reviewed-by: Amitay Isaacs <[email protected]>
    (cherry picked from commit 385aef614034a3f32276e19312f089990e6dbb85)

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

Summary of changes:
 buildtools/wafsamba/samba_perl.py                |  3 ++-
 ctdb/config/events.d/50.samba                    |  4 ++--
 ctdb/tests/eventscripts/50.samba.shutdown.011.sh | 15 +++++++++++++++
 ctdb/tests/eventscripts/50.samba.startup.011.sh  | 15 +++++++++++++++
 ctdb/tests/eventscripts/etc-ctdb/rc.local        |  2 +-
 ctdb/tests/eventscripts/scripts/local.sh         |  4 ++--
 6 files changed, 37 insertions(+), 6 deletions(-)
 create mode 100755 ctdb/tests/eventscripts/50.samba.shutdown.011.sh
 create mode 100755 ctdb/tests/eventscripts/50.samba.startup.011.sh


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_perl.py b/buildtools/wafsamba/samba_perl.py
index f2f176d..2e9a53a 100644
--- a/buildtools/wafsamba/samba_perl.py
+++ b/buildtools/wafsamba/samba_perl.py
@@ -49,7 +49,8 @@ def SAMBA_CHECK_PERL(conf, mandatory=True, version=(5,0,0)):
     conf.env.PERL_LIB_INSTALL_DIR = perl_lib_install_dir
 
     perl_inc = read_perl_config_var('print "@INC"')
-    perl_inc.remove('.')
+    if '.' in perl_inc:
+        perl_inc.remove('.')
     conf.start_msg("PERL_INC: ")
     conf.end_msg("%s" % (perl_inc), 'GREEN')
     conf.env.PERL_INC = perl_inc
diff --git a/ctdb/config/events.d/50.samba b/ctdb/config/events.d/50.samba
index b521d00..4a532a4 100755
--- a/ctdb/config/events.d/50.samba
+++ b/ctdb/config/events.d/50.samba
@@ -14,8 +14,8 @@ case $CTDB_INIT_STYLE in
 		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-nmb}
 		;;
 	debian)
-		CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-samba}
-		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""}
+		CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smbd}
+		CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-nmbd}
 		;;
 	*)
 		# Use redhat style as default:
diff --git a/ctdb/tests/eventscripts/50.samba.shutdown.011.sh b/ctdb/tests/eventscripts/50.samba.shutdown.011.sh
new file mode 100755
index 0000000..f225e8f
--- /dev/null
+++ b/ctdb/tests/eventscripts/50.samba.shutdown.011.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. "${TEST_SCRIPTS_DIR}/unit.sh"
+
+define_test "shutdown, Debian init style"
+
+setup_samba
+
+export EVENTSCRIPT_TESTS_INIT_STYLE="debian"
+
+ok <<EOF
+Stopping smbd: OK
+Stopping nmbd: OK
+EOF
+simple_test
diff --git a/ctdb/tests/eventscripts/50.samba.startup.011.sh b/ctdb/tests/eventscripts/50.samba.startup.011.sh
new file mode 100755
index 0000000..3205497
--- /dev/null
+++ b/ctdb/tests/eventscripts/50.samba.startup.011.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. "${TEST_SCRIPTS_DIR}/unit.sh"
+
+define_test "shutdown, Debian init style"
+
+setup_samba
+
+export EVENTSCRIPT_TESTS_INIT_STYLE="debian"
+
+ok <<EOF
+Starting nmbd: OK
+Starting smbd: OK
+EOF
+simple_test
diff --git a/ctdb/tests/eventscripts/etc-ctdb/rc.local b/ctdb/tests/eventscripts/etc-ctdb/rc.local
index 3a55e53..541474a 100755
--- a/ctdb/tests/eventscripts/etc-ctdb/rc.local
+++ b/ctdb/tests/eventscripts/etc-ctdb/rc.local
@@ -58,5 +58,5 @@ background_with_logging ()
     "$@" 2>&1 </dev/null | sed -e 's@^@\&@'
 }
 
-CTDB_INIT_STYLE="redhat"
+CTDB_INIT_STYLE="${EVENTSCRIPT_TESTS_INIT_STYLE:-redhat}"
 PATH="${EVENTSCRIPTS_PATH}:$PATH"
diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh
index 61a033a..f90a500 100644
--- a/ctdb/tests/eventscripts/scripts/local.sh
+++ b/ctdb/tests/eventscripts/scripts/local.sh
@@ -806,7 +806,7 @@ setup_samba ()
 	eventscript_call ctdb_service_managed
 
         # All possible service names for all known distros.
-	for i in "smb" "nmb" "samba" ; do
+	for i in "smb" "nmb" "samba" "smbd" "nmbd" ; do
 	    service "$i" force-started
 	done
 
@@ -826,7 +826,7 @@ setup_samba ()
 	eventscript_call ctdb_service_unmanaged
 
         # All possible service names for all known distros.
-	for i in "smb" "nmb" "samba" ; do
+	for i in "smb" "nmb" "samba" "smbd" "nmbd" ; do
 	    service "$i" force-stopped
 	done
 


-- 
Samba Shared Repository
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.