Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-installation for 
openSUSE:Factory checked in at 2021-06-15 16:37:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-installation.new.32437 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-installation"

Tue Jun 15 16:37:06 2021 rev:472 rq:899069 version:4.4.12

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes    
2021-06-01 10:34:04.156466499 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-installation.new.32437/yast2-installation.changes
 2021-06-15 16:37:22.817697984 +0200
@@ -1,0 +2,16 @@
+Tue Jun  8 08:28:28 UTC 2021 - Knut Anderssen <kanders...@suse.com>
+
+- Export also the https_proxy environment variable when a proxy
+  config is given through linuxrc (bsc#1185016)
+- 4.4.12
+
+-------------------------------------------------------------------
+Mon Jun  7 16:03:30 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
+
+- Better evaluate the old and new repositories during upgrade,
+  do not preselect new repositories for removal if they
+  accidentally use the same repository as already present in
+  the system (bsc#1185822)
+- 4.4.11
+
+-------------------------------------------------------------------

Old:
----
  yast2-installation-4.4.10.tar.bz2

New:
----
  yast2-installation-4.4.12.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.w0QATx/_old  2021-06-15 16:37:23.457699093 +0200
+++ /var/tmp/diff_new_pack.w0QATx/_new  2021-06-15 16:37:23.457699093 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        4.4.10
+Version:        4.4.12
 Release:        0
 Summary:        YaST2 - Installation Parts
 License:        GPL-2.0-only
@@ -85,7 +85,7 @@
 # Pkg::ProvidePackage
 Requires:       yast2-pkg-bindings >= 3.1.33
 # Proxy settings for 2nd stage (bnc#764951)
-Requires:       yast2-proxy
+Requires:       yast2-proxy >= 4.4.1
 # for AbortException and handle direct abort
 Requires:       yast2-ruby-bindings >= 4.0.6
 # Systemd default target and services. This version supports

++++++ yast2-installation-4.4.10.tar.bz2 -> yast2-installation-4.4.12.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-4.4.10/.rubocop.yml 
new/yast2-installation-4.4.12/.rubocop.yml
--- old/yast2-installation-4.4.10/.rubocop.yml  2021-05-31 15:51:47.000000000 
+0200
+++ new/yast2-installation-4.4.12/.rubocop.yml  2021-06-10 17:13:40.000000000 
+0200
@@ -64,3 +64,8 @@
     - src/lib/**/*.rb
   Exclude:
     - src/lib/installation/clients/*.rb
+
+Style/PredicateName:
+  Exclude:
+    # mocked Registration.is_registered?
+    - test/lib/upgrade_repo_manager_test.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-4.4.10/doc/control-file.md 
new/yast2-installation-4.4.12/doc/control-file.md
--- old/yast2-installation-4.4.10/doc/control-file.md   2021-05-31 
15:51:47.000000000 +0200
+++ new/yast2-installation-4.4.12/doc/control-file.md   2021-06-10 
17:13:40.000000000 +0200
@@ -69,6 +69,11 @@
     LVM and encryption, and what subvolumes to create if Btrfs is used on the
     root filesystem.
 
+-   Network
+
+    This is used to customize some network configuration defaults like
+    IP forwarding, new connections startmode or the use of NetworkManager.
+
 -   Scripting and Hooks
 
     To customize installation further more, hooks and special slots can
@@ -827,7 +832,8 @@
 
 System Roles, if defined in the control file, are presented during
 the first stage of the installation. The user will select one of them,
-and they will affect the proposed configuration of partitioning and software.
+and they will affect the proposed configuration of partitioning, 
+network and software.
 It also allows to modify the configuration of systemd services.
 
 A role can also define additional dialogs that are shown when a given role is
@@ -888,6 +894,10 @@
             <name>devil-master</name>
           </service>
         </services>
+        <network>
+          <ipv4_forward config:type="boolean">true</ipv4_forward>
+          <ipv6_forward config:type="boolean">true</ipv6_forward>
+        </network>
       </system_role>
     </system_roles>
 
@@ -926,9 +936,9 @@
 ```
 
 Each role has a short label and a few lines of description in the *texts*
-section, identified by a matching *id* element. The contents of *partitioning*,
-*software* and *globals* are merged with the corresponding top-level 
definitions. See
-[Partitioning](#partitioning) and [Software](#software).
+section, identified by a matching *id* element. The contents of 
*partitioning*, 
+*network*, *software* and *globals* are merged with the corresponding top-level
+definitions. See [Partitioning](#partitioning), [Network](#network) and 
[Software](#software).
 
 The *services* part currently only supports enabling additional services which
 is done by specifying *service* with its *name* as seen in the example.
@@ -1224,6 +1234,24 @@
 </subvolumes>
 ```
 
+## Network
+
+Some options to modify network configuration defaults.
+
+  * `force_static_ip` *(boolean, default: `false`)*
+    Initialize new connections using a static bootproto.
+  * `startmode` *(string)*
+    When to bring up an interface. Possible values are `hotplug`, `auto`, 
`ifplugd`, 
+    `manual`, `nfsroot` or `off`.
+  * `network_manager`
+    Whether NetworkManager should be the default backend.
+    Possible values are  `always`, `never` or `laptop` which will be true in 
+    case the computer being installed is a `laptop`.
+  * `ipv4_forward` *(boolean, no default value)*
+    Sets IPv4 Forwarding to be enabled.
+  * `ipv6_forward` *(boolean, no default value)*
+    Sets IPv6 Forwarding to be enabled.
+
 ### Self Update
 
 To enable the self update feature (FATE#319716), the location of the update
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.10/package/yast2-installation.changes 
new/yast2-installation-4.4.12/package/yast2-installation.changes
--- old/yast2-installation-4.4.10/package/yast2-installation.changes    
2021-05-31 15:51:47.000000000 +0200
+++ new/yast2-installation-4.4.12/package/yast2-installation.changes    
2021-06-10 17:13:40.000000000 +0200
@@ -1,4 +1,20 @@
 -------------------------------------------------------------------
+Tue Jun  8 08:28:28 UTC 2021 - Knut Anderssen <kanders...@suse.com>
+
+- Export also the https_proxy environment variable when a proxy
+  config is given through linuxrc (bsc#1185016)
+- 4.4.12
+
+-------------------------------------------------------------------
+Mon Jun  7 16:03:30 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
+
+- Better evaluate the old and new repositories during upgrade,
+  do not preselect new repositories for removal if they
+  accidentally use the same repository as already present in
+  the system (bsc#1185822)
+- 4.4.11
+
+-------------------------------------------------------------------
 Mon May 31 08:43:52 UTC 2021 - Knut Anderssen <kanders...@suse.com>
 
 - Modify IP forwarding network configuration using the defaults
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.10/package/yast2-installation.spec 
new/yast2-installation-4.4.12/package/yast2-installation.spec
--- old/yast2-installation-4.4.10/package/yast2-installation.spec       
2021-05-31 15:51:47.000000000 +0200
+++ new/yast2-installation-4.4.12/package/yast2-installation.spec       
2021-06-10 17:13:40.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        4.4.10
+Version:        4.4.12
 Release:        0
 Summary:        YaST2 - Installation Parts
 License:        GPL-2.0-only
@@ -85,7 +85,7 @@
 # Pkg::ProvidePackage
 Requires:       yast2-pkg-bindings >= 3.1.33
 # Proxy settings for 2nd stage (bnc#764951)
-Requires:       yast2-proxy
+Requires:       yast2-proxy >= 4.4.1
 # for AbortException and handle direct abort
 Requires:       yast2-ruby-bindings >= 4.0.6
 # Systemd default target and services. This version supports
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.10/src/lib/installation/clients/proxy_finish.rb 
new/yast2-installation-4.4.12/src/lib/installation/clients/proxy_finish.rb
--- old/yast2-installation-4.4.10/src/lib/installation/clients/proxy_finish.rb  
2021-05-31 15:51:47.000000000 +0200
+++ new/yast2-installation-4.4.12/src/lib/installation/clients/proxy_finish.rb  
2021-06-10 17:13:40.000000000 +0200
@@ -32,10 +32,13 @@
 #
 module Yast
   class ProxyFinishClient < Client
+    include Yast::Logger
+
     def main
       textdomain "installation"
 
       Yast.import "Stage"
+      Yast.import "Proxy"
 
       @ret = nil
       @func = ""
@@ -63,17 +66,14 @@
           "when"  => [:installation, :update, :autoinst]
         }
       elsif @func == "Write"
-        if Stage.initial
-          @proxy = 
Convert.to_string(SCR.Read(path(".etc.install_inf.ProxyURL")))
+        if write_to_target?
+          proxy_settings = Proxy.Export
 
-          if !@proxy.nil?
-            Builtins.y2milestone("setting proxy to %1", @proxy)
+          log.info("Writing proxy settings to the target system: 
#{proxy_settings.inspect}")
 
-            # maybe use Proxy module
-            SCR.Write(path(".sysconfig.proxy.HTTP_PROXY"), @proxy)
-            SCR.Write(path(".sysconfig.proxy.FTP_PROXY"), @proxy)
-            SCR.Write(path(".sysconfig.proxy"), nil)
-          end
+          Proxy.Import(proxy_settings)
+          Proxy.WriteSysconfig
+          Proxy.WriteCurlrc
         end
       else
         Builtins.y2error("unknown function: %1", @func)
@@ -84,5 +84,17 @@
       Builtins.y2milestone("proxy_finish finished")
       deep_copy(@ret)
     end
+
+  private
+
+    # Whether the configuration should be written to the target system or not
+    #
+    #  @return [Boolean]
+    def write_to_target?
+      return false unless Stage.initial
+
+      # In case of AutoYaST the configuration could have been imported but not 
written yet
+      Proxy.modified || Proxy.to_target
+    end
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.10/src/lib/installation/upgrade_repo_manager.rb 
new/yast2-installation-4.4.12/src/lib/installation/upgrade_repo_manager.rb
--- old/yast2-installation-4.4.10/src/lib/installation/upgrade_repo_manager.rb  
2021-05-31 15:51:47.000000000 +0200
+++ new/yast2-installation-4.4.12/src/lib/installation/upgrade_repo_manager.rb  
2021-06-10 17:13:40.000000000 +0200
@@ -25,6 +25,7 @@
   # and using them in the new upgraded system.
   class UpgradeRepoManager
     include Yast::Logger
+    extend Yast::Logger
 
     # @return [Array<Y2Packager::Repository>] The old repositories
     attr_reader :repositories
@@ -52,7 +53,12 @@
       current_repos = Y2Packager::Repository.all
       stored_repos = Y2Packager::OriginalRepositorySetup.instance.repositories
       stored_repo_aliases = stored_repos.map(&:repo_alias)
-      old_repos = current_repos.select { |r| 
stored_repo_aliases.include?(r.repo_alias) }
+      reg_urls = registration_urls
+
+      old_repos = current_repos.select do |r|
+        stored_repo_aliases.include?(r.repo_alias) &&
+          !reg_urls.include?(base_url(r.raw_url.uri))
+      end
 
       current_services = Y2Packager::Service.all
       stored_services = Y2Packager::OriginalRepositorySetup.instance.services
@@ -158,5 +164,49 @@
         repo.url = url
       end
     end
+
+    # Collect the repository URLs for all registered products and addons,
+    # If the system is not registered or the yast2-registration package is not
+    # installed then it return an empty list.
+    #
+    # @return [Array<URI>] list of simplified URLs
+    # @see .base_url
+    def self.registration_urls
+      require "registration/registration"
+      require "registration/registration_ui"
+      require "registration/url_helpers"
+
+      return [] unless Registration::Registration.is_registered?
+
+      registration = 
Registration::Registration.new(Registration::UrlHelpers.registration_url)
+      registration_ui = Registration::RegistrationUI.new(registration)
+      activations = registration_ui.activated_products
+
+      activations.map(&:repositories).flatten.map { |repo| 
base_url(repo["url"]) }
+    rescue LoadError
+      # the registration package is not available in the openSUSE installer
+      # or during RPM build
+      log.info("Registration package not available")
+      []
+    end
+
+    # Remove some URL parts to allow less strict comparison:
+    # - remove the query parameter, the locally saved SCC repositories have
+    #   an unique hash attached as a query parameter, the activated products
+    #   result does not contain that
+    # - ignore the trailing slash, it is not important for comparing 
repositories
+    #
+    # @param repo_url [String, URI] the input URL
+    # @return [URI] simplified URL
+    def self.base_url(repo_url)
+      uri = repo_url.is_a?(URI) ? repo_url.dup : URI(repo_url)
+      uri.query = nil
+      # do NOT use the bang method here (delete_suffix!), it would modify
+      # the original URL although the .dup is used above!
+      uri.path = uri.path.delete_suffix("/")
+      uri
+    end
+
+    private_class_method :registration_urls, :base_url
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-4.4.10/startup/common/misc.sh 
new/yast2-installation-4.4.12/startup/common/misc.sh
--- old/yast2-installation-4.4.10/startup/common/misc.sh        2021-05-31 
15:51:47.000000000 +0200
+++ new/yast2-installation-4.4.12/startup/common/misc.sh        2021-06-10 
17:13:40.000000000 +0200
@@ -24,6 +24,7 @@
 # ---
        if [ "$ProxyURL" ] ; then
                export http_proxy="$ProxyURL"
+               export https_proxy="$ProxyURL"
                export ftp_proxy="$ProxyURL"
        fi
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.10/test/lib/clients/proxy_finish_test.rb 
new/yast2-installation-4.4.12/test/lib/clients/proxy_finish_test.rb
--- old/yast2-installation-4.4.10/test/lib/clients/proxy_finish_test.rb 
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-installation-4.4.12/test/lib/clients/proxy_finish_test.rb 
2021-06-10 17:13:40.000000000 +0200
@@ -0,0 +1,85 @@
+#! /usr/bin/env rspec
+
+require_relative "./../../test_helper"
+
+require "installation/clients/proxy_finish"
+
+describe Yast::ProxyFinishClient do
+  let(:client) { described_class.new }
+  let(:func) { "Info" }
+  let(:parm) { nil }
+  let(:args) { [] }
+  let(:func) { args[0] }
+  let(:parms) { args[1] }
+
+  before do
+    allow(Yast::WFM).to receive(:Args).and_return(args)
+    allow(Yast::WFM).to receive(:Args).with(0).and_return(args[0])
+    allow(Yast::WFM).to receive(:Args).with(1).and_return(args[1])
+  end
+
+  context "when the client is called with 'Info' argument" do
+    let(:args) { ["Info"] }
+
+    it "returns a hash" do
+      expect(client.main).to be_a(Hash)
+    end
+
+    it "returns 1 step with 'Saving proxy configuration...' title" do
+      result = client.main
+      expect(result["steps"]).to eql(1)
+      expect(result["title"]).to eql("Saving proxy configuration...")
+    end
+
+    it "returns that the step is valid for :installation, :update and 
:autoinst modes" do
+      expect(client.main["when"]).to include(:installation, :update, :autoinst)
+    end
+  end
+
+  context "when the client is called with the 'Write' argument" do
+    let(:initial_stage) { true }
+    let(:to_target) { false }
+    let(:modified) { false }
+    let(:args) { ["Write"] }
+    let(:config) { { "http_proxy" => "http://proxy.example.com:3128/"; } }
+
+    before do
+      allow(Yast::Stage).to receive(:initial).and_return(initial_stage)
+      allow(Yast::Proxy).to receive(:to_target).and_return(to_target)
+      allow(Yast::Proxy).to receive(:Export).and_return(config)
+      allow(Yast::Proxy).to receive(:modified).and_return(modified)
+    end
+
+    context "when running on the first stage" do
+      context "and the proxy settings were not written to the inst-sys during 
the installation" do
+        it "does nothing" do
+          expect(Yast::Proxy).to_not receive(:WriteSysconfig)
+          expect(Yast::Proxy).to_not receive(:WriteCurlrc)
+          client.main
+        end
+      end
+
+      context "and the proxy settings have been modified but not written yet" 
do
+        let(:modified) { true }
+
+        it "writes the current sysconfig and curlrc configuration to the 
target system" do
+          expect(Yast::Proxy).to receive(:Import).with(config)
+          expect(Yast::Proxy).to receive(:WriteSysconfig)
+          expect(Yast::Proxy).to receive(:WriteCurlrc)
+          client.main
+        end
+      end
+
+      context "and the proxy settings were written to the inst-sys during the 
installation" do
+        let(:to_target) { true }
+
+        it "writes the current sysconfig and curlrc configuration to the 
target system" do
+          expect(Yast::Proxy).to receive(:Import).with(config)
+          expect(Yast::Proxy).to receive(:WriteSysconfig)
+          expect(Yast::Proxy).to receive(:WriteCurlrc)
+          client.main
+        end
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.10/test/lib/upgrade_repo_manager_test.rb 
new/yast2-installation-4.4.12/test/lib/upgrade_repo_manager_test.rb
--- old/yast2-installation-4.4.10/test/lib/upgrade_repo_manager_test.rb 
2021-05-31 15:51:47.000000000 +0200
+++ new/yast2-installation-4.4.12/test/lib/upgrade_repo_manager_test.rb 
2021-06-10 17:13:40.000000000 +0200
@@ -3,6 +3,20 @@
 require_relative "../test_helper"
 require "installation/upgrade_repo_manager"
 
+begin
+  # check if the registration package is present, it might not be available 
during RPM build
+  require "registration/registration"
+rescue LoadError
+  # mock the Registration class if missing
+  module Registration
+    class Registration
+      def self.is_registered?
+        false
+      end
+    end
+  end
+end
+
 describe Installation::UpgradeRepoManager do
   let(:repo1) do
     Y2Packager::Repository.new(repo_id: 1, repo_alias: "test1",
@@ -122,6 +136,7 @@
       allow(Y2Packager::Repository).to receive(:all).and_return([repo1, repo2])
       expect(Y2Packager::OriginalRepositorySetup.instance).to 
receive(:repositories)
         .and_return([repo1, repo2])
+      allow(Registration::Registration).to 
receive(:is_registered?).and_return(false)
     end
 
     it "initializes the UpgradeRepoManager from the stored old repositories" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-4.4.10/test/test_helper.rb 
new/yast2-installation-4.4.12/test/test_helper.rb
--- old/yast2-installation-4.4.10/test/test_helper.rb   2021-05-31 
15:51:47.000000000 +0200
+++ new/yast2-installation-4.4.12/test/test_helper.rb   2021-06-10 
17:13:40.000000000 +0200
@@ -39,6 +39,7 @@
 stub_module("ProfileLocation")
 # we cannot depend on this module (circular dependency)
 stub_module("NtpClient")
+stub_module("Proxy")
 
 if ENV["COVERAGE"]
   require "simplecov"

Reply via email to