Open l0b0 opened 5 years ago
In other words, cabal needs the real "GNU Wget" and doesn't like the pseudo wget
provided by busybox
I'm not sure what we can do here; to some degree I consider this a packaging issue with the APK as the APK doesn't make sure that either curl
or a proper wget
is in PATH (cabal checks whether curl
exists, if not, falls back to checking whether wget
exists, and so on...; or you can force a specific HTTP transport via the --http-transport
flag/config setting)
Is this an arch issue per-se or can one get the real wget from arch too?
I suppose the one thing we could do is add a check on wget that its the real one and not a substitute, but that does feel like a bit much.
Ah its not arch per-se but Alpine. And it does look from a quick browse that one can install the "real" wget or curl if desired.
Is there a way to detect that the wget
exe we've found is impaired?
@23Skidoo a simple heuristic would be invoking wget --version
and possibly making sure the string "GNU Wget" is included in the output:
$ wget --version
GNU Wget 1.19.4 built on linux-gnu.
-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls
+ntlm +opie +psl +ssl/openssl
Wgetrc:
/etc/wgetrc (system)
Locale:
/usr/share/locale
Compile:
gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
-DLOCALEDIR="/usr/share/locale" -I. -I../../src -I../lib
-I../../lib -Wdate-time -D_FORTIFY_SOURCE=2 -DHAVE_LIBSSL -DNDEBUG
-g -O2 -fdebug-prefix-map=/build/wget-Xb5Z7Y/wget-1.19.4=.
-fstack-protector-strong -Wformat -Werror=format-security
-DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -g -Wall
Link:
gcc -DHAVE_LIBSSL -DNDEBUG -g -O2
-fdebug-prefix-map=/build/wget-Xb5Z7Y/wget-1.19.4=.
-fstack-protector-strong -Wformat -Werror=format-security
-DNO_SSLv2 -D_FILE_OFFSET_BITS=64 -g -Wall -Wl,-Bsymbolic-functions
-Wl,-z,relro -Wl,-z,now -lpcre -luuid -lidn2 -lssl -lcrypto -lpsl
ftp-opie.o openssl.o http-ntlm.o ../lib/libgnu.a
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://www.gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
Please send bug reports and questions to <bug-wget@gnu.org>.
Whereas, for busybox, --version
doesn't even seem to exist, and you get a non-zero exitcode with a usage message:
# wget --version
wget: unrecognized option: version
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.
Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
[--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
[-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...
Retrieve files via HTTP or FTP
--spider Only check URL existence: $? is 0 if exists
-c Continue retrieval of aborted transfer
-q Quiet
-P DIR Save to DIR (default .)
-S Show server response
-T SEC Network read timeout is SEC seconds
-O FILE Save to FILE ('-' for stdout)
-U STR Use STR for User-Agent header
-Y on/off Use proxy
So for wget version for alpine that is using busybox you have to do the following:
RUN apk update \
&& apk add ca-certificates wget \
&& update-ca-certificates # This line may not do anything
Reference: https://github.com/Yelp/dumb-init/issues/73
Describe the bug
As above.
To Reproduce Steps to reproduce the behavior:
System informataion