Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2014-05-06 13:40:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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-04-26 11:45:24.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 2014-05-06 13:40:57.000000000 +0200 @@ -1,0 +2,22 @@ +Mon May 5 22:31:45 UTC 2014 - mfilka@suse.com + +- fixed testsuite - adapted to API changes +- 3.1.53 + +------------------------------------------------------------------- +Mon May 5 08:50:48 UTC 2014 - mfilka@suse.com + +- bnc#870896 + - fixed proposed DNS / Hostname configuration to be same as in + SLE-11 +- 3.1.52 + +------------------------------------------------------------------- +Mon Apr 28 11:06:47 UTC 2014 - mfilka@suse.com + +- bnc#867451 + - when virtual machine is installed, propose virtual interface + configuration +- 3.1.51 + +------------------------------------------------------------------- Old: ---- yast2-network-3.1.50.tar.bz2 New: ---- yast2-network-3.1.53.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.qz1C7S/_old 2014-05-06 13:40:59.000000000 +0200 +++ /var/tmp/diff_new_pack.qz1C7S/_new 2014-05-06 13:40:59.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 3.1.50 +Version: 3.1.53 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-network-3.1.50.tar.bz2 -> yast2-network-3.1.53.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/package/yast2-network.changes new/yast2-network-3.1.53/package/yast2-network.changes --- old/yast2-network-3.1.50/package/yast2-network.changes 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/package/yast2-network.changes 2014-05-06 07:33:51.000000000 +0200 @@ -1,4 +1,26 @@ ------------------------------------------------------------------- +Mon May 5 22:31:45 UTC 2014 - mfilka@suse.com + +- fixed testsuite - adapted to API changes +- 3.1.53 + +------------------------------------------------------------------- +Mon May 5 08:50:48 UTC 2014 - mfilka@suse.com + +- bnc#870896 + - fixed proposed DNS / Hostname configuration to be same as in + SLE-11 +- 3.1.52 + +------------------------------------------------------------------- +Mon Apr 28 11:06:47 UTC 2014 - mfilka@suse.com + +- bnc#867451 + - when virtual machine is installed, propose virtual interface + configuration +- 3.1.51 + +------------------------------------------------------------------- Fri Apr 25 07:15:25 UTC 2014 - mfilka@suse.com - bnc#872319 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/package/yast2-network.spec new/yast2-network-3.1.53/package/yast2-network.spec --- old/yast2-network-3.1.50/package/yast2-network.spec 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/package/yast2-network.spec 2014-05-06 07:33:51.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 3.1.50 +Version: 3.1.53 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/src/Makefile.am new/yast2-network-3.1.53/src/Makefile.am --- old/yast2-network-3.1.50/src/Makefile.am 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/src/Makefile.am 2014-05-06 07:33:51.000000000 +0200 @@ -32,14 +32,12 @@ clients/routing.rb \ clients/lan.rb \ clients/host_auto.rb \ - clients/general_proposal.rb \ clients/inst_ask_net_test.rb \ clients/inst_hostname.rb \ clients/firewall_stage1_proposal.rb \ clients/routing_auto.rb \ clients/remote.rb \ clients/dns.rb \ - clients/lan_proposal.rb \ clients/host.rb \ clients/inst_install_inf.rb diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/src/clients/general_proposal.rb new/yast2-network-3.1.53/src/clients/general_proposal.rb --- old/yast2-network-3.1.50/src/clients/general_proposal.rb 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/src/clients/general_proposal.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,126 +0,0 @@ -# encoding: utf-8 - -#*************************************************************************** -# -# Copyright (c) 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -#************************************************************************** -# File: clients/general_proposal.ycp -# Package: Network configuration -# Summary: Network mode + ipv6 proposal -# Authors: Martin Vidner <mvidner@suse.cz> -# -# -# This is not a standalone proposal, it depends on lan_proposal. It -# must run after it. -module Yast - class GeneralProposalClient < Client - def main - Yast.import "UI" - - textdomain "network" - - # The main () - Builtins.y2milestone("----------------------------------------") - Builtins.y2milestone("General network settings proposal started") - Builtins.y2milestone("Arguments: %1", WFM.Args) - - Yast.import "Lan" - Yast.import "LanItems" - Yast.import "NetworkService" - - Yast.include self, "network/lan/complex.rb" - - @args = WFM.Args - - @func = Ops.get_string(@args, 0, "") - @param = Ops.get_map(@args, 1, {}) - @ret = {} - - # create a textual proposal - if @func == "MakeProposal" - @proposal = "" - @links = [] - @warning = nil - @warning_level = nil - - @sum = Lan.SummaryGeneral - @proposal = Ops.get_string(@sum, 0, "") - @links = Ops.get_list(@sum, 1, []) - - @ret = { - "preformatted_proposal" => @proposal, - "links" => @links, - "warning_level" => @warning_level, - "warning" => @warning - } - # run the module - elsif @func == "AskUser" - @chosen_id = Ops.get_string(@param, "chosen_id", "") - @seq = :next - if @chosen_id == "lan--nm-enable" - NetworkService.use_network_manager - elsif @chosen_id == "lan--nm-disable" - NetworkService.use_netconfig - elsif @chosen_id == "ipv6-enable" - Lan.SetIPv6(true) - elsif @chosen_id == "ipv6-disable" - Lan.SetIPv6(false) - elsif @chosen_id == "virtual-enable" - Lan.virt_net_proposal = true - elsif @chosen_id == "virtual-revert" - Lan.virt_net_proposal = false - else - Wizard.CreateDialog - Wizard.SetDesktopTitleAndIcon("lan") - - @seq = ManagedDialog() - Wizard.CloseDialog - end - LanItems.proposal_valid = false # repropose - LanItems.SetModified - @ret = { "workflow_sequence" => @seq } - # create titles - elsif @func == "Description" - @ret = { - # RichText label - "rich_text_title" => _("General Network Settings"), - # Menu label - "menu_title" => _("General &Network Settings"), - "id" => "networkmode" - } - # write the proposal - elsif @func == "Write" - Builtins.y2debug("lan_proposal did it") - else - Builtins.y2error("unknown function: %1", @func) - end - - # Finish - Builtins.y2debug("ret=%1", @ret) - Builtins.y2milestone("General network settings proposal finished") - Builtins.y2milestone("----------------------------------------") - deep_copy(@ret) - - # EOF - end - end -end - -Yast::GeneralProposalClient.new.main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/src/clients/lan_proposal.rb new/yast2-network-3.1.53/src/clients/lan_proposal.rb --- old/yast2-network-3.1.50/src/clients/lan_proposal.rb 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/src/clients/lan_proposal.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,205 +0,0 @@ -# encoding: utf-8 - -#*************************************************************************** -# -# Copyright (c) 2012 Novell, Inc. -# All Rights Reserved. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of version 2 of the GNU General Public License as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, contact Novell, Inc. -# -# To contact Novell about this file by physical or electronic mail, -# you may find current contact information at www.novell.com -# -#************************************************************************** -# File: clients/lan_proposal.ycp -# Package: Network configuration -# Summary: Lan configuration proposal -# Authors: Michal Svec <msvec@suse.cz> -# -module Yast - class LanProposalClient < Client - def main - Yast.import "UI" - - textdomain "network" - - # The main () - Builtins.y2milestone("----------------------------------------") - Builtins.y2milestone("Lan proposal started") - Builtins.y2milestone("Arguments: %1", WFM.Args) - - Yast.import "Arch" - Yast.import "Lan" - Yast.import "Linuxrc" - Yast.import "Popup" - Yast.import "Progress" - Yast.import "LanItems" - - Yast.include self, "network/lan/wizards.rb" - - @args = WFM.Args - - # yast2-installation calls the method this way: - # - # WFM::CallFunction( <proposal>, [<client function>, <map of arguments>]) - # - # see inst_proposal.ycp - @func = Ops.get_string(@args, 0, "") - @param = Ops.get_map(@args, 1, {}) - - @ret = {} - - # create a textual proposal - if @func == "MakeProposal" - @proposal = "" - @warning = nil - @warning_level = nil - @force_reset = Ops.get_boolean(@param, "force_reset", false) - - Builtins.y2milestone( - "lan_proposal/MakeProposal force_reset: %1", - @force_reset - ) - - if @force_reset || !LanItems.proposal_valid - LanItems.proposal_valid = true - - BusyPopup(_("Detecting network cards...")) - - @progress_orig = Progress.set(false) - - # NM wants us to repropose but while at it Lan::Read should not - # think it does a full reread and unset Lan::modified. #147270 - Lan.Read(@force_reset ? :nocache : :cache) - - if Lan.virt_net_proposal == nil - Lan.virt_net_proposal = VirtProposalRequired() - end - - Lan.Propose - Progress.set(@progress_orig) - - BusyPopupClose() - end - - @sum = Lan.Summary("proposal") - @proposal = Ops.get_string(@sum, 0, "") - - @ret = { - "preformatted_proposal" => @proposal, - "warning_level" => @warning_level, # TODO `warning - "warning" => @warning, # TODO WiFi but no encryption - "links" => Ops.get_list(@sum, 1, []) - } - # run the module - elsif @func == "AskUser" - @stored = Lan.Export - - @chosen_id = Ops.get_string(@param, "chosen_id", "") - @seq = :next - @match = Builtins.regexptokenize( - @chosen_id, - "^lan--wifi-encryption-(.*)" - ) - if @match != nil && @match != [] - Builtins.y2milestone("%1", @chosen_id) - @dev = Ops.get(@match, 0, "") - # unescape colons - @dev = Builtins.mergestring(Builtins.splitstring(@dev, "/"), ":") - - Builtins.foreach(LanItems.Items) do |row, value| - LanItems.current = row - if LanItems.IsCurrentConfigured - if Builtins.issubstring( - @dev, - Ops.get_string(LanItems.getCurrentItem, "ifcfg", "") - ) - LanItems.SetItem - raise Break - end - end - end if IsNotEmpty( - @dev - ) - - - # #113196: must create new dialog for proposal clients - Wizard.CreateDialog - Wizard.SetDesktopTitleAndIcon("lan") - @seq = AddressSequence("wire") - - Wizard.CloseDialog - else - @seq = LanAutoSequence("proposal") - end - - if @seq != :next - LanItems.Items = {} - Lan.Import(@stored) - end - @ret = { "workflow_sequence" => @seq } - # create titles - elsif @func == "Description" - @ret = { - # RichText label - "rich_text_title" => _("Network Interfaces"), - # Menu label - "menu_title" => _("&Network Interfaces"), - "id" => "lan" - } - # write the proposal - elsif @func == "Write" - if PackagesInstall(Lan.Packages) != :next - # popup already shown - Builtins.y2error("Packages installation failure, not saving") - elsif !Lan.virt_net_proposal && - (Linuxrc.display_ip || Linuxrc.vnc || Linuxrc.usessh) - Builtins.y2milestone("write only") - Lan.WriteOnly - else - Lan.Write - # With a little help from my friends: - # Let yast2-printer listen for CUPS broadcasts - SCR.Execute( - path(".target.bash_background"), - "test -f /usr/lib/YaST2/bin/listen_remote_ipp && /usr/lib/YaST2/bin/listen_remote_ipp 120" - ) - end - else - Builtins.y2error("unknown function: %1", @func) - end - - # Finish - Builtins.y2debug("ret=%1", @ret) - Builtins.y2milestone("Lan proposal finished") - Builtins.y2milestone("----------------------------------------") - deep_copy(@ret) - - # EOF - end - - # Decides if a proposal for virtualization host machine is required. - def VirtProposalRequired - # S390 has special requirements. See bnc#817943 - return false if Arch.s390 - - return true if PackageSystem.Installed("xen") && !Arch.is_xenU - return true if PackageSystem.Installed("kvm") - return true if PackageSystem.Installed("qemu") - - false - end - end -end - -Yast::LanProposalClient.new.main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/src/clients/save_network.rb new/yast2-network-3.1.53/src/clients/save_network.rb --- old/yast2-network-3.1.50/src/clients/save_network.rb 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/src/clients/save_network.rb 2014-05-06 07:33:52.000000000 +0200 @@ -29,6 +29,7 @@ # module Yast require "network/install_inf_convertor" + require "network/network_autoconfiguration" class SaveNetworkClient < Client include Logger @@ -257,6 +258,9 @@ WFM.SCRSetDefault(old_SCR) WFM.SCRClose(new_SCR) + NetworkAutoconfiguration.instance.configure_virtuals + NetworkAutoconfiguration.instance.configure_dns + LanUdevAuto.Write if Mode.autoinst SCR.Execute(path(".target.bash"), "chkconfig network on") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/src/include/network/lan/complex.rb new/yast2-network-3.1.53/src/include/network/lan/complex.rb --- old/yast2-network-3.1.50/src/include/network/lan/complex.rb 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/src/include/network/lan/complex.rb 2014-05-06 07:33:52.000000000 +0200 @@ -57,57 +57,13 @@ Yast.include include_target, "network/services/dns.rb" Yast.include include_target, "network/lan/dhcp.rb" Yast.include include_target, "network/lan/s390.rb" + Yast.include include_target, "network/widgets.rb" @shown = false @wd = { - "MANAGED" => { - "widget" => :radio_buttons, - # radio button group label, method of setup - "label" => _( - "Network Setup Method" - ), - "items" => [ - # radio button label - # the user can control the network with the NetworkManager - # program - [ - "managed", - _("&User Controlled with NetworkManager") - ], - # radio button label - # ifup is a program name - [ - "ifup", - _("&Traditional Method with ifup") - ], - # radio button label - # wicked is network configuration backend like netconfig - [ - "wicked", - _("Controlled by &wicked") - ], - ], - "opt" => [], - "help" => Ops.get_string(@help, "managed", ""), - "init" => fun_ref(method(:ManagedInit), "void (string)"), - "store" => fun_ref(method(:ManagedStore), "void (string, map)") - }, - "IPV6" => { - "widget" => :custom, - "custom_widget" => Frame( - _("IPv6 Protocol Settings"), - Left(CheckBox(Id(:ipv6), Opt(:notify), _("Enable IPv6"))) - ), - "opt" => [], - "help" => Ops.get_string(@help, "ipv6", ""), - "init" => fun_ref(method(:initIPv6), "void (string)"), - "handle" => fun_ref( - method(:handleIPv6), - "symbol (string, map)" - ), - "store" => fun_ref(method(:storeIPv6), "void (string, map)") - }, + "MANAGED" => managed_widget, + "IPV6" => ipv6_widget, "OVERVIEW" => { "widget" => :custom, "custom_widget" => VBox( @@ -130,7 +86,6 @@ method(:handleOverview), "symbol (string, map)" ), - # "store" : storeOverview, "help" => Ops.get_string( @help, "overview", @@ -310,89 +265,6 @@ !Arch.s390 || s390_DriverLoaded(devname) end - - def initIPv6(key) - UI.ChangeWidget(Id(:ipv6), :Value, Lan.ipv6 ? true : false) - - nil - end - - def handleIPv6(key, event) - event = deep_copy(event) - if Ops.get_string(event, "EventReason", "") == "ValueChanged" - Lan.SetIPv6(Convert.to_boolean(UI.QueryWidget(Id(:ipv6), :Value))) - end - nil - end - - def storeIPv6(key, event) - event = deep_copy(event) - if Convert.to_boolean(UI.QueryWidget(Id(:ipv6), :Value)) - Lan.SetIPv6(true) - else - Lan.SetIPv6(false) - end - - nil - end - - # Initialize the NetworkManager widget - # @param [String] key id of the widget - def ManagedInit(key) - value = "managed" if NetworkService.is_network_manager - value = "ifup" if NetworkService.is_netconfig - value = "wicked" if NetworkService.is_wicked - - UI.ChangeWidget( - Id("managed"), - :Enabled, - NetworkService.is_backend_available(:network_manager)) - UI.ChangeWidget( - Id("ifup"), - :Enabled, - NetworkService.is_backend_available(:netconfig)) - UI.ChangeWidget( - Id("wicked"), - :Enabled, - NetworkService.is_backend_available(:wicked)) - - UI.ChangeWidget(Id(key), :CurrentButton, value) - - nil - end - - # Store the NetworkManager widget - # @param [String] key id of the widget - # @param [Hash] event the event being handled - def ManagedStore(key, event) - new_backend = UI.QueryWidget(Id(key), :CurrentButton) - - case new_backend - when "ifup" - NetworkService.use_netconfig - when "managed" - NetworkService.use_network_manager - when "wicked" - NetworkService.use_wicked - end - - if NetworkService.Modified - LanItems.SetModified - - if Stage.normal && NetworkService.is_network_manager - Popup.AnyMessage( - _("Applet needed"), - _( - "NetworkManager is controlled by desktop applet\n" + - "(KDE plasma widget and nm-applet for GNOME).\n" + - "Be sure it's running and if not, start it manually." - )) - end - end - - nil - end - def enableDisableButtons LanItems.current = Convert.to_integer( UI.QueryWidget(Id(:_hw_items), :CurrentItem) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/src/include/network/widgets.rb new/yast2-network-3.1.53/src/include/network/widgets.rb --- old/yast2-network-3.1.50/src/include/network/widgets.rb 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/src/include/network/widgets.rb 2014-05-06 07:33:52.000000000 +0200 @@ -41,6 +41,8 @@ Yast.import "IP" Yast.import "NetworkPopup" Yast.import "NetworkInterfaces" + Yast.import "NetworkService" + Yast.import "Lan" Yast.import "LanItems" Yast.include include_target, "network/complex.rb" @@ -286,6 +288,139 @@ } end + # Initialize the NetworkManager widget + # @param [String] key id of the widget + def ManagedInit(key) + value = "managed" if NetworkService.is_network_manager + value = "ifup" if NetworkService.is_netconfig + value = "wicked" if NetworkService.is_wicked + + UI.ChangeWidget( + Id("managed"), + :Enabled, + NetworkService.is_backend_available(:network_manager)) + UI.ChangeWidget( + Id("ifup"), + :Enabled, + NetworkService.is_backend_available(:netconfig)) + UI.ChangeWidget( + Id("wicked"), + :Enabled, + NetworkService.is_backend_available(:wicked)) + + UI.ChangeWidget(Id(key), :CurrentButton, value) + + nil + end + + # Store the NetworkManager widget + # @param [String] key id of the widget + # @param [Hash] event the event being handled + def ManagedStore(key, event) + new_backend = UI.QueryWidget(Id(key), :CurrentButton) + + case new_backend + when "ifup" + NetworkService.use_netconfig + when "managed" + NetworkService.use_network_manager + when "wicked" + NetworkService.use_wicked + end + + if NetworkService.Modified + LanItems.SetModified + + if Stage.normal && NetworkService.is_network_manager + Popup.AnyMessage( + _("Applet needed"), + _( + "NetworkManager is controlled by desktop applet\n" + + "(KDE plasma widget and nm-applet for GNOME).\n" + + "Be sure it's running and if not, start it manually." + )) + end + end + + nil + end + + def managed_widget + { + "widget" => :radio_buttons, + # radio button group label, method of setup + "label" => _("Network Setup Method"), + "items" => [ + # radio button label + # the user can control the network with the NetworkManager + # program + [ + "managed", + _("&User Controlled with NetworkManager") + ], + # radio button label + # ifup is a program name + [ + "ifup", + _("&Traditional Method with ifup") + ], + # radio button label + # wicked is network configuration backend like netconfig + [ + "wicked", + _("Controlled by &wicked") + ], + ], + "opt" => [], + "help" => Ops.get_string(@help, "managed", ""), + "init" => fun_ref(method(:ManagedInit), "void (string)"), + "store" => fun_ref(method(:ManagedStore), "void (string, map)") + } + end + + def initIPv6(key) + UI.ChangeWidget(Id(:ipv6), :Value, Lan.ipv6 ? true : false) + + nil + end + + def handleIPv6(key, event) + event = deep_copy(event) + if Ops.get_string(event, "EventReason", "") == "ValueChanged" + Lan.SetIPv6(Convert.to_boolean(UI.QueryWidget(Id(:ipv6), :Value))) + end + nil + end + + def storeIPv6(key, event) + event = deep_copy(event) + if Convert.to_boolean(UI.QueryWidget(Id(:ipv6), :Value)) + Lan.SetIPv6(true) + else + Lan.SetIPv6(false) + end + + nil + end + + def ipv6_widget + { + "widget" => :custom, + "custom_widget" => Frame( + _("IPv6 Protocol Settings"), + Left(CheckBox(Id(:ipv6), Opt(:notify), _("Enable IPv6"))) + ), + "opt" => [], + "help" => Ops.get_string(@help, "ipv6", ""), + "init" => fun_ref(method(:initIPv6), "void (string)"), + "handle" => fun_ref( + method(:handleIPv6), + "symbol (string, map)" + ), + "store" => fun_ref(method(:storeIPv6), "void (string, map)") + } + end + def GetDeviceDescription(device_id) device_name = NetworkInterfaces.GetValue(device_id, "NAME") if device_name == nil || device_name == "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/src/lib/network/network_autoconfiguration.rb new/yast2-network-3.1.53/src/lib/network/network_autoconfiguration.rb --- old/yast2-network-3.1.50/src/lib/network/network_autoconfiguration.rb 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/src/lib/network/network_autoconfiguration.rb 2014-05-06 07:33:52.000000000 +0200 @@ -11,8 +11,12 @@ include Logger include Yast + Yast.import "Lan" Yast.import "LanItems" Yast.import "NetworkInterfaces" + Yast.import "Package" + Yast.import "DNS" + Yast.import "Arch" BASH_PATH = Path.new(".target.bash") @@ -56,6 +60,41 @@ activate_changes(dhcp_cards) end + # Propose configuration for virtual devices + # + # It checks if any of supported virtual machines were installed. If found, + # propose virtual device(s) configuration + def configure_virtuals + return if !virtual_proposal_required? + + log.info("NetworkAutoconfiguration: proposing virtual devices") + + Lan.ProposeVirtualized + + # avoid restarting network (installation can run via ssh, vnc, ...) + # Moreover virtual devices are not needed during first stage. So, it can + # wait for rebooting into just installed target + Lan.WriteOnly + end + + # Propose DNS and Hostname setup + def configure_dns + DNS.Read # handles NetworkConfig too + DNS.ProposeHostname # generate random hostname, if none known so far + + # propose settings + DNS.dhcp_hostname = !Arch.is_laptop + + # get default value, from control.xml + DNS.write_hostname = DNS.DefaultWriteHostname + + log.info("NetworkAutoconfiguration: proposing DNS / Hostname configuration") + log.info("dhcp hostname: #{DNS.dhcp_hostname}") + log.info("write hostname: #{DNS.write_hostname}") + + DNS.Write + end + private def network_cards LanItems.Read @@ -167,5 +206,17 @@ LanItems.SetItemSysconfigOpt(item_id, "DHCLIENT_SET_DEFAULT_ROUTE", value) end + # Decides if a proposal for virtualization host machine is required. + def virtual_proposal_required? + # S390 has special requirements. See bnc#817943 + return false if Arch.s390 + + return true if PackageSystem.Installed("xen") && !Arch.is_xenU + return true if PackageSystem.Installed("kvm") + return true if PackageSystem.Installed("qemu") + + false + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/src/modules/Lan.rb new/yast2-network-3.1.53/src/modules/Lan.rb --- old/yast2-network-3.1.50/src/modules/Lan.rb 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/src/modules/Lan.rb 2014-05-06 07:33:52.000000000 +0200 @@ -77,16 +77,6 @@ @write_only = false - # Current module information - # FIXME: MOD global map Module = $[]; - - # propose configuration for virtual networks (bridged) ? - @virt_net_proposal = nil - - # autoinstallation: if true, write_only is disabled and the network settings - # are applied at once, like during the normal installation. #128810, #168806 - # boolean start_immediately = false; - # ipv6 module @ipv6 = true @@ -637,23 +627,7 @@ ) end - Builtins.y2milestone("virt_net_proposal %1", @virt_net_proposal) - if Stage.cont && @virt_net_proposal == true && - (Linuxrc.usessh || Linuxrc.vnc || Linuxrc.display_ip) - - if ConfirmVirtProposal.instance.run == :ok - Builtins.y2milestone( - "Restarting network because of bridged proposal" - ) - NetworkService.Restart - end - # For ssh/vnc installation don't reload/restart network because possibility of IP change (bnc#347482) - elsif Stage.cont && - (Linuxrc.usessh || Linuxrc.vnc || Linuxrc.display_ip) - Builtins.y2milestone( - "For ssh or vnc installation don't reload/restart network during installation." - ) - elsif LanItems.force_restart + if LanItems.force_restart NetworkService.Restart else NetworkService.ReloadOrRestart @@ -834,9 +808,7 @@ status_nm = _("Traditional network setup with NetControl - ifup") # enable NetworkManager applet # for virtual network proposal (bridged) don't show hyperlink to enable networkmanager - link_nm = @virt_net_proposal ? - "..." : - Hyperlink(href_nm, _("Enable NetworkManager")) + link_nm = Hyperlink(href_nm, _("Enable NetworkManager")) end if @ipv6 @@ -852,28 +824,6 @@ # enable ipv6 support link_v6 = Hyperlink(href_v6, _("Enable IPv6")) end - # no exception needed for virtualbox* (bnc#648044) http://www.virtualbox.org/manual/ch06.html - if PackageSystem.Installed("xen") && !Arch.is_xenU || - PackageSystem.Installed("kvm") || - PackageSystem.Installed("qemu") - if @virt_net_proposal - href_virt_net = "virtual-revert" - status_virt_net = _( - "Proposed bridged configuration for virtual machine network" - ) - link_virt_net = Hyperlink( - href_virt_net, - _("Use non-bridged configuration") - ) - else - href_virt_net = "virtual-enable" - status_virt_net = _("Proposed non-bridged network configuration") - link_virt_net = Hyperlink( - href_virt_net, - _("Use bridged configuration") - ) - end - end descr = Builtins.sformat( "<ul><li>%1: %2 (%3)</li></ul> \n\t\t\t <ul><li>%4 (%5)</li></ul>", header_nm, @@ -1153,29 +1103,22 @@ Builtins.y2milestone("NetworkConfig::DHCP=%1", NetworkConfig.DHCP) # test if we have any virtualization installed - if @virt_net_proposal - Builtins.y2milestone( - "Virtualization [xen|kvm|qemu] detected - will propose virtualization network" - ) - ProposeVirtualized() - else - if !LanItems.nm_proposal_valid - if UseNetworkManager() - NetworkService.use_network_manager - else - NetworkService.use_netconfig - end - - LanItems.nm_proposal_valid = true + if !LanItems.nm_proposal_valid + if UseNetworkManager() + NetworkService.use_network_manager + else + NetworkService.use_netconfig end - if NetworkService.is_network_manager - ProposeNMInterfaces() + LanItems.nm_proposal_valid = true + end - LanItems.modified = true # #144139 workaround - Builtins.y2milestone("NM proposal") - return true - end + if NetworkService.is_network_manager + ProposeNMInterfaces() + + LanItems.modified = true # #144139 workaround + Builtins.y2milestone("NM proposal") + return true end # Something is already configured -> do nothing configured = false @@ -1482,7 +1425,6 @@ have_br end - publish :variable => :virt_net_proposal, :type => "boolean" publish :variable => :ipv6, :type => "boolean" publish :variable => :AbortFunction, :type => "block <boolean>" publish :variable => :bond_autoconf_slaves, :type => "list <string>" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/testsuite/tests/Network_YaPI.out new/yast2-network-3.1.53/testsuite/tests/Network_YaPI.out --- old/yast2-network-3.1.50/testsuite/tests/Network_YaPI.out 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/testsuite/tests/Network_YaPI.out 2014-05-06 07:33:52.000000000 +0200 @@ -12,6 +12,7 @@ Read .routes [$["destination":"default", "gateway":"10.20.30.40"]] Execute .target.bash "rpm -q --whatprovides SuSEfirewall2" 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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled SuSEfirewall2.service " $["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"] @@ -271,14 +272,21 @@ Write .network.value."eth0".STARTMODE "auto" true Write .network nil true 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 is-enabled 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 stop 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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled 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 start 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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled network.service " $["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_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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled SuSEfirewall2.service " $["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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled SuSEfirewall2.service " $["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 @@ -352,8 +360,13 @@ Write .network.value."eth3".STARTMODE "auto" true Write .network nil true 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 is-enabled 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 stop 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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled 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 start 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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled network.service " $["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" @@ -420,5 +433,10 @@ Write .network.value."eth5.23".VLAN_ID "42" true Write .network nil true 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 is-enabled 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 stop 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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled 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 start 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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled network.service " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.50/testsuite/tests/YaPI_bond.out new/yast2-network-3.1.53/testsuite/tests/YaPI_bond.out --- old/yast2-network-3.1.50/testsuite/tests/YaPI_bond.out 2014-04-25 14:38:44.000000000 +0200 +++ new/yast2-network-3.1.53/testsuite/tests/YaPI_bond.out 2014-05-06 07:33:52.000000000 +0200 @@ -18,5 +18,10 @@ Write .network.value."bond0".STARTMODE "auto" true Write .network nil true 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 is-enabled 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 stop 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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled 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 start 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"] +Execute .target.bash_output " LANG=C TERM=dumb COLUMNS=1024 systemctl --no-legend --no-pager --no-ask-password is-enabled network.service " $["exit":0, "stderr":"", "stdout":"laptop.suse.cz"] -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org