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 unrecognized option --show-progress #207

Closed
marcus-leonard opened this issue Aug 25, 2022 · 8 comments · Fixed by #218
Closed

wget unrecognized option --show-progress #207

marcus-leonard opened this issue Aug 25, 2022 · 8 comments · Fixed by #218

Comments

@marcus-leonard
Copy link

Server: Red Hat Enterprise Linux Server release 7.9
wget version: GNU Wget 1.14

$ bee dl-core
wget: unrecognized option '--show-progress'
...
# Install fails.

$ wget -h | grep progress
       --progress=TYPE           select progress gauge type.

Later things (like Ubuntu 20.04) have

$ wget -h | grep progress
       --progress=TYPE             select progress gauge type
       --show-progress             display the progress bar in any verbosity mode

Not a big deal, but there are probably still quite a few RHEL 7 (and similar) OSs around.

@yorkshire-pudding
Copy link
Collaborator

I recall having this issue with my host.
My workaround was to use the --hide-progress argument.
https://github.com/backdrop-contrib/bee/wiki/Usage#download-core

This can also be used for modules.

@yorkshire-pudding
Copy link
Collaborator

@marcus-leonard - It may be possible to factor this in if the version text is fairly standard. Please can you paste what you get when you type:

wget --version

@laryn
Copy link
Member

laryn commented Oct 7, 2022

GNU Wget 1.14 built on linux-gnu.

+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +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../lib -I../lib -O2 -g -pipe 
    -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong 
    --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic 
Link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions 
    -fstack-protector-strong --param=ssp-buffer-size=4 
    -grecord-gcc-switches -m64 -mtune=generic -lssl -lcrypto 
    /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so 
    -ldl -lz -lz -lidn -luuid -lpcre ftp-opie.o openssl.o http-ntlm.o 
    ../lib/libgnu.a 

Copyright (C) 2011 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>.

@yorkshire-pudding
Copy link
Collaborator

yorkshire-pudding commented Oct 8, 2022

@laryn - thanks.
Looks like how the version is output is fairly standard between versions so should be able to do something.

@yorkshire-pudding
Copy link
Collaborator

yorkshire-pudding commented Oct 8, 2022

@laryn @marcus-leonard

I've added a pull request to add support for showing the progress bar on earlier version of wget
It is not quite the same as the arguments don't work in the same way

This is post 1.16
/tmp/filter_perms63 100%[===================>]  10.42K  --.-KB/s    in 0s

 [✔] 'filter_perms' was downloaded into '/app/backdrop/modules/filter_perms'.
This is 1.14 (my web host)
--2022-10-08 14:59:09--  https://github.com/backdrop-contrib/backup_migrate/releases/latest/download/backup_migrate.zip
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/backdrop-contrib/backup_migrate/releases/download/1.x-1.0.20/backup_migrate.zip [following]
--2022-10-08 14:59:09--  https://github.com/backdrop-contrib/backup_migrate/releases/download/1.x-1.0.20/backup_migrate.zip
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/29902295/a7e911a2-02fe-46c5-8f0d-b14e199fb9fd?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221008%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221008T145910Z&X-Amz-Expires=300&X-Amz-Signature=afb2e57cbc2f3fec359d5f05771d780a8949f2bdd06fe6f5d3f0e281ac43e14f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=29902295&response-content-disposition=attachment%3B%20filename%3Dbackup_migrate.zip&response-content-type=application%2Foctet-stream [following]
--2022-10-08 14:59:10--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/29902295/a7e911a2-02fe-46c5-8f0d-b14e199fb9fd?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221008%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221008T145910Z&X-Amz-Expires=300&X-Amz-Signature=afb2e57cbc2f3fec359d5f05771d780a8949f2bdd06fe6f5d3f0e281ac43e14f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=29902295&response-content-disposition=attachment%3B%20filename%3Dbackup_migrate.zip&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 112185 (110K) [application/octet-stream]
Saving to: '/tmp/backup_migrate6341903db650d/backup_migrate.zip'

100%[==============================================================================>] 112,185     --.-K/s   in 0.002s

