Hello community,
here is the log from the commit of package yast2-samba-server for
openSUSE:Factory checked in at 2014-05-06 13:40:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-samba-server (Old)
and /work/SRC/openSUSE:Factory/.yast2-samba-server.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-samba-server"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-samba-server/yast2-samba-server.changes
2014-04-05 14:42:52.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-samba-server.new/yast2-samba-server.changes
2014-05-06 13:40:59.000000000 +0200
@@ -1,0 +2,12 @@
+Tue May 6 05:34:49 UTC 2014 - [email protected]
+
+- Adapted testsuite to last changes in Service module.
+- 3.1.8
+
+-------------------------------------------------------------------
+Tue Apr 22 15:49:38 CEST 2014 - [email protected]
+
+- Deprecated Service method calls replaced with new ones
+- 3.1.7
+
+-------------------------------------------------------------------
Old:
----
yast2-samba-server-3.1.6.tar.bz2
New:
----
yast2-samba-server-3.1.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-samba-server.spec ++++++
--- /var/tmp/diff_new_pack.JRSphT/_old 2014-05-06 13:41:00.000000000 +0200
+++ /var/tmp/diff_new_pack.JRSphT/_new 2014-05-06 13:41:00.000000000 +0200
@@ -17,14 +17,14 @@
Name: yast2-samba-server
-Version: 3.1.6
+Version: 3.1.8
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
Url: https://github.com/yast/yast-samba-server
-# Service module switched to systemd
+# Service.Active
BuildRequires: libsmbclient
BuildRequires: libsmbclient-devel
BuildRequires: perl-Crypt-SmbHash
@@ -32,7 +32,7 @@
BuildRequires: perl-XML-Writer
BuildRequires: samba-client
BuildRequires: update-desktop-files
-BuildRequires: yast2 >= 2.23.15
+BuildRequires: yast2 >= 3.1.53
BuildRequires: yast2-devtools >= 3.1.10
BuildRequires: yast2-ldap
BuildRequires: yast2-perl-bindings
@@ -41,8 +41,8 @@
BuildRequires: yast2-users
Requires: perl-Crypt-SmbHash
-# Wizard::SetDesktopTitleAndIcon
-Requires: yast2 >= 2.21.22
+# Service.Active
+Requires: yast2 >= 3.1.53
Requires: yast2-ldap >= 3.1.2
Requires: yast2-network
Requires: yast2-perl-bindings
++++++ yast2-samba-server-3.1.6.tar.bz2 -> yast2-samba-server-3.1.8.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-samba-server-3.1.6/package/yast2-samba-server.changes
new/yast2-samba-server-3.1.8/package/yast2-samba-server.changes
--- old/yast2-samba-server-3.1.6/package/yast2-samba-server.changes
2014-03-28 15:48:02.000000000 +0100
+++ new/yast2-samba-server-3.1.8/package/yast2-samba-server.changes
2014-05-06 08:38:49.000000000 +0200
@@ -1,4 +1,16 @@
-------------------------------------------------------------------
+Tue May 6 05:34:49 UTC 2014 - [email protected]
+
+- Adapted testsuite to last changes in Service module.
+- 3.1.8
+
+-------------------------------------------------------------------
+Tue Apr 22 15:49:38 CEST 2014 - [email protected]
+
+- Deprecated Service method calls replaced with new ones
+- 3.1.7
+
+-------------------------------------------------------------------
Fri Mar 28 14:38:00 UTC 2014 - [email protected]
- Fix failing testsuite
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-samba-server-3.1.6/package/yast2-samba-server.spec
new/yast2-samba-server-3.1.8/package/yast2-samba-server.spec
--- old/yast2-samba-server-3.1.6/package/yast2-samba-server.spec
2014-03-28 15:48:02.000000000 +0100
+++ new/yast2-samba-server-3.1.8/package/yast2-samba-server.spec
2014-05-06 08:38:49.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-samba-server
-Version: 3.1.6
+Version: 3.1.8
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -26,14 +26,14 @@
Group: System/YaST
License: GPL-2.0
-# Service module switched to systemd
-BuildRequires: yast2 >= 2.23.15
+# Service.Active
+BuildRequires: yast2 >= 3.1.53
BuildRequires: libsmbclient libsmbclient-devel perl-Crypt-SmbHash perl-X500-DN
samba-client yast2-samba-client perl-XML-Writer update-desktop-files
yast2-testsuite yast2-perl-bindings yast2-ldap yast2-users
BuildRequires: yast2-devtools >= 3.1.10
Requires: perl-Crypt-SmbHash
-# Wizard::SetDesktopTitleAndIcon
-Requires: yast2 >= 2.21.22
+# Service.Active
+Requires: yast2 >= 3.1.53
Requires: yast2-ldap >= 3.1.2
Requires: yast2-perl-bindings
Requires: yast2-network
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-3.1.6/src/modules/SambaService.pm
new/yast2-samba-server-3.1.8/src/modules/SambaService.pm
--- old/yast2-samba-server-3.1.6/src/modules/SambaService.pm 2014-03-28
15:48:02.000000000 +0100
+++ new/yast2-samba-server-3.1.8/src/modules/SambaService.pm 2014-05-06
08:38:49.000000000 +0200
@@ -51,6 +51,8 @@
# Is smb and nmb service enabled?
our $Service = 0;
+our @service_names = ("nmb", "smb");
+
# Data was modified?
BEGIN{ $TYPEINFO{GetModified} = ["function", "boolean"] }
sub GetModified {
@@ -89,10 +91,20 @@
sub Write {
my ($self) = @_;
my $error = 0;
+
return 1 unless $Modified;
+
y2debug("Samba service if ". ($Service ? "enabled" : "disabled"));
- Service->Adjust("nmb", $Service ? "enable" : "disable") or $error = 1;
- Service->Adjust("smb", $Service ? "enable" : "disable") or $error = 1;
+ if ($Service) {
+ foreach my $service_name (@service_names) {
+ Service->Enable($service_name) or $error = 1;
+ }
+ } else {
+ foreach my $service_name (@service_names) {
+ Service->Disable($service_name) or $error = 1;
+ }
+ }
+
$Modified = 0;
return $error == 0;
}
@@ -118,9 +130,8 @@
BEGIN{$TYPEINFO{GetServiceRunning} = ["function", "boolean"]}
sub GetServiceRunning {
my $running = 1;
- foreach("nmb", "smb") {
- # '0' means -> running
- if (Service->Status($_)) {
+ foreach(@service_names) {
+ if (! Service->Active($_)) {
$running = 0;
}
}
@@ -133,35 +144,36 @@
sub StartStopNow {
my ($self, $on) = @_;
my $error = 0;
-
+
# Zero connected users -> restart, einther -> reload
my $connected_users = $self->ConnectedUsers();
- my $run_command = (scalar(@$connected_users)>0 ? "reload":"restart");
+ my $nr_connected_users = scalar(@$connected_users);
- foreach("nmb", "smb") {
+ foreach my $service_name (@service_names) {
if ($on) {
# check, if the services run
- if (Service->Status($_)) {
+ if (Service->Active($service_name)) {
# the service does not run => start it
- unless (Service->Start($_)) {
- y2error("Service::Start($_) failed");
+ unless (Service->Start($service_name)) {
+ y2error("Service::Start($service_name) failed");
$error = 1;
}
} else {
# the service runs => relaod it
# RunInitScript return exit code, 0 = OK
# Bugzilla #120080 - 'reload' instead of 'restart'
- y2milestone("Number of connected users:
".scalar(@$connected_users).", running ".$_." -> ".$run_command);
- if (Service->RunInitScript($_, $run_command)) {
- y2error("Service::RunInitScript(".$_.", '".$run_command."')
failed");
+ my $run_command = (($nr_connected_users > 0) ?
"Reload":"Restart");
+ y2milestone("Number of connected users:
".$nr_connected_users.", running ".$service_name." -> ".$run_command);
+ if (! Service->$run_command($service_name)) {
+ y2error("Service::RunInitScript(".$service_name.",
'".$run_command."') failed");
$error = 1;
}
}
} else {
# turn services off
- unless (Service->Status($_)) {
- unless (Service->Stop($_)) {
- y2error("Service::Stop($_) failed");
+ unless (Service->Active($service_name)) {
+ unless (Service->Stop($service_name)) {
+ y2error("Service::Stop($service_name) failed");
$error = 1;
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-samba-server-3.1.6/testsuite/YaPI/tests/YaPI-EditService.out
new/yast2-samba-server-3.1.8/testsuite/YaPI/tests/YaPI-EditService.out
--- old/yast2-samba-server-3.1.6/testsuite/YaPI/tests/YaPI-EditService.out
2014-03-28 15:48:02.000000000 +0100
+++ new/yast2-samba-server-3.1.8/testsuite/YaPI/tests/YaPI-EditService.out
2014-05-06 08:38:49.000000000 +0200
@@ -1,12 +1,8 @@
Return Enable disabled service
-Log [DEPRECIATION] `Adjust' is deprecated; use `enable` or `disable` instead
-Log [DEPRECIATION] `Adjust' is deprecated; use `enable` or `disable` instead
Return true
Return Disable disabled service
Return true
Return Enable enabled service
-Log [DEPRECIATION] `Adjust' is deprecated; use `enable` or `disable` instead
-Log [DEPRECIATION] `Adjust' is deprecated; use `enable` or `disable` instead
Return true
Return Disable enabled service
Return true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-samba-server-3.1.6/testsuite/YaPI/tests/YaPI-GetServiceStatus.out
new/yast2-samba-server-3.1.8/testsuite/YaPI/tests/YaPI-GetServiceStatus.out
--- old/yast2-samba-server-3.1.6/testsuite/YaPI/tests/YaPI-GetServiceStatus.out
2014-03-28 15:48:02.000000000 +0100
+++ new/yast2-samba-server-3.1.8/testsuite/YaPI/tests/YaPI-GetServiceStatus.out
2014-05-06 08:38:49.000000000 +0200
@@ -1,6 +1,8 @@
Return Disabled service
Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl
--no-legend --no-pager --no-ask-password show smb.service --property=Id
--property=MainPID --property=Description --property=LoadState
--property=ActiveState --property=SubState --property=UnitFileState
--property=FragmentPath " $["exit":0, "stderr":"", "stdout":""]
+Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl
--no-legend --no-pager --no-ask-password is-enabled smb.service " $["exit":0,
"stderr":"", "stdout":""]
Return 0
Return Enabled service
Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl
--no-legend --no-pager --no-ask-password show smb.service --property=Id
--property=MainPID --property=Description --property=LoadState
--property=ActiveState --property=SubState --property=UnitFileState
--property=FragmentPath " $["exit":0, "stderr":"", "stdout":""]
+Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl
--no-legend --no-pager --no-ask-password is-enabled smb.service " $["exit":0,
"stderr":"", "stdout":""]
Return 0
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]