From 1a2d5d1ebaaa6d9ba74505c15888950e112f4ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Fri, 27 Apr 2018 15:49:02 +0100 Subject: [PATCH 01/16] Revert "adapt Rakefile and Dockerfile for SLE-15-GA" This reverts commit 6047c93d6ab96ae5f8dcf04ffd29c226c4f86f36. --- Dockerfile | 2 +- Rakefile | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index b1e712ce9..f9587f00b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Use this base image # - built: https://hub.docker.com/r/yastdevel/ruby/ # - source: https://github.com/yast/docker-yast-ruby -FROM yastdevel/ruby:sle15 +FROM yastdevel/ruby COPY . /usr/src/app # English messages, UTF-8, "C" locale for numeric formatting tests ENV LC_ALL= LANG=en_US.UTF-8 LC_NUMERIC=C diff --git a/Rakefile b/Rakefile index 45bceb6c9..2432dd52a 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,5 @@ require "yast/rake" -Yast::Tasks.submit_to :sle15 - Yast::Tasks.configuration do |conf| # lets ignore license check for now conf.skip_license_check << /.*/ From d1ad06a92be326991d60a7b621760d6407b41299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?= Date: Tue, 15 May 2018 10:12:07 +0100 Subject: [PATCH 02/16] Replace firewallctl by firewall-cmd for obtaining the current state. --- library/network/src/lib/y2firewall/firewalld/api.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/network/src/lib/y2firewall/firewalld/api.rb b/library/network/src/lib/y2firewall/firewalld/api.rb index 1756d51f2..4fe7b1ac2 100644 --- a/library/network/src/lib/y2firewall/firewalld/api.rb +++ b/library/network/src/lib/y2firewall/firewalld/api.rb @@ -105,7 +105,7 @@ def disable! # @return [Boolean] The firewalld service state (exit code) def state - case Yast::Execute.on_target("firewallctl", "state", allowed_exitstatus: [0, 252]) + case Yast::Execute.on_target("firewall-cmd", "--state", allowed_exitstatus: [0, 252]) when 0 "running" when 252 From 1bf10a250a45aae2546847d754474a78d7965f8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?= Date: Tue, 15 May 2018 10:13:32 +0100 Subject: [PATCH 03/16] Bump version & changelog. --- package/yast2.changes | 7 +++++++ package/yast2.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package/yast2.changes b/package/yast2.changes index 6d7b85df2..cb80454ee 100644 --- a/package/yast2.changes +++ b/package/yast2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 15 09:12:23 UTC 2018 - knut.anderssen@suse.com + +- Replace the deprecated firewallctl command with firewall-cmd for + obtaining the firewalld state (bsc#1093111) +- 4.0.74 + ------------------------------------------------------------------- Tue May 8 10:21:07 UTC 2018 - jlopez@suse.com diff --git a/package/yast2.spec b/package/yast2.spec index 63fcfd307..3600b452a 100644 --- a/package/yast2.spec +++ b/package/yast2.spec @@ -16,7 +16,7 @@ # Name: yast2 -Version: 4.0.73 +Version: 4.0.74 Release: 0 Summary: YaST2 - Main Package License: GPL-2.0 From 87bc76d87574fbe1e231d83b40893dc0c2d00ad8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?= Date: Tue, 15 May 2018 10:51:30 +0100 Subject: [PATCH 04/16] Changes based on CR. --- library/network/src/lib/y2firewall/firewalld/api.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/network/src/lib/y2firewall/firewalld/api.rb b/library/network/src/lib/y2firewall/firewalld/api.rb index 4fe7b1ac2..91ee63a56 100644 --- a/library/network/src/lib/y2firewall/firewalld/api.rb +++ b/library/network/src/lib/y2firewall/firewalld/api.rb @@ -103,7 +103,11 @@ def disable! offline? ? run_command("--disable") : Yast::Service.Disable("firewalld") end - # @return [Boolean] The firewalld service state (exit code) + # Return the current state of the firewalld service (running or not + # running) + # + # @return [String] firewalld service state + # @see http://www.firewalld.org/documentation/man-pages/firewall-cmd.html def state case Yast::Execute.on_target("firewall-cmd", "--state", allowed_exitstatus: [0, 252]) when 0 From 8f448ba3ed19d06310480a93f27eb20f499bba1e Mon Sep 17 00:00:00 2001 From: Jiri Srain Date: Fri, 8 Jun 2018 09:26:14 +0200 Subject: [PATCH 05/16] fixed merge --- package/yast2.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/package/yast2.spec b/package/yast2.spec index d41d812cb..9d0ea764b 100644 --- a/package/yast2.spec +++ b/package/yast2.spec @@ -17,7 +17,6 @@ Name: yast2 -Version: 4.0.74 Version: 4.0.77 Release: 0 Summary: YaST2 - Main Package From 2b4a4d307f268e4fe0b5227acef1d2054fe8104f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Iv=C3=A1n=20L=C3=B3pez=20Gonz=C3=A1lez?= Date: Tue, 17 Jul 2018 08:36:08 +0100 Subject: [PATCH 06/16] Revert "Bump version & changelog." This reverts commit 19fdcf3550938f9140af64c7ae39cdaf7b9704ca. --- package/yast2.changes | 6 ------ 1 file changed, 6 deletions(-) diff --git a/package/yast2.changes b/package/yast2.changes index c1b88c1e9..b0b434c6c 100644 --- a/package/yast2.changes +++ b/package/yast2.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Mon Jul 16 09:12:23 UTC 2018 - knut.anderssen@suse.com - -- Replace the deprecated firewallctl command with firewall-cmd for - obtaining the firewalld state (bsc#1093111) - ------------------------------------------------------------------- Tue Jul 3 08:01:07 UTC 2018 - knut.anderssen@suse.com From eeb2c27f9dadc401a66f6cdcd9feb9ed47fa3a42 Mon Sep 17 00:00:00 2001 From: Fraser Bell Date: Sun, 22 Jul 2018 19:48:13 -0700 Subject: [PATCH 07/16] Fix comment --- doc/examples/ask_resize_windows_partition.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/examples/ask_resize_windows_partition.rb b/doc/examples/ask_resize_windows_partition.rb index 9e86a53c8..bc809cd6c 100644 --- a/doc/examples/ask_resize_windows_partition.rb +++ b/doc/examples/ask_resize_windows_partition.rb @@ -24,8 +24,8 @@ # Example when to use a headline: # # There is lengthy text that advanced users might have read several times -# before, so we give him a concise headline that identifies that dialog so he -# can keep on working without having to read everything again. +# before, so we give the users a concise headline that identifies that dialogue +# so they can keep on working without having to read everything again. module Yast class AskResizeWindowsPartitionClient < Client def main From 0b9127b637bcc6f6d83fe3d77b2252b2ae096bca Mon Sep 17 00:00:00 2001 From: Fraser Bell Date: Sun, 22 Jul 2018 21:03:59 -0700 Subject: [PATCH 08/16] Fix Grammar --- doc/examples/popups2.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/examples/popups2.rb b/doc/examples/popups2.rb index 961ae91ce..2a1a103cd 100644 --- a/doc/examples/popups2.rb +++ b/doc/examples/popups2.rb @@ -58,7 +58,7 @@ def main "Really delete world?", "You in your infinite wisdom have chosen to delete this only world of ours.\n" \ "This will mean the end to all of mankind and all life in the only known planet\n" \ - "known to habitate intelligent or other life in the entire universe.\n" \ + "known to be inhabited by intelligent or other life in the entire universe.\n" \ "\n" \ "Even though it is well known that mankind and human character are far from perfect,\n" \ "we urgently request you to reconsider that decision.\n" \ @@ -72,17 +72,17 @@ def main "\n" \ "\n" \ "\n" \ - "If make the wrong decision, creatures from outer space may decide\n" \ + "If you make the wrong decision, creatures from outer space may choose\n" \ "\n" \ - "to get rid of that planet of ours to make room for some interstellar\n" \ + "to get rid of this planet of ours to make room for some interstellar\n" \ "\n" \ "hyper expressway.\n" \ "\n" \ "\n" \ "\n" \ - "So: Do you fail to be aware to recognize the lack of not being able\n" \ - "\n" \ - "to face this kind of indecision may kill all of mankind?", + "So: Do you fail to recognize that your inability to confront\n" \ + "\n" \ + "this kind of indecision may destroy all of mankind?", "&Everything you say", "I'll &buy one of it", :focus_no @@ -94,17 +94,17 @@ def main "\n" \ "\n" \ "\n" \ - "If make the wrong decision, creatures from outer space may decide\n" \ + "If you make the wrong decision, creatures from outer space may choose\n" \ "\n" \ - "to get rid of that planet of ours to make room for some interstellar\n" \ + "to get rid of this planet of ours to make room for some interstellar\n" \ "\n" \ "hyper expressway.\n" \ "\n" \ "\n" \ "\n" \ - "So: Do you fail to be aware to recognize the lack of not being able\n" \ - "\n" \ - "to face this kind of indecision may kill all of mankind?", + "So: Do you fail to recognize that your inability to confront\n" \ + "\n" \ + "this kind of indecision may destroy all of mankind?", "&Everything you say", "I'll &buy one of it", "But I don't have a &car", From 74dc64cf6beca8fb6ca2a65553ca0b7936e61520 Mon Sep 17 00:00:00 2001 From: Fraser Bell Date: Tue, 24 Jul 2018 20:30:15 -0700 Subject: [PATCH 09/16] Fix typos and readability --- .../network/src/lib/network/susefirewall2.rb | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/library/network/src/lib/network/susefirewall2.rb b/library/network/src/lib/network/susefirewall2.rb index a1d5a7696..e39aac428 100644 --- a/library/network/src/lib/network/susefirewall2.rb +++ b/library/network/src/lib/network/susefirewall2.rb @@ -278,12 +278,12 @@ def ReportOnlyOnce(what_to_report) # Function returns whether the feature 'any' network interface is supported in the # firewall configuration. The string 'any' must be in the 'EXT' zone. - # Updated: Currently returns only 'true' as every unasigned interface is + # Updated: Currently returns only 'true' as every unassigned interface is # automatically assigned to the EXT zone by SuSEfirewall2. # # @return [Boolean] is_supported whether the feature is supported or not def IsAnyNetworkInterfaceSupported - # Currently unasigned interfaces belong to the EXT zone by dafault + # Currently unassigned interfaces belong to the EXT zone by dafault true end @@ -360,7 +360,7 @@ def ReadSysconfigSuSEFirewall(variables) nil end - # Local function for reseting list of sysconfig variables in internal variables. + # Local function for resetting list of sysconfig variables in internal variables. # # @param [Array] variables of sysconfig variables def ResetSysconfigSuSEFirewall(variables) @@ -492,7 +492,7 @@ def SetBroadcastConfiguration(zone, broadcast_configuration) nil end - # Local function return map of allowed ports (without aliases). + # Local function returns map of allowed ports (without aliases). # If any list for zone is defined but empty, all allowed # UDP ports for this zone also accept broadcast packets. # This function returns only ports that are mentioned in configuration, @@ -526,7 +526,7 @@ def GetBroadcastAllowedPorts # BNC #694782: "yes" is automatically translated by SuSEfirewall2 elsif broadcast == "yes" Ops.set(allowed_ports, zone, ["yes"]) - # only listed ports allows broadcast + # only listed ports allow broadcast else Ops.set(allowed_ports, zone, Builtins.splitstring(broadcast, " ")) Ops.set( @@ -1761,7 +1761,7 @@ def WriteConfiguration true end - # Helper function for the backward compatibility. + # Helper function for backward compatibility. # See WriteConfiguration(). Remove from code ASAP. # # @return [Boolean] if succesful @@ -1769,7 +1769,7 @@ def WriteOnly WriteConfiguration() end - # Function for writing and enabling configuration it is an union of + # Function for writing and enabling configuration, it is a union of # WriteConfiguration() and ActivateConfiguration(). # # @return [Boolean] if succesfull @@ -1789,7 +1789,7 @@ def Write # This powerful function returns list of services/ports which are # not assigned to any fully-supported known-services. # This function doesn't check for services defined by packages. - # They are listed by a different way. + # They are listed by a different method. # # @return [Array] of additional (unassigned) services # @@ -1939,7 +1939,7 @@ def RemoveSpecialInterfaceFromZone(interface, zone) nil end - # Functions adds special string into defined zone. + # Function adds special string into defined zone. # # @param [String] interface # @param [String] zone @@ -1985,7 +1985,7 @@ def SetMasquerade(enable, _zone = nil) Ops.set(@SETTINGS, "FW_MASQUERADE", enable ? "yes" : "no") - # routing is needed for masquerading, but we can't swithc it off when disabling masquerading + # routing is needed for masquerading, but we can't switch it off when disabling masquerading Ops.set(@SETTINGS, "FW_ROUTE", "yes") if enable nil @@ -2223,7 +2223,7 @@ def SetLoggingSettings(rule, state) nil end - # Function returns yes/no - ingoring broadcast for zone + # Function returns yes/no - ignoring broadcast for zone # # @param [String] zone # @return [String] "yes" or "no" @@ -2240,7 +2240,7 @@ def GetIgnoreLoggingBroadcast(zone) Ops.get_string(@SETTINGS, Ops.add("FW_IGNORE_FW_BROADCAST_", zone), "no") end - # Function sets yes/no - ingoring broadcast for zone + # Function sets yes/no - ignoring broadcast for zone # # @param [String] zone # @param [String] bcast ignore 'yes' or 'no' @@ -2261,7 +2261,7 @@ def SetIgnoreLoggingBroadcast(zone, bcast) nil end - # Firewall Expert Rulezz + # Firewall Expert Rules # Returns list of rules describing protocols and ports that are allowed # to be accessed from listed hosts. All is returned as a single string. From 6ae6341cef5145baf44a73688a4824804b6b5747 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Tue, 7 Aug 2018 10:23:43 +0100 Subject: [PATCH 10/16] SystemService#start_modes returns known modes when service is not found * It does not have enough information to infer which are the supported modes. * This feature is used during first stage. --- .../systemd/src/lib/yast2/system_service.rb | 12 ++++++ library/systemd/src/lib/yast2/systemd_unit.rb | 3 +- .../systemd/test/yast2/system_service_test.rb | 37 +++++++++++++++++-- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/library/systemd/src/lib/yast2/system_service.rb b/library/systemd/src/lib/yast2/system_service.rb index b7ff3513a..85ddc367a 100644 --- a/library/systemd/src/lib/yast2/system_service.rb +++ b/library/systemd/src/lib/yast2/system_service.rb @@ -173,6 +173,13 @@ def initialize(service) @errors = {} end + # Determines whether the service exists in the underlying system + # + # @return [Boolean] true if it exists; false otherwise. + def found? + !service.not_found? + end + # State of the service # # In case the service is not active but socket is, the socket state is considered @@ -228,8 +235,13 @@ def currently_active? # * :on_demand: The service will be started on demand. # * :manual: The service is disabled and it will be started manually. # + # @note When the service does not exist in the underlying system (for instance, + # during 1st stage) all possible start modes are returned, as there is no way + # to find out which of them are supported. + # # @return [Array] List of supported modes. def start_modes + @start_modes = [:on_boot, :manual, :on_demand] unless found? return @start_modes if @start_modes @start_modes = [:on_boot, :manual] @start_modes << :on_demand if socket diff --git a/library/systemd/src/lib/yast2/systemd_unit.rb b/library/systemd/src/lib/yast2/systemd_unit.rb index c358b0d2f..d47a57cde 100644 --- a/library/systemd/src/lib/yast2/systemd_unit.rb +++ b/library/systemd/src/lib/yast2/systemd_unit.rb @@ -81,7 +81,8 @@ class PropMap < Hash :loaded?, :active_state, :sub_state, - :can_reload? + :can_reload?, + :not_found? ].freeze private_constant :FORWARDED_METHODS diff --git a/library/systemd/test/yast2/system_service_test.rb b/library/systemd/test/yast2/system_service_test.rb index 424005b01..d5b4f5607 100755 --- a/library/systemd/test/yast2/system_service_test.rb +++ b/library/systemd/test/yast2/system_service_test.rb @@ -28,14 +28,16 @@ let(:service) do instance_double(Yast::SystemdServiceClass::Service, - name: "cups", - enabled?: service_enabled, - active?: service_active, - refresh!: true) + name: "cups", + enabled?: service_enabled, + active?: service_active, + not_found?: !service_found, + refresh!: true) end let(:service_enabled) { true } let(:service_active) { true } + let(:service_found) { true } let(:service_socket) do instance_double(Yast::SystemdSocketClass::Socket, @@ -311,6 +313,15 @@ expect(system_service.start_modes).to contain_exactly(:on_boot, :manual) end end + + context "when the service is not found" do + let(:socket) { nil } + let(:service_found) { false } + + it "returns all available start modes" do + expect(system_service.start_modes).to contain_exactly(:on_boot, :manual, :on_demand) + end + end end describe "#start_mode" do @@ -1093,4 +1104,22 @@ end end end + + describe "#found" do + context "when the service is found" do + let(:service_found) { true } + + it "returns true" do + expect(system_service.found?).to eq(true) + end + end + + context "when the service is not found" do + let(:service_found) { false } + + it "returns false" do + expect(system_service.found?).to eq(false) + end + end + end end From ce97b06415334e86088bc2d6b61323d4faa62428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Tue, 7 Aug 2018 10:25:14 +0100 Subject: [PATCH 11/16] SystemService registers an error when the socket is missing --- library/systemd/src/lib/yast2/system_service.rb | 2 +- library/systemd/test/yast2/system_service_test.rb | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/library/systemd/src/lib/yast2/system_service.rb b/library/systemd/src/lib/yast2/system_service.rb index 85ddc367a..8ff97eddc 100644 --- a/library/systemd/src/lib/yast2/system_service.rb +++ b/library/systemd/src/lib/yast2/system_service.rb @@ -437,7 +437,7 @@ def save_start_mode when :on_boot service.enable && (socket ? socket.disable : true) when :on_demand - service.disable && (socket ? socket.enable : true) + service.disable && (socket ? socket.enable : false) when :manual service.disable && (socket ? socket.disable : true) end diff --git a/library/systemd/test/yast2/system_service_test.rb b/library/systemd/test/yast2/system_service_test.rb index d5b4f5607..30df06fe9 100755 --- a/library/systemd/test/yast2/system_service_test.rb +++ b/library/systemd/test/yast2/system_service_test.rb @@ -620,6 +620,17 @@ system_service.save end + + context "but there is not associated socket (possible during 1st stage)" do + before do + allow(system_service).to receive(:socket).and_return(nil) + end + + it "registers an error" do + system_service.save + expect(system_service.errors).to include(start_mode: :on_demand) + end + end end context "and the new start mode is :manual" do From 04797bca010c040da828df6a5b6e3124d3eddc55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Tue, 7 Aug 2018 14:31:18 +0100 Subject: [PATCH 12/16] Fix socket detection * Some research is needed to find a better version, but the current implementation does not work when the socket is already stopped or YaST is running on 1st stage. --- .../systemd/src/modules/systemd_service.rb | 16 ++++-------- library/systemd/test/systemd_service_test.rb | 26 +++++++++++-------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/library/systemd/src/modules/systemd_service.rb b/library/systemd/src/modules/systemd_service.rb index 0971ead3e..de88889fb 100644 --- a/library/systemd/src/modules/systemd_service.rb +++ b/library/systemd/src/modules/systemd_service.rb @@ -190,19 +190,13 @@ def restart # Returns socket associated with service or nil if there is no such socket # + # @note The current implementation is too simplistic. At this point, checking the + # 'Triggers' property of each socket would be a better way. However, it won't work + # during installation as 'systemctl show' is not available. + # # @return [Yast::SystemdSocketClass::Socket] def socket - return @socket if @socket - - # not triggered - socket_name = properties.triggered_by - return unless socket_name - - # this may be a space separated list - socket_name = socket_name[/\S+\.socket/] - return unless socket_name # triggered by non-socket - - @socket = Yast::SystemdSocket.find(socket_name) + @socket ||= Yast::SystemdSocket.find(name) end # Determines whether the service has an associated socket diff --git a/library/systemd/test/systemd_service_test.rb b/library/systemd/test/systemd_service_test.rb index 405cad466..0001f3532 100755 --- a/library/systemd/test/systemd_service_test.rb +++ b/library/systemd/test/systemd_service_test.rb @@ -179,20 +179,22 @@ module Yast describe "#socket" do subject(:service) { SystemdService.find(service_name) } + let(:service_name) { "sshd" } - before { stub_services(service: service_name) } + before do + allow(SystemdSocket).to receive(:find).with(service_name).and_return(socket) + end - context "when the service is triggered by a socket" do - let(:service_name) { "cups" } + context "when a socket named after the service exists" do + let(:socket) { instance_double(SystemdSocketClass::Socket) } it "returns the socket" do - expect(service.socket).to be_a(Yast::SystemdSocketClass::Socket) - expect(service.socket.unit_name).to eq("iscsid") + expect(service.socket).to eq(socket) end end - context "when the service is not triggered by a socket" do - let(:service_name) { "sshd" } + context "when no socket named after the service exists" do + let(:socket) { nil } it "returns nil" do expect(service.socket).to be_nil @@ -201,12 +203,14 @@ module Yast end describe "#socket?" do - subject(:service) { SystemdService.find(service_name) } + subject(:service) { SystemdService.find("sshd") } - before { stub_services(service: service_name) } + before do + allow(service).to receive(:socket).and_return(socket) + end context "when there is an associated socket" do - let(:service_name) { "cups" } + let(:socket) { instance_double(SystemdSocketClass::Socket) } it "returns true" do expect(service.socket?).to eq(true) @@ -214,7 +218,7 @@ module Yast end context "when there is no associated socket" do - let(:service_name) { "sshd" } + let(:socket) { nil } it "returns false" do expect(service.socket?).to eq(false) From 2caff96dc815d843cdb1ca8415a22472c3cb0b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Wed, 8 Aug 2018 11:11:44 +0100 Subject: [PATCH 13/16] Bump version and update changes file --- package/yast2.changes | 8 ++++++++ package/yast2.spec | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package/yast2.changes b/package/yast2.changes index aadbc07a3..cae8cf320 100644 --- a/package/yast2.changes +++ b/package/yast2.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Aug 8 10:09:55 UTC 2018 - igonzalezsosa@suse.com + +- Add a method to detect whether a systemd service exists in + the underlying system or not (related to fate#319428). +- Fix systemd socket detection. +- 4.0.83 + ------------------------------------------------------------------- Wed Aug 1 10:48:04 UTC 2018 - igonzalezsosa@suse.com diff --git a/package/yast2.spec b/package/yast2.spec index 48c59940e..8114fd1c6 100644 --- a/package/yast2.spec +++ b/package/yast2.spec @@ -17,7 +17,7 @@ Name: yast2 -Version: 4.0.82 +Version: 4.0.83 Release: 0 Summary: YaST2 - Main Package License: GPL-2.0-only From fd7d95184b95e6695fa6bb70664e6f5422a028b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Wed, 8 Aug 2018 12:13:39 +0100 Subject: [PATCH 14/16] Update from code review --- library/systemd/src/modules/systemd_service.rb | 2 +- library/systemd/test/yast2/system_service_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/systemd/src/modules/systemd_service.rb b/library/systemd/src/modules/systemd_service.rb index de88889fb..89508afc7 100644 --- a/library/systemd/src/modules/systemd_service.rb +++ b/library/systemd/src/modules/systemd_service.rb @@ -194,7 +194,7 @@ def restart # 'Triggers' property of each socket would be a better way. However, it won't work # during installation as 'systemctl show' is not available. # - # @return [Yast::SystemdSocketClass::Socket] + # @return [Yast::SystemdSocketClass::Socket,nil] def socket @socket ||= Yast::SystemdSocket.find(name) end diff --git a/library/systemd/test/yast2/system_service_test.rb b/library/systemd/test/yast2/system_service_test.rb index 30df06fe9..88ad398c0 100755 --- a/library/systemd/test/yast2/system_service_test.rb +++ b/library/systemd/test/yast2/system_service_test.rb @@ -1116,7 +1116,7 @@ end end - describe "#found" do + describe "#found?" do context "when the service is found" do let(:service_found) { true } From 3a52f85f0ea563812843c82b48a0b3d1e38ea87a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Wed, 8 Aug 2018 15:04:04 +0100 Subject: [PATCH 15/16] Adjust Dockerfile and Rakefile --- Dockerfile | 2 +- Rakefile | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f9587f00b..b1e712ce9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Use this base image # - built: https://hub.docker.com/r/yastdevel/ruby/ # - source: https://github.com/yast/docker-yast-ruby -FROM yastdevel/ruby +FROM yastdevel/ruby:sle15 COPY . /usr/src/app # English messages, UTF-8, "C" locale for numeric formatting tests ENV LC_ALL= LANG=en_US.UTF-8 LC_NUMERIC=C diff --git a/Rakefile b/Rakefile index 2432dd52a..45bceb6c9 100644 --- a/Rakefile +++ b/Rakefile @@ -1,5 +1,7 @@ require "yast/rake" +Yast::Tasks.submit_to :sle15 + Yast::Tasks.configuration do |conf| # lets ignore license check for now conf.skip_license_check << /.*/ From 8c16b39fe25821bbb3b3ac838bc09ae4bba16a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Imobach=20Gonz=C3=A1lez=20Sosa?= Date: Wed, 8 Aug 2018 15:07:47 +0100 Subject: [PATCH 16/16] Drop duplicated changes entry --- package/yast2.changes | 6 ------ 1 file changed, 6 deletions(-) diff --git a/package/yast2.changes b/package/yast2.changes index cae8cf320..82390928d 100644 --- a/package/yast2.changes +++ b/package/yast2.changes @@ -27,12 +27,6 @@ Wed Jul 25 08:13:31 UTC 2018 - jlopez@suse.com socket (needed for bsc#1080738 and fate#319428). - 4.0.80 -------------------------------------------------------------------- -Mon Jul 16 09:12:23 UTC 2018 - knut.anderssen@suse.com - -- Replace the deprecated firewallctl command with firewall-cmd for - obtaining the firewalld state (bsc#1093111) - ------------------------------------------------------------------- Tue Jul 3 08:01:07 UTC 2018 - knut.anderssen@suse.com