* [PATCH 0/3] Fixes for oe-git-proxy
@ 2015-09-18 10:46 Peter Kjellerstedt
2015-09-18 10:46 ` [PATCH 1/3] oe-git-proxy: Allow explicit IP addresses in $NO_PROXY Peter Kjellerstedt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2015-09-18 10:46 UTC (permalink / raw)
To: openembedded-core; +Cc: dvhart
This fixes a couple of problems with the oe-git-proxy script. See the
respective commits for more information.
//Peter
The following changes since commit 3a5e46b6ed483e43251da7e328b9299189997722:
bitbake: bb.fetch2.{git, hg}: remove tarball if it needs updating (2015-09-18 09:05:36 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib pkj/oe-git-proxy
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=pkj/oe-git-proxy
Peter Kjellerstedt (3):
oe-git-proxy: Allow explicit IP addresses in $NO_PROXY
oe-git-proxy: Correct the parsing of a port in $ALL_PROXY
oe-git-proxy: Allow socks4 as protocol in $ALL_PROXY
scripts/oe-git-proxy | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] oe-git-proxy: Allow explicit IP addresses in $NO_PROXY
2015-09-18 10:46 [PATCH 0/3] Fixes for oe-git-proxy Peter Kjellerstedt
@ 2015-09-18 10:46 ` Peter Kjellerstedt
2015-09-18 10:46 ` [PATCH 2/3] oe-git-proxy: Correct the parsing of a port in $ALL_PROXY Peter Kjellerstedt
2015-09-18 10:46 ` [PATCH 3/3] oe-git-proxy: Allow socks4 as protocol " Peter Kjellerstedt
2 siblings, 0 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2015-09-18 10:46 UTC (permalink / raw)
To: openembedded-core; +Cc: dvhart
Without this fix, if one specified, e.g., 127.0.0.1 in $NO_PROXY, the
oe-git-proxy script would fail with a message like this:
/home/pkj/yocto/poky/scripts/oe-git-proxy: line 64: 32-127.0.0.1: syntax error: invalid arithmetic operator (error token is ".0.0.1")
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
scripts/oe-git-proxy | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
index 4873455..2473282 100755
--- a/scripts/oe-git-proxy
+++ b/scripts/oe-git-proxy
@@ -53,6 +53,7 @@ match_ipv4() {
# Determine the mask bitlength
BITS=${CIDR##*/}
+ [ "$BITS" != "$CIDR" ] || BITS=32
if [ -z "$BITS" ]; then
return 1
fi
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] oe-git-proxy: Correct the parsing of a port in $ALL_PROXY
2015-09-18 10:46 [PATCH 0/3] Fixes for oe-git-proxy Peter Kjellerstedt
2015-09-18 10:46 ` [PATCH 1/3] oe-git-proxy: Allow explicit IP addresses in $NO_PROXY Peter Kjellerstedt
@ 2015-09-18 10:46 ` Peter Kjellerstedt
2015-09-18 10:46 ` [PATCH 3/3] oe-git-proxy: Allow socks4 as protocol " Peter Kjellerstedt
2 siblings, 0 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2015-09-18 10:46 UTC (permalink / raw)
To: openembedded-core; +Cc: dvhart
Due to an error in the regular expression used to extract a port
number specified in $ALL_PROXY, rather than allowing the port number
to be followed by an optional "/", the port was required to be
followed by "/?".
This corrects the regular expression to allow an optional "/". It also
allows the odd "/?" suffix for backwards compatibility.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
scripts/oe-git-proxy | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
index 2473282..b971c88 100755
--- a/scripts/oe-git-proxy
+++ b/scripts/oe-git-proxy
@@ -113,7 +113,9 @@ done
# Proxy is necessary, determine protocol, server, and port
PROTO=$(echo $ALL_PROXY | sed -e 's/\([^:]*\):\/\/.*/\1/')
PROXY=$(echo $ALL_PROXY | sed -e 's/.*:\/\/\([^:]*\).*/\1/')
-PORT=$(echo $ALL_PROXY | sed -e 's/.*:\([0-9]*\)\/?$/\1/')
+# For backwards compatibility, this allows the port number to be followed by /?
+# in addition to the customary optional /
+PORT=$(echo $ALL_PROXY | sed -e 's/.*:\([0-9]*\)\(\/?\?\)\?$/\1/')
if [ "$PORT" = "$ALL_PROXY" ]; then
PORT=""
fi
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] oe-git-proxy: Allow socks4 as protocol in $ALL_PROXY
2015-09-18 10:46 [PATCH 0/3] Fixes for oe-git-proxy Peter Kjellerstedt
2015-09-18 10:46 ` [PATCH 1/3] oe-git-proxy: Allow explicit IP addresses in $NO_PROXY Peter Kjellerstedt
2015-09-18 10:46 ` [PATCH 2/3] oe-git-proxy: Correct the parsing of a port in $ALL_PROXY Peter Kjellerstedt
@ 2015-09-18 10:46 ` Peter Kjellerstedt
2 siblings, 0 replies; 4+ messages in thread
From: Peter Kjellerstedt @ 2015-09-18 10:46 UTC (permalink / raw)
To: openembedded-core; +Cc: dvhart
The current default is to use SOCKS4a when socks is specified as
protocol in $ALL_PROXY. However, not all socks servers support
SOCKS4a. By allowing socks4 as an additional protocol, this script
will happily work with SOCKS4 only servers.
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
scripts/oe-git-proxy | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/scripts/oe-git-proxy b/scripts/oe-git-proxy
index b971c88..d2e9f92 100755
--- a/scripts/oe-git-proxy
+++ b/scripts/oe-git-proxy
@@ -120,11 +120,16 @@ if [ "$PORT" = "$ALL_PROXY" ]; then
PORT=""
fi
-if [ "$PROTO" = "socks" ]; then
+if [ "$PROTO" = "socks" ] || [ "$PROTO" = "socks4a" ]; then
if [ -z "$PORT" ]; then
PORT="1080"
fi
METHOD="SOCKS4A:$PROXY:$1:$2,socksport=$PORT"
+elif [ "$PROTO" = "socks4" ]; then
+ if [ -z "$PORT" ]; then
+ PORT="1080"
+ fi
+ METHOD="SOCKS4:$PROXY:$1:$2,socksport=$PORT"
else
# Assume PROXY (http, https, etc)
if [ -z "$PORT" ]; then
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-18 10:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-18 10:46 [PATCH 0/3] Fixes for oe-git-proxy Peter Kjellerstedt
2015-09-18 10:46 ` [PATCH 1/3] oe-git-proxy: Allow explicit IP addresses in $NO_PROXY Peter Kjellerstedt
2015-09-18 10:46 ` [PATCH 2/3] oe-git-proxy: Correct the parsing of a port in $ALL_PROXY Peter Kjellerstedt
2015-09-18 10:46 ` [PATCH 3/3] oe-git-proxy: Allow socks4 as protocol " Peter Kjellerstedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox