commit yast2-installation for openSUSE:Factory
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 2022-10-22 14:12:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-installation (Old) and /work/SRC/openSUSE:Factory/.yast2-installation.new.2275 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-installation" Sat Oct 22 14:12:20 2022 rev:510 rq:1030314 version:4.5.8 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-installation/yast2-installation.changes 2022-09-16 13:32:11.433239585 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-installation.new.2275/yast2-installation.changes 2022-10-22 14:12:34.632665505 +0200 @@ -1,0 +2,7 @@ +Thu Oct 20 13:53:14 UTC 2022 - Steffen Winterfeldt <snwint@suse.com> + +- add 'repo', 'cd', 'dvd', 'hd', and 'label' schemes to + Yast::Transfer::FileFromUrl (jsc#SLE-22578, jsc#SLE-24584) +- 4.5.8 + +------------------------------------------------------------------- Old: ---- yast2-installation-4.5.7.tar.bz2 New: ---- yast2-installation-4.5.8.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-installation.spec ++++++ --- /var/tmp/diff_new_pack.VNTUvd/_old 2022-10-22 14:12:36.192669202 +0200 +++ /var/tmp/diff_new_pack.VNTUvd/_new 2022-10-22 14:12:36.200669221 +0200 @@ -17,7 +17,7 @@ Name: yast2-installation -Version: 4.5.7 +Version: 4.5.8 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only ++++++ yast2-installation-4.5.7.tar.bz2 -> yast2-installation-4.5.8.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.5.7/package/yast2-installation.changes new/yast2-installation-4.5.8/package/yast2-installation.changes --- old/yast2-installation-4.5.7/package/yast2-installation.changes 2022-09-15 16:22:48.000000000 +0200 +++ new/yast2-installation-4.5.8/package/yast2-installation.changes 2022-10-21 10:03:39.000000000 +0200 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Oct 20 13:53:14 UTC 2022 - Steffen Winterfeldt <snwint@suse.com> + +- add 'repo', 'cd', 'dvd', 'hd', and 'label' schemes to + Yast::Transfer::FileFromUrl (jsc#SLE-22578, jsc#SLE-24584) +- 4.5.8 + +------------------------------------------------------------------- Thu Sep 15 14:04:42 UTC 2022 - Stefan Hundhammer <shundhammer@suse.com> - Don't set QT_SCALE_FACTOR unless > 1 (bsc#1199020) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.5.7/package/yast2-installation.spec new/yast2-installation-4.5.8/package/yast2-installation.spec --- old/yast2-installation-4.5.7/package/yast2-installation.spec 2022-09-15 16:22:48.000000000 +0200 +++ new/yast2-installation-4.5.8/package/yast2-installation.spec 2022-10-21 10:03:39.000000000 +0200 @@ -16,7 +16,7 @@ # Name: yast2-installation -Version: 4.5.7 +Version: 4.5.8 Release: 0 Summary: YaST2 - Installation Parts License: GPL-2.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-installation-4.5.7/src/lib/transfer/file_from_url.rb new/yast2-installation-4.5.8/src/lib/transfer/file_from_url.rb --- old/yast2-installation-4.5.7/src/lib/transfer/file_from_url.rb 2022-09-15 16:22:48.000000000 +0200 +++ new/yast2-installation-4.5.8/src/lib/transfer/file_from_url.rb 2022-10-21 10:03:39.000000000 +0200 @@ -19,6 +19,7 @@ require "yast" require "yast2/execute" +require "yast2/rel_url" # rubocop:disable all module Yast::Transfer @@ -76,7 +77,10 @@ # The URL allows autoyast-specific schemes: # https://www.suse.com/documentation/sles-12/singlehtml/book_autoyast/book_aut... # - # @param scheme [String] cifs, nfs, device, usb, http, https, ... + # @note Some arguments are duplicated in the urltok hash. Where they + # differ, the explicitly passed arguments replace their counterparts in urltok. + # + # @param scheme [String] ftp, tftp, http, https, cifs, nfs, device, cd, dvd, hd, usb, file, label, repo # @param host [String] # @param urlpath [String] # @param localfile [String] destination filename @@ -97,9 +101,13 @@ @GET_error = "" ok = false res = {} + + # ensure both sets of parameters are in sync toks = deep_copy(urltok) - Ops.set(toks, "scheme", _Scheme) - Ops.set(toks, "host", _Host) + toks["scheme"] = _Scheme + toks["host"] = _Host + toks["path"] = _Path + Builtins.y2milestone( "Scheme:%1 Host:%2 Path:%3 Localfile:%4", _Scheme, @@ -107,11 +115,64 @@ _Path, _Localfile ) + + log.info "toks initial: #{hide_password(toks).inspect}" + + if _Scheme == "repo" + base_url = InstURL.installInf2Url("") + if base_url.empty? + log.err "no ZyppRepoURL in /etc/install.inf" + return false + end + + log.info("installation path from install.inf: #{URL.HidePassword(base_url)}") + + toks["scheme"] = "relurl" + rel_url = URL.Build(toks) + log.info("relative url: #{rel_url}") + + absolute_url = Yast2::RelURL.from_installation_repository(rel_url).absolute_url.to_s + log.info("absolute url: #{URL.HidePassword(absolute_url)}") + + toks = URL.Parse(absolute_url) + log.info "toks absolute: #{hide_password(toks).inspect}" + end + + # convert 'cd', "dvd', and 'hd' Zypp schemes to 'device' schema + if ["cd", "dvd", "hd"].include?(toks["scheme"]) + dev_name = toks["query"].match(/devices?=\/dev\/(.*)/) + if !dev_name.nil? + toks["scheme"] = "device" + toks["host"] = dev_name[1] + toks["query"] = "" + end + end + + # convert 'label' scheme to 'device' scheme + if toks["scheme"] == "label" + toks["scheme"] = "device" + toks["host"] = "disk/by-label/#{toks["host"]}" + end + + _Scheme = toks["scheme"] + _Host = toks["host"] + _Path = toks["path"] + if Builtins.regexpsub(_Path, "(.*)//(.*)", "\\1/\\2") != nil _Path = Builtins.regexpsub(_Path, "(.*)//(.*)", "\\1/\\2") + log.info "path changed from #{toks["path"]} to #{_Path}" end - Ops.set(toks, "path", _Path) + toks["path"] = _Path + + log.info "toks final: #{hide_password(toks).inspect}" + + # URL.Build does not reconstruct the URL in all cases; notably it has + # some ideas about what the host part might look like - which conflicts + # with the host part being used for device names in local disk URIs. + # + # It does not matter much as full_url is only used for ftp/http(s). full_url = URL.Build(toks) + log.info("full url (host part might be missing): #{URL.HidePassword(full_url)}") tmp_dir = Convert.to_string(WFM.Read(path(".local.tmpdir"), [])) mount_point = Ops.add(tmp_dir, "/tmp_mount") @@ -532,5 +593,18 @@ rescue SystemCallError => e log.warn "Could not copy #{source} to #{destination}: #{e.inspect}" end + + # Replace password with 'PASSWORD', if one was set. + # + # This is used to keep logs clean. + # + # @param toks [Hash{String => String}] + # + # @return [Hash{String => String}] + def hide_password(toks) + tmp = toks.dup + tmp["pass"] &&= "PASSWORD" + tmp + end end end
participants (1)
-
Source-Sync