commit yast2-network for openSUSE:Factory
Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2014-04-05 14:43:15 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-network" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2014-03-21 12:14:36.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 2014-04-05 14:43:21.000000000 +0200 @@ -1,0 +2,62 @@ +Fri Apr 4 12:41:36 UTC 2014 - jreidinger@suse.com + +- avoid client redefinition warning (bnc#872089) +- 3.1.45 + +------------------------------------------------------------------- +Wed Apr 2 13:22:18 UTC 2014 - mfilka@suse.com + +- bnc#869199 + - fix resolv.conf not getting updated (via NETCONFIG_DNS_POLICY + being emptied) +- 3.1.44 + +------------------------------------------------------------------- +Wed Apr 2 11:18:53 UTC 2014 - jreidinger@suse.com + +- fix typos in latest change ( found by openqa ) +- 3.1.43 + +------------------------------------------------------------------- +Wed Apr 2 09:22:07 UTC 2014 - jreidinger@suse.com + +- split enabling sshd and opening firewall port in installation + (bnc#865056) +- 3.1.42 + +------------------------------------------------------------------- +Mon Mar 31 08:53:01 CEST 2014 - locilka@suse.com + +- Fixed calling logging function in inst_lan (bnc#871091) +- 3.1.41 + +------------------------------------------------------------------- +Fri Mar 28 12:12:58 UTC 2014 - mfilka@suse.com + +- bnc#870622 + - opening network configuration dialogue on user's request works +- 3.1.40 + +------------------------------------------------------------------- +Thu Mar 27 08:11:59 UTC 2014 - mfilka@suse.com + +- bnc#869776 + - fixed internal error raised when building interface overview +- 3.1.39 + +------------------------------------------------------------------- +Mon Mar 24 23:18:43 UTC 2014 - mfilka@suse.com + +- bnc#869353 + - inst_lan can walk back in installer +- 3.1.38 + +------------------------------------------------------------------- +Fri Mar 21 15:24:19 UTC 2014 - mfilka@suse.com + +- bnc#869224 + - enlarged nic name input field in "Edit Nic Name" dialogue in + ncurses mode +- 3.1.37 + +------------------------------------------------------------------- Old: ---- yast2-network-3.1.36.tar.bz2 New: ---- yast2-network-3.1.45.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.ZdGNs7/_old 2014-04-05 14:43:21.000000000 +0200 +++ /var/tmp/diff_new_pack.ZdGNs7/_new 2014-04-05 14:43:21.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 3.1.36 +Version: 3.1.45 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-network-3.1.36.tar.bz2 -> yast2-network-3.1.45.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/package/yast2-network.changes new/yast2-network-3.1.45/package/yast2-network.changes --- old/yast2-network-3.1.36/package/yast2-network.changes 2014-03-19 18:32:43.000000000 +0100 +++ new/yast2-network-3.1.45/package/yast2-network.changes 2014-04-04 15:12:50.000000000 +0200 @@ -1,4 +1,66 @@ ------------------------------------------------------------------- +Fri Apr 4 12:41:36 UTC 2014 - jreidinger@suse.com + +- avoid client redefinition warning (bnc#872089) +- 3.1.45 + +------------------------------------------------------------------- +Wed Apr 2 13:22:18 UTC 2014 - mfilka@suse.com + +- bnc#869199 + - fix resolv.conf not getting updated (via NETCONFIG_DNS_POLICY + being emptied) +- 3.1.44 + +------------------------------------------------------------------- +Wed Apr 2 11:18:53 UTC 2014 - jreidinger@suse.com + +- fix typos in latest change ( found by openqa ) +- 3.1.43 + +------------------------------------------------------------------- +Wed Apr 2 09:22:07 UTC 2014 - jreidinger@suse.com + +- split enabling sshd and opening firewall port in installation + (bnc#865056) +- 3.1.42 + +------------------------------------------------------------------- +Mon Mar 31 08:53:01 CEST 2014 - locilka@suse.com + +- Fixed calling logging function in inst_lan (bnc#871091) +- 3.1.41 + +------------------------------------------------------------------- +Fri Mar 28 12:12:58 UTC 2014 - mfilka@suse.com + +- bnc#870622 + - opening network configuration dialogue on user's request works +- 3.1.40 + +------------------------------------------------------------------- +Thu Mar 27 08:11:59 UTC 2014 - mfilka@suse.com + +- bnc#869776 + - fixed internal error raised when building interface overview +- 3.1.39 + +------------------------------------------------------------------- +Mon Mar 24 23:18:43 UTC 2014 - mfilka@suse.com + +- bnc#869353 + - inst_lan can walk back in installer +- 3.1.38 + +------------------------------------------------------------------- +Fri Mar 21 15:24:19 UTC 2014 - mfilka@suse.com + +- bnc#869224 + - enlarged nic name input field in "Edit Nic Name" dialogue in + ncurses mode +- 3.1.37 + +------------------------------------------------------------------- Wed Mar 19 09:53:20 UTC 2014 - mfilka@suse.com - bnc#868830 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/package/yast2-network.spec new/yast2-network-3.1.45/package/yast2-network.spec --- old/yast2-network-3.1.36/package/yast2-network.spec 2014-03-19 18:32:43.000000000 +0100 +++ new/yast2-network-3.1.45/package/yast2-network.spec 2014-04-04 15:12:50.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 3.1.36 +Version: 3.1.45 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/src/clients/firewall_stage1_finish.rb new/yast2-network-3.1.45/src/clients/firewall_stage1_finish.rb --- old/yast2-network-3.1.36/src/clients/firewall_stage1_finish.rb 2014-03-19 18:32:43.000000000 +0100 +++ new/yast2-network-3.1.45/src/clients/firewall_stage1_finish.rb 2014-04-04 15:12:50.000000000 +0200 @@ -57,6 +57,7 @@ #we have those from the proposal @fw_enabled = SuSEFirewall4Network.Enabled1stStage @ssh_enabled = SuSEFirewall4Network.EnabledSsh1stStage + @sshd_enabled = SuSEFirewall4Network.EnabledSshd @vnc_enabled = SuSEFirewall4Network.EnabledVnc1stStage if @func == "Info" @@ -94,7 +95,10 @@ SuSEFirewall.GetKnownFirewallZones, true ) - #enable SSH service if the port is to be opened (bnc#537980) + end + + if @sshd_enabled + #enable SSH service independent of port open (bnc#865056) Service.Enable("sshd") end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/src/clients/firewall_stage1_proposal.rb new/yast2-network-3.1.45/src/clients/firewall_stage1_proposal.rb --- old/yast2-network-3.1.36/src/clients/firewall_stage1_proposal.rb 2014-03-19 18:32:43.000000000 +0100 +++ new/yast2-network-3.1.45/src/clients/firewall_stage1_proposal.rb 2014-04-04 15:12:50.000000000 +0200 @@ -28,6 +28,19 @@ # module Yast class FirewallStage1ProposalClient < Client + PROPOSAL_ID = "fw_1ststage" + + LINK_ENABLE_FIREWALL = "firewall--enable_firewall_in_proposal" + LINK_DISABLE_FIREWALL = "firewall--disable_firewall_in_proposal" + LINK_OPEN_SSH_PORT = "firewall--enable_ssh_port_in_proposal" + LINK_BLOCK_SSH_PORT = "firewall--disable_ssh_port_in_proposal" + LINK_ENABLE_SSHD = "firewall--enable_sshd_in_proposal" + LINK_DISABLE_SSHD = "firewall--disable_sshd_in_proposal" + LINK_ENABLE_VNC = "firewall--enable_vnc_in_proposal" + LINK_DISABLE_VNC = "firewall--disable_vnc_in_proposal" + LINK_FIREWALL_DIALOG = "firewall_stage1" + + def main Yast.import "UI" textdomain "network" @@ -41,39 +54,34 @@ Yast.import "SuSEFirewallProposal" Yast.import "Wizard" - @PROPOSAL_ID = "fw_1ststage" - - @LINK_ENABLE_FIREWALL = "firewall--enable_firewall_in_proposal" - @LINK_DISABLE_FIREWALL = "firewall--disable_firewall_in_proposal" - @LINK_ENABLE_SSH = "firewall--enable_ssh_in_proposal" - @LINK_DISABLE_SSH = "firewall--disable_ssh_in_proposal" - @LINK_ENABLE_VNC = "firewall--enable_vnc_in_proposal" - @LINK_DISABLE_VNC = "firewall--disable_vnc_in_proposal" - @LINK_FIREWALL_DIALOG = "firewall_stage1" - # run this only once if !SuSEFirewallProposal.GetProposalInitialized # variables from control file Builtins.y2milestone( - "Default firewall values: enable_firewall=%1, enable_ssh=%2", + "Default firewall values: enable_firewall=%1, enable_ssh=%2 enable_sshd=%3", ProductFeatures.GetBooleanFeature("globals", "enable_firewall"), - ProductFeatures.GetBooleanFeature("globals", "firewall_enable_ssh") + ProductFeatures.GetBooleanFeature("globals", "firewall_enable_ssh"), + ProductFeatures.GetBooleanFeature("globals", "enable_sshd") ) SuSEFirewall4Network.SetEnabled1stStage( ProductFeatures.GetBooleanFeature("globals", "enable_firewall") ) - #we're installing over SSH, propose opening SSH port (bnc#535206) + # we're installing over SSH, propose opening SSH port (bnc#535206) if Linuxrc.usessh SuSEFirewall4Network.SetSshEnabled1stStage(true) + SuSEFirewall4Network.SetSshdEnabled(true) else SuSEFirewall4Network.SetSshEnabled1stStage( ProductFeatures.GetBooleanFeature("globals", "firewall_enable_ssh") ) + SuSEFirewall4Network.SetSshdEnabled( + ProductFeatures.GetBooleanFeature("globals", "enable_sshd") + ) end - #we're installing over VNC, propose opening VNC port (bnc#734264) + # we're installing over VNC, propose opening VNC port (bnc#734264) SuSEFirewall4Network.SetVncEnabled1stStage(true) if Linuxrc.vnc SuSEFirewallProposal.SetProposalInitialized(true) @@ -88,82 +96,64 @@ if @func == "MakeProposal" # Summary is visible only if installing over VNC # and if firewall is enabled - otherwise port could not be blocked - @vnc_proposal = Linuxrc.vnc && SuSEFirewall4Network.Enabled1stStage ? - Ops.add( - Ops.add( - "<li>", - SuSEFirewall4Network.EnabledVnc1stStage ? - Builtins.sformat( - _("VNC ports will be open (close</a>)"), - @LINK_DISABLE_VNC - ) : - Builtins.sformat( - _("VNC ports will be blocked (open</a>)"), - @LINK_ENABLE_VNC - ) - ), - "</li>\n" - ) : - "" + vnc_proposal_element = "" + if Linuxrc.vnc && SuSEFirewall4Network.Enabled1stStage + vnc_proposal = SuSEFirewall4Network.EnabledVnc1stStage ? + _("VNC ports will be open (close</a>)") % + LINK_DISABLE_VNC + : _("VNC ports will be blocked (open</a>)") % + LINK_ENABLE_VNC + vnc_proposal_element = "<li>#{vnc_proposal}</li>" + end + + firewall_proposal = SuSEFirewall4Network.Enabled1stStage ? + _( + "Firewall will be enabled (disable</a>)" + ) % LINK_DISABLE_FIREWALL + : + _( + "Firewall will be disabled (enable</a>)" + ) % LINK_ENABLE_FIREWALL + + ssh_proposal = SuSEFirewall4Network.EnabledSsh1stStage ? + _( + "SSH port will be open (block</a>)" + ) % LINK_BLOCK_SSH_PORT + : + _( + "SSH port will be blocked (open</a>)" + ) % LINK_OPEN_SSH_PORT + + sshd_proposal = SuSEFirewall4Network.EnabledSshd ? + _( + "SSH service will be enabled (disable</a>)" + ) % LINK_DISABLE_SSHD + : + _( + "SSH service will be disabled (enable</a>)" + ) % LINK_ENABLE_SSHD - @output = Ops.add( - Ops.add( - Ops.add( - Ops.add( - Ops.add( - Ops.add( - Ops.add( - "<ul>\n" + "<li>", - SuSEFirewall4Network.Enabled1stStage ? - Builtins.sformat( - _( - "Firewall will be enabled (disable</a>)" - ), - @LINK_DISABLE_FIREWALL - ) : - Builtins.sformat( - _( - "Firewall will be disabled (enable</a>)" - ), - @LINK_ENABLE_FIREWALL - ) - ), - "</li>\n" - ), - # Summary is visible even if firewall is disabled - it also installs and enables the SSHD service - "<li>" - ), - SuSEFirewall4Network.EnabledSsh1stStage ? - Builtins.sformat( - _( - "SSH service will be enabled, SSH port will be open (disable and close</a>)" - ), - @LINK_DISABLE_SSH - ) : - Builtins.sformat( - _( - "SSH service will be disabled, SSH port will be blocked (enable and open</a>)" - ), - @LINK_ENABLE_SSH - ) - ), - "</li>\n" - ), - @vnc_proposal - ), - "</ul>\n" - ) + + + + @output = "<ul>\n<li>#{firewall_proposal}</li>\n" + + "<li>#{ssh_proposal}</li>\n" + + "<li>#{sshd_proposal}</li>\n" + + vnc_proposal_element + + "</ul>\n" @ret = { "preformatted_proposal" => @output, "warning_level" => :warning, "links" => [ - @LINK_ENABLE_FIREWALL, - @LINK_DISABLE_FIREWALL, - @LINK_ENABLE_SSH, - @LINK_DISABLE_SSH, - @LINK_ENABLE_VNC, - @LINK_DISABLE_VNC + LINK_ENABLE_FIREWALL, + LINK_DISABLE_FIREWALL, + LINK_OPEN_SSH_PORT, + LINK_BLOCK_SSH_PORT, + LINK_ENABLE_SSHD, + LINK_DISABLE_SSHD, + LINK_ENABLE_VNC, + LINK_DISABLE_VNC ] } elsif @func == "AskUser" @@ -171,42 +161,51 @@ @result = :next Builtins.y2milestone("User clicked %1", @chosen_link) - if @chosen_link == @LINK_ENABLE_FIREWALL + case @chosen_link + when LINK_ENABLE_FIREWALL Builtins.y2milestone("Enabling FW") SuSEFirewall4Network.SetEnabled1stStage(true) PackagesProposal.AddResolvables( - @PROPOSAL_ID, + PROPOSAL_ID, :package, ["SuSEfirewall2"] ) - elsif @chosen_link == @LINK_DISABLE_FIREWALL + when LINK_DISABLE_FIREWALL Builtins.y2milestone("Disabling FW") SuSEFirewall4Network.SetEnabled1stStage(false) PackagesProposal.RemoveResolvables( - @PROPOSAL_ID, + PROPOSAL_ID, :package, ["SuSEfirewall2"] ) - elsif @chosen_link == @LINK_ENABLE_SSH - Builtins.y2milestone("Enabling SSH") - PackagesProposal.AddResolvables(@PROPOSAL_ID, :package, ["openssh"]) + when LINK_OPEN_SSH_PORT + Builtins.y2milestone("Opening SSH port") SuSEFirewall4Network.SetSshEnabled1stStage(true) - elsif @chosen_link == @LINK_DISABLE_SSH - Builtins.y2milestone("Disabling SSH") + when LINK_BLOCK_SSH_PORT + Builtins.y2milestone("Blocking SSH port") SuSEFirewall4Network.SetSshEnabled1stStage(false) + when LINK_ENABLE_SSHD + Builtins.y2milestone("Enabling SSHD") + PackagesProposal.AddResolvables(PROPOSAL_ID, :package, ["openssh"]) + SuSEFirewall4Network.SetSshdEnabled(true) + when LINK_DISABLE_SSHD + Builtins.y2milestone("Disabling SSHD") + SuSEFirewall4Network.SetSshdEnabled(false) PackagesProposal.RemoveResolvables( - @PROPOSAL_ID, + PROPOSAL_ID, :package, ["openssh"] ) - elsif @chosen_link == @LINK_ENABLE_VNC + when LINK_ENABLE_VNC Builtins.y2milestone("Enabling VNC") SuSEFirewall4Network.SetVncEnabled1stStage(true) - elsif @chosen_link == @LINK_DISABLE_VNC + when LINK_DISABLE_VNC Builtins.y2milestone("Disabling VNC") SuSEFirewall4Network.SetVncEnabled1stStage(false) - elsif @chosen_link == @LINK_FIREWALL_DIALOG + when LINK_FIREWALL_DIALOG @result = FirewallDialogSimple() + else + raise "INTERNAL ERROR: unknown action '#{@chosen_link}' for proposal client" end SuSEFirewallProposal.SetChangedByUser(true) @@ -219,7 +218,7 @@ "rich_text_title" => _("Firewall and SSH"), # Menu entry label "menu_title" => _("&Firewall and SSH"), - "id" => @LINK_FIREWALL_DIALOG + "id" => LINK_FIREWALL_DIALOG } elsif @func == "Write" @ret = { "success" => true } @@ -262,10 +261,19 @@ CheckBox( Id("open_ssh_port"), # TRANSLATORS: check-box label - _("Open SSH Port and Enable SSH Service"), + _("Open SSH Port"), SuSEFirewall4Network.EnabledSsh1stStage ) ), + Left( + CheckBox( + Id("enable_sshd"), + # TRANSLATORS: check-box label + _("Enable SSH Service"), + SuSEFirewall4Network.EnabledSshd + ) + ), + Linuxrc.vnc ? vnc_support : Empty() ) ) @@ -284,7 +292,7 @@ ) + _( "<p>With enabled firewall, you can decide whether to open firewall port for SSH\n" + - "service and allow remote SSH logins. This will also enable SSH service (i.e. it\n" + + "service and allow remote SSH logins. Independently you can also enable SSH service (i.e. it\n" + "will be started on computer boot).</p>" ) + (Linuxrc.vnc ? @@ -346,6 +354,10 @@ SuSEFirewall4Network.SetSshEnabled1stStage(open_ssh_port) SuSEFirewall4Network.SetVncEnabled1stStage(open_vnc_port) end + + SuSEFirewall4Network.SetSshdEnabled( + UI::QueryWidget(Id("enable_sshd"), :Value) + ) end # anything but enabling the firewall closes this dialog @@ -356,7 +368,7 @@ Wizard.CloseDialog Convert.to_symbol(dialog_ret) end - end + end unless defined? FirewallStage1ProposalClient end Yast::FirewallStage1ProposalClient.new.main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/src/clients/inst_lan.rb new/yast2-network-3.1.45/src/clients/inst_lan.rb --- old/yast2-network-3.1.36/src/clients/inst_lan.rb 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/src/clients/inst_lan.rb 2014-04-04 15:12:50.000000000 +0200 @@ -38,6 +38,7 @@ Yast.import "Label" Yast.import "Lan" Yast.import "RichText" + Yast.import "GetInstArgs" textdomain "network" @@ -47,11 +48,22 @@ Yast.include self, "network/lan/cmdline.rb" Yast.include self, "network/lan/wizards.rb" - conf_net = LanItems.Items.keys.any? { |i| LanItems.IsItemConfigured(i) } + manual_conf_request = GetInstArgs.argmap["skip_detection"] || false + log.info("Lan module forces manual configuration: #{manual_conf_request}") - log.info("Configured network found: #{conf_net}") - - ret = !conf_net ? LanSequence() : :next + # keep network configuration state in @@conf_net to gurantee same + # behavior when walking :back in installation workflow + if !defined?(@@network_configured) + @@network_configured = LanItems.Items.keys.any? { |i| LanItems.IsItemConfigured(i) } + end + + log.info("Configured network found: #{@@network_configured}") + + if @@network_configured && !manual_conf_request + ret = GetInstArgs.going_back ? :back : :next + else + ret = LanSequence() + end log.info("Lan module finished, ret = #{ret}") log.info("----------------------------------------") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/src/include/network/services/dns.rb new/yast2-network-3.1.45/src/include/network/services/dns.rb --- old/yast2-network-3.1.36/src/include/network/services/dns.rb 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/src/include/network/services/dns.rb 2014-04-04 15:12:50.000000000 +0200 @@ -369,14 +369,13 @@ # @param [String] key for known keys see hn_settings # @param [Object] value value for particular hn_settings key def SetHnItem(key, value) - value = deep_copy(value) Builtins.y2milestone( "hn_settings[ \"%1\"] changes '%2' -> '%3'", key, - Ops.get_string(@hn_settings, key, ""), + @hn_settings[key].to_s, value ) - Ops.set(@hn_settings, key, value) + @hn_settings[key] = value nil end @@ -666,14 +665,9 @@ # @param [String] key ignored # @param [Hash] event user generated event def storeHostnameGlobal(key, event) - event = deep_copy(event) - Builtins.foreach( - Convert.convert( - Map.Keys(@hn_settings), - :from => "list", - :to => "list <string>" - ) - ) { |key2| StoreHnWidget(key2, event) } + @hn_settings.keys.each do |key2| + StoreHnWidget(key2, event) if UI.QueryWidget(Id(key2), :Enabled) + end StoreHnSettings() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/src/lib/network/confirm_virt_proposal.rb new/yast2-network-3.1.45/src/lib/network/confirm_virt_proposal.rb --- old/yast2-network-3.1.36/src/lib/network/confirm_virt_proposal.rb 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/src/lib/network/confirm_virt_proposal.rb 2014-04-04 15:12:50.000000000 +0200 @@ -4,91 +4,35 @@ module Yast - Yast.import "UI" - Yast.import "LanItems" - Yast.import "Popup" - # The class represents a simple dialog which asks user for confirmation of # network.service restart during installation. class ConfirmVirtProposal + include Singleton include UIShortcuts include I18n - def self.run - open - - # for autoinstallation popup has timeout 10 seconds (#192181) - # timeout for every case (bnc#429562) - ret = UI.TimeoutUserInput(10 * 1000) - - close - - ret - end + Yast.import "Popup" + Yast.import "Label" - private - - def self.open - UI.OpenDialog( - Opt(:decorated), - HBox( - HSpacing(1), - HCenter( - HSquash( - VBox( - HCenter( - HSquash( - VBox( - # This is the heading of the popup box - Left(Heading(_("Confirm Network Restart"))), - VSpacing(0.5), - # This is in information message. Next come the - # hardware class name (network cards). - HVCenter( - Label( - _( - "Because of the bridged network, YaST2 needs to restart the network to apply the settings." - ) - ) - ), - VSpacing(0.5) - ) - ) - ), - ButtonBox( - HWeight( - 1, - PushButton( - Id(:ok), - Opt(:default, :okButton), - Label.OKButton - ) - ), - # PushButton label - HWeight( - 1, - PushButton( - Id(:cancel), - Opt(:cancelButton), - Label.CancelButton - ) - ) - ), - VSpacing(0.2) - ) - ) - ), - HSpacing(1) - ) + # Shows a confirmation timed dialogue + # + # Returns :ok when user agreed, :cancel otherwise + def run + textdomain "network" + + ret = Popup.TimedAnyQuestion( + _("Confirm Network Restart"), + _( + "Because of the bridged network, YaST2 needs to restart the network to apply the settings." + ), + Label.OKButton, + Label.CancelButton, + :focus_yes, + 10 ) - UI.SetFocus(Id(:ok)) - end - - def self.close - UI.CloseDialog + ret ? :ok : :cancel end - end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/src/lib/network/edit_nic_name.rb new/yast2-network-3.1.45/src/lib/network/edit_nic_name.rb --- old/yast2-network-3.1.36/src/lib/network/edit_nic_name.rb 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/src/lib/network/edit_nic_name.rb 2014-04-04 15:12:50.000000000 +0200 @@ -95,7 +95,7 @@ Left( HBox( Label(_("Device name:")), - InputField(Id(:dev_name), "", @old_name) + InputField(Id(:dev_name), Opt(:hstretch), "", @old_name) ) ), VSpacing(0.5), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/src/modules/Lan.rb new/yast2-network-3.1.45/src/modules/Lan.rb --- old/yast2-network-3.1.36/src/modules/Lan.rb 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/src/modules/Lan.rb 2014-04-04 15:12:50.000000000 +0200 @@ -641,7 +641,7 @@ if Stage.cont && @virt_net_proposal == true && (Linuxrc.usessh || Linuxrc.vnc || Linuxrc.display_ip) - if ConfirmVirtProposal.run == :ok + if ConfirmVirtProposal.instance.run == :ok Builtins.y2milestone( "Restarting network because of bridged proposal" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/src/modules/LanItems.rb new/yast2-network-3.1.45/src/modules/LanItems.rb --- old/yast2-network-3.1.36/src/modules/LanItems.rb 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/src/modules/LanItems.rb 2014-04-04 15:12:50.000000000 +0200 @@ -857,25 +857,13 @@ # get list of all configurations for "netcard" macro in NetworkInterfaces module def getNetworkInterfaces - confs = [] configurations = NetworkInterfaces.FilterDevices("netcard") + devtypes = NetworkInterfaces.CardRegex["netcard"].to_s.split("|") - Builtins.foreach( - Builtins.splitstring( - Ops.get(NetworkInterfaces.CardRegex, "netcard", ""), - "|" - ) - ) do |devtype| - Builtins.foreach( - Convert.convert( - Map.Keys(Ops.get_map(configurations, devtype, {})), - :from => "list", - :to => "list <string>" - ) - ) { |file| confs = Builtins.add(confs, file) } + devtypes.inject([]) do |acc, type| + conf = configurations[type].to_h + acc.concat(conf.keys) end - - deep_copy(confs) end def FindAndSelect(device) @@ -1285,7 +1273,7 @@ IsEmpty(NetworkInterfaces.Current["WIRELESS_KEY_0"]) # avoid colons - ifcfg_name.tr!(":", "/") + ifcfg_name = ifcfg_name.tr(":", "/") href = "lan--wifi-encryption-" + ifcfg_name # interface summary: WiFi without encryption warning = HTML.Colorize(_("Warning: no encryption is used."), "red") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/src/modules/SuSEFirewall4Network.rb new/yast2-network-3.1.45/src/modules/SuSEFirewall4Network.rb --- old/yast2-network-3.1.36/src/modules/SuSEFirewall4Network.rb 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/src/modules/SuSEFirewall4Network.rb 2014-04-04 15:12:50.000000000 +0200 @@ -44,6 +44,7 @@ @firewall_enabled_1st_stage = false @ssh_enabled_1st_stage = false + @sshd_enabled = false @vnc_enabled_1st_stage = false end @@ -249,6 +250,19 @@ @ssh_enabled_1st_stage end + # Sets whether start sshd + # @param boolean new state + def SetSshdEnabled(enabled) + @sshd_enabled = enabled + + nil + end + + # Returns whether sshd will be enabled + def EnabledSshd + @sshd_enabled + end + # Sets whether VNC ports should be opened in firewall # @param boolean new state def SetVncEnabled1stStage(enabled) @@ -276,6 +290,8 @@ publish :function => :Enabled1stStage, :type => "boolean ()" publish :function => :SetSshEnabled1stStage, :type => "void (boolean)" publish :function => :EnabledSsh1stStage, :type => "boolean ()" + publish :function => :SetSshdEnabled, :type => "void (boolean)" + publish :function => :EnabledSshd, :type => "boolean ()" publish :function => :SetVncEnabled1stStage, :type => "void (boolean)" publish :function => :EnabledVnc1stStage, :type => "boolean ()" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/test/lan_items_helpers_test.rb new/yast2-network-3.1.45/test/lan_items_helpers_test.rb --- old/yast2-network-3.1.36/test/lan_items_helpers_test.rb 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/test/lan_items_helpers_test.rb 2014-04-04 15:12:50.000000000 +0200 @@ -44,3 +44,62 @@ expect(Yast::LanItems.Items).to be_empty end end + +describe "LanItemsClass#getNetworkInterfaces" do + + NETCONFIG_ITEMS = { + "eth" => { + "eth1" => { "BOOTPROTO" => "none" }, + "eth2" => { "BOOTPROTO" => "none" }, + "eth4" => { + "BOOTPROTO" => "static", + "IPADDR" => "0.0.0.0", + "PREFIX" => "32" + }, + "eth5" => { "BOOTPROTO" => "static", "STARTMODE" => "nfsroot" }, + "eth6" => { "BOOTPROTO" => "static", "STARTMODE" => "ifplugd" }, + }, + "tun" => { + "tun0" => { + "BOOTPROTO" => "static", + "STARTMODE" => "onboot", + "TUNNEL" => "tun" + }, + }, + "tap" => { + "tap0" => { + "BOOTPROTO" => "static", + "STARTMODE" => "onboot", + "TUNNEL" => "tap" + }, + }, + "br" => { + "br0" => { "BOOTPROTO" => "dhcp" }, + }, + "bond" => { + "bond0" => { + "BOOTPROTO" => "static", + "BONDING_MASTER" => "yes", + "BONDING_SLAVE0" => "eth1", + "BONDING_SLAVE1" => "eth2" + } + } + } + + EXPECTED_INTERFACES = [ + "eth1", + "eth2", + "eth4", + "eth5", + "eth6", + "tun0", + "tap0", + "br0", + "bond0" + ] + + it "returns list of known interfaces" do + Yast::NetworkInterfaces.stub(:FilterDevices) { NETCONFIG_ITEMS } + expect(Yast::LanItems.getNetworkInterfaces).to match_array(EXPECTED_INTERFACES) + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/testsuite/tests/Network_YaPI.out new/yast2-network-3.1.45/testsuite/tests/Network_YaPI.out --- old/yast2-network-3.1.36/testsuite/tests/Network_YaPI.out 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/testsuite/tests/Network_YaPI.out 2014-04-04 15:12:50.000000000 +0200 @@ -11,7 +11,9 @@ Read .target.size "/etc/sysconfig/network/routes" 27 Read .routes [$["destination":"default", "gateway":"10.20.30.40"]] Execute .target.bash "rpm -q --whatprovides SuSEfirewall2" 0 -Execute .target.bash "/bin/systemctl is-enabled SuSEfirewall2.service" 0 +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show SuSEfirewall2.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Read .etc.sysctl_conf."net.ipv4.ip_forward" nil +Read .etc.sysctl_conf."net.ipv6.conf.all.forwarding" nil Dir .network.section: ["eth0", "eth1", "eth2", "eth3", "eth4", "eth5", "eth5.23"] Dir .network.value."eth0": ["BOOTPROTO", "STARTMODE"] Read .network.value."eth0".BOOTPROTO "dhcp4" @@ -104,7 +106,7 @@ Read .network.value."eth5.23".VLAN_ID "23" Read .probe.architecture "i386" Read .sysconfig.console.CONSOLE_ENCODING "UTF-8" -Execute .target.bash_output "locale -k charmap" $["exit":0, "stdout":"laptop.suse.cz"] +Execute .target.bash_output "locale -k charmap" $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] Read .target.size "/etc/install.inf" 27 Dir .etc.install_inf: [] Read .target.string "/proc/cmdline" "laptop.suse.cz" @@ -202,8 +204,8 @@ Read .target.string "/sys/class/net/eth5.23/type" "laptop.suse.cz" Read .target.stat "/sys/class/net/eth5.23/type" $["exists":true] Read .target.string "/sys/class/net/eth5.23/type" "laptop.suse.cz" -Execute .target.bash_output "hostname --fqdn" $["exit":0, "stdout":"laptop.suse.cz"] -Execute .target.bash_output "hostname --fqdn" $["exit":0, "stdout":"laptop.suse.cz"] +Execute .target.bash_output "hostname --fqdn" $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Execute .target.bash_output "hostname --fqdn" $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] Return $["dns":$["nameservers":["208.67.222.222", "208.67.220.220"], "searches":["suse.cz", "suse.de"]], "hostname":$["dhcp_hostname":"1", "domain":"suse.cz", "name":"laptop"], "interfaces":$["eth0":$["bootproto":"dhcp4", "mtu":"", "startmode":"manual"], "eth1":$["bootproto":"static", "ipaddr":"1.2.3.4/24", "mtu":"1234", "startmode":"auto"], "eth2":$["bootproto":"static", "ipaddr":"1.2.3.5/24", "mtu":"", "startmode":"auto"], "eth3":$["bootproto":"static", "ipaddr":"1.2.3.6/24", "mtu":"", "startmode":"auto"], "eth4":$["bootproto":"static", "ipaddr":"1.2.3.7/24", "mtu":"", "startmode":"auto"], "eth5":$["bootproto":"static", "ipaddr":"", "mtu":"", "startmode":"auto"], "eth5.23":$["bootproto":"static", "ipaddr":"1.2.3.8/24", "mtu":"", "startmode":"auto", "vlan_etherdevice":"eth5", "vlan_id":"23"]], "routes":$["default":$["via":"10.20.30.40"]]] Dump Testing YaPI Write Dir .network.section: ["eth0", "eth1", "eth2", "eth3", "eth4", "eth5", "eth5.23"] @@ -268,11 +270,18 @@ Write .network.value."eth0".BOOTPROTO "dhcp4" true Write .network.value."eth0".STARTMODE "auto" true Write .network nil true -Execute .target.bash_output "/bin/systemctl restart network.service" $["TERM":"raw"] $["exit":0, "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show network.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password restart network.service " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show network.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] Read .target.size "/etc/sysconfig/network/routes" 27 Read .routes [$["destination":"default", "gateway":"10.20.30.40"]] -Execute .target.bash "/bin/systemctl is-enabled SuSEfirewall2.service" 0 -Execute .target.bash "/bin/systemctl is-enabled SuSEfirewall2.service" 0 +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show SuSEfirewall2.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Read .etc.sysctl_conf."net.ipv4.ip_forward" nil +Read .etc.sysctl_conf."net.ipv6.conf.all.forwarding" nil +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show SuSEfirewall2.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Write .etc.sysctl_conf."net.ipv4.ip_forward" "0" true +Write .etc.sysctl_conf."net.ipv6.conf.all.forwarding" "0" true +Write .etc.sysctl_conf nil true Execute .target.bash "echo 0 > /proc/sys/net/ipv4/ip_forward" 0 Execute .target.bash "echo 0 > /proc/sys/net/ipv6/conf/all/forwarding" 0 Read .target.size "/etc/sysconfig/network/routes" 27 @@ -342,7 +351,9 @@ Write .network.value."eth3".IPADDR "1.2.3.7/24" true Write .network.value."eth3".STARTMODE "auto" true Write .network nil true -Execute .target.bash_output "/bin/systemctl restart network.service" $["TERM":"raw"] $["exit":0, "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show network.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password restart network.service " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show network.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] Dir .network.section: ["eth0", "eth1", "eth2", "eth3", "eth4", "eth5", "eth5.23"] Dir .network.value."eth0": ["BOOTPROTO", "STARTMODE"] Read .network.value."eth0".BOOTPROTO "dhcp4" @@ -408,4 +419,6 @@ Write .network.value."eth5.23".STARTMODE "auto" true Write .network.value."eth5.23".VLAN_ID "42" true Write .network nil true -Execute .target.bash_output "/bin/systemctl restart network.service" $["TERM":"raw"] $["exit":0, "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show network.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password restart network.service " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show network.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/testsuite/tests/Network_YaPI.rb new/yast2-network-3.1.45/testsuite/tests/Network_YaPI.rb --- old/yast2-network-3.1.36/testsuite/tests/Network_YaPI.rb 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/testsuite/tests/Network_YaPI.rb 2014-04-04 15:12:50.000000000 +0200 @@ -101,7 +101,11 @@ @EXEC = { "target" => { - "bash_output" => { "exit" => 0, "stdout" => "laptop.suse.cz" }, + "bash_output" => { + "exit" => 0, + "stdout" => "laptop.suse.cz", + "stderr" => "" + }, "bash" => 0 } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/testsuite/tests/YaPI_bond.out new/yast2-network-3.1.45/testsuite/tests/YaPI_bond.out --- old/yast2-network-3.1.36/testsuite/tests/YaPI_bond.out 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/testsuite/tests/YaPI_bond.out 2014-04-04 15:12:50.000000000 +0200 @@ -17,4 +17,6 @@ Write .network.value."bond0".IPADDR "4.3.2.1/24" true Write .network.value."bond0".STARTMODE "auto" true Write .network nil true -Execute .target.bash_output "/bin/systemctl restart network.service" $["TERM":"raw"] $["exit":0, "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show network.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password restart network.service " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password show network.service --property=Id --property=MainPID --property=Description --property=LoadState --property=ActiveState --property=SubState --property=UnitFileState --property=FragmentPath " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.36/testsuite/tests/YaPI_bond.rb new/yast2-network-3.1.45/testsuite/tests/YaPI_bond.rb --- old/yast2-network-3.1.36/testsuite/tests/YaPI_bond.rb 2014-03-19 18:32:44.000000000 +0100 +++ new/yast2-network-3.1.45/testsuite/tests/YaPI_bond.rb 2014-04-04 15:12:50.000000000 +0200 @@ -34,7 +34,11 @@ @EXEC = { "target" => { - "bash_output" => { "exit" => 0, "stdout" => "laptop.suse.cz" } + "bash_output" => { + "exit" => 0, + "stdout" => "laptop.suse.cz", + "stderr" => "" + } } } -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de