Hello community,

here is the log from the commit of package autoyast2 for openSUSE:Factory 
checked in at 2019-08-08 14:22:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old)
 and      /work/SRC/openSUSE:Factory/.autoyast2.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "autoyast2"

Thu Aug  8 14:22:55 2019 rev:260 rq:721520 version:4.2.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes      2019-07-31 
14:25:22.742313705 +0200
+++ /work/SRC/openSUSE:Factory/.autoyast2.new.9556/autoyast2.changes    
2019-08-08 14:22:58.368353023 +0200
@@ -1,0 +2,14 @@
+Fri Aug  6 15:58:25 UTC 2019 - Imobach Gonzalez Sosa <[email protected]>
+
+- Add missing 'uuid' element to the partition sections
+  (boo#1144007).
+- 4.2.7
+
+-------------------------------------------------------------------
+Mon Aug  5 15:38:18 CEST 2019 - [email protected]
+
+- Fixed downloading of AutoYaST configuration file with "relurl"
+  (bsc#1138117).
+- 4.2.6
+
+-------------------------------------------------------------------

Old:
----
  autoyast2-4.2.5.tar.bz2

New:
----
  autoyast2-4.2.7.tar.bz2

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

Other differences:
------------------
++++++ autoyast2.spec ++++++
--- /var/tmp/diff_new_pack.YugEID/_old  2019-08-08 14:22:58.808352956 +0200
+++ /var/tmp/diff_new_pack.YugEID/_new  2019-08-08 14:22:58.812352955 +0200
@@ -22,7 +22,7 @@
 %endif
 
 Name:           autoyast2
-Version:        4.2.5
+Version:        4.2.7
 Release:        0
 Summary:        YaST2 - Automated Installation
 License:        GPL-2.0-only

++++++ autoyast2-4.2.5.tar.bz2 -> autoyast2-4.2.7.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.5/package/autoyast2.changes 
new/autoyast2-4.2.7/package/autoyast2.changes
--- old/autoyast2-4.2.5/package/autoyast2.changes       2019-07-25 
09:54:59.000000000 +0200
+++ new/autoyast2-4.2.7/package/autoyast2.changes       2019-08-07 
15:04:17.000000000 +0200
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Fri Aug  6 15:58:25 UTC 2019 - Imobach Gonzalez Sosa <[email protected]>
+
+- Add missing 'uuid' element to the partition sections
+  (boo#1144007).
+- 4.2.7
+
+-------------------------------------------------------------------
+Mon Aug  5 15:38:18 CEST 2019 - [email protected]
+
+- Fixed downloading of AutoYaST configuration file with "relurl"
+  (bsc#1138117).
+- 4.2.6
+
+-------------------------------------------------------------------
 Thu Jul 18 15:05:10 UTC 2019 - Jan Engelhardt <[email protected]>
 
 - Use modern tar syntax
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.5/package/autoyast2.spec 
new/autoyast2-4.2.7/package/autoyast2.spec
--- old/autoyast2-4.2.5/package/autoyast2.spec  2019-07-25 09:54:59.000000000 
+0200
+++ new/autoyast2-4.2.7/package/autoyast2.spec  2019-08-07 15:04:17.000000000 
+0200
@@ -22,7 +22,7 @@
 %endif
 
 Name:           autoyast2
-Version:        4.2.5
+Version:        4.2.7
 Release:        0
 Summary:        YaST2 - Automated Installation
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.5/src/autoyast-rnc/partitioning.rnc 
new/autoyast2-4.2.7/src/autoyast-rnc/partitioning.rnc
--- old/autoyast2-4.2.5/src/autoyast-rnc/partitioning.rnc       2019-07-25 
09:54:59.000000000 +0200
+++ new/autoyast2-4.2.7/src/autoyast-rnc/partitioning.rnc       2019-08-07 
15:04:17.000000000 +0200
@@ -57,6 +57,7 @@
   | part_fs_options
   | part_fstopt
   | part_label
+  | part_uuid
   | part_loop_fs
   | part_lv_name
   | part_lvm_group
@@ -164,6 +165,7 @@
 
 part_fstopt = element fstopt { text }
 part_label = element label { text }
+part_uuid = element uuid { text }
 part_loop_fs =
   element loop_fs { BOOLEAN }
 part_mount = element mount { text }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.5/src/modules/AutoinstConfig.rb 
new/autoyast2-4.2.7/src/modules/AutoinstConfig.rb
--- old/autoyast2-4.2.5/src/modules/AutoinstConfig.rb   2019-07-25 
09:54:59.000000000 +0200
+++ new/autoyast2-4.2.7/src/modules/AutoinstConfig.rb   2019-08-07 
15:04:17.000000000 +0200
@@ -376,6 +376,23 @@
       @user     = parsed_url["user"]   || ""
       @pass     = parsed_url["pass"]   || ""
 
+      if @scheme == "relurl" || @scheme == "file"
+        # "relurl": No host information has been given here. So a part of the 
path or the
+        # complete path has been stored in the host variable while parsing it.
+        # This will be reverted.
+        #
+        # "file": Normally the file is defined with 3 slashes like 
file:///autoinst.xml
+        # in order to define an empty host entry. But that will be often 
overseen
+        # by the user. So we will support file://autoinst.xml too:
+        log.info "correcting #{@scheme}://#{@host}/#{@filepath} to empty host 
entry"
+        if [email protected]? && [email protected]?
+          @filepath = File.join( @host, @filepath)
+        else
+          @filepath = @host unless @host.empty?
+        end
+        @host = ""
+      end
+
       @remoteProfile = !["default", "file", "floppy", "usb", 
"device"].include?(@scheme)
 
       log.info "urltok = #{URL.HidePassword(profile_location)}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.5/src/modules/ProfileLocation.rb 
new/autoyast2-4.2.7/src/modules/ProfileLocation.rb
--- old/autoyast2-4.2.5/src/modules/ProfileLocation.rb  2019-07-25 
09:54:59.000000000 +0200
+++ new/autoyast2-4.2.7/src/modules/ProfileLocation.rb  2019-08-07 
15:04:17.000000000 +0200
@@ -24,6 +24,7 @@
       Yast.import "Report"
       Yast.import "Label"
       Yast.import "URL"
+      Yast.import "InstURL"
 
       Yast.include self, "autoinstall/autoinst_dialogs.rb"
       Yast.include self, "autoinstall/io.rb"
@@ -57,76 +58,26 @@
       is_directory = false
 
       if AutoinstConfig.scheme == "relurl"
-        # FIXME:
-        # file                  # local file
+        url_str = InstURL.installInf2Url("")
+        log.info( "installation path from install.inf: #{url_str}" )
 
-        AutoinstConfig.scheme = Convert.to_string(
-          SCR.Read(path(".etc.install_inf.InstMode"))
-        )
-        if AutoinstConfig.scheme == "hd" || AutoinstConfig.scheme == 
"harddisk" ||
-            AutoinstConfig.scheme == "disk"
-          part = 
Convert.to_string(SCR.Read(path(".etc.install_inf.Partition")))
-          AutoinstConfig.scheme = "device"
-          AutoinstConfig.host = part
-          AutoinstConfig.filepath = Ops.add(
-            Ops.add(
-              Convert.to_string(SCR.Read(path(".etc.install_inf.Serverdir"))),
-              "/"
-            ),
-            AutoinstConfig.filepath
-          )
-        else
-          if AutoinstConfig.scheme == "cd" || AutoinstConfig.scheme == "cdrom"
+        if !url_str.empty?
+          url = URL.Parse(url_str)
+          AutoinstConfig.scheme = url["scheme"]
+          AutoinstConfig.host = url["host"]
+          AutoinstConfig.filepath = File.join( url["path"], 
AutoinstConfig.filepath)
+
+          if ["cd", "cdrom"].include? AutoinstConfig.scheme
             AutoinstConfig.scheme = "file"
           end
-          if Ops.greater_than(Builtins.size(AutoinstConfig.filepath), 0)
-            AutoinstConfig.filepath = Ops.add(
-              Ops.add(
-                Ops.add(
-                  Ops.add(
-                    Convert.to_string(
-                      SCR.Read(path(".etc.install_inf.Serverdir"))
-                    ),
-                    "/"
-                  ),
-                  AutoinstConfig.host
-                ),
-                "/"
-              ),
-              AutoinstConfig.filepath
-            )
-          else
-            AutoinstConfig.filepath = Ops.add(
-              Ops.add(
-                
Convert.to_string(SCR.Read(path(".etc.install_inf.Serverdir"))),
-                "/"
-              ),
-              AutoinstConfig.host
-            )
-          end
-          if Convert.to_string(SCR.Read(path(".etc.install_inf.Server"))) != 
nil
-            AutoinstConfig.host = Convert.to_string(
-              SCR.Read(path(".etc.install_inf.Server"))
-            )
-          end
-        end
 
-        Builtins.y2milestone(
-          "relurl for profile changed to: %1://%2%3",
-          AutoinstConfig.scheme,
-          AutoinstConfig.host,
-          AutoinstConfig.filepath
-        )
-        SCR.Write(
-          path(".etc.install_inf.ayrelurl"),
-          Builtins.sformat(
-            "%1://%2/%3",
-            AutoinstConfig.scheme,
-            AutoinstConfig.host,
-            AutoinstConfig.filepath
-          )
-        )
-        SCR.Write(path(".etc.install_inf"), nil)
+          ayrelurl = 
"#{AutoinstConfig.scheme}://#{AutoinstConfig.host}/#{AutoinstConfig.filepath}"
+          log.info( "relurl for profile changed to: #{ayrelurl}" )
+          SCR.Write( path(".etc.install_inf.ayrelurl"), ayrelurl )
+          SCR.Write(path(".etc.install_inf"), nil)
+        else
+          log.warn( "Cannot evaluate ZyppRepoURL from /etc/install.inf" )
+        end
       elsif AutoinstConfig.scheme == "label"
         # autoyast=label://my_home//autoinst.xml in linuxrc:
         # AY is searching for a partition with the label "my_home". This 
partition
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.5/test/AutoinstConfig_test.rb 
new/autoyast2-4.2.7/test/AutoinstConfig_test.rb
--- old/autoyast2-4.2.5/test/AutoinstConfig_test.rb     2019-07-25 
09:54:59.000000000 +0200
+++ new/autoyast2-4.2.7/test/AutoinstConfig_test.rb     2019-08-07 
15:04:17.000000000 +0200
@@ -110,6 +110,70 @@
         expect(subject.pass).to eq("woo")
       end
     end
+
+    context "when \"relurl\" is defined" do
+      let(:autoyast_profile_url) { "relurl://auto-installation.xml" }
+      it "sets host and filename correctly" do
+        expect(subject.ParseCmdLine(autoyast_profile_url)).to eq(true)
+        expect(subject.host).to eq("")
+        expect(subject.scheme).to eq("relurl")
+        expect(subject.filepath).to eq("auto-installation.xml")
+      end
+    end
+
+    context "when \"relurl\" is defined and sub-pathes are defined" do
+      let(:autoyast_profile_url) { "relurl://sub_path/auto-installation.xml" }
+      it "sets host and filename correctly" do
+        expect(subject.ParseCmdLine(autoyast_profile_url)).to eq(true)
+        expect(subject.host).to eq("")
+        expect(subject.scheme).to eq("relurl")
+        expect(subject.filepath).to eq("sub_path/auto-installation.xml")
+      end
+    end
+
+    context "when \"file:\/\/\" is defined" do
+      context "when no sub path is defined" do
+        let(:autoyast_profile_url) { "file://auto-installation.xml" }
+        it "sets host and filename correctly" do
+          expect(subject.ParseCmdLine(autoyast_profile_url)).to eq(true)
+          expect(subject.host).to eq("")
+          expect(subject.scheme).to eq("file")
+          expect(subject.filepath).to eq("auto-installation.xml")
+        end
+      end
+
+      context "when sub path is defined" do
+        let(:autoyast_profile_url) { "file://sub-path/auto-installation.xml" }
+        it "sets host and filename correctly" do
+          expect(subject.ParseCmdLine(autoyast_profile_url)).to eq(true)
+          expect(subject.host).to eq("")
+          expect(subject.scheme).to eq("file")
+          expect(subject.filepath).to eq("sub-path/auto-installation.xml")
+        end
+      end
+    end
+
+    context "when \"file:///\" is defined (old format)" do
+      context "when no sub path is defined" do
+        let(:autoyast_profile_url) { "file:///auto-installation.xml" }
+        it "sets host and filename correctly" do
+          expect(subject.ParseCmdLine(autoyast_profile_url)).to eq(true)
+          expect(subject.host).to eq("")
+          expect(subject.scheme).to eq("file")
+          expect(subject.filepath).to eq("/auto-installation.xml")
+        end
+      end
+
+      context "when sub path is defined" do
+        let(:autoyast_profile_url) { "file:///sub-path/auto-installation.xml" }
+        it "sets host and filename correctly" do
+          expect(subject.ParseCmdLine(autoyast_profile_url)).to eq(true)
+          expect(subject.host).to eq("")
+          expect(subject.scheme).to eq("file")
+          expect(subject.filepath).to eq("/sub-path/auto-installation.xml")
+        end
+      end
+    end
   end
 
   describe "#profile_path" do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.5/test/Makefile.am 
new/autoyast2-4.2.7/test/Makefile.am
--- old/autoyast2-4.2.5/test/Makefile.am        2019-07-25 09:54:59.000000000 
+0200
+++ new/autoyast2-4.2.7/test/Makefile.am        2019-08-07 15:04:17.000000000 
+0200
@@ -11,6 +11,7 @@
     AutoinstGeneral_test.rb \
     AutoinstPartPlan_test.rb \
     AutoinstSoftware_test.rb \
+    ProfileLocation_test.rb  \
     autoinst_storage_test.rb \
     profile_test.rb \
     Y2ModuleConfig_test.rb \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/autoyast2-4.2.5/test/ProfileLocation_test.rb 
new/autoyast2-4.2.7/test/ProfileLocation_test.rb
--- old/autoyast2-4.2.5/test/ProfileLocation_test.rb    1970-01-01 
01:00:00.000000000 +0100
+++ new/autoyast2-4.2.7/test/ProfileLocation_test.rb    2019-08-07 
15:04:17.000000000 +0200
@@ -0,0 +1,31 @@
+#!/usr/bin/env rspec
+
+require_relative "test_helper"
+
+Yast.import "ProfileLocation"
+
+describe "Yast::ProfileLocation" do
+
+  subject { Yast::ProfileLocation }
+
+  describe "#Process" do
+ 
+    context "when scheme is \"relurl\"" do
+      before do
+        Yast::AutoinstConfig.scheme = "relurl"
+        Yast::AutoinstConfig.xml_tmpfile = "/tmp/123"
+        Yast::AutoinstConfig.filepath = "autoinst.xml"
+        allow(Yast::InstURL).to receive(:installInf2Url).and_return(
+          "http://download.opensuse.org/distribution/leap/15.1/repo/oss/";)
+      end
+
+      it "downloads AutoYaST configuration file with absolute path" do
+        expect(subject).to receive(:Get).with("http",
+          "download.opensuse.org",
+          "/distribution/leap/15.1/repo/oss/autoinst.xml",
+          "/tmp/123")
+        subject.Process
+      end
+    end
+  end
+end


Reply via email to