summaryrefslogtreecommitdiffstats
path: root/scripts/oe-git-proxy
AgeCommit message (Collapse)Author
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-31oe-git-proxy: Avoid resolving NO_PROXY against local filesJan Kiszka
NO_PROXY may contain * elements, and if we are unlucky (or want to match all hosts with *), we will pick up local files rather than doing the match in match_host. Quoting helps here. (From OE-Core rev: 7e216e806ca765152fd874e24785f783a3201284) Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-12-13oe-git-proxy: create usage outputEd Bartosh
Created usage output for oe-git-proxy script. [YOCTO #10751] (From OE-Core rev: ec0fdb5e896fc20dbafcc8ae507b17c011dc56fd) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-20oe-git-proxy: don't depend on syslinuxAndré Draszik
gethostip comes from syslinux. It seems odd to depend on a bootloader to clone a git repository. Switch to using getent from the c-library, which should be available on every system. We now also support the case where a hostname resolves to more than one IP address. (From OE-Core rev: c91dbf3ca2faec95195c85b65aa6cab7de9bca2c) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28oe-git-proxy: support username / password in http proxyAndré Draszik
We also make sure to correctly support usernames that contain spaces. For simplicity sed + regex has been replaced with shell parameter expansion, which works in both, bash and dash. (From OE-Core rev: ce4ff3dd80379e1bf71a967e0512591aaa046308) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-28oe-git-proxy: also check all_proxy and http_proxy env variablesAndré Draszik
(From OE-Core rev: 00fe3004aa624afee62315d5ea7566853b926931) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23oe-git-proxy: Allow socks4 as protocol in $ALL_PROXYPeter Kjellerstedt
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. (From OE-Core rev: da9ddf48ed4a13cdc47649e22ab6ef7e36e01fdf) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23oe-git-proxy: Correct the parsing of a port in $ALL_PROXYPeter Kjellerstedt
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. (From OE-Core rev: 39eb19e2ae9add58c763b71b54bdb3739041b2d0) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-23oe-git-proxy: Allow explicit IP addresses in $NO_PROXYPeter Kjellerstedt
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") (From OE-Core rev: c01e61d8b79d644880415986bdb1ba925f194329) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-31oe-git-proxy: Redirect error messages to STDERRJuro Bystricky
oe-git-proxy script needs socat. If socat is not found, an error message is issued on STDOUT. This leads to a misleading git message: fatal: protocol error: bad line length character: ERRO instead of the intended message: ERROR: socat binary not in PATH Redirecting the error message to STDERR fixes this issue. (From OE-Core rev: 960a7f7ae24e72efc165a431f8b91b3f3b176916) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-10oe-git-proxy: use SOCKS4a instead of SOCKS4Ross Burton
In some situations where a proxy is required the client can't even do DNS lookups, so instead of using SOCKS4 use SOCKS4a which moves the name resolution from the client to the proxy. (From OE-Core rev: 984455a95b4302d527ff54e019d8ed00611f3664) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11oe-git-proxy: Use socat instead of BSD ncDarren Hart
BSD nc was commonly available on the current distros until Fedora 18 appears to have dropped it. socat appears to be a reasonable replacement with availability on Fedora and Ubuntu and going back some time as well. Update the script to use the socat syntax. Simplify the logic a bit by using exec for the no-proxy-needed cases. (From OE-Core rev: 795b1ea370b8a1d9152c171a50e80bd0b4b8dc60) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-02-11oe-git-proxy: Add a new comprehensive git proxy scriptDarren Hart
oe-git-proxy.sh is a simple tool to be used via GIT_PROXY_COMMAND. It uses BSD netcat to make SOCKS5 or HTTPS proxy connections. It uses ALL_PROXY to determine the proxy server, protocol, and port. It uses NO_PROXY to skip using the proxy for a comma delimited list of hosts, host globs (*.example.com), IPs, or CIDR masks (192.168.1.0/24). It is known to work with both bash and dash shells. V2: Implement recommendations by Enrico Scholz: o Use exec for the nc calls o Use "$@" instead of $* to avoid quoting issues inherent with $* o Use bash explicitly and simplify some of the string manipulations Also: o Drop the .sh in the name per Otavio Salvador o Remove a stray debug statement V3: Implement recommendations by Otavio Salvador o GPL license blurb o Fix minor typo in comment block (From OE-Core rev: 62867f56da0e0904f0108f113324c2432659fbac) Signed-off-by: Darren Hart <dvhart@linux.intel.com> Cc: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Cc: Otavio Salvador <otavio@ossystems.com.br> git-proxy cleanup Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>