Hello community,
here is the log from the commit of package yast2-samba-server for
openSUSE:Leap:15.2 checked in at 2020-03-13 10:55:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/yast2-samba-server (Old)
and /work/SRC/openSUSE:Leap:15.2/.yast2-samba-server.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-samba-server"
Fri Mar 13 10:55:53 2020 rev:28 rq:784273 version:4.2.4
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/yast2-samba-server/yast2-samba-server.changes
2020-01-15 16:32:21.792883368 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.yast2-samba-server.new.3160/yast2-samba-server.changes
2020-03-13 10:55:55.524372658 +0100
@@ -1,0 +2,15 @@
+Wed Mar 11 10:00:37 UTC 2020 - Knut Anderssen <[email protected]>
+
+- Fix check of connected users when proposing the default service
+ action (bsc#1166303)
+- 4.2.4
+
+-------------------------------------------------------------------
+Thu Mar 5 13:59:38 UTC 2020 - Knut Anderssen <[email protected]>
+
+- Propose to restart samba services by default when writing the
+ configuration with services already running. Reload is still used
+ if some user is connected to the samba server (bsc#1165638)
+- 4.2.3
+
+-------------------------------------------------------------------
Old:
----
yast2-samba-server-4.2.2.tar.bz2
New:
----
yast2-samba-server-4.2.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-samba-server.spec ++++++
--- /var/tmp/diff_new_pack.p6iycv/_old 2020-03-13 10:55:55.960372969 +0100
+++ /var/tmp/diff_new_pack.p6iycv/_new 2020-03-13 10:55:55.964372972 +0100
@@ -1,7 +1,7 @@
#
# spec file for package yast2-samba-server
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: yast2-samba-server
-Version: 4.2.2
+Version: 4.2.4
Release: 0
Url: https://github.com/yast/yast-samba-server
Summary: YaST2 - Samba Server Configuration
++++++ yast2-samba-server-4.2.2.tar.bz2 -> yast2-samba-server-4.2.4.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-4.2.2/.yardopts
new/yast2-samba-server-4.2.4/.yardopts
--- old/yast2-samba-server-4.2.2/.yardopts 1970-01-01 01:00:00.000000000
+0100
+++ new/yast2-samba-server-4.2.4/.yardopts 2020-03-11 12:00:57.000000000
+0100
@@ -0,0 +1,7 @@
+--no-private
+--markup markdown
+--protected
+--readme README.md
+--output-dir ./doc/autodocs
+--files *.md
+src/**/*.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-samba-server-4.2.2/package/yast2-samba-server.changes
new/yast2-samba-server-4.2.4/package/yast2-samba-server.changes
--- old/yast2-samba-server-4.2.2/package/yast2-samba-server.changes
2019-11-28 16:08:27.000000000 +0100
+++ new/yast2-samba-server-4.2.4/package/yast2-samba-server.changes
2020-03-11 12:00:57.000000000 +0100
@@ -1,4 +1,19 @@
-------------------------------------------------------------------
+Wed Mar 11 10:00:37 UTC 2020 - Knut Anderssen <[email protected]>
+
+- Fix check of connected users when proposing the default service
+ action (bsc#1166303)
+- 4.2.4
+
+-------------------------------------------------------------------
+Thu Mar 5 13:59:38 UTC 2020 - Knut Anderssen <[email protected]>
+
+- Propose to restart samba services by default when writing the
+ configuration with services already running. Reload is still used
+ if some user is connected to the samba server (bsc#1165638)
+- 4.2.3
+
+-------------------------------------------------------------------
Thu Nov 28 14:35:11 UTC 2019 - Knut Anderssen <[email protected]>
- Fix failing Samba.GetServiceStatus old testsuite forcing and
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-samba-server-4.2.2/package/yast2-samba-server.spec
new/yast2-samba-server-4.2.4/package/yast2-samba-server.spec
--- old/yast2-samba-server-4.2.2/package/yast2-samba-server.spec
2019-11-28 16:08:27.000000000 +0100
+++ new/yast2-samba-server-4.2.4/package/yast2-samba-server.spec
2020-03-11 12:00:57.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package yast2-samba-server
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
Name: yast2-samba-server
-Version: 4.2.2
+Version: 4.2.4
Release: 0
Url: https://github.com/yast/yast-samba-server
Summary: YaST2 - Samba Server Configuration
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-samba-server-4.2.2/src/include/samba-server/complex.rb
new/yast2-samba-server-4.2.4/src/include/samba-server/complex.rb
--- old/yast2-samba-server-4.2.2/src/include/samba-server/complex.rb
2019-11-28 16:08:27.000000000 +0100
+++ new/yast2-samba-server-4.2.4/src/include/samba-server/complex.rb
2020-03-11 12:00:57.000000000 +0100
@@ -87,13 +87,7 @@
# If there some connected users, SAMBA is running and should be running
# also after the Write() operation and the Progress was turned on before
# Writing SAMBA conf
- connected_users = SambaService.ConnectedUsers.count
- Builtins.y2milestone("Number of connected users: %1", connected_users)
-
- switch_to_reload = connected_users > 0 &&
- SambaService.GetServiceRunning &&
- SambaService.GetServiceAutoStart &&
- ProgressStatus()
+ switch_to_reload = need_to_restart? && connected_users? &&
ProgressStatus()
ret = save_status(switch_to_reload)
@@ -112,6 +106,26 @@
ret ? :next : :abort
end
+ # Convenience method to check whether a restart or reload should be used
+ # after writing the configuration
+ #
+ # @return [Boolean] true if the service is running; false otherwise
+ def need_to_restart?
+ # could be partialy active. i.e: smb is running and nmb is not
+ services.currently_active?
+ end
+
+ # Convenience method to check whether there are users connected to samba
+ # service or not
+ #
+ # @return [Boolean] true if some user is connected to the service; false
+ # otherwise
+ def connected_users?
+ connected_users = SambaService.ConnectedUsers.count
+ Builtins.y2milestone("Number of connected users: %1", connected_users)
+ connected_users > 0
+ end
+
# Saves service status (start mode and starts/stops the service)
#
# @param switch_to_reload [Boolean] indicates if restart action must be
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-samba-server-4.2.2/src/include/samba-server/dialogs.rb
new/yast2-samba-server-4.2.4/src/include/samba-server/dialogs.rb
--- old/yast2-samba-server-4.2.2/src/include/samba-server/dialogs.rb
2019-11-28 16:08:27.000000000 +0100
+++ new/yast2-samba-server-4.2.4/src/include/samba-server/dialogs.rb
2020-03-11 12:00:57.000000000 +0100
@@ -100,7 +100,10 @@
#
# @return [::CWM::ServiceWidget]
def service_widget
- @service_widget ||= ::CWM::ServiceWidget.new(services)
+ return @service_widget if @service_widget
+ @service_widget = ::CWM::ServiceWidget.new(services)
+ @service_widget.default_action = :restart if need_to_restart? &&
!connected_users?
+ @service_widget
end
# routines
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-4.2.2/src/modules/SambaService.pm
new/yast2-samba-server-4.2.4/src/modules/SambaService.pm
--- old/yast2-samba-server-4.2.2/src/modules/SambaService.pm 2019-11-28
16:08:27.000000000 +0100
+++ new/yast2-samba-server-4.2.4/src/modules/SambaService.pm 2020-03-11
12:00:57.000000000 +0100
@@ -145,7 +145,7 @@
my ($self, $on) = @_;
my $error = 0;
- # Zero connected users -> restart, einther -> reload
+ # Zero connected users -> restart, either -> reload
my $connected_users = $self->ConnectedUsers();
my $nr_connected_users = scalar(@$connected_users);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-samba-server-4.2.2/test/dialog_complex_test.rb
new/yast2-samba-server-4.2.4/test/dialog_complex_test.rb
--- old/yast2-samba-server-4.2.2/test/dialog_complex_test.rb 2019-11-28
16:08:27.000000000 +0100
+++ new/yast2-samba-server-4.2.4/test/dialog_complex_test.rb 2020-03-11
12:00:57.000000000 +0100
@@ -42,17 +42,18 @@
allow(Yast2::SystemService).to
receive(:find).with(anything).and_return(service)
allow(Yast2::CompoundService).to receive(:new).and_return(services)
allow(services).to receive(:action).and_return(action)
+ allow(services).to receive(:currently_active?).and_return(service_running)
end
let(:service) { instance_double("Yast2::SystemService", save: true, is_a?:
true) }
let(:services) { instance_double("Yast2::CompoundService", save: true) }
+ let(:service_running) { false }
let(:action) { :start }
describe "#WriteDialog" do
subject(:samba) { TestComplexDialog.new }
let(:connected_users) { ["john", "jane"] }
- let(:service_running) { false }
let(:service_on_boot) { false }
let(:auto) { false }