Hello community, here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2020-11-29 12:25:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-network (Old) and /work/SRC/openSUSE:Factory/.yast2-network.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network" Sun Nov 29 12:25:32 2020 rev:437 rq:851346 version:4.3.30 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2020-11-23 16:26:36.724535171 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-network.new.5913/yast2-network.changes 2020-11-29 12:25:45.257839906 +0100 @@ -1,0 +2,15 @@ +Wed Nov 25 10:02:37 UTC 2020 - Knut Anderssen <kanders...@suse.com> + +- Do not crash when trying to replace an /etc/hosts alias using the + current static hostname and it is not set (bsc#1179178) +- 4.3.30 + +------------------------------------------------------------------- +Mon Nov 23 08:03:17 UTC 2020 - Knut Anderssen <kanders...@suse.com> + +- Do not show a warn message when modifying a bonding configuration + and all the slaves are already configured with BOOTPROTO='none' + (bsc#1178950) +- 4.3.29 + +------------------------------------------------------------------- Old: ---- yast2-network-4.3.28.tar.bz2 New: ---- yast2-network-4.3.30.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.f70Emy/_old 2020-11-29 12:25:46.561841225 +0100 +++ /var/tmp/diff_new_pack.f70Emy/_new 2020-11-29 12:25:46.565841229 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.3.28 +Version: 4.3.30 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only ++++++ yast2-network-4.3.28.tar.bz2 -> yast2-network-4.3.30.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/.github/workflows/ci.yml new/yast2-network-4.3.30/.github/workflows/ci.yml --- old/yast2-network-4.3.28/.github/workflows/ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-network-4.3.30/.github/workflows/ci.yml 2020-11-27 15:07:55.000000000 +0100 @@ -0,0 +1,85 @@ + +# See https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions + +name: CI + +on: [push, pull_request] + +jobs: + Tests: + runs-on: ubuntu-latest + container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + + steps: + + - name: Git Checkout + uses: actions/checkout@v1 + + # just for easier debugging... + - name: Inspect Installed Packages + run: rpm -qa | sort + + - name: Unit Tests + run: rake test:unit + # enable code coverage reporting + env: + COVERAGE: 1 + + # send the coverage report to coveralls.io + - name: Coveralls Report + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + Rubocop: + runs-on: ubuntu-latest + container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + + steps: + + - name: Git Checkout + uses: actions/checkout@v1 + + - name: Rubocop + run: rake check:rubocop + + Package: + runs-on: ubuntu-latest + container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + + steps: + + - name: Git Checkout + uses: actions/checkout@v1 + + - name: Package Build + run: yast-ci-ruby -o package + + Yardoc: + runs-on: ubuntu-latest + container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + + steps: + + - name: Git Checkout + uses: actions/checkout@v1 + + - name: Yardoc + run: rake check:doc + + # downloading the Docker image takes some time so bundling several fast + # checks into one job avoids that overhead + Checks: + runs-on: ubuntu-latest + container: registry.opensuse.org/yast/head/containers/yast-ruby:latest + + steps: + + - name: Git Checkout + uses: actions/checkout@v1 + + - name: Perl Syntax + run: yast-ci-ruby -o perl_syntax + + - name: POT Check + run: rake check:pot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/.travis.yml new/yast2-network-4.3.30/.travis.yml --- old/yast2-network-4.3.28/.travis.yml 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,15 +0,0 @@ -sudo: required -language: bash -services: - - docker - -before_install: - - docker build -t yast-network-image . - # list the installed packages (just for easier debugging) - - docker run --rm -it yast-network-image rpm -qa | sort - -script: - # the "yast-travis-ruby" script is included in the base yastdevel/ruby image - # see https://github.com/yast/docker-yast-ruby/blob/master/yast-travis-ruby - - docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" yast-network-image yast-travis-ruby - - docker run -it -e TRAVIS=1 -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" yast-network-image rake check:doc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/Dockerfile new/yast2-network-4.3.30/Dockerfile --- old/yast2-network-4.3.28/Dockerfile 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/Dockerfile 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -FROM registry.opensuse.org/yast/head/containers/yast-ruby:latest -COPY . /usr/src/app - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/README.md new/yast2-network-4.3.30/README.md --- old/yast2-network-4.3.28/README.md 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/README.md 2020-11-27 15:07:55.000000000 +0100 @@ -1,9 +1,11 @@ ## YaST Network Module -[](https://travis-ci.org/yast/yast-network) -[](https://ci.opensuse.org/view/Yast/job/yast-network-master/) -[](https://codeclimate.com/github/yast/yast-network) +[]( +https://github.com/yast/yast-network/actions?query=branch%3Amaster) +[]( +https://ci.opensuse.org/view/Yast/job/yast-yast-network-master/) [](https://coveralls.io/r/yast/yast-network) +[](https://codeclimate.com/github/yast/yast-network) The YaST2 Network module manages network configuration including device configuration, DNS, Routing and more diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/package/yast2-network.changes new/yast2-network-4.3.30/package/yast2-network.changes --- old/yast2-network-4.3.28/package/yast2-network.changes 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/package/yast2-network.changes 2020-11-27 15:07:55.000000000 +0100 @@ -1,4 +1,19 @@ ------------------------------------------------------------------- +Wed Nov 25 10:02:37 UTC 2020 - Knut Anderssen <kanders...@suse.com> + +- Do not crash when trying to replace an /etc/hosts alias using the + current static hostname and it is not set (bsc#1179178) +- 4.3.30 + +------------------------------------------------------------------- +Mon Nov 23 08:03:17 UTC 2020 - Knut Anderssen <kanders...@suse.com> + +- Do not show a warn message when modifying a bonding configuration + and all the slaves are already configured with BOOTPROTO='none' + (bsc#1178950) +- 4.3.29 + +------------------------------------------------------------------- Fri Nov 20 07:23:27 UTC 2020 - Knut Anderssen <kanders...@suse.com> - Fixed detection of connection configuration changes (bsc#1178950) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/package/yast2-network.spec new/yast2-network-4.3.30/package/yast2-network.spec --- old/yast2-network-4.3.28/package/yast2-network.spec 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/package/yast2-network.spec 2020-11-27 15:07:55.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.3.28 +Version: 4.3.30 Release: 0 Summary: YaST2 - Network Configuration License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/src/lib/y2network/interface_config_builders/bonding.rb new/yast2-network-4.3.30/src/lib/y2network/interface_config_builders/bonding.rb --- old/yast2-network-4.3.28/src/lib/y2network/interface_config_builders/bonding.rb 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/src/lib/y2network/interface_config_builders/bonding.rb 2020-11-27 15:07:55.000000000 +0100 @@ -50,14 +50,17 @@ connection_config.options end - # Checks if any of given device is already configured and need adaptation for bridge + # Returns whether any configuration of the given devices needs to be + # adapted in order to be added as a bonding slave + # @param devices [Array<String>] devices to check - # @return [Boolean] true if there is device that needs adaptation - def already_configured?(devices) + # return [Boolean] true if there is a device config that needs + # to be adaptated; false otherwise + def require_adaptation?(devices) devices.any? do |device| next false unless yast_config.configured_interface?(device) - yast_config.connections.by_name(device).startmode.name != "none" + yast_config.connections.by_name(device).bootproto.name != "none" end end @@ -66,7 +69,7 @@ slaves.each do |slave| interface = yast_config.interfaces.by_name(slave) connection = yast_config.connections.by_name(slave) - next if connection && connection.startmode.name == "none" + next if connection && connection.bootproto.name == "none" builder = InterfaceConfigBuilder.for(interface.type, config: connection) builder.name = interface.name diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/src/lib/y2network/interface_config_builders/bridge.rb new/yast2-network-4.3.30/src/lib/y2network/interface_config_builders/bridge.rb --- old/yast2-network-4.3.28/src/lib/y2network/interface_config_builders/bridge.rb 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/src/lib/y2network/interface_config_builders/bridge.rb 2020-11-27 15:07:55.000000000 +0100 @@ -32,10 +32,13 @@ super(type: InterfaceType::BRIDGE, config: config) end - # Checks if any of given device is already configured and need adaptation for bridge + # Returns whether any configuration of the given devices needs to be + # adapted in order to be added as a bridge port + # # @param devices [Array<String>] devices to check - # @return [Boolean] true if there is device that needs adaptation - def already_configured?(devices) + # @return [Boolean] true if there is a device config that needs + # to be adaptated; false otherwise + def require_adaptation?(devices) devices.any? do |device| next false unless yast_config.configured_interface?(device) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/src/lib/y2network/widgets/bond_slave.rb new/yast2-network-4.3.30/src/lib/y2network/widgets/bond_slave.rb --- old/yast2-network-4.3.28/src/lib/y2network/widgets/bond_slave.rb 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/src/lib/y2network/widgets/bond_slave.rb 2020-11-27 15:07:55.000000000 +0100 @@ -130,7 +130,7 @@ return false unless continue_with_duplicates?(physical_ports) end - if @settings.already_configured?(selected_items || []) + if @settings.require_adaptation?(selected_items || []) return Yast::Popup.ContinueCancel( _( "At least one selected device is already configured.\n" \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/src/lib/y2network/widgets/bridge_ports.rb new/yast2-network-4.3.30/src/lib/y2network/widgets/bridge_ports.rb --- old/yast2-network-4.3.28/src/lib/y2network/widgets/bridge_ports.rb 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/src/lib/y2network/widgets/bridge_ports.rb 2020-11-27 15:07:55.000000000 +0100 @@ -69,7 +69,7 @@ # # @return true if valid or user decision if not def validate - if @settings.already_configured?(value || []) + if @settings.require_adaptation?(value || []) Yast::Popup.ContinueCancel( _( "At least one selected device is already configured.\n" \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/src/modules/Host.rb new/yast2-network-4.3.30/src/modules/Host.rb --- old/yast2-network-4.3.28/src/modules/Host.rb 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/src/modules/Host.rb 2020-11-27 15:07:55.000000000 +0100 @@ -192,8 +192,8 @@ # Update hosts according to the current hostname # (only one hostname, assigned to all IP) - # @param oldhn [String] current hostname - # @param newhn [String] current domain name + # @param oldhn [String, nil] hostname to be replaced + # @param newhn [String] new hostname value # @param ip [String] to assign # @return [Boolean] true if success def Update(oldhn, newhn, ip) @@ -203,7 +203,7 @@ log.info("Updating /etc/hosts: #{oldhn} -> #{newhn}: #{ip}") # Remove old hostname from hosts - @hosts.delete_hostname(oldhn) if !oldhn.empty? + @hosts.delete_hostname(oldhn) if ![nil, ""].include?(oldhn) # Add localhost if missing @hosts.add_entry("127.0.0.1", "localhost") if @hosts.host("127.0.0.1").empty? @@ -275,7 +275,7 @@ static_ips = StaticIPs().reject { |sip| @hosts.include_ip?(sip) } return if static_ips.empty? - fqhostname = Hostname.MergeFQ(DNS.hostname, DNS.domain) + fqhostname = DNS.hostname # assign system wide hostname to a static ip without particular hostname static_ips.each { |sip| Update(fqhostname, fqhostname, sip) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/test/test_helper.rb new/yast2-network-4.3.30/test/test_helper.rb --- old/yast2-network-4.3.28/test/test_helper.rb 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/test/test_helper.rb 2020-11-27 15:07:55.000000000 +0100 @@ -35,12 +35,20 @@ # track all ruby files under src SimpleCov.track_files("#{srcdir}/**/*.rb") - # use coveralls for on-line code coverage reporting at Travis CI - if ENV["TRAVIS"] - require "coveralls" + # additionally use the LCOV format for on-line code coverage reporting at CI + if ENV["CI"] || ENV["COVERAGE_LCOV"] + require "simplecov-lcov" + + SimpleCov::Formatter::LcovFormatter.config do |c| + c.report_with_single_file = true + # this is the default Coveralls GitHub Action location + # https://github.com/marketplace/actions/coveralls-github-action + c.single_report_path = "coverage/lcov.info" + end + SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter + SimpleCov::Formatter::LcovFormatter ] end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/test/y2network/interface_config_builders/bonding_test.rb new/yast2-network-4.3.30/test/y2network/interface_config_builders/bonding_test.rb --- old/yast2-network-4.3.28/test/y2network/interface_config_builders/bonding_test.rb 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/test/y2network/interface_config_builders/bonding_test.rb 2020-11-27 15:07:55.000000000 +0100 @@ -28,6 +28,30 @@ let(:config) { Y2Network::Config.new(source: :test) } before do + allow(config).to receive(:interfaces).and_return(interfaces_collection) + allow(config).to receive(:connections).and_return(connection_configs_collection) + allow(connection_config).to receive(:name).and_return(connection_name) + allow(connection_config).to receive(:find_master).and_return(connection_master) + allow(Yast::Arch).to receive(:s390).and_return(s390) + end + + let(:s390) { false } + + let(:interfaces_collection) do + Y2Network::InterfacesCollection.new([interface1, interface2]) + end + + let(:connection_configs_collection) do + Y2Network::ConnectionConfigsCollection.new([connection_config]) + end + + let(:interface1) { Y2Network::Interface.new("iface1") } + let(:interface2) { Y2Network::Interface.new("iface2") } + let(:connection_config) { Y2Network::ConnectionConfig::Bonding.new } + let(:connection_name) { "" } + let(:connection_master) { nil } + + before do allow(Y2Network::Config) .to receive(:find) .with(:yast) @@ -35,7 +59,7 @@ end subject(:config_builder) do - res = Y2Network::InterfaceConfigBuilders::Bonding.new + res = Y2Network::InterfaceConfigBuilders::Bonding.new(config: connection_config) res.name = "bond0" res end @@ -47,38 +71,6 @@ end describe "#bondable_interfaces" do - before do - allow(config).to receive(:interfaces).and_return(interfaces_collection) - - allow(config).to receive(:connections).and_return(connection_configs_collection) - - allow(connection_config).to receive(:name).and_return(connection_name) - - allow(connection_config).to receive(:find_master).and_return(connection_master) - - allow(Yast::Arch).to receive(:s390).and_return(s390) - end - - let(:interfaces_collection) do - Y2Network::InterfacesCollection.new([interface1, interface2]) - end - - let(:connection_configs_collection) do - Y2Network::ConnectionConfigsCollection.new([connection_config]) - end - - let(:interface1) { Y2Network::Interface.new("iface1") } - - let(:interface2) { Y2Network::Interface.new("iface2") } - - let(:connection_config) { Y2Network::ConnectionConfig::Bonding.new } - - let(:connection_name) { "" } - - let(:connection_master) { nil } - - let(:s390) { false } - shared_examples "interface filters" do context "when an interface does not have a connection config yet" do let(:connection_name) { "iface2" } # only iface2 has a config @@ -147,4 +139,52 @@ include_examples "interface filters" end end + + describe "require_adaptation?" do + before do + connection_config.slaves = ["iface1", "iface2"] + end + + context "when there is no slave configured" do + it "returns false" do + expect(subject.require_adaptation?(connection_config.slaves)).to eql(false) + end + end + + context "when all the slaves are properly configure do" do + it "return false" do + subject.save + expect(subject.require_adaptation?(connection_config.slaves)).to eql(false) + end + end + context "when at least one configured slave need to be adapted" do + it "return true" do + subject.save + iface1_conn = connection_configs_collection.by_name("iface1") + iface1_conn.bootproto = Y2Network::BootProtocol::DHCP + expect(subject.require_adaptation?(connection_config.slaves)).to eql(true) + end + end + + end + + describe "#save" do + let(:connection_name) { "bond0" } + + it "adapts the selected slaves configuration when needed" do + connection_config.slaves = ["iface1", "iface2"] + + expect(Y2Network::InterfaceConfigBuilder) + .to receive(:for).with(anything, config: nil).twice.and_call_original + subject.save + iface1_conn = connection_configs_collection.by_name("iface1") + iface2_conn = connection_configs_collection.by_name("iface2") + iface2_conn.bootproto = Y2Network::BootProtocol::DHCP + expect(Y2Network::InterfaceConfigBuilder) + .to receive(:for).with(anything, config: iface2_conn).once.and_call_original + expect(Y2Network::InterfaceConfigBuilder) + .to_not receive(:for).with(anything, config: iface1_conn) + subject.save + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/test/y2network/interface_config_builders/bridge_test.rb new/yast2-network-4.3.30/test/y2network/interface_config_builders/bridge_test.rb --- old/yast2-network-4.3.28/test/y2network/interface_config_builders/bridge_test.rb 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/test/y2network/interface_config_builders/bridge_test.rb 2020-11-27 15:07:55.000000000 +0100 @@ -53,9 +53,9 @@ end end - describe "#already_configured?" do + describe "#require_adaptation?" do it "returns boolean" do - expect(subject.already_configured?([])).to eq false + expect(subject.require_adaptation?([])).to eq false end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-4.3.28/test/y2network/widgets/bridge_ports_test.rb new/yast2-network-4.3.30/test/y2network/widgets/bridge_ports_test.rb --- old/yast2-network-4.3.28/test/y2network/widgets/bridge_ports_test.rb 2020-11-20 12:30:12.000000000 +0100 +++ new/yast2-network-4.3.30/test/y2network/widgets/bridge_ports_test.rb 2020-11-27 15:07:55.000000000 +0100 @@ -28,7 +28,7 @@ subject { described_class.new(builder) } before do - allow(builder).to receive(:already_configured?).and_return(false) + allow(builder).to receive(:require_adaptation?).and_return(false) end include_examples "CWM::MultiSelectionBox" @@ -43,7 +43,7 @@ context "when some of the enslaved interfaces are configured" do it "warns the user and request confirmation to continue" do - allow(builder).to receive(:already_configured?).and_return(true) + allow(builder).to receive(:require_adaptation?).and_return(true) expect(Yast::Popup).to receive(:ContinueCancel).and_return(true) _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org