Hello community, here is the log from the commit of package yast2-network for openSUSE:Leap:15.2 checked in at 2020-03-02 17:21:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/yast2-network (Old) and /work/SRC/openSUSE:Leap:15.2/.yast2-network.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network" Mon Mar 2 17:21:25 2020 rev:122 rq:779791 version:4.2.57 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/yast2-network/yast2-network.changes 2020-02-27 06:41:22.513593596 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.yast2-network.new.26092/yast2-network.changes 2020-03-02 17:21:25.934073186 +0100 @@ -1,0 +2,7 @@ +Tue Feb 25 12:16:42 CET 2020 - [email protected] + +- Using SysctlConfig class: Handle sysctl entries in different + directories (bsc#1151649). +- 4.2.57 + +------------------------------------------------------------------- Old: ---- yast2-network-4.2.56.tar.bz2 New: ---- yast2-network-4.2.57.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.1PocvZ/_old 2020-03-02 17:21:26.494074265 +0100 +++ /var/tmp/diff_new_pack.1PocvZ/_new 2020-03-02 17:21:26.526074327 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.2.56 +Version: 4.2.57 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only @@ -33,9 +33,8 @@ #for install task BuildRequires: yast2-storage-ng BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake) -# NetworkService check if Systemd is running for determining -# the current network backend -BuildRequires: yast2 >= 4.2.31 +# CFA::SysctlConfig +BuildRequires: yast2 >= 4.2.67 BuildRequires: yast2-packager >= 4.0.18 # Product control need xml agent BuildRequires: yast2-xml @@ -49,8 +48,8 @@ Requires: sysconfig >= 0.80.0 Requires: yast2-proxy Requires: yast2-storage-ng -# CFA::Sysctl -Requires: yast2 >= 4.2.25 +# CFA::SysctlConfig +Requires: yast2 >= 4.2.67 # Packages::vnc_packages Requires: augeas-lenses Requires: yast2-packager >= 4.0.18 ++++++ yast2-network-4.2.56.tar.bz2 -> yast2-network-4.2.57.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.2.56/package/yast2-network.changes new/yast2-network-4.2.57/package/yast2-network.changes --- old/yast2-network-4.2.56/package/yast2-network.changes 2020-02-24 10:19:16.000000000 +0100 +++ new/yast2-network-4.2.57/package/yast2-network.changes 2020-02-26 12:14:43.000000000 +0100 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Feb 25 12:16:42 CET 2020 - [email protected] + +- Using SysctlConfig class: Handle sysctl entries in different + directories (bsc#1151649). +- 4.2.57 + +------------------------------------------------------------------- Fri Feb 21 09:53:25 UTC 2020 - Knut Anderssen <[email protected]> - Do not crash when checking if a given 'host' is local or not diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.2.56/package/yast2-network.spec new/yast2-network-4.2.57/package/yast2-network.spec --- old/yast2-network-4.2.56/package/yast2-network.spec 2020-02-24 10:19:16.000000000 +0100 +++ new/yast2-network-4.2.57/package/yast2-network.spec 2020-02-26 12:14:43.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.2.56 +Version: 4.2.57 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only @@ -33,9 +33,8 @@ #for install task BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake) BuildRequires: yast2-storage-ng -# NetworkService check if Systemd is running for determining -# the current network backend -BuildRequires: yast2 >= 4.2.31 +# CFA::SysctlConfig +BuildRequires: yast2 >= 4.2.67 BuildRequires: yast2-packager >= 4.0.18 # Product control need xml agent BuildRequires: yast2-xml @@ -49,8 +48,8 @@ Requires: sysconfig >= 0.80.0 Requires: yast2-proxy Requires: yast2-storage-ng -# CFA::Sysctl -Requires: yast2 >= 4.2.25 +# CFA::SysctlConfig +Requires: yast2 >= 4.2.67 # Packages::vnc_packages Requires: yast2-packager >= 4.0.18 Requires: rubygem(%rb_default_ruby_abi:cfa) >= 0.6.4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.2.56/src/lib/y2network/sysconfig/config_reader.rb new/yast2-network-4.2.57/src/lib/y2network/sysconfig/config_reader.rb --- old/yast2-network-4.2.56/src/lib/y2network/sysconfig/config_reader.rb 2020-02-24 10:19:16.000000000 +0100 +++ new/yast2-network-4.2.57/src/lib/y2network/sysconfig/config_reader.rb 2020-02-26 12:14:43.000000000 +0100 @@ -17,11 +17,10 @@ # To contact SUSE LLC about this file by physical or electronic mail, you may # find current contact information at www.suse.com. require "yast" -require "cfa/sysctl" +require "cfa/sysctl_config" require "y2network/config" require "y2network/interface" require "y2network/routing" -require "y2network/sysconfig_paths" require "y2network/routing_table" require "y2network/sysconfig/routes_file" require "y2network/sysconfig/dns_reader" @@ -49,8 +48,8 @@ routing_tables = find_routing_tables(interfaces_reader.interfaces) routing = Routing.new( tables: routing_tables, - forward_ipv4: sysctl_file.forward_ipv4?, - forward_ipv6: sysctl_file.forward_ipv6? + forward_ipv4: sysctl_config_file.forward_ipv4, + forward_ipv6: sysctl_config_file.forward_ipv6 ) result = Config.new( @@ -70,8 +69,6 @@ private - include SysconfigPaths - # Returns an interfaces reader instance # # @return [SysconfigInterfaces] Interfaces reader @@ -140,15 +137,15 @@ Y2Network::Sysconfig::HostnameReader.new.config end - # Returns the Sysctl file class + # Returns the Sysctl_Config file class # - # @return [CFA::Sysctl] - def sysctl_file - return @sysctl_file if @sysctl_file - - @sysctl_file = CFA::Sysctl.new - @sysctl_file.load - @sysctl_file + # @return [CFA::SysctlConfig] + def sysctl_config_file + return @sysctl_config_file if @sysctl_config_file + + @sysctl_config_file = CFA::SysctlConfig.new + @sysctl_config_file.load + @sysctl_config_file end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.2.56/src/lib/y2network/sysconfig/config_writer.rb new/yast2-network-4.2.57/src/lib/y2network/sysconfig/config_writer.rb --- old/yast2-network-4.2.56/src/lib/y2network/sysconfig/config_writer.rb 2020-02-24 10:19:16.000000000 +0100 +++ new/yast2-network-4.2.57/src/lib/y2network/sysconfig/config_writer.rb 2020-02-26 12:14:43.000000000 +0100 @@ -18,13 +18,12 @@ # find current contact information at www.suse.com. require "yast" -require "y2network/sysconfig_paths" require "y2network/sysconfig/routes_file" require "y2network/sysconfig/dns_writer" require "y2network/sysconfig/hostname_writer" require "y2network/sysconfig/connection_config_writer" require "y2network/sysconfig/interfaces_writer" -require "cfa/sysctl" +require "cfa/sysctl_config" Yast.import "Host" @@ -64,8 +63,6 @@ private - include SysconfigPaths - # Writes changes per interface # # @param config [Y2Network::Config] current configuration for writing @@ -103,20 +100,22 @@ # # @param routing [Y2Network::Routing] routing configuration def write_ip_forwarding(routing) - sysctl = CFA::Sysctl.new - sysctl.load - sysctl.forward_ipv4 = routing.forward_ipv4 - sysctl.forward_ipv6 = routing.forward_ipv6 - sysctl.save - - update_ip_forwarding(sysctl.raw_forward_ipv4, :ipv4) - update_ip_forwarding(sysctl.raw_forward_ipv6, :ipv6) + sysctl_config = CFA::SysctlConfig.new + sysctl_config.load + sysctl_config.forward_ipv4 = routing.forward_ipv4 + sysctl_config.forward_ipv6 = routing.forward_ipv6 + sysctl_config.save unless sysctl_config.conflict? + + update_ip_forwarding((sysctl_config.forward_ipv4 ? "1" : "0"), + :ipv4) + update_ip_forwarding((sysctl_config.forward_ipv6 ? "1" : "0"), + :ipv6) nil end IP_SYSCTL = { - ipv4: IPV4_SYSCTL, - ipv6: IPV6_SYSCTL + ipv4: "net.ipv4.ip_forward", + ipv6: "net.ipv6.conf.all.forwarding" }.freeze # Updates the IP forwarding configuration of the running kernel diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.2.56/src/lib/y2network/sysconfig_paths.rb new/yast2-network-4.2.57/src/lib/y2network/sysconfig_paths.rb --- old/yast2-network-4.2.56/src/lib/y2network/sysconfig_paths.rb 2020-02-24 10:19:16.000000000 +0100 +++ new/yast2-network-4.2.57/src/lib/y2network/sysconfig_paths.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -# Copyright (c) [2019] SUSE LLC -# -# 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 SUSE LLC. -# -# To contact SUSE LLC about this file by physical or electronic mail, you may -# find current contact information at www.suse.com. - -module Y2Network - # Various constants which tells what can be found where in sysconfig - module SysconfigPaths - # sysctl keys, used as *single* SCR path components below - IPV4_SYSCTL = "net.ipv4.ip_forward".freeze - IPV6_SYSCTL = "net.ipv6.conf.all.forwarding".freeze - - private_constant :IPV4_SYSCTL - private_constant :IPV6_SYSCTL - - # SCR paths IPv4 / IPv6 Forwarding - SYSCTL_AGENT_PATH = ".etc.sysctl_conf".freeze - SYSCTL_IPV4_PATH = (SYSCTL_AGENT_PATH + ".\"#{IPV4_SYSCTL}\"").freeze - SYSCTL_IPV6_PATH = (SYSCTL_AGENT_PATH + ".\"#{IPV6_SYSCTL}\"").freeze - end -end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.2.56/src/modules/Lan.rb new/yast2-network-4.2.57/src/modules/Lan.rb --- old/yast2-network-4.2.56/src/modules/Lan.rb 2020-02-24 10:19:16.000000000 +0100 +++ new/yast2-network-4.2.57/src/modules/Lan.rb 2020-02-26 12:14:43.000000000 +0100 @@ -28,7 +28,7 @@ # Representation of the configuration of network cards. # Input and output routines. require "yast" -require "cfa/sysctl" +require "cfa/sysctl_config" require "network/network_autoyast" require "network/confirm_virt_proposal" require "ui/text_helpers" @@ -221,9 +221,9 @@ # # return [Boolean] true when IPv6 is enabled in the system def readIPv6 - sysctl_file = CFA::Sysctl.new - sysctl_file.load - ipv6 = !sysctl_file.disable_ipv6? + sysctl_config_file = CFA::SysctlConfig.new + sysctl_config_file.load + ipv6 = !sysctl_config_file.disable_ipv6 log.info("readIPv6: IPv6 is #{ipv6 ? "enabled" : "disabled"}") ipv6 end @@ -406,10 +406,10 @@ def writeIPv6 log.info("writeIPv6: IPv6 is #{@ipv6 ? "enabled" : "disabled"}") - sysctl_file = CFA::Sysctl.new - sysctl_file.load - sysctl_file.disable_ipv6 = !@ipv6 - sysctl_file.save + sysctl_config_file = CFA::SysctlConfig.new + sysctl_config_file.load + sysctl_config_file.disable_ipv6 = !@ipv6 + sysctl_config_file.save unless sysctl_config_file.conflict? SCR.Execute( path(".target.bash"), Builtins.sformat( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.2.56/test/lan_test.rb new/yast2-network-4.2.57/test/lan_test.rb --- old/yast2-network-4.2.56/test/lan_test.rb 2020-02-24 10:19:16.000000000 +0100 +++ new/yast2-network-4.2.57/test/lan_test.rb 2020-02-26 12:14:43.000000000 +0100 @@ -242,12 +242,12 @@ end describe "#readIPv6" do - let(:sysctl_file) { CFA::Sysctl.new } + let(:sysctl_config_file) { CFA::SysctlConfig.new } before do - allow(CFA::Sysctl).to receive(:new).and_return(sysctl_file) - allow(sysctl_file).to receive(:load) - sysctl_file.disable_ipv6 = disable_ipv6 + allow(CFA::SysctlConfig).to receive(:new).and_return(sysctl_config_file) + allow(sysctl_config_file).to receive(:load) + sysctl_config_file.disable_ipv6 = disable_ipv6 end context "when IPv6 is disabled" do @@ -268,20 +268,20 @@ end describe "#readIPv6" do - let(:sysctl_file) { CFA::Sysctl.new } + let(:sysctl_config_file) { CFA::SysctlConfig.new } before do - allow(CFA::Sysctl).to receive(:new).and_return(sysctl_file) - allow(sysctl_file).to receive(:load) - allow(sysctl_file).to receive(:save) + allow(CFA::SysctlConfig).to receive(:new).and_return(sysctl_config_file) + allow(sysctl_config_file).to receive(:load) + allow(sysctl_config_file).to receive(:save) Yast::Lan.ipv6 = ipv6 end context "when IPv6 is enabled" do let(:ipv6) { true } - it "enables IPv6 in the sysctl configuration" do - expect(sysctl_file).to receive(:disable_ipv6=).with(false) + it "enables IPv6 in the sysctl_config configuration" do + expect(sysctl_config_file).to receive(:disable_ipv6=).with(false) Yast::Lan.writeIPv6 end @@ -294,8 +294,8 @@ context "when IPv6 is disabled" do let(:ipv6) { false } - it "disables IPv6 in the sysctl configuration" do - expect(sysctl_file).to receive(:disable_ipv6=).with(true) + it "disables IPv6 in the sysctl_config configuration" do + expect(sysctl_config_file).to receive(:disable_ipv6=).with(true) Yast::Lan.writeIPv6 end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.2.56/test/y2network/sysconfig/config_reader_test.rb new/yast2-network-4.2.57/test/y2network/sysconfig/config_reader_test.rb --- old/yast2-network-4.2.56/test/y2network/sysconfig/config_reader_test.rb 2020-02-24 10:19:16.000000000 +0100 +++ new/yast2-network-4.2.57/test/y2network/sysconfig/config_reader_test.rb 2020-02-26 12:14:43.000000000 +0100 @@ -88,11 +88,14 @@ end end - describe "#forward_ipv4?" do - let(:sysctl_file) { instance_double(CFA::Sysctl, forward_ipv4?: forward_ipv4).as_null_object } + describe "#forward_ipv4" do + let(:sysctl_file) do + instance_double(CFA::SysctlConfig, + forward_ipv4: forward_ipv4).as_null_object + end before do - allow(CFA::Sysctl).to receive(:new).and_return(sysctl_file) + allow(CFA::SysctlConfig).to receive(:new).and_return(sysctl_file) end context "when IPv4 forwarding is allowed" do @@ -112,11 +115,14 @@ end end - describe "#forward_ipv6?" do - let(:sysctl_file) { instance_double(CFA::Sysctl, forward_ipv6?: forward_ipv6).as_null_object } + describe "#forward_ipv6" do + let(:sysctl_file) do + instance_double(CFA::SysctlConfig, + forward_ipv6: forward_ipv6).as_null_object + end before do - allow(CFA::Sysctl).to receive(:new).and_return(sysctl_file) + allow(CFA::SysctlConfig).to receive(:new).and_return(sysctl_file) end context "when IPv6 forwarding is allowed" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.2.56/test/y2network/sysconfig/config_writer_test.rb new/yast2-network-4.2.57/test/y2network/sysconfig/config_writer_test.rb --- old/yast2-network-4.2.56/test/y2network/sysconfig/config_writer_test.rb 2020-02-24 10:19:16.000000000 +0100 +++ new/yast2-network-4.2.57/test/y2network/sysconfig/config_writer_test.rb 2020-02-26 12:14:43.000000000 +0100 @@ -25,7 +25,6 @@ require "y2network/routing" require "y2network/route" require "y2network/routing_table" -require "y2network/sysconfig_paths" require "y2network/connection_config/ethernet" require "y2network/connection_config/ip_config" @@ -99,8 +98,8 @@ let(:dns_writer) { instance_double(Y2Network::Sysconfig::DNSWriter, write: nil) } let(:hostname_writer) { instance_double(Y2Network::Sysconfig::HostnameWriter, write: nil) } let(:interfaces_writer) { instance_double(Y2Network::Sysconfig::InterfacesWriter, write: nil) } - let(:sysctl_file) do - CFA::Sysctl.new do |f| + let(:sysctl_config_file) do + CFA::SysctlConfig.new do |f| f.forward_ipv4 = false f.forward_ipv6 = false end @@ -120,9 +119,9 @@ allow_any_instance_of(Y2Network::Sysconfig::ConnectionConfigWriter).to receive(:write) allow(Y2Network::Sysconfig::InterfacesWriter).to receive(:new) .and_return(interfaces_writer) - allow(CFA::Sysctl).to receive(:new).and_return(sysctl_file) - allow(sysctl_file).to receive(:load) - allow(sysctl_file).to receive(:save) + allow(CFA::SysctlConfig).to receive(:new).and_return(sysctl_config_file) + allow(sysctl_config_file).to receive(:load) + allow(sysctl_config_file).to receive(:save) end it "saves general routes to main routes file" do @@ -219,9 +218,9 @@ let(:forward_ipv4) { true } it "Writes ip forwarding setup for IPv4" do - expect(sysctl_file).to receive(:forward_ipv4=).with(true).and_call_original - expect(sysctl_file).to receive(:forward_ipv6=).with(false).and_call_original - expect(sysctl_file).to receive(:save) + expect(sysctl_config_file).to receive(:forward_ipv4=).with(true).and_call_original + expect(sysctl_config_file).to receive(:forward_ipv6=).with(false).and_call_original + expect(sysctl_config_file).to receive(:save) writer.write(config) end end @@ -230,9 +229,9 @@ let(:forward_ipv6) { true } it "Writes ip forwarding setup for IPv6" do - expect(sysctl_file).to receive(:forward_ipv4=).with(false).and_call_original - expect(sysctl_file).to receive(:forward_ipv6=).with(true).and_call_original - expect(sysctl_file).to receive(:save) + expect(sysctl_config_file).to receive(:forward_ipv4=).with(false).and_call_original + expect(sysctl_config_file).to receive(:forward_ipv6=).with(true).and_call_original + expect(sysctl_config_file).to receive(:save) writer.write(config) end
