Hello community, here is the log from the commit of package yast2-firewall for openSUSE:Factory checked in at 2020-08-14 13:10:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-firewall (Old) and /work/SRC/openSUSE:Factory/.yast2-firewall.new.3399 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-firewall" Fri Aug 14 13:10:20 2020 rev:84 rq:826199 version:4.3.4 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-firewall/yast2-firewall.changes 2020-07-27 17:36:43.146787394 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-firewall.new.3399/yast2-firewall.changes 2020-08-14 13:10:23.101234333 +0200 @@ -1,0 +2,14 @@ +Thu Aug 13 07:52:47 UTC 2020 - Michal Filka <mfi...@suse.com> + +- AutoYaST: moved the configuration into first stage (bsc#1173624) +- 4.3.4 + +------------------------------------------------------------------- +Tue Aug 11 12:05:15 CEST 2020 - sch...@suse.de + +- AutoYaST: Added supplements: autoyast(firewall) into the spec file + in order to install this packages if the section has been defined + in the AY configuration file (bsc#1146494). +- 4.3.3 + +------------------------------------------------------------------- Old: ---- yast2-firewall-4.3.2.tar.bz2 New: ---- yast2-firewall-4.3.4.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-firewall.spec ++++++ --- /var/tmp/diff_new_pack.7KYmE5/_old 2020-08-14 13:10:23.589234519 +0200 +++ /var/tmp/diff_new_pack.7KYmE5/_new 2020-08-14 13:10:23.593234520 +0200 @@ -17,7 +17,7 @@ Name: yast2-firewall -Version: 4.3.2 +Version: 4.3.4 Release: 0 Summary: YaST2 - Firewall Configuration License: GPL-2.0-only @@ -50,6 +50,8 @@ Obsoletes: yast2-config-firewall Obsoletes: yast2-trans-firewall +Supplements: autoyast(firewall) + BuildArch: noarch %description ++++++ yast2-firewall-4.3.2.tar.bz2 -> yast2-firewall-4.3.4.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-firewall-4.3.2/package/yast2-firewall.changes new/yast2-firewall-4.3.4/package/yast2-firewall.changes --- old/yast2-firewall-4.3.2/package/yast2-firewall.changes 2020-07-24 13:36:38.000000000 +0200 +++ new/yast2-firewall-4.3.4/package/yast2-firewall.changes 2020-08-13 09:59:42.000000000 +0200 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Thu Aug 13 07:52:47 UTC 2020 - Michal Filka <mfi...@suse.com> + +- AutoYaST: moved the configuration into first stage (bsc#1173624) +- 4.3.4 + +------------------------------------------------------------------- +Tue Aug 11 12:05:15 CEST 2020 - sch...@suse.de + +- AutoYaST: Added supplements: autoyast(firewall) into the spec file + in order to install this packages if the section has been defined + in the AY configuration file (bsc#1146494). +- 4.3.3 + +------------------------------------------------------------------- Thu Jul 23 15:55:52 UTC 2020 - Knut Anderssen <kanders...@suse.com> - AutoYaST: Only export modified zones when it is asked to export a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-firewall-4.3.2/package/yast2-firewall.spec new/yast2-firewall-4.3.4/package/yast2-firewall.spec --- old/yast2-firewall-4.3.2/package/yast2-firewall.spec 2020-07-24 13:36:38.000000000 +0200 +++ new/yast2-firewall-4.3.4/package/yast2-firewall.spec 2020-08-13 09:59:42.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-firewall -Version: 4.3.2 +Version: 4.3.4 Release: 0 Summary: YaST2 - Firewall Configuration Group: System/YaST @@ -48,6 +48,8 @@ Obsoletes: yast2-config-firewall Obsoletes: yast2-trans-firewall +Supplements: autoyast(firewall) + BuildArch: noarch %description diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-firewall-4.3.2/src/lib/y2firewall/clients/installation_finish.rb new/yast2-firewall-4.3.4/src/lib/y2firewall/clients/installation_finish.rb --- old/yast2-firewall-4.3.2/src/lib/y2firewall/clients/installation_finish.rb 2020-07-24 13:36:38.000000000 +0200 +++ new/yast2-firewall-4.3.4/src/lib/y2firewall/clients/installation_finish.rb 2020-08-13 09:59:42.000000000 +0200 @@ -22,6 +22,7 @@ require "yast" require "y2firewall/firewalld" require "y2firewall/proposal_settings" +require "y2firewall/clients/auto" require "installation/finish_client" Yast.import "Mode" @@ -33,6 +34,7 @@ # modes. class InstallationFinish < ::Installation::FinishClient include Yast::I18n + include Yast::Logger # Y2Firewall::ProposalSettings instance attr_accessor :settings @@ -55,6 +57,14 @@ end def write + # If the profile is missing then firewall section is not present at all. + # The firewall will be configured according to product proposals then. + if Yast::Mode.auto && Y2Firewall::Clients::Auto.profile + log.info("Firewall: running configuration according to the AY profile") + + return Y2Firewall::Clients::Auto.new.write + end + Service.Enable("sshd") if @settings.enable_sshd configure_firewall if @firewalld.installed? true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-firewall-4.3.2/test/lib/y2firewall/clients/installation_finish_test.rb new/yast2-firewall-4.3.4/test/lib/y2firewall/clients/installation_finish_test.rb --- old/yast2-firewall-4.3.2/test/lib/y2firewall/clients/installation_finish_test.rb 2020-07-24 13:36:38.000000000 +0200 +++ new/yast2-firewall-4.3.4/test/lib/y2firewall/clients/installation_finish_test.rb 2020-08-13 09:59:42.000000000 +0200 @@ -62,6 +62,33 @@ expect(subject.write).to eq true end end + + context "when running in AutoYaST" do + before(:each) do + allow(Y2Firewall::Clients::Auto).to receive(:profile).and_return(profile) + allow(Yast::Mode).to receive(:auto).and_return(true) + end + + context "when firewall section is present" do + let(:profile) { { "enable_firewall" => true } } + + it "calls AY client write" do + expect_any_instance_of(Y2Firewall::Clients::Auto).to receive(:write) + + subject.write + end + end + + context "when firewall section is not present" do + let(:profile) { nil } + + it "configures firewall according to product settings" do + expect(subject).to receive(:configure_firewall) + + subject.write + end + end + end end describe "#configure_firewall" do