Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2018-06-19 11:53:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network" Tue Jun 19 11:53:10 2018 rev:386 rq:617467 version:4.0.34 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2018-05-11 14:26:58.830914198 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 2018-06-19 11:53:20.005044352 +0200 @@ -1,0 +2,22 @@ +Mon Jun 18 08:01:44 UTC 2018 - mfi...@suse.com + +- bnc#1097954 + - fixed several rpmlint warnings +- 4.0.34 + +------------------------------------------------------------------- +Tue Jun 12 10:29:30 CEST 2018 - sch...@suse.de + +- AutoYaST: Checking for empty host name entries and informing + the user. (bnc#1095113) + 4.0.33 + +------------------------------------------------------------------- +Thu Jun 7 10:48:42 UTC 2018 - knut.anders...@suse.com + +- AutoYaST: Do not crash when trying to convert the /etc/hosts + profile declaration from multiple line host entries for the same + host to just one line (bnc#1095971) +- 4.0.32 + +------------------------------------------------------------------- Old: ---- yast2-network-4.0.31.tar.bz2 New: ---- yast2-network-4.0.34.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.Bbtfnt/_old 2018-06-19 11:53:21.065004998 +0200 +++ /var/tmp/diff_new_pack.Bbtfnt/_new 2018-06-19 11:53:21.065004998 +0200 @@ -17,11 +17,12 @@ Name: yast2-network -Version: 4.0.31 +Version: 4.0.34 Release: 0 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build +Url: https://github.com/yast/yast-network Source0: %{name}-%{version}.tar.bz2 BuildRequires: update-desktop-files @@ -64,12 +65,15 @@ Requires: yast2-ruby-bindings >= 1.0.0 -Obsoletes: yast2-network-devel-doc +Obsoletes: yast2-network-devel-doc <= 3.1.154 +Provides: yast2-network-devel-doc = %{version} Summary: YaST2 - Network Configuration License: GPL-2.0 Group: System/YaST +%build + %description This package contains the YaST2 component for network configuration. ++++++ yast2-network-4.0.31.tar.bz2 -> yast2-network-4.0.34.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.0.31/package/yast2-network.changes new/yast2-network-4.0.34/package/yast2-network.changes --- old/yast2-network-4.0.31/package/yast2-network.changes 2018-05-09 15:48:51.000000000 +0200 +++ new/yast2-network-4.0.34/package/yast2-network.changes 2018-06-18 11:21:20.000000000 +0200 @@ -1,4 +1,26 @@ ------------------------------------------------------------------- +Mon Jun 18 08:01:44 UTC 2018 - mfi...@suse.com + +- bnc#1097954 + - fixed several rpmlint warnings +- 4.0.34 + +------------------------------------------------------------------- +Tue Jun 12 10:29:30 CEST 2018 - sch...@suse.de + +- AutoYaST: Checking for empty host name entries and informing + the user. (bnc#1095113) + 4.0.33 + +------------------------------------------------------------------- +Thu Jun 7 10:48:42 UTC 2018 - knut.anders...@suse.com + +- AutoYaST: Do not crash when trying to convert the /etc/hosts + profile declaration from multiple line host entries for the same + host to just one line (bnc#1095971) +- 4.0.32 + +------------------------------------------------------------------- Wed May 9 10:35:36 UTC 2018 - knut.anders...@suse.com - Fix the check for adjusting ifcfg configuration in case of diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.0.31/package/yast2-network.spec new/yast2-network-4.0.34/package/yast2-network.spec --- old/yast2-network-4.0.31/package/yast2-network.spec 2018-05-09 15:48:51.000000000 +0200 +++ new/yast2-network-4.0.34/package/yast2-network.spec 2018-06-18 11:21:20.000000000 +0200 @@ -17,11 +17,12 @@ Name: yast2-network -Version: 4.0.31 +Version: 4.0.34 Release: 0 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build +Url: https://github.com/yast/yast-network Source0: %{name}-%{version}.tar.bz2 BuildRequires: update-desktop-files @@ -64,12 +65,15 @@ Requires: yast2-ruby-bindings >= 1.0.0 -Obsoletes: yast2-network-devel-doc +Obsoletes: yast2-network-devel-doc <= 3.1.154 +Provides: yast2-network-devel-doc = %{version} Summary: YaST2 - Network Configuration License: GPL-2.0 Group: System/YaST +%build + %description This package contains the YaST2 component for network configuration. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.0.31/src/lib/network/network_autoyast.rb new/yast2-network-4.0.34/src/lib/network/network_autoyast.rb --- old/yast2-network-4.0.31/src/lib/network/network_autoyast.rb 2018-05-09 15:48:51.000000000 +0200 +++ new/yast2-network-4.0.34/src/lib/network/network_autoyast.rb 2018-06-18 11:21:20.000000000 +0200 @@ -22,6 +22,7 @@ Yast.import "Linuxrc" Yast.import "Host" Yast.import "Routing" + Yast.import "AutoInstall" end # Merges existing config from system into given configuration map @@ -358,6 +359,10 @@ yast_module.Import(ay_config) + # Results of imported values semantic check. + # Return true in order to not call the NetworkAutoconfiguration.configure_hosts + return true unless AutoInstall.valid_imported_values + write ||= !ay_general_section.fetch("mode", "second_stage" => true)["second_stage"] log.info("Write configuration instantly: #{write}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.0.31/src/modules/Host.rb new/yast2-network-4.0.34/src/modules/Host.rb --- old/yast2-network-4.0.31/src/modules/Host.rb 2018-05-09 15:48:51.000000000 +0200 +++ new/yast2-network-4.0.34/src/modules/Host.rb 2018-06-18 11:21:20.000000000 +0200 @@ -37,6 +37,7 @@ Yast.import "NetworkInterfaces" Yast.import "String" Yast.import "Summary" + Yast.import "AutoInstall" Yast.include self, "network/routines.rb" @@ -178,7 +179,7 @@ # use ::1 entry as a reference if (imported_hosts["::1"] || []).size > 1 imported_hosts.each_pair do |k, v| - imported_hosts[k] = v.join(" ") + imported_hosts[k] = [v.join(" ")] end end @@ -186,6 +187,8 @@ set_names(ip, names) end + check_profile_for_errors(imported_hosts) + true end @@ -343,6 +346,21 @@ private + # Semantic AutoYaST profile check + # + # Problems will be stored in AutoInstall.issues_list. + # @param [Hash] input autoyast settings + def check_profile_for_errors(imported_hosts) + # Checking for empty hostnames + imported_hosts.each do |ip, hosts| + next unless hosts.any? { |host| host.strip.empty? } + AutoInstall.issues_list.add(:invalid_value, "host", "names", + "", + # TRANSLATORS: %s is host address + _("The name must not be empty for %s.") % ip) + end + end + # Give address a new list of names. def set_names(address, names) @hosts.delete_by_ip(address) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.0.31/test/host_test.rb new/yast2-network-4.0.34/test/host_test.rb --- old/yast2-network-4.0.31/test/host_test.rb 2018-05-09 15:48:51.000000000 +0200 +++ new/yast2-network-4.0.34/test/host_test.rb 2018-06-18 11:21:20.000000000 +0200 @@ -132,6 +132,8 @@ } end + let(:i_list) { double("IssuesList", add: nil) } + it "loads the current '/etc/hosts' entries" do Yast::Host.Import("hosts" => {}) @@ -143,6 +145,33 @@ expect(Yast::Host.name_map).to eql(etc_hosts.merge("10.20.1.29" => ["beholder"])) end + + it "blames empty host name entries" do + expect(Yast::AutoInstall).to receive(:issues_list).and_return(i_list) + expect(i_list).to receive(:add) + .with(:invalid_value, + "host", + "names", + "", + "The name must not be empty for 10.20.1.29.") + Yast::Host.Import("hosts" => { "10.20.1.29" => [" "] }) + end + + context "when the profile contains multiple host entries for ::1" do + let(:holder_entries) { ["beholder.test.com test.com", "second.test.com second"] } + let(:hosts) do + { + "::1" => ["localhost", "ipv6-localhost", "ipv6-loopback"], + "10.20.1.29" => holder_entries + } + end + + it "converts each duplicated entry to just one line" do + Yast::Host.Import("hosts" => hosts) + + expect(Yast::Host.name_map["10.20.1.29"]).to eql([holder_entries.join(" ")]) + end + end end describe ".Export" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.0.31/test/test_helper.rb new/yast2-network-4.0.34/test/test_helper.rb --- old/yast2-network-4.0.31/test/test_helper.rb 2018-05-09 15:48:51.000000000 +0200 +++ new/yast2-network-4.0.34/test/test_helper.rb 2018-06-18 11:21:20.000000000 +0200 @@ -24,6 +24,9 @@ Yast.const_set name.to_sym, Class.new { def self.fake_method; end } end +# stub classes from other modules to speed up a build +stub_module("AutoInstall") + # A two level section/key => value store # to remember values of /etc/sysconfig/network/ifcfg-* class SectionKeyValue