Skip to content

Commit

Permalink
Merge branch 'SLE-15-SP3' into merge_SLE-15-SP3
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed Jun 9, 2021
2 parents 6ec640e + 378b54c commit e06884f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .rubocop.yml
Expand Up @@ -30,7 +30,7 @@ Metrics/BlockNesting:
# Offense count: 1
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 350
Max: 355

# Offense count: 8
Metrics/CyclomaticComplexity:
Expand Down
9 changes: 9 additions & 0 deletions package/yast2-proxy.changes
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Jun 9 08:04:48 UTC 2021 - Knut Anderssen <kanderssen@suse.com>

- 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 <lslezak@suse.cz>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-proxy.spec
Expand Up @@ -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
Expand Down
16 changes: 11 additions & 5 deletions src/modules/Proxy.rb
Expand Up @@ -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
Expand All @@ -26,6 +30,7 @@ def main
@no = ""
@user = ""
@pass = ""
@to_target = false
end

# domains that should not be proxied; reader
Expand Down Expand Up @@ -209,6 +214,7 @@ 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
@to_target = true if Stage.initial

@modified = false

Expand Down Expand Up @@ -267,8 +273,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
Expand All @@ -292,22 +298,22 @@ 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(
command,
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...")
Expand Down

0 comments on commit e06884f

Please sign in to comment.