diff --git a/.rubocop.yml b/.rubocop.yml index 2f3c55a..0b87536 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -30,7 +30,7 @@ Metrics/BlockNesting: # Offense count: 1 # Configuration parameters: CountComments. Metrics/ClassLength: - Max: 350 + Max: 355 # Offense count: 8 Metrics/CyclomaticComplexity: diff --git a/package/yast2-proxy.changes b/package/yast2-proxy.changes index 6e3a840..a6b9f72 100644 --- a/package/yast2-proxy.changes +++ b/package/yast2-proxy.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Jun 9 08:04:48 UTC 2021 - Knut Anderssen + +- Added 'to_target' variable which will determine whether the + configuration should be written to the target system at the end + of the installation or not (bsc#1185016). +- Replace novell urls by SUSE ones (bsc#1100366) +- 4.4.1 + ------------------------------------------------------------------- Tue Apr 20 13:51:55 UTC 2021 - Ladislav Slezák diff --git a/package/yast2-proxy.spec b/package/yast2-proxy.spec index 0b1c92c..19af331 100644 --- a/package/yast2-proxy.spec +++ b/package/yast2-proxy.spec @@ -17,7 +17,7 @@ Name: yast2-proxy -Version: 4.4.0 +Version: 4.4.1 Release: 0 Summary: YaST2 - Proxy Configuration License: GPL-2.0-or-later diff --git a/src/modules/Proxy.rb b/src/modules/Proxy.rb index 356950a..f0fc562 100644 --- a/src/modules/Proxy.rb +++ b/src/modules/Proxy.rb @@ -5,12 +5,16 @@ module Yast # Configures FTP and HTTP proxies via sysconfig # and /root/.curlrc (for YOU) class ProxyClass < Module + # @return [Boolean] Whether the configuration should be copied to the target system + attr_accessor :to_target + def main textdomain "proxy" Yast.import "Summary" Yast.import "Progress" Yast.import "Mode" + Yast.import "Stage" Yast.import "Popup" @proposal_valid = false @@ -26,6 +30,7 @@ def main @no = "" @user = "" @pass = "" + @to_target = false end # domains that should not be proxied; reader @@ -209,6 +214,9 @@ def Write # user can't relogin in installation and update, do not show the msg then (bnc#486037, bnc#543469) ProxyFinishPopup(true) if Mode.normal + # By now the configuration written to the inst-sys should be copied always to the target + # system, so it is set here in order to discharge others from establishing it. (bsc#1185016) + @to_target = true if Stage.initial @modified = false @@ -267,8 +275,8 @@ def RunTestProxy(http_proxy, https_proxy, ftp_proxy, proxy_user, proxy_password) # /usr/bin/curl --verbose # --proxy http://server_name:port_number # --proxy-user user:password - # --url http://www.novell.com or ftp://ftp.novell.com | suggested for HTTP or FTP test - # --url https://secure-www.novell.com --insecure + # --url http://www.suse.com or ftp://ftp.suse.com | suggested for HTTP or FTP test + # --url https://www.suse.com --insecure ret = {} test_http = (http_proxy != "" && http_proxy != "http://") ? true : false @@ -292,7 +300,7 @@ def RunTestProxy(http_proxy, https_proxy, ftp_proxy, proxy_user, proxy_password) http_proxy.shellescape, user_pass, timeout_sec, - "http://www.novell.com" + "http://www.suse.com" ) # adding option --insecure to accept the certificate without asking https_command = Builtins.sformat( @@ -300,14 +308,14 @@ def RunTestProxy(http_proxy, https_proxy, ftp_proxy, proxy_user, proxy_password) https_proxy.shellescape, user_pass, timeout_sec, - "https://secure-www.novell.com --insecure" + "https://www.suse.com --insecure" ) ftp_command = Builtins.sformat( command, ftp_proxy.shellescape, user_pass, timeout_sec, - "ftp://ftp.novell.com" + "ftp://ftp.suse.com" ) Builtins.y2milestone("Running HTTP_PROXY test...")