2022-10-08 14:59:10 (57.5 MB/s) - '/tmp/backup_migrate6341903db650d/backup_migrate.zip' saved [112185/112185]

 [✔] 'backup_migrate' was downloaded into '/home/user/website/dev/www/modules/backup_migrate'.

I did try a suggestion on this page but it made no difference.

wget --progress=bar:force:noscroll 

From my perspective, this is better than causing an error if you don't use --hide-progress but I'd be interested if others could test and let me know your views.

The alternative would be to simply hide progress for earlier versions.

@marcus-leonard
Copy link
Author

Thanks for looking into this & sorry for delay responding.
Yes, agree; it's a bit noisy but much better than failing with the error.
If the lower version of wget is detected, you could potentially offer a note about using --hide-progress, but bee help dl-core points this out anyway.

@yorkshire-pudding
Copy link
Collaborator

@marcus-leonard - Thanks - that's a really good suggestion.
How about:

from 1.14 on my web host
--2022-10-10 08:46:33--  https://github.com/backdrop-contrib/snazzy/releases/latest/download/snazzy.zip
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/backdrop-contrib/snazzy/releases/download/1.x-2.0.2/snazzy.zip [following]
--2022-10-10 08:46:33--  https://github.com/backdrop-contrib/snazzy/releases/download/1.x-2.0.2/snazzy.zip
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/322872675/59bf07a0-dca6-4cc2-b406-d42f5c9f7c65?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221010%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221010T084634Z&X-Amz-Expires=300&X-Amz-Signature=0fc8a22983803a4d3111b8da6d8baf77cefd219fcad20f226f29cefff5e8a7a8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=322872675&response-content-disposition=attachment%3B%20filename%3Dsnazzy.zip&response-content-type=application%2Foctet-stream [following]
--2022-10-10 08:46:34--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/322872675/59bf07a0-dca6-4cc2-b406-d42f5c9f7c65?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221010%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221010T084634Z&X-Amz-Expires=300&X-Amz-Signature=0fc8a22983803a4d3111b8da6d8baf77cefd219fcad20f226f29cefff5e8a7a8&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=322872675&response-content-disposition=attachment%3B%20filename%3Dsnazzy.zip&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1672491 (1.6M) [application/octet-stream]
Saving to: '/tmp/snazzy6343dbe997bc2/snazzy.zip'

100%[=====================================================>] 1,672,491   --.-K/s   in 0.04s

2022-10-10 08:46:34 (40.5 MB/s) - '/tmp/snazzy6343dbe997bc2/snazzy.zip' saved [1672491/1672491]


 [i] The wget tool used for downloading is version 1.14 and does not support showing only the
     progress bar. Upgrade to version 1.16 or later; or use the '--hide-progress' argument if
     you wish to hide altogether.
 [✔] 'snazzy' was downloaded into '/home/user/website/docroot/themes/snazzy'.

@marcus-leonard
Copy link
Author

@yorkshire-pudding That looks pretty good.

The only other option for wget 1.14 that affects things seems to be
wget -nv [URL]
which produces this

$ wget -nv https://github.com/backdrop-contrib/snazzy/releases/latest/download/snazzy.zip
2022-10-12 15:48:07 URL:https://objects.githubusercontent.com/github-production-release-asset-2e65be/322872675/59bf07a0-dca6-4cc2-b406-d42f5c9f7c65?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221012%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221012T044807Z&X-Amz-Expires=300&X-Amz-Signature=f3569ca1fd9e403f4b04b6c683342a9a7597a75f9eeff3eb4cd6e563c7fd0e82&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=322872675&response-content-disposition=attachment%3B%20filename%3Dsnazzy.zip&response-content-type=application%2Foctet-stream [1672491/1672491] -> "snazzy.zip" [1]

which is shorter but doesn't show any progress.

I think what you've done so far is fine.

yorkshire-pudding added a commit that referenced this issue Oct 13, 2022
Issue #207 - Adds progress bar for earlier versions of wget and a message explaining why the output is so long and what they can do about it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants