Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wget: unrecognised option: read-timeout #2001

Closed
WhyNotHugo opened this issue Jan 9, 2023 · 6 comments
Closed

wget: unrecognised option: read-timeout #2001

WhyNotHugo opened this issue Jan 9, 2023 · 6 comments

Comments

@WhyNotHugo
Copy link

Trying to install arial fails due to a bogus wget flag.

$ winetricks arial
warning: taskset/cpuset not available on your platform!
Executing mkdir -p /home/hugo/wine
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Using winetricks 20220411 - sha256sum: 69856050cfe9d97902dfd68c1ad42a10a4be0fe76660744126d7e3ed75610495 with wine-7.22 and WINEARCH=win64
Executing w_do_call arial
Executing mkdir -p /home/hugo/wine
------------------------------------------------------
warning: You are using a 64-bit WINEPREFIX. Note that many verbs only install 32-bit versions of packages. If you encounter problems, please retest in a clean 32-bit WINEPREFIX before reporting a bug.
------------------------------------------------------
Executing load_arial 
Executing mkdir -p /home/hugo/.cache/winetricks/corefonts
Executing cd /home/hugo/.cache/winetricks/corefonts
Downloading https://mirrors.kernel.org/gentoo/distfiles/arial32.exe to /home/hugo/.cache/winetricks/corefonts
wget: unrecognised option: read-timeout
BusyBox v1.35.0 (2023-01-07 08:37:08 UTC) multi-call binary.

Usage: wget [-cqS] [--spider] [-O FILE] [-o LOGFILE] [--header STR]
	[--post-data STR | --post-file FILE] [-Y on/off]
	[-P DIR] [-U AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

	--spider	Only check URL existence: $? is 0 if exists
	--header STR	Add STR (of form 'header: value') to headers
	--post-data STR	Send STR using POST method
	--post-file FILE	Send FILE using POST method
	-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)
	-o LOGFILE	Log messages to FILE
	-U STR		Use STR for User-Agent header
	-Y on/off	Use proxy
Executing cd /home/hugo/.cache/winetricks/corefonts
Downloading https://web.archive.org/web/2000/https://mirrors.kernel.org/gentoo/distfiles/arial32.exe to /home/hugo/.cache/winetricks/corefonts
wget: unrecognised option: read-timeout
BusyBox v1.35.0 (2023-01-07 08:37:08 UTC) multi-call binary.

Usage: wget [-cqS] [--spider] [-O FILE] [-o LOGFILE] [--header STR]
	[--post-data STR | --post-file FILE] [-Y on/off]
	[-P DIR] [-U AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

	--spider	Only check URL existence: $? is 0 if exists
	--header STR	Add STR (of form 'header: value') to headers
	--post-data STR	Send STR using POST method
	--post-file FILE	Send FILE using POST method
	-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)
	-o LOGFILE	Log messages to FILE
	-U STR		Use STR for User-Agent header
	-Y on/off	Use proxy
------------------------------------------------------
warning: Downloading https://web.archive.org/web/2000/https://mirrors.kernel.org/gentoo/distfiles/arial32.exe failed
------------------------------------------------------

IIRC, A few different wget implementations exist.
Perhaps it's best to use curl which has the same API everywhere?

@WhyNotHugo
Copy link
Author

Installing gnu wget seems to serve as a workaround.

@WhyNotHugo
Copy link
Author

Huh -T is available in both gnu wget and busybox wget, maybe it's safe enough to use that flag instead of --read-timeout.

@austin987
Copy link
Contributor

If you want to use curl, you can use WINETRICKS_DOWNLOADER=curl winetricks ..., or install GNU wget, as you found.

Arguably, this is a bug in BusyBox; it just needs to accept the long option in addition to the short option to be compatible.

For this particular problem though, if you'd like to send a PR to change it to use -T, that's fine. Personally, I prefer long options to short in scripts, as they're easier to understand at a glance, though that code already has a mix..

I don't know if anyone has tested Winetricks with BusyBox before, so you may run into more issues. Feel free to open bugs (though they may end up being bugs for BusyBox ;)).

@WhyNotHugo
Copy link
Author

If you want to use curl, you can use WINETRICKS_DOWNLOADER=curl winetricks ..., or install GNU wget, as you found.

I'll mention this on the Alpine side, it might be worth tweaking the package (I think pulling gnu wget as a dependency makes sense).

Arguably, this is a bug in BusyBox; it just needs to accept the long option in addition to the short option to be compatible.

BusyBox doesn't do GNU-style options, only POSIX-style, so this change is unlikely to happen.

For this particular problem though, if you'd like to send a PR to change it to use -T, that's fine. Personally, I prefer long options to short in scripts, as they're easier to understand at a glance, though that code already has a mix..

I'll see if this can be resolved downstream first, otherwise I'll come back with a patch.

I don't know if anyone has tested Winetricks with BusyBox before, so you may run into more issues. Feel free to open bugs (though they may end up being bugs for BusyBox ;)).

I've hit no other issues with winetricks on busybox so far :)

@WhyNotHugo
Copy link
Author

Addresses downstream: https://gitlab.alpinelinux.org/alpine/aports/-/commit/3c797b34d9389d473a345b8ed193ce367ab76125

Thanks!

@austin987
Copy link
Contributor

Arguably, this is a bug in BusyBox; it just needs to accept the long option in addition to the short option to be compatible.

BusyBox doesn't do GNU-style options, only POSIX-style, so this change is unlikely to happen.

Interesting. I don't recall that being a limitation when I last used it. Their docs certainly list some GNU style options: https://www.busybox.net/downloads/BusyBox.html

(e.g., chpasswd/dumpleases/etc.).

I don't know if anyone has tested Winetricks with BusyBox before, so you may run into more issues. Feel free to open bugs (though they may end up being bugs for BusyBox ;)).

I've hit no other issues with winetricks on busybox so far :)

Awesome! Great to hear!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants