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-12-18 20:29:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-installation.new.2520 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-installation"

Sat Dec 18 20:29:46 2021 rev:486 rq:940916 version:4.4.30

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes    
2021-12-12 00:56:03.446520433 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-installation.new.2520/yast2-installation.changes
  2021-12-18 20:30:08.442239034 +0100
@@ -1,0 +2,15 @@
+Thu Dec 16 13:43:05 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
+
+- Self-update now supports relative URLs (relurl://), it defines
+  the self-update repository relatively to the main installation
+  repository (jsc#SLE-22669)
+- 4.4.30
+
+-------------------------------------------------------------------
+Thu Dec 16 07:34:27 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
+
+- Do not preselect any product during upgrade (related to
+  bsc#1192230).
+- 4.4.29
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-installation.spec ++++++
--- /var/tmp/diff_new_pack.ssz82t/_old  2021-12-18 20:30:09.042239367 +0100
+++ /var/tmp/diff_new_pack.ssz82t/_new  2021-12-18 20:30:09.046239369 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        4.4.28
+Version:        4.4.30
 Release:        0
 Summary:        YaST2 - Installation Parts
 License:        GPL-2.0-only
@@ -28,8 +28,8 @@
 Source2:        YaST2-Firstboot.service
 
 BuildRequires:  update-desktop-files
-# y2packager/exceptions
-BuildRequires:  yast2 >= 4.4.24
+# Yast2::RelURL
+BuildRequires:  yast2 >= 4.4.28
 # CIOIgnore
 BuildRequires:  yast2-bootloader
 # storage-ng based version
@@ -70,8 +70,8 @@
 Requires:       pciutils
 # tar-gzip some system files and untar-ungzip them after the installation 
(FATE #300421, #120103)
 Requires:       tar
-# y2packager/exceptions
-Requires:       yast2 >= 4.4.24
+# Yast2::RelURL
+Requires:       yast2 >= 4.4.28
 # CIOIgnore
 Requires:       yast2-bootloader
 Requires:       yast2-country >= 3.3.1

++++++ yast2-installation-4.4.28.tar.bz2 -> yast2-installation-4.4.30.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-installation-4.4.28/doc/SELF_UPDATE.md 
new/yast2-installation-4.4.30/doc/SELF_UPDATE.md
--- old/yast2-installation-4.4.28/doc/SELF_UPDATE.md    2021-12-10 
16:21:25.000000000 +0100
+++ new/yast2-installation-4.4.30/doc/SELF_UPDATE.md    2021-12-16 
15:39:35.000000000 +0100
@@ -296,7 +296,47 @@
 
 Currently only HTTP/HTTPS and FTP URL schemes are supported for downloading
 the updates. Some additional schemes might work but are not tested and 
therefore
-not supported.
+not supported. (See `man zypper` for the complete list of possible URLs.)
+
+Additionally the self-update supports the `relurl://` schema. This refers to a
+location relative to the installation repository (defined by the `install` boot
+parameter which by default uses the booting device).
+
+### Relative URL Examples
+
+Using a relative URL (relurl://) can be useful when serving the packages via a
+local installation server or when building a custom installation medium which
+includes a self-update repository.
+
+#### Custom DVD/USB Medium
+
+Assume the installation repository is at the medium root (`/`) and the
+self-update repository in the `self_update` subdirectory.
+
+Then you can add the `self_update=relurl://self_update` boot option directly to
+the default boot parameters and it will work properly even if the medium is
+copied to an USB stick, hard disk or a network server.
+
+#### Installation Server
+
+Relative URL can be also useful when you copy the original installation medium
+unmodified to a network server.
+
+Assume that the installation packages are available via
+`http://example.com/repo` and a self-update repository is available at
+`http://example.com/self_update`.
+
+Then you can use the `install=http://example.com/repo` and
+`self_update=relurl://../self_update` boot parameters. *That means you can even
+go up in the directory structure using the usual `../` notation!*
+
+The advantage is that you do not need to change the `self_update` parameter
+when the repositories are moved to a different location or different server.
+
+But the most beneficial is using a relative URL in an AutoYaST profile. Then 
the
+same AutoYaST profile can work with different product versions without any
+change if you use the same repository structure on the server for all versions.
+
 
 ## Error Handling
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.28/package/yast2-installation.changes 
new/yast2-installation-4.4.30/package/yast2-installation.changes
--- old/yast2-installation-4.4.28/package/yast2-installation.changes    
2021-12-10 16:21:25.000000000 +0100
+++ new/yast2-installation-4.4.30/package/yast2-installation.changes    
2021-12-16 15:39:35.000000000 +0100
@@ -1,4 +1,19 @@
 -------------------------------------------------------------------
+Thu Dec 16 13:43:05 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
+
+- Self-update now supports relative URLs (relurl://), it defines
+  the self-update repository relatively to the main installation
+  repository (jsc#SLE-22669)
+- 4.4.30
+
+-------------------------------------------------------------------
+Thu Dec 16 07:34:27 UTC 2021 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
+
+- Do not preselect any product during upgrade (related to
+  bsc#1192230).
+- 4.4.29
+
+-------------------------------------------------------------------
 Thu Dec  9 16:07:34 UTC 2021 - Ladislav Slez??k <lsle...@suse.cz>
 
 - Improve the self-update process, do not read the products from
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.28/package/yast2-installation.spec 
new/yast2-installation-4.4.30/package/yast2-installation.spec
--- old/yast2-installation-4.4.28/package/yast2-installation.spec       
2021-12-10 16:21:25.000000000 +0100
+++ new/yast2-installation-4.4.30/package/yast2-installation.spec       
2021-12-16 15:39:35.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-installation
-Version:        4.4.28
+Version:        4.4.30
 Release:        0
 Summary:        YaST2 - Installation Parts
 License:        GPL-2.0-only
@@ -28,8 +28,8 @@
 Source2:        YaST2-Firstboot.service
 
 BuildRequires:  update-desktop-files
-# y2packager/exceptions
-BuildRequires:  yast2 >= 4.4.24
+# Yast2::RelURL
+BuildRequires:  yast2 >= 4.4.28
 # CIOIgnore
 BuildRequires:  yast2-bootloader
 # storage-ng based version
@@ -70,8 +70,8 @@
 Requires:       pciutils
 # tar-gzip some system files and untar-ungzip them after the installation 
(FATE #300421, #120103)
 Requires:       tar
-# y2packager/exceptions
-Requires:       yast2 >= 4.4.24
+# Yast2::RelURL
+Requires:       yast2 >= 4.4.28
 # CIOIgnore
 Requires:       yast2-bootloader
 Requires:       yast2-country >= 3.3.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.28/src/lib/installation/clients/inst_complex_welcome.rb
 
new/yast2-installation-4.4.30/src/lib/installation/clients/inst_complex_welcome.rb
--- 
old/yast2-installation-4.4.28/src/lib/installation/clients/inst_complex_welcome.rb
  2021-12-10 16:21:25.000000000 +0100
+++ 
new/yast2-installation-4.4.30/src/lib/installation/clients/inst_complex_welcome.rb
  2021-12-16 15:39:35.000000000 +0100
@@ -68,10 +68,7 @@
 
       Yast::Wizard.EnableAbortButton
 
-      # Preselect the product if there is only one so the license can be shown.
-      # As selecting a product can have side effects (especially in the full
-      # medium), do not select it twice.
-      products.first.select if products.size == 1 && !products.first.selected?
+      preselect_product_if_needed
 
       loop do
         dialog_result = ::Installation::Dialogs::ComplexWelcome.run(
@@ -225,5 +222,20 @@
 
       true
     end
+
+    # Preselects the product if required
+    #
+    # The product is preselected if:
+    #
+    # * There is only a single base product available.
+    # * The installer is not running on update mode. In this case, the product
+    #   is selected when the user choses which system to upgrade.
+    def preselect_product_if_needed
+      return if Mode.update || products.size != 1
+
+      # As selecting a product can have side effects (especially in the full
+      # medium), do not select it twice.
+      products.first.select unless products.first.selected?
+    end
   end unless defined? Yast::InstComplexWelcomeClient
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.28/src/lib/installation/update_repositories_finder.rb
 
new/yast2-installation-4.4.30/src/lib/installation/update_repositories_finder.rb
--- 
old/yast2-installation-4.4.28/src/lib/installation/update_repositories_finder.rb
    2021-12-10 16:21:25.000000000 +0100
+++ 
new/yast2-installation-4.4.30/src/lib/installation/update_repositories_finder.rb
    2021-12-16 15:39:35.000000000 +0100
@@ -15,6 +15,7 @@
 
 require "yast"
 require "installation/update_repository"
+require "yast2/rel_url"
 require "uri"
 
 Yast.import "Pkg"
@@ -27,6 +28,7 @@
 Yast.import "ProductFeatures"
 Yast.import "InstFunctions"
 Yast.import "OSRelease"
+Yast.import "URL"
 
 module Installation
   # Invalid registration URL error
@@ -150,6 +152,8 @@
 
     # Converts the string into an URI if it's valid
     #
+    # Expands a relative URL (relurl://) to an URL relative to the installation
+    # repository.
     # Substituting $arch pattern with the architecture of the current system.
     # Substituting these variables with the /etc/os-release content:
     #   $os_release_name       => NAME
@@ -172,7 +176,20 @@
         Yast::OSRelease.ReleaseVersion)
       real_url = real_url.gsub(/\$os_release_version\b/,
         Yast::OSRelease.ReleaseVersionHumanReadable)
-      URI.regexp.match(real_url) ? URI(real_url) : nil
+
+      return nil unless URI.regexp.match(real_url)
+
+      # convert a relative URL to absolute
+      if Yast2::RelURL.relurl?(real_url)
+        # relative URL is relative to the installation repository
+        relurl = Yast2::RelURL.from_installation_repository(real_url)
+        absolute_url = relurl.absolute_url
+        log.info "Relative URL #{Yast::URL.HidePassword(real_url)} "\
+          "converted to absolute URL 
#{Yast::URL.HidePassword(absolute_url.to_s)}"
+        absolute_url
+      else
+        URI(real_url)
+      end
     end
 
     # Return the URL of the preferred registration server
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.28/test/lib/clients/inst_complex_welcome_test.rb 
new/yast2-installation-4.4.30/test/lib/clients/inst_complex_welcome_test.rb
--- old/yast2-installation-4.4.28/test/lib/clients/inst_complex_welcome_test.rb 
2021-12-10 16:21:25.000000000 +0100
+++ new/yast2-installation-4.4.30/test/lib/clients/inst_complex_welcome_test.rb 
2021-12-16 15:39:35.000000000 +0100
@@ -340,6 +340,11 @@
               .with(product_specs, anything)
             subject.main
           end
+
+          it "does not preselect the product" do
+            expect(product_spec).to_not receive(:select)
+            subject.main
+          end
         end
       end
     end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-installation-4.4.28/test/lib/update_repositories_finder_test.rb 
new/yast2-installation-4.4.30/test/lib/update_repositories_finder_test.rb
--- old/yast2-installation-4.4.28/test/lib/update_repositories_finder_test.rb   
2021-12-10 16:21:25.000000000 +0100
+++ new/yast2-installation-4.4.30/test/lib/update_repositories_finder_test.rb   
2021-12-16 15:39:35.000000000 +0100
@@ -30,15 +30,29 @@
         .and_return(url_from_linuxrc)
       allow(Yast::Pkg).to receive(:GetArchitecture).and_return(arch)
       allow(Yast::AutoinstGeneral).to receive(:self_update_url).and_return(nil)
+      allow(Yast::InstURL).to receive(:installInf2Url)
+        .and_return("http://example.com/install/sle15-sp3";)
     end
 
     context "when URL was specified via Linuxrc" do
-      let(:url_from_linuxrc) { "http://example.net/sles12/"; }
+      context "a normal URL is used" do
+        let(:url_from_linuxrc) { "http://example.net/sles12/"; }
 
-      it "returns the updates repository using the URL from Linuxrc" do
-        expect(Installation::UpdateRepository).to receive(:new)
-          .with(URI(url_from_linuxrc), :user).and_return(repo)
-        expect(finder.updates).to eq([repo])
+        it "returns the updates repository using the URL from Linuxrc" do
+          expect(Installation::UpdateRepository).to receive(:new)
+            .with(URI(url_from_linuxrc), :user).and_return(repo)
+          expect(finder.updates).to eq([repo])
+        end
+      end
+
+      context "a relative URL is used" do
+        let(:url_from_linuxrc) { "relurl://../self_update" }
+
+        it "returns the updates repository relative to the installation 
repository" do
+          expect(Installation::UpdateRepository).to receive(:new)
+            .with(URI("http://example.com/install/self_update";), 
:user).and_return(repo)
+          expect(finder.updates).to eq([repo])
+        end
       end
     end
 

Reply via email to