Hello community, here is the log from the commit of package yast2-samba-client for openSUSE:Factory checked in at 2013-02-21 10:47:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-samba-client (Old) and /work/SRC/openSUSE:Factory/.yast2-samba-client.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-samba-client", Maintainer is "jsuch...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-samba-client/yast2-samba-client.changes 2013-01-20 08:19:43.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-samba-client.new/yast2-samba-client.changes 2013-02-21 10:47:54.000000000 +0100 @@ -1,0 +2,9 @@ +Wed Feb 20 11:44:33 CET 2013 - jsuch...@suse.cz + +- synchronize cluster before restarting CTDB clone service + (bnc#802814) +- force synchronization of smb.conf (bnc#802814) +- do not use hard-coded ctdb resource identifier (bnc#804303) +- 2.23.2 + +------------------------------------------------------------------- Old: ---- yast2-samba-client-2.23.1.tar.bz2 New: ---- yast2-samba-client-2.23.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-samba-client.spec ++++++ --- /var/tmp/diff_new_pack.ZKPYLx/_old 2013-02-21 10:47:56.000000000 +0100 +++ /var/tmp/diff_new_pack.ZKPYLx/_new 2013-02-21 10:47:56.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-samba-client -Version: 2.23.1 +Version: 2.23.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-samba-client-2.23.1.tar.bz2 -> yast2-samba-client-2.23.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/VERSION new/yast2-samba-client-2.23.2/VERSION --- old/yast2-samba-client-2.23.1/VERSION 2013-01-18 10:35:22.000000000 +0100 +++ new/yast2-samba-client-2.23.2/VERSION 2013-02-20 14:41:33.000000000 +0100 @@ -1 +1 @@ -2.23.1 +2.23.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/configure new/yast2-samba-client-2.23.2/configure --- old/yast2-samba-client-2.23.1/configure 2013-01-18 10:43:32.000000000 +0100 +++ new/yast2-samba-client-2.23.2/configure 2013-02-20 14:41:46.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for yast2-samba-client 2.23.1. +# Generated by GNU Autoconf 2.69 for yast2-samba-client 2.23.2. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='yast2-samba-client' PACKAGE_TARNAME='yast2-samba-client' -PACKAGE_VERSION='2.23.1' -PACKAGE_STRING='yast2-samba-client 2.23.1' +PACKAGE_VERSION='2.23.2' +PACKAGE_STRING='yast2-samba-client 2.23.2' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1247,7 +1247,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures yast2-samba-client 2.23.1 to adapt to many kinds of systems. +\`configure' configures yast2-samba-client 2.23.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1319,7 +1319,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of yast2-samba-client 2.23.1:";; + short | recursive ) echo "Configuration of yast2-samba-client 2.23.2:";; esac cat <<\_ACEOF @@ -1399,7 +1399,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -yast2-samba-client configure 2.23.1 +yast2-samba-client configure 2.23.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1416,7 +1416,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by yast2-samba-client $as_me 2.23.1, which was +It was created by yast2-samba-client $as_me 2.23.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2355,7 +2355,7 @@ # Define the identity of the package. PACKAGE='yast2-samba-client' - VERSION='2.23.1' + VERSION='2.23.2' cat >>confdefs.h <<_ACEOF @@ -2478,7 +2478,7 @@ -VERSION="2.23.1" +VERSION="2.23.2" RPMNAME="yast2-samba-client" MAINTAINER="Jiri Suchomel <jsuch...@suse.cz>" @@ -3404,7 +3404,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by yast2-samba-client $as_me 2.23.1, which was +This file was extended by yast2-samba-client $as_me 2.23.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3457,7 +3457,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -yast2-samba-client config.status 2.23.1 +yast2-samba-client config.status 2.23.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/configure.in new/yast2-samba-client-2.23.2/configure.in --- old/yast2-samba-client-2.23.1/configure.in 2013-01-18 10:43:29.000000000 +0100 +++ new/yast2-samba-client-2.23.2/configure.in 2013-02-20 14:41:42.000000000 +0100 @@ -3,7 +3,7 @@ dnl -- This file is generated by y2autoconf 2.23.2 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(yast2-samba-client, 2.23.1, http://bugs.opensuse.org/, yast2-samba-client) +AC_INIT(yast2-samba-client, 2.23.2, http://bugs.opensuse.org/, yast2-samba-client) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,7 +18,7 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.23.1" +VERSION="2.23.2" RPMNAME="yast2-samba-client" MAINTAINER="Jiri Suchomel <jsuch...@suse.cz>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/src/Samba.ycp new/yast2-samba-client-2.23.2/src/Samba.ycp --- old/yast2-samba-client-2.23.1/src/Samba.ycp 2013-01-18 10:37:00.000000000 +0100 +++ new/yast2-samba-client-2.23.2/src/Samba.ycp 2013-02-20 14:41:33.000000000 +0100 @@ -740,7 +740,16 @@ if (FileUtils::Exists ("/usr/sbin/csync2")) { - map out = (map) SCR::Execute (.target.bash_output, "/usr/sbin/csync2 -xv"); + // first, force syncing of smb.conf (bnc#802814) + map out = (map) SCR::Execute (.target.bash_output, "/usr/sbin/csync2 -f /etc/samba/smb.conf"); + if (out["exit"]:0 != 0) + { + y2error ("csync2 failed with %1", out); + return false; + } + + // sync the rest + out = (map) SCR::Execute (.target.bash_output, "/usr/sbin/csync2 -xv"); if (out["exit"]:0 != 0) { y2error ("csync2 failed with %1", out); @@ -838,8 +847,6 @@ ret = false; } - SambaNetJoin::CleanupCTDB (); - // winbind Progress::NextStage(); if (winbind_enabled && !cluster_present) { @@ -919,9 +926,11 @@ y2warning ("pam-config failed for service %1", service); }); } + if (cluster_present) { SynchronizeCluster (); + SambaNetJoin::CleanupCTDB (); } // finished diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/src/SambaAD.pm new/yast2-samba-client-2.23.2/src/SambaAD.pm --- old/yast2-samba-client-2.23.1/src/SambaAD.pm 2013-01-18 10:37:00.000000000 +0100 +++ new/yast2-samba-client-2.23.2/src/SambaAD.pm 2013-02-20 14:41:33.000000000 +0100 @@ -69,9 +69,9 @@ return $dhcp_client if (defined $dhcp_client) && !$force; my $network = YaPI::NETWORK->Read (); - $dhcp_client = FALSE; + $dhcp_client = TRUE; foreach my $iface (values %{$network->{"interfaces"}}) { - $dhcp_client = $dhcp_client || (($iface->{"bootproto"} || "") =~ m/^dhcp[46]?$/); + $dhcp_client = $dhcp_client && (($iface->{"bootproto"} || "") =~ m/^dhcp[46]?$/); } return $dhcp_client; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/src/SambaNetJoin.pm new/yast2-samba-client-2.23.2/src/SambaNetJoin.pm --- old/yast2-samba-client-2.23.1/src/SambaNetJoin.pm 2013-01-18 10:41:41.000000000 +0100 +++ new/yast2-samba-client-2.23.2/src/SambaNetJoin.pm 2013-02-20 14:41:33.000000000 +0100 @@ -41,10 +41,12 @@ # if DNS should be adapted with AD server my $adapt_dns = FALSE; +# name of base resource +my $rsc_id = ""; + # name of clone resource my $clone_id = ""; - # Helper function to execute crm binary (internal only, not part of API). # Takes all arguments in one string. sub CRMCall { @@ -94,12 +96,12 @@ return FALSE; } - # find out the clone resource id, to do later crm operations with + # find out resource and clone ids, to do later crm operations with my $show = CRMCall ("configure save -"); if ($show =~ /primitive (\w+) ocf:heartbeat:CTDB/) { - my $primitive = $1; - if ($show =~ /clone (.+) $primitive/) { - $clone_id = $1; + $rsc_id = $1; + if ($show =~ /clone (.+) $rsc_id/) { + $clone_id = $1; } } @@ -159,7 +161,7 @@ # 3. Run crm configure edit and search for the ctdb resource. Add the following line: # ctdb_manages_winbind="false" - CRMCall ("resource param ctdb set ctdb_manages_winbind no"); + CRMCall ("resource param $rsc_id set ctdb_manages_winbind no"); # 4. save winbind into /etc/nsswitch.conf # 5. Restart the NSC daemon: @@ -200,7 +202,7 @@ CRMCall ("resource stop $clone_id"); # b. Change the value from false to true: ctdb_manages_winbind="true" - CRMCall ("resource param ctdb set ctdb_manages_winbind yes"); + CRMCall ("resource param $rsc_id set ctdb_manages_winbind yes"); # c. Restart the ctdb resource: CRMCall ("resource start $clone_id"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/Makefile.am new/yast2-samba-client-2.23.2/testsuite/Makefile.am --- old/yast2-samba-client-2.23.1/testsuite/Makefile.am 2013-01-07 15:19:07.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/Makefile.am 2013-02-20 14:41:33.000000000 +0100 @@ -5,7 +5,7 @@ # AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.ycp) $(wildcard tests/*.yh) $(wildcard tests/*.pl) $(wildcard tests/*.pm) +EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.ycp) testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/Makefile.in new/yast2-samba-client-2.23.2/testsuite/Makefile.in --- old/yast2-samba-client-2.23.1/testsuite/Makefile.in 2013-01-18 10:43:34.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/Makefile.in 2013-02-20 14:41:47.000000000 +0100 @@ -195,7 +195,7 @@ yncludedir = @yncludedir@ ystartupdir = @ystartupdir@ AUTOMAKE_OPTIONS = dejagnu -EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.ycp) $(wildcard tests/*.yh) $(wildcard tests/*.pl) $(wildcard tests/*.pm) +EXTRA_DIST = $(wildcard tests/*.out) $(wildcard tests/*.err) $(wildcard tests/*.ycp) testsuite_prepare = @ydatadir@/testsuite/Makefile.testsuite all: all-am diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_ExportImport.out new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_ExportImport.out --- old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_ExportImport.out 2013-01-07 15:19:07.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_ExportImport.out 2013-02-20 14:41:33.000000000 +0100 @@ -1,24 +1,3 @@ -dump1: [_internal] -dump1: abc = ABC -dump1: -dump1: [a] -dump1: Bee Bee = x -dump1: _comment = A -dump1: _disabled = 1 -dump1: _modified = 1 -dump1: _xxx = 8 -dump1: -dump1: [b] -dump1: Two Two = 22 -dump1: no = <undefined> -dump1: -dump1: [removed] - -dump2: [a] -dump2: _comment = A -dump2: _disabled = 1 -dump2: bee bee = x -dump2: -dump2: [b] -dump2: two two = 22 - +Dump $["_internal":$["abc":"ABC"], "a":$["Bee Bee":"x", "_comment":"A", "_disabled":true, "_modified":true, "_xxx":8], "b":$["Two Two":22, "no":nil], "removed":nil] +Return nil +Return [$["comment":"A", "disabled":true, "name":"a", "parameters":$["bee_bee":"x"]], $["name":"b", "parameters":$["two_two":"22"]]] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_ExportImport.pl new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_ExportImport.pl --- old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_ExportImport.pl 2013-01-07 15:19:07.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_ExportImport.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -#!/usr/bin/perl - -use strict; - -use SambaConfig; -use Data::Dumper; - -## test Get/Set Modified -SambaConfig->Import({ - a=>{"Bee Bee"=>"x", _modified=>1, _disabled=>1, _xxx=>8, _comment=>"A"}, - _internal=>{abc=>"ABC"}, - removed=>undef, - b=>{no=>undef, "Two Two"=>22}}); -SambaConfig->Dump("dump1: "); - -my $dump = SambaConfig->Export(); -#print Dumper($dump); - -SambaConfig->Import($dump); -SambaConfig->Dump("dump2: "); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_ExportImport.ycp new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_ExportImport.ycp --- old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_ExportImport.ycp 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_ExportImport.ycp 2013-02-20 14:41:33.000000000 +0100 @@ -0,0 +1,32 @@ +/** + * test SambaConfig::Export: + * should remove modified flags and internal shares from config + */ +{ + import "Testsuite"; + import "SambaConfig"; + + map i = $[ + "a" : $[ + "Bee Bee" : "x", + "_modified" : true, + "_disabled" : true, + "_xxx" : 8, + "_comment" : "A" + ], + "_internal" : $[ + "abc" : "ABC" + ], + "removed" : nil, + "b" : $[ + "no" : nil, + "Two Two" : 22 + ] + ]; + + Testsuite::Dump (i); + + Testsuite::Test(``(SambaConfig::Import (i)), [ $[], $[], $[] ], 0); + + Testsuite::Test (``(SambaConfig::Export ()), [], 0); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_Global.pl new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_Global.pl --- old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_Global.pl 2013-01-07 15:19:07.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_Global.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -#!/usr/bin/perl - -use SambaConfig; -use Data::Dumper; - -# test Configured -print Dumper(SambaConfig->Configured()); -SambaConfig->Import({a=>{b=>"x"}}); -print Dumper(SambaConfig->Configured()); - -# test Get/Set Modified -print Dumper(SambaConfig->GetModified()); -SambaConfig->SetModified(); -print Dumper(SambaConfig->GetModified()); - -# test GetShares -print Dumper(SambaConfig->GetShares()); - - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_ReadWrite.pl new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_ReadWrite.pl --- old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_ReadWrite.pl 2013-01-07 15:19:07.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_ReadWrite.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,66 +0,0 @@ -#!/usr/bin/perl - -use SambaConfig; -use Data::Dumper; - -$smb_conf = "/etc/samba/smb.conf"; -$smb_conf_bak = "/tmp/smb.conf"; -die "no permision to write to $smb_conf" unless -w $smb_conf; - -# backup smb.conf -if ( -f $smb_conf && not -f $smb_conf_bak ) { - open(SMB, "<", $smb_conf) or die $!; - open(BAK, ">", $smb_conf_bak) or die $!; - print BAK <SMB>; - close BAK; close SMB; -} -# truncate smb.conf -open(SMB, ">", $smb_conf) or die $!; close SMB; - -# no write -SambaConfig->Import({ - a => {b=>"y"}, - home => {path=>"/dev", _modified=>1}, - global => {x=>"y"}}); -SambaConfig->Write(); -SambaConfig->Import(); -SambaConfig->Read(); -SambaConfig->Dump(); - -# normal write -SambaConfig->Import({ - a => {b=>"y", _modified=>1}, - home => {path=>"/dev", _modified=>1}, - global => {_modified=>1, abc=>"ABC"}}); -SambaConfig->ShareRemove("home"); -SambaConfig->Write(); -SambaConfig->Import(); -SambaConfig->Read(); -SambaConfig->Dump(); - -# write disabled share -SambaConfig->Import({ - a => {b=>undef, c=>"z", _modified=>1, _disabled=>1}, - global => {_modified=>1, abc=>undef, def=>"DEF"}}); -SambaConfig->Write(); -SambaConfig->Import(); -SambaConfig->Read(); -SambaConfig->Dump(); - -# write (force) share with comment -SambaConfig->Import({ - a => {c=>"q",_disabled=>1,_comment=>"share disabled by gizo"}, - _my => {my=>1}, - global => {ghc=>"GHC"}}); -SambaConfig->Write(1); -SambaConfig->Import(); -SambaConfig->Read(); -SambaConfig->Dump(); - -# restore smb.conf -open(SMB, ">", $smb_conf) or die $!; -open(BAK, "<", $smb_conf_bak) or die $!; -print SMB <BAK>; -close BAK; close SMB; - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_Share.pl new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_Share.pl --- old/yast2-samba-client-2.23.1/testsuite/tests/SambaConfig_Share.pl 2013-01-07 15:19:07.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/tests/SambaConfig_Share.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,120 +0,0 @@ -#!/usr/bin/perl - -use SambaConfig; -use Data::Dumper; - -# test general shares - -SambaConfig->Import( -{ - a=>{x=>"y"}, - b=>{u=>"v", _internal=>"xxx", no=>undef}, - ro=>{"read only"=>"Yes", "root directory"=>"/root", int=>8}, - rw=>{"read only"=>"No", "root directory"=>"/dev/zero", _disabled=>1}, -}); - -print Dumper("ShareRemove", - !defined SambaConfig->ShareRemove(), - SambaConfig->ShareRemove("a"), - !SambaConfig->ShareRemove("a")); - -print Dumper("ShareExists", - !defined SambaConfig->ShareExists(), - !SambaConfig->ShareExists("a"), - SambaConfig->ShareExists("b")); - -print Dumper("ShareKeys", - !defined SambaConfig->ShareKeys(), - $#{SambaConfig->ShareKeys("a")}==-1, - $#{SambaConfig->ShareKeys("b")}==0); - -print Dumper("ShareSetStr", - !defined SambaConfig->ShareSetStr(), - !defined SambaConfig->ShareSetStr("g"), - SambaConfig->ShareSetStr("g","My Key", "My Val"), - !SambaConfig->ShareSetStr("g","Lock Dir"), - SambaConfig->ShareSetStr("g","Lock Dir", "/dev"), - SambaConfig->ShareSetStr("g","Lock Dir", "/home"), - !SambaConfig->ShareSetStr("g","Lock Dir", "/home"), - SambaConfig->ShareSetStr("g","Lock Dir"), - !SambaConfig->ShareSetStr("g","writable"), - SambaConfig->ShareSetStr("g","writable", 1), - !SambaConfig->ShareSetStr("g","writable", 1), - SambaConfig->ShareSetStr("g","writable", 0), - SambaConfig->ShareSetStr("g","writable")); - -print Dumper("ShareGetKey", - !defined SambaConfig->ShareGetStr(), - !defined SambaConfig->ShareGetStr("g"), - SambaConfig->ShareGetStr("ro","root","default") eq "/root", - SambaConfig->ShareGetStr("rw","root","default") eq "/dev/zero", - !defined SambaConfig->ShareGetStr("xx","root"), - SambaConfig->ShareGetStr("xx","root","default") eq "default"); - -print Dumper("ShareGetTruth (+inverted synonyms)", - !defined SambaConfig->ShareGetTruth(), - !defined SambaConfig->ShareGetTruth("g"), - !SambaConfig->ShareGetTruth("ro","writable"), - SambaConfig->ShareGetTruth("rw","writable"), - !defined SambaConfig->ShareGetTruth("xx","writable"), - SambaConfig->ShareGetTruth("xx","writable", 1), - SambaConfig->ShareGetTruth("ro","Read Only"), - !SambaConfig->ShareGetTruth("rw","Read Only"), - !SambaConfig->ShareGetTruth("xx","Read Only", 0)); - -print Dumper("ShareGetInt", - !defined SambaConfig->ShareGetInteger(), - !defined SambaConfig->ShareGetInteger("g"), - SambaConfig->ShareGetInteger("ro","int") == 8, - !defined SambaConfig->ShareGetInteger("rw","int"), - SambaConfig->ShareGetInteger("rw","int", 9) == 9); - -print Dumper("ShareSetInt, ShareSetTruth", - !defined SambaConfig->ShareSetTruth(), - !defined SambaConfig->ShareSetInteger("g"), - !SambaConfig->ShareSetInteger("ro","int", 8), - SambaConfig->ShareSetInteger("ro","int", 9), - !SambaConfig->ShareSetTruth("rw","truth"), - SambaConfig->ShareSetTruth("rw","truth", 1), - SambaConfig->ShareSetTruth("rw","truth", 0)); - -print Dumper("Share Enable/Disable/Adjust/Enabled", - !defined SambaConfig->ShareEnable(), - !defined SambaConfig->ShareEnable("xxxxx"), - !defined SambaConfig->ShareDisable(), - !defined SambaConfig->ShareDisable("xxxxx"), - !defined SambaConfig->ShareEnabled(), - !defined SambaConfig->ShareEnabled("xxxxx"), - !SambaConfig->ShareAdjust("ro", 1), - !SambaConfig->ShareAdjust("rw", 0), - SambaConfig->ShareAdjust("rw", 1), - SambaConfig->ShareAdjust("ro", 0), - SambaConfig->ShareEnabled("rw"), - !SambaConfig->ShareEnabled("ro")); - -print Dumper("Share Get/Set/Update Map", - !defined SambaConfig->ShareGetMap(), - !defined SambaConfig->ShareSetMap(), - !defined SambaConfig->ShareUpdateMap(), - SambaConfig->ShareSetMap("home", {a=>"ABC", x=>"XYZ"}), - !SambaConfig->ShareSetMap("home", {a=>"ABC", x=>"XYZ"}), - !SambaConfig->ShareUpdateMap("home", {x=>"123"}), - SambaConfig->ShareUpdateMap("home", {y=>"123"}), - length(%{SambaConfig->ShareGetMap("home")})==3); - - -print Dumper("Share Get/Set Modified", - !defined SambaConfig->ShareGetModified(), - !defined SambaConfig->ShareSetModified(), - !SambaConfig->ShareGetModified("mod"), - SambaConfig->ShareSetModified("mod"), - !SambaConfig->ShareSetModified("mod"), - SambaConfig->ShareGetModified("mod")); - -print Dumper("Share Get/Set Comment", - !defined SambaConfig->ShareGetComment(), - !defined SambaConfig->ShareSetComment(), - !defined SambaConfig->ShareGetComment("mod"), - SambaConfig->ShareSetComment("mod","comment"), - !SambaConfig->ShareSetComment("mod","comment"), - SambaConfig->ShareGetComment("mod") eq "comment"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/tests/SambaNetJoin.pl new/yast2-samba-client-2.23.2/testsuite/tests/SambaNetJoin.pl --- old/yast2-samba-client-2.23.1/testsuite/tests/SambaNetJoin.pl 2013-01-07 15:19:07.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/tests/SambaNetJoin.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,26 +0,0 @@ -#!/usr/bin/perl - -use SambaNetJoin; -use lib "../src"; use SambaConfig; - -use Data::Dumper; - -## test agent -use YaST::YCP; -YaST::YCP::Import("Testsuite"); -my $e_ok = {target=>{bash_output=>{exit=>0}}}; -my $e_err = {target=>{bash_output=>{exit=>1, stdout=>"fake error"}}}; - -Testsuite->Init([{},{},$e_ok],undef); - -print Dumper( - SambaNetJoin->Test("xxx"), - SambaNetJoin->Test("xxx"), - !SambaNetJoin->Join("xxx")); - -SambaConfig->GlobalSetStr("netbios name", "TUX"); -Testsuite->Init([{},{},$e_err],undef); - -print Dumper( - !SambaNetJoin->Test("tux net"), - SambaNetJoin->Join("tux net", "fake level", "user", "****") eq "fake error"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/tests/SambaNmbLookup.pl new/yast2-samba-client-2.23.2/testsuite/tests/SambaNmbLookup.pl --- old/yast2-samba-client-2.23.1/testsuite/tests/SambaNmbLookup.pl 2013-01-07 15:19:07.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/tests/SambaNmbLookup.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,96 +0,0 @@ -#!/usr/bin/perl - -use Data::Dumper; - -use SambaNmbLookup; - -## test agent -use YaST::YCP qw(:DATA); -YaST::YCP::Import("Testsuite"); -my $e_err = {target=>{bash_output=>{exit=>0, stdout=>8}}, background=>{run_output=>0, kill=>1}}; -my $e_ok = {target=>{bash_output=>{exit=>0, stdout=>0}}, background=>{run_output=>1}}; -my $r_running = {background=>{isrunning=>1}}; -my $r_done = {background=>{isrunning=>0, newout=>[ - "WORKGROUP\tDEBIAN_FANS", - "LMB\tGIZO", - "MEMBERS\tGIZO", - "", - "WORKGROUP\tSUPERSONIC", - "PDC\tSATYR", - "DMB\tSATYR", - "LMB\tSATYR", - "MEMBERS\tSATYR", - "", - "WORKGROUP\tTEST", - "BDC\tTEST", -]}}; - -## fake modules -sub PackageSystem::Installed {exists $installed{$_[1]} ? $installed{$_[1]} : 0}; -sub Service::Status {exists $status{$_[1]} ? $status{$_[1]} : -1}; - - -## Start() -%installed = (); -print Dumper(!SambaNmbLookup->Start()); - -%installed = ("samba-client" => 1); -Testsuite->Init([{},{},$e_ok],undef); # run as root, exec nbstatus return ok -print Dumper(SambaNmbLookup->Start()); - -%installed = ("samba-client" => 1, "samba" => 1); -Testsuite->Init([{},{},$e_err],undef); # run as user, exec nbstatus return err -print Dumper(!SambaNmbLookup->Start()); - -%installed = ("samba-client" => 1, "samba" => 1); -$status{"nmb"}=0; # nmb is running -print Dumper(!SambaNmbLookup->Start()); - -%installed = ("samba-client" => 1, "samba" => 1); -$status{"nmb"}=1; # nmb is stopped -print Dumper(!SambaNmbLookup->Start()); - - -## nmbStatus() -$SambaNmbLookup::Nmbstatus_running=0; -SambaNmbLookup->checkNmbstatus(); # nmbstatus not running -print Dumper(SambaNmbLookup->GetAvailableNeighbours()); - -Testsuite->Init([$r_running,{},$e_err],undef); # background process is running -$SambaNmbLookup::Nmbstatus_running=1; -$SambaNmbLookup::wait = 0.4; # wait for 0.4 sec (instead of 120 sec) -SambaNmbLookup->checkNmbstatus(); -print Dumper(SambaNmbLookup->GetAvailableNeighbours()); - -Testsuite->Init([$r_done,{},$e_ok],undef); # background process is finished -$SambaNmbLookup::Nmbstatus_running=1; -SambaNmbLookup->checkNmbstatus(); -print Dumper(SambaNmbLookup->GetAvailableDomains()); - -Testsuite->Init([$r_done,{},$e_ok],undef); # background process is finished -$SambaNmbLookup::Nmbstatus_running=1; -$SambaNmbLookup::Nmbd_was_running=1; -SambaNmbLookup->checkNmbstatus(); -print Dumper(SambaNmbLookup->GetAvailableNeighbours(" (domin)")); - - -## Query funcs() -print Dumper(SambaNmbLookup->Available()); - -print Dumper( - !SambaNmbLookup->IsDomain("xxx"), - SambaNmbLookup->IsDomain("SUPERSONIC"), - SambaNmbLookup->IsDomain("TEST"), - !SambaNmbLookup->IsDomain("GIZO")); - -print Dumper( - !SambaNmbLookup->HasPDC("xxx"), - SambaNmbLookup->HasPDC("SUPERSONIC"), - !SambaNmbLookup->HasPDC("TEST"), - !SambaNmbLookup->HasPDC("GIZO")); - -print Dumper( - !SambaNmbLookup->HasBDC("xxx"), - !SambaNmbLookup->HasBDC("SUPERSONIC"), - SambaNmbLookup->HasBDC("TEST"), - !SambaNmbLookup->HasBDC("GIZO")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-samba-client-2.23.1/testsuite/tests/SambaWinbind.pl new/yast2-samba-client-2.23.2/testsuite/tests/SambaWinbind.pl --- old/yast2-samba-client-2.23.1/testsuite/tests/SambaWinbind.pl 2013-01-07 15:19:07.000000000 +0100 +++ new/yast2-samba-client-2.23.2/testsuite/tests/SambaWinbind.pl 1970-01-01 01:00:00.000000000 +0100 @@ -1,118 +0,0 @@ -#!/usr/bin/perl - -use SambaWinbind; -use lib "../src"; use SambaConfig; - -use Data::Dumper; - -## fake modules -sub PackageSystem::Installed {$installed{$_[1]}} -sub Service::Enabled {$service_enabled} -sub Service::Status {$service_status} -sub Service::Adjust {print "Service::Adjust($_[1], $_[2])\n"; $service_adjust_return} -sub Service::Start {print "Service::Start($_[1])\n"; $service_start_return} -sub Service::Stop {print "Service::Stop($_[1])\n"; $service_stop_return} -sub Service::Restart {print "Service::Restart($_[1])\n"; $service_restart_return} -sub Nsswitch::WriteDb {print "Nsswitch::WriteDB($_[1], [",join(",",@{$_[2]}),"])\n"} -sub Nsswitch::ReadDb {$nssdb{$_[1]}} -sub Nsswitch::Write {$write} -sub PamSettings::GetValues {$pamdb{$_[2]}} -sub PamSettings::SetValues {print "PamSettings::SetValues($_[1], $_[2], '", join(" ", @{$_[3]}),"')\n"} - - -## IsEnabled() -$installed{"samba-winbind"} = 0; -$service_enabled = 0; -print Dumper(!SambaWinbind->IsEnabled()); - -$installed{"samba-winbind"} = 1; -$service_enabled = 0; -print Dumper(!SambaWinbind->IsEnabled()); - -$installed{"samba-winbind"} = 1; -$service_enabled = 1; -print Dumper(SambaWinbind->IsEnabled()); - - -## AdjustSambaConfig() -SambaWinbind->AdjustSambaConfig(0); -SambaConfig->Dump(); - -SambaWinbind->AdjustSambaConfig(1); -SambaConfig->Dump(); - - -## Adjust Nsswitch() -%nssdb = (passwd => [qw(files winbind nis)], group => [qw(files ldap nis)]); -$write = 1; -SambaWinbind->AdjustNsswitch(0); - -%nssdb = (passwd => [qw(files winbind nis)], group => [qw(files ldap nis)]); -$write = 0; -SambaWinbind->AdjustNsswitch(1); - - -## AdjustPam() -%pamdb = (auth => ["md5","call_modules=files,winbind,nis","nullok"], account => ["md5","call_modules=files,ldap,nis","nullok"]); -SambaWinbind->AdjustPam(0); - -%pamdb = (auth => ["md5","call_modules=files,winbind,nis","nullok"], account => ["md5","call_modules=files,ldap,nis","nullok"]); -SambaWinbind->AdjustPam(1); - -%pamdb = (auth => ["md5","nullok"], account => ["call_modules=winbind"]); -SambaWinbind->AdjustPam(0); - -%pamdb = (auth => ["md5","nullok"], account => ["call_modules=winbind"]); -SambaWinbind->AdjustPam(1); - -%pamdb = (auth => []); -SambaWinbind->AdjustPam(1); - - -## AdjustService() -%installed = ("samba-winbind" => 0); -print Dumper(SambaWinbind->AdjustService(0)); - -%installed = ("samba-winbind" => 0); -print Dumper(!SambaWinbind->AdjustService(1)); - -$service_adjust_return = 1; -%installed = ("samba-winbind" => 1); -print Dumper(SambaWinbind->AdjustService(1)); - -$service_adjust_return = 0; -%installed = ("samba-winbind" => 1); -print Dumper(!SambaWinbind->AdjustService(0)); - - -## StartStopNow() -%installed = ("samba-winbind" => 0); -print Dumper(SambaWinbind->StartStopNow(0)); - -%installed = ("samba-winbind" => 0); -print Dumper(!SambaWinbind->StartStopNow(1)); - -%installed = ("samba-winbind" => 1); -$service_status = 1; -$service_start_return = 1; -print Dumper(SambaWinbind->StartStopNow(1)); -$service_start_return = 0; -print Dumper(!SambaWinbind->StartStopNow(1)); - -%installed = ("samba-winbind" => 1); -$service_status = 0; -$service_restart_return = 1; -print Dumper(SambaWinbind->StartStopNow(1)); -$service_restart_return = 0; -print Dumper(!SambaWinbind->StartStopNow(1)); - -%installed = ("samba-winbind" => 1); -$service_status = 0; -$service_stop_return = 1; -print Dumper(SambaWinbind->StartStopNow(0)); -$service_stop_return = 0; -print Dumper(!SambaWinbind->StartStopNow(0)); - -%installed = ("samba-winbind" => 1); -$service_status = 1; -print Dumper(SambaWinbind->StartStopNow(0)); -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org