[yast-commit] [ci_new_pac] JFYI yast2-network -> sle12
Script 'mail_helper' called by ro Hello packager, This is just FYI. Your package was checked in in distribution "sle12" by autobuild-member: ro. Here comes the log... ---------------------------%<------------------------------ Hi, here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-network -> sle12 ## BNC# 883836 : "Changing DHCP to DHCPv4+v6 in yast lan set 'DHCLIENT_SET_DEFAULT_ROUTE' to 'no' & breaks IPv4 routing" (RESOLVED/FIXED) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2-network/yast2-network.changes 2014-08-06 16:42:29.000000000 +0200 +++ /mounts/work_src_done/SLE12/yast2-network/yast2-network.changes 2014-08-11 10:55:42.000000000 +0200 @@ -1,0 +2,6 @@ +Thu Aug 7 12:20:44 UTC 2014 - mvidner@suse.com + +- Do not lose default route when editing an interface (bnc#883836). +- 3.1.77 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2-network - at least 15 other packages ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2-network (Old) and /mounts/work_src_done/SLE12/yast2-network (BS:build ID:42451 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-network", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-network-3.1.76.tar.bz2 New: ---- yast2-network-3.1.77.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.y0aXCw/_old 2014-08-12 14:13:16.000000000 +0200 +++ /var/tmp/diff_new_pack.y0aXCw/_new 2014-08-12 14:13:16.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 3.1.76 +Version: 3.1.77 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-network-3.1.76.tar.bz2 -> yast2-network-3.1.77.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/package/yast2-network.changes new/yast2-network-3.1.77/package/yast2-network.changes --- old/yast2-network-3.1.76/package/yast2-network.changes 2014-08-05 16:54:40.000000000 +0200 +++ new/yast2-network-3.1.77/package/yast2-network.changes 2014-08-11 10:49:58.000000000 +0200 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Aug 7 12:20:44 UTC 2014 - mvidner@suse.com + +- Do not lose default route when editing an interface (bnc#883836). +- 3.1.77 + +------------------------------------------------------------------- Tue Aug 5 14:59:19 CEST 2014 - schubi@suse.de - Autoyast: If NetworkManager is not available taking wicked although diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/package/yast2-network.spec new/yast2-network-3.1.77/package/yast2-network.spec --- old/yast2-network-3.1.76/package/yast2-network.spec 2014-08-05 16:54:40.000000000 +0200 +++ new/yast2-network-3.1.77/package/yast2-network.spec 2014-08-11 10:49:58.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 3.1.76 +Version: 3.1.77 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/src/lib/network/network_autoconfiguration.rb new/yast2-network-3.1.77/src/lib/network/network_autoconfiguration.rb --- old/yast2-network-3.1.76/src/lib/network/network_autoconfiguration.rb 2014-08-05 16:54:40.000000000 +0200 +++ new/yast2-network-3.1.77/src/lib/network/network_autoconfiguration.rb 2014-08-11 10:49:58.000000000 +0200 @@ -27,16 +27,19 @@ # find out network devices suitable for dhcp autoconfiguration. # Such device has to: # - be unconfigured - # - physically connected to a network (it speeds up initialization phase of - # installer - bnc#872319) - dhcp_cards = network_cards.select { |c| !configured?(c) && phy_connected?(c) } + # - physically connected to a network + # (it speeds up the initialization phase of installer - bnc#872319) + dhcp_cards = network_cards.select do |c| + !configured?(c) && phy_connected?(c) + end log.info "Candidates for enabling DHCP: #{dhcp_cards}" # TODO time consuming, some progress would be nice dhcp_cards.each { |d| setup_dhcp(d) } - # FIXME this can be really slow as it calls wicked one-by-one. So for n devices - # connected to a network but without dhcp it takes n * <dhcp lease wait timeout>. + # FIXME this can be really slow as it calls wicked one-by-one. + # So for n devices connected to a network but without dhcp + # it takes n * <dhcp lease wait timeout>. activate_changes(dhcp_cards) # drop devices without dhcp lease diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/src/modules/LanItems.rb new/yast2-network-3.1.77/src/modules/LanItems.rb --- old/yast2-network-3.1.76/src/modules/LanItems.rb 2014-08-05 16:54:40.000000000 +0200 +++ new/yast2-network-3.1.77/src/modules/LanItems.rb 2014-08-11 10:49:58.000000000 +0200 @@ -244,7 +244,6 @@ "REMOTE_IPADDR" => "", "NETMASK" => "", "MTU" => "", - "DHCLIENT_SET_DEFAULT_ROUTE" => "no", "LLADDR" => "00:00:00:00:00:00", "ETHTOOL_OPTIONS" => "", "NAME" => "", @@ -1053,8 +1052,9 @@ NetworkInterfaces.Read NetworkInterfaces.CleanHotplugSymlink + interfaces = getNetworkInterfaces # match configurations to Items list with hwinfo - Builtins.foreach(getNetworkInterfaces) do |confname| + Builtins.foreach(interfaces) do |confname| pos = nil val = {} Builtins.foreach( @@ -1077,7 +1077,7 @@ end # add to Items also virtual devices (configurations) without hwinfo - Builtins.foreach(getNetworkInterfaces) do |confname| + Builtins.foreach(interfaces) do |confname| already = false Builtins.foreach( Convert.convert( @@ -1860,18 +1860,13 @@ # returns a map with device options for newly created item def new_item_default_options - # common options - devmap = { - "NETMASK" => Ops.get_string( - NetHwDetection.result, - "NETMASK", - "255.255.255.0" - ) - } # #31369 - - devmap[ "STARTMODE"] = new_device_startmode - - deep_copy(devmap) + { + # bnc#46369 + "NETMASK" => NetHwDetection.result["NETMASK"] || "255.255.255.0", + "STARTMODE" => new_device_startmode, + # bnc#883836 bnc#868187 + "DHCLIENT_SET_DEFAULT_ROUTE" => "no" + } end # Select the given device diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/Makefile.am new/yast2-network-3.1.77/test/Makefile.am --- old/yast2-network-3.1.76/test/Makefile.am 2014-08-05 16:54:40.000000000 +0200 +++ new/yast2-network-3.1.77/test/Makefile.am 2014-08-11 10:49:58.000000000 +0200 @@ -1,17 +1,18 @@ TESTS = \ - netcard_test.rb \ - edit_nic_name_test.rb \ - lan_udev_auto_test.rb \ bridge_test.rb \ - routing_test.rb \ - new_device_startmode_test.rb \ - widgets_test.rb \ + edit_nic_name_test.rb \ install_inf_convertor_test.rb \ lan_items_helpers_test.rb \ + lan_udev_auto_test.rb \ link_handlers_test.rb \ - suse_firewall_4_network_test.rb + netcard_test.rb \ + network_autoconfiguration_test.rb \ + new_device_startmode_test.rb \ + routing_test.rb \ + suse_firewall_4_network_test.rb \ + widgets_test.rb TEST_EXTENSIONS = .rb -RB_LOG_COMPILER = rspec +RB_LOG_COMPILER = rspec --format doc VERBOSE = 1 EXTRA_DIST = $(TESTS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/bridge_test.rb new/yast2-network-3.1.77/test/bridge_test.rb --- old/yast2-network-3.1.76/test/bridge_test.rb 2014-08-05 16:54:40.000000000 +0200 +++ new/yast2-network-3.1.77/test/bridge_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,6 +1,6 @@ #! /usr/bin/env rspec -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" require "yast" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/edit_nic_name_test.rb new/yast2-network-3.1.77/test/edit_nic_name_test.rb --- old/yast2-network-3.1.76/test/edit_nic_name_test.rb 2014-08-05 16:54:40.000000000 +0200 +++ new/yast2-network-3.1.77/test/edit_nic_name_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,9 +1,6 @@ #!/usr/bin/env rspec -# The test is currently not started automatically because of missing rspec.rpm in -# OpenSUSE:Factory - -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" require "yast" require "network/edit_nic_name" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/install_inf_convertor_test.rb new/yast2-network-3.1.77/test/install_inf_convertor_test.rb --- old/yast2-network-3.1.76/test/install_inf_convertor_test.rb 2014-08-05 16:54:40.000000000 +0200 +++ new/yast2-network-3.1.77/test/install_inf_convertor_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,6 +1,6 @@ #!/usr/bin/env rspec -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" require "yast" require "network/install_inf_convertor" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/lan_items_helpers_test.rb new/yast2-network-3.1.77/test/lan_items_helpers_test.rb --- old/yast2-network-3.1.76/test/lan_items_helpers_test.rb 2014-08-05 16:54:41.000000000 +0200 +++ new/yast2-network-3.1.77/test/lan_items_helpers_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,6 +1,6 @@ #!/usr/bin/env rspec -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" require "yast" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/lan_udev_auto_test.rb new/yast2-network-3.1.77/test/lan_udev_auto_test.rb --- old/yast2-network-3.1.76/test/lan_udev_auto_test.rb 2014-08-05 16:54:41.000000000 +0200 +++ new/yast2-network-3.1.77/test/lan_udev_auto_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,9 +1,6 @@ #!/usr/bin/env rspec -# The test is currently not started automatically because of missing rspec.rpm in -# OpenSUSE:Factory - -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" require "yast" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/link_handlers_test.rb new/yast2-network-3.1.77/test/link_handlers_test.rb --- old/yast2-network-3.1.76/test/link_handlers_test.rb 2014-08-05 16:54:41.000000000 +0200 +++ new/yast2-network-3.1.77/test/link_handlers_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,6 +1,6 @@ #!/usr/bin/env rspec -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" require "yast" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/netcard_test.rb new/yast2-network-3.1.77/test/netcard_test.rb --- old/yast2-network-3.1.76/test/netcard_test.rb 2014-08-05 16:54:41.000000000 +0200 +++ new/yast2-network-3.1.77/test/netcard_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,6 +1,6 @@ #! /usr/bin/env rspec -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" HWINFO_DEVICE_DESC = "Intel Ethernet controller" HWINFO_DEVICE_MAC = "00:01:02:03:04:05" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/network_autoconfiguration_test.rb new/yast2-network-3.1.77/test/network_autoconfiguration_test.rb --- old/yast2-network-3.1.76/test/network_autoconfiguration_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-3.1.77/test/network_autoconfiguration_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -0,0 +1,176 @@ +#!/usr/bin/env rspec + +require_relative "test_helper" + +require "yast" +require "network/network_autoconfiguration" + +Yast.import "NetworkInterfaces" + +# @return one item for a .probe.netcard list +def probe_netcard_factory(num) + num = num.to_s + dev_name = "eth#{num}" + + { + "bus" => "Virtio", + "class_id" => 2, + "dev_name" => dev_name, + "dev_names" => [dev_name], + "device" => "Ethernet Card #{num}", + "device_id" => 262145, + "driver" => "virtio_net", + "driver_module" => "virtio_net", + "drivers" => [ + { + "active" => true, + "modprobe" => true, + "modules" => [["virtio_net", ""]] + } + ], + "modalias" => "virtio:d00000001v00001AF4", + "model" => "Virtio Ethernet Card #{num}", + "resource" => { + "hwaddr" => [ {"addr" => "52:54:00:5b:b2:7#{num}"} ], + "link"=> [ {"state" => true} ] + }, + "sub_class_id" => 0, + "sysfs_bus_id" => "virtio#{num}", + "sysfs_id" => "/devices/pci0000:00/0000:00:03.0/virtio#{num}", + "unique_key" => "vWuh.VIRhsc57kT#{num}", + "vendor" => "Virtio", + "vendor_id" => 286740 + } +end + +# A two level section/key => value store +# to remember values of /etc/sysconfig/network/ifcfg-* +class SectionKeyValue + def initialize + @sections = {} + end + + def sections + @sections.keys + end + + def keys(section) + @sections[section].keys + end + + def get(section, key) + @sections[section][key] + end + + def set(section, key, value) + section_hash = @sections[section] ||= {} + section_hash[key] = value + end +end + +describe Yast::NetworkAutoconfiguration do + let(:instance) { Yast::NetworkAutoconfiguration.instance } + let(:network_interfaces) { double("NetworkInterfaces") } + + before(:each) do + ifcfg_files = SectionKeyValue.new + + # network configs + allow(Yast::SCR).to receive(:Dir) do |path| + case path.to_s + when ".network.section" + ifcfg_files.sections + when /^\.network\.value\."(eth\d+)"$/ + ifcfg_files.keys($1) + when ".modules.options", ".etc.install_inf" + [] + else + raise "Unexpected Dir #{path}" + end + end + + allow(Yast::SCR).to receive(:Read) do |path| + if path.to_s =~ /^\.network\.value\."(eth\d+)".(.*)/ + ifcfg_files.get($1, $2) + else + raise "Unexpected Read #{path}" + end + end + + allow(Yast::SCR).to receive(:Write) do |path, value| + if path.to_s =~ /^\.network\.value\."(eth\d+)".(.*)/ + ifcfg_files.set($1, $2, value) + elsif path.to_s == ".network" && value.nil? + true + else + raise "Unexpected Write #{path}, #{value}" + end + end + + # stub NetworkInterfaces, apart from the ifcfgs + allow(Yast::NetworkInterfaces). + to receive(:CleanHotplugSymlink) + allow(Yast::NetworkInterfaces). + to receive(:GetTypeFromSysfs). with(/eth\d+/). and_return "eth" + allow(Yast::NetworkInterfaces). + to receive(:GetType). with(/eth\d+/). and_return "eth" + allow(Yast::NetworkInterfaces). + to receive(:GetType). with(""). and_return nil + + # stub program execution + # - interfaces are up + allow(Yast::SCR). + to receive(:Execute). + with(Yast::Path.new(".target.bash"), /^wicked ifstatus/). + and_return 0 + # - reload works + allow(Yast::SCR). + to receive(:Execute). + with(Yast::Path.new(".target.bash"), /^wicked ifreload/). + and_return 0 + # - ping works + allow(Yast::SCR). + to receive(:Execute). + with(Yast::Path.new(".target.bash"), /^ping/). + and_return 0 + + # These "expect" should be "allow", but then it does not work out, + # because SCR multiplexes too much and the matchers get confused. + + # Hardware detection + expect(Yast::SCR). + to receive(:Read). + with(Yast::Path.new(".probe.netcard")). + and_return( [probe_netcard_factory(0), probe_netcard_factory(1)] ) + + # link status + expect(Yast::SCR). + to receive(:Read). + with(Yast::Path.new(".target.string"), %r{/sys/class/net/.*/carrier}). + twice. + and_return "1" + + # miscellaneous uninteresting but hard to avoid stuff + + allow(Yast::Confirm).to receive(:Detection).and_return true + expect(Yast::SCR). + to receive(:Read). + with(Yast::Path.new(".etc.install_inf.BrokenModules")). + and_return "" + expect(Yast::SCR). + to receive(:Read). + with(Yast::Path.new(".udev_persistent.net")). + and_return {} + expect(Yast::SCR). + to receive(:Read). + with(Yast::Path.new(".udev_persistent.drivers")). + and_return {} + end + + it "configures just one NIC to have a default route" do + expect { instance.configure_dhcp }.to_not raise_error + result = Yast::NetworkInterfaces.FilterDevices("") + expect(result["eth"]["eth0"]["DHCLIENT_SET_DEFAULT_ROUTE"]).to eq "yes" + expect(result["eth"]["eth1"]["DHCLIENT_SET_DEFAULT_ROUTE"]).to eq "no" + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/new_device_startmode_test.rb new/yast2-network-3.1.77/test/new_device_startmode_test.rb --- old/yast2-network-3.1.76/test/new_device_startmode_test.rb 2014-08-05 16:54:41.000000000 +0200 +++ new/yast2-network-3.1.77/test/new_device_startmode_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,6 +1,6 @@ #!rspec -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" require "yast" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/routing_test.rb new/yast2-network-3.1.77/test/routing_test.rb --- old/yast2-network-3.1.76/test/routing_test.rb 2014-08-05 16:54:41.000000000 +0200 +++ new/yast2-network-3.1.77/test/routing_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,9 +1,6 @@ #!/usr/bin/env rspec -# The test is currently not started automatically because of missing rspec.rpm -# in OpenSUSE:Factory - -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" require "yast" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/suse_firewall_4_network_test.rb new/yast2-network-3.1.77/test/suse_firewall_4_network_test.rb --- old/yast2-network-3.1.76/test/suse_firewall_4_network_test.rb 2014-08-05 16:54:41.000000000 +0200 +++ new/yast2-network-3.1.77/test/suse_firewall_4_network_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,6 +1,6 @@ #!/usr/bin/env rspec -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" require "yast" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/test_helper.rb new/yast2-network-3.1.77/test/test_helper.rb --- old/yast2-network-3.1.76/test/test_helper.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-3.1.77/test/test_helper.rb 2014-08-11 10:49:58.000000000 +0200 @@ -0,0 +1 @@ +ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.76/test/widgets_test.rb new/yast2-network-3.1.77/test/widgets_test.rb --- old/yast2-network-3.1.76/test/widgets_test.rb 2014-08-05 16:54:41.000000000 +0200 +++ new/yast2-network-3.1.77/test/widgets_test.rb 2014-08-11 10:49:58.000000000 +0200 @@ -1,6 +1,6 @@ #!/usr/bin/env rspec -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +require_relative "test_helper" require "yast" continue with "q"... Checked in at Tue Aug 12 14:13:24 CEST 2014 by ro Remember to have fun... -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
ro