Hello community,
here is the log from the commit of package yast2-firewall for
openSUSE:Leap:15.2 checked in at 2020-03-02 17:21:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/yast2-firewall (Old)
and /work/SRC/openSUSE:Leap:15.2/.yast2-firewall.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-firewall"
Mon Mar 2 17:21:39 2020 rev:90 rq:780387 version:4.2.3
Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/yast2-firewall/yast2-firewall.changes
2020-01-15 16:32:11.156879534 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.yast2-firewall.new.26092/yast2-firewall.changes
2020-03-02 17:21:44.942109819 +0100
@@ -1,0 +2,8 @@
+Wed Feb 26 20:23:04 UTC 2020 - Knut Anderssen <[email protected]>
+
+- AutoYaST: Added back the installation finish client for opening
+ the VNC or SSH port during the first stage when used for remote
+ installations (bsc#1161319)
+- 4.2.3
+
+-------------------------------------------------------------------
Old:
----
yast2-firewall-4.2.2.tar.bz2
New:
----
yast2-firewall-4.2.3.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-firewall.spec ++++++
--- /var/tmp/diff_new_pack.XGzDg7/_old 2020-03-02 17:21:45.302110513 +0100
+++ /var/tmp/diff_new_pack.XGzDg7/_new 2020-03-02 17:21:45.306110521 +0100
@@ -1,7 +1,7 @@
#
# spec file for package yast2-firewall
#
-# 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-firewall
-Version: 4.2.2
+Version: 4.2.3
Release: 0
Summary: YaST2 - Firewall Configuration
License: GPL-2.0-only
++++++ yast2-firewall-4.2.2.tar.bz2 -> yast2-firewall-4.2.3.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-firewall-4.2.2/package/yast2-firewall.changes
new/yast2-firewall-4.2.3/package/yast2-firewall.changes
--- old/yast2-firewall-4.2.2/package/yast2-firewall.changes 2019-08-27
19:39:09.000000000 +0200
+++ new/yast2-firewall-4.2.3/package/yast2-firewall.changes 2020-02-27
14:02:20.000000000 +0100
@@ -1,4 +1,12 @@
-------------------------------------------------------------------
+Wed Feb 26 20:23:04 UTC 2020 - Knut Anderssen <[email protected]>
+
+- AutoYaST: Added back the installation finish client for opening
+ the VNC or SSH port during the first stage when used for remote
+ installations (bsc#1161319)
+- 4.2.3
+
+-------------------------------------------------------------------
Tue Aug 27 18:00:06 CEST 2019 - [email protected]
- Set X-SuSE-YaST-AutoInstResource in desktop file (bsc#144894).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-firewall-4.2.2/package/yast2-firewall.spec
new/yast2-firewall-4.2.3/package/yast2-firewall.spec
--- old/yast2-firewall-4.2.2/package/yast2-firewall.spec 2019-08-27
19:39:09.000000000 +0200
+++ new/yast2-firewall-4.2.3/package/yast2-firewall.spec 2020-02-27
14:02:20.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-firewall
-Version: 4.2.2
+Version: 4.2.3
Release: 0
Summary: YaST2 - Firewall Configuration
Group: System/YaST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-firewall-4.2.2/src/lib/y2firewall/clients/installation_finish.rb
new/yast2-firewall-4.2.3/src/lib/y2firewall/clients/installation_finish.rb
--- old/yast2-firewall-4.2.2/src/lib/y2firewall/clients/installation_finish.rb
2019-08-27 19:39:09.000000000 +0200
+++ new/yast2-firewall-4.2.3/src/lib/y2firewall/clients/installation_finish.rb
2020-02-27 14:02:20.000000000 +0100
@@ -24,6 +24,8 @@
require "y2firewall/proposal_settings"
require "installation/finish_client"
+Yast.import "Mode"
+
module Y2Firewall
module Clients
# This is a step of base installation finish and it is responsible of write
@@ -49,7 +51,7 @@
end
def modes
- [:installation]
+ [:installation, :autoinst]
end
def write
@@ -63,14 +65,32 @@
# Modifies the configuration of the firewall according to the current
# settings
def configure_firewall
+ configure_firewall_service
+ configure_ssh
+ configure_vnc
+ end
+
+ # Convenience method to enable / disable the firewalld service depending
+ # on the proposal settings
+ def configure_firewall_service
+ return unless Yast::Mode.installation
+
@settings.enable_firewall ? @firewalld.enable! : @firewalld.disable!
+ end
+ # Convenience method to open the ssh ports in firewalld depending on the
+ # proposal settings
+ def configure_ssh
if @settings.open_ssh
@firewalld.api.add_service(@settings.default_zone, "ssh")
else
@firewalld.api.remove_service(@settings.default_zone, "ssh")
end
+ end
+ # Convenience method to open the vnc ports in firewalld depending on the
+ # proposal settings
+ def configure_vnc
if @settings.open_vnc
if @firewalld.api.service_supported?("tigervnc")
@firewalld.api.add_service(@settings.default_zone, "tigervnc")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-firewall-4.2.2/test/lib/y2firewall/clients/auto_test.rb
new/yast2-firewall-4.2.3/test/lib/y2firewall/clients/auto_test.rb
--- old/yast2-firewall-4.2.2/test/lib/y2firewall/clients/auto_test.rb
2019-08-27 19:39:09.000000000 +0200
+++ new/yast2-firewall-4.2.3/test/lib/y2firewall/clients/auto_test.rb
2020-02-27 14:02:20.000000000 +0100
@@ -399,4 +399,10 @@
end
end
end
+
+ describe "#packages" do
+ it "returns a hash with firewalld as a package to be installed" do
+ expect(subject.packages).to eq("install" => ["firewalld"], "remove" =>
[])
+ end
+ end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-firewall-4.2.2/test/lib/y2firewall/clients/installation_finish_test.rb
new/yast2-firewall-4.2.3/test/lib/y2firewall/clients/installation_finish_test.rb
---
old/yast2-firewall-4.2.2/test/lib/y2firewall/clients/installation_finish_test.rb
2019-08-27 19:39:09.000000000 +0200
+++
new/yast2-firewall-4.2.3/test/lib/y2firewall/clients/installation_finish_test.rb
2020-02-27 14:02:20.000000000 +0100
@@ -21,7 +21,7 @@
describe "#modes" do
it "runs on installation and autoinstallation" do
- expect(subject.modes).to eq([:installation])
+ expect(subject.modes).to eq([:installation, :autoinst])
end
end
@@ -30,13 +30,13 @@
let(:installed) { true }
before do
- allow(proposal_settings).to
receive("enable_sshd").and_return(enable_sshd)
- allow(firewalld).to receive("installed?").and_return(installed)
- allow(proposal_settings).to receive("open_ssh").and_return(false)
+ allow(proposal_settings).to receive(:enable_sshd).and_return(enable_sshd)
+ allow(firewalld).to receive(:installed?).and_return(installed)
+ allow(proposal_settings).to receive(:open_ssh).and_return(false)
end
it "enables the sshd service if enabled in the proposal" do
- allow(proposal_settings).to receive("enable_sshd").and_return(true)
+ allow(proposal_settings).to receive(:enable_sshd).and_return(true)
expect(Yast::Service).to receive(:Enable).with("sshd")
subject.write
@@ -69,30 +69,34 @@
let(:api) do
instance_double(Y2Firewall::Firewalld::Api, remove_service: true,
add_service: true)
end
+ let(:installation) { true }
before do
- allow(proposal_settings).to
receive("enable_firewall").and_return(enable_firewall)
- allow(firewalld).to receive("api").and_return(api)
- allow(firewalld).to receive("enable!")
- allow(firewalld).to receive("disable!")
- allow(proposal_settings).to receive("open_ssh").and_return(false)
+ allow(proposal_settings).to
receive(:enable_firewall).and_return(enable_firewall)
+ allow(firewalld).to receive(:api).and_return(api)
+ allow(firewalld).to receive(:enable!)
+ allow(firewalld).to receive(:disable!)
+ allow(Yast::Mode).to receive(:installation).and_return(installation)
+ allow(proposal_settings).to receive(:open_ssh).and_return(false)
end
- it "enables the firewalld service if enabled in the proposal" do
- allow(proposal_settings).to receive("enable_firewall").and_return(true)
- expect(firewalld).to receive("enable!")
+ context "during an installation" do
+ it "enables the firewalld service if enabled in the proposal" do
+ allow(proposal_settings).to receive(:enable_firewall).and_return(true)
+ expect(firewalld).to receive(:enable!)
- subject.send(:configure_firewall)
- end
+ subject.send(:configure_firewall)
+ end
- it "disables the firewalld service if disabled in the proposal" do
- expect(firewalld).to receive("disable!")
+ it "disables the firewalld service if disabled in the proposal" do
+ expect(firewalld).to receive(:disable!)
- subject.send(:configure_firewall)
+ subject.send(:configure_firewall)
+ end
end
it "adds the ssh service to the default zone if opened in the proposal" do
- expect(proposal_settings).to receive("open_ssh").and_return(true)
+ expect(proposal_settings).to receive(:open_ssh).and_return(true)
expect(api).to
receive(:add_service).with(proposal_settings.default_zone, "ssh")
subject.send(:configure_firewall)
@@ -108,7 +112,7 @@
let(:service_available) { true }
before do
- allow(proposal_settings).to receive("open_vnc").and_return(true)
+ allow(proposal_settings).to receive(:open_vnc).and_return(true)
allow(api).to
receive(:service_supported?).with("tigervnc").and_return(service_available)
end