From 913fe842244314d348f36ddceed31f7f6a50a6bc Mon Sep 17 00:00:00 2001 From: oech3 <> Date: Thu, 13 Nov 2025 18:45:04 +0900 Subject: [PATCH 1/3] Avoid mixing wget and curl --- GNUmakefile | 4 ++-- src/uu/head/BENCHMARKING.md | 2 +- src/uu/shuf/BENCHMARKING.md | 2 +- src/uu/wc/BENCHMARKING.md | 4 ++-- util/android-commands.sh | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index b13dbbd34..b2deceed6 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -345,7 +345,7 @@ test_toybox: toybox-src: if [ ! -e "$(TOYBOX_SRC)" ] ; then \ mkdir -p "$(TOYBOX_ROOT)" ; \ - wget "https://github.com/landley/toybox/archive/refs/tags/$(TOYBOX_VER).tar.gz" -P "$(TOYBOX_ROOT)" ; \ + curl "https://github.com/landley/toybox/archive/refs/tags/$(TOYBOX_VER).tar.gz" -o "$(TOYBOX_ROOT)/$(TOYBOX_VER).tar.gz" ; \ tar -C "$(TOYBOX_ROOT)" -xf "$(TOYBOX_ROOT)/$(TOYBOX_VER).tar.gz" ; \ sed -i -e "s|TESTDIR=\".*\"|TESTDIR=\"$(BUILDDIR)\"|g" $(TOYBOX_SRC)/scripts/test.sh; \ sed -i -e "s/ || exit 1//g" $(TOYBOX_SRC)/scripts/test.sh; \ @@ -354,7 +354,7 @@ toybox-src: busybox-src: if [ ! -e "$(BUSYBOX_SRC)" ] ; then \ mkdir -p "$(BUSYBOX_ROOT)" ; \ - wget "https://busybox.net/downloads/busybox-$(BUSYBOX_VER).tar.bz2" -P "$(BUSYBOX_ROOT)" ; \ + curl "https://busybox.net/downloads/busybox-$(BUSYBOX_VER).tar.bz2" -o "$(BUSYBOX_ROOT)/$(BUSYBOX_VER).tar.bz2" ; \ tar -C "$(BUSYBOX_ROOT)" -xf "$(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER).tar.bz2" ; \ fi ; diff --git a/src/uu/head/BENCHMARKING.md b/src/uu/head/BENCHMARKING.md index d751d1f7f..79b6821e5 100644 --- a/src/uu/head/BENCHMARKING.md +++ b/src/uu/head/BENCHMARKING.md @@ -20,7 +20,7 @@ William Shakespeare*, which is in the public domain in the United States and most other parts of the world. ```shell -wget -O shakespeare.txt https://www.gutenberg.org/files/100/100-0.txt +curl -o shakespeare.txt https://www.gutenberg.org/files/100/100-0.txt ``` This particular file has about 170,000 lines, each of which is no longer diff --git a/src/uu/shuf/BENCHMARKING.md b/src/uu/shuf/BENCHMARKING.md index d16b1afb0..ddb98b457 100644 --- a/src/uu/shuf/BENCHMARKING.md +++ b/src/uu/shuf/BENCHMARKING.md @@ -14,7 +14,7 @@ renaming the executable from `shuf` to `shuf.old`. Sample input can be generated using `/dev/random`: ```shell -wget -O input.txt https://www.gutenberg.org/files/100/100-0.txt +curl -o input.txt https://www.gutenberg.org/files/100/100-0.txt ``` To avoid distortions from IO, it is recommended to store input data in tmpfs. diff --git a/src/uu/wc/BENCHMARKING.md b/src/uu/wc/BENCHMARKING.md index 6c938a602..60f9139da 100644 --- a/src/uu/wc/BENCHMARKING.md +++ b/src/uu/wc/BENCHMARKING.md @@ -56,7 +56,7 @@ To get a file with less artificial contents, download a book from Project Gutenberg and concatenate it a lot of times: ```shell -wget https://www.gutenberg.org/files/2701/2701-0.txt -O moby.txt +curl https://www.gutenberg.org/files/2701/2701-0.txt -o moby.txt cat moby.txt moby.txt moby.txt moby.txt > moby4.txt cat moby4.txt moby4.txt moby4.txt moby4.txt > moby16.txt cat moby16.txt moby16.txt moby16.txt moby16.txt > moby64.txt @@ -65,7 +65,7 @@ cat moby16.txt moby16.txt moby16.txt moby16.txt > moby64.txt And get one with lots of unicode too: ```shell -wget https://www.gutenberg.org/files/30613/30613-0.txt -O odyssey.txt +curl https://www.gutenberg.org/files/30613/30613-0.txt -o odyssey.txt cat odyssey.txt odyssey.txt odyssey.txt odyssey.txt > odyssey4.txt cat odyssey4.txt odyssey4.txt odyssey4.txt odyssey4.txt > odyssey16.txt cat odyssey16.txt odyssey16.txt odyssey16.txt odyssey16.txt > odyssey64.txt diff --git a/util/android-commands.sh b/util/android-commands.sh index aa02e5b34..b87d7050b 100755 --- a/util/android-commands.sh +++ b/util/android-commands.sh @@ -329,7 +329,7 @@ init() { snapshot_name="${AVD_CACHE_KEY}" # shellcheck disable=SC2015 - wget -nv "https://github.com/termux/termux-app/releases/download/${termux}/termux-app_${termux}+github-debug_${arch}.apk" && + curl -sLO "https://github.com/termux/termux-app/releases/download/${termux}/termux-app_${termux}+github-debug_${arch}.apk" && snapshot "termux-app_${termux}+github-debug_${arch}.apk" && hash_rustc && exit_termux && From ff92c55962701ef3047d471a543a205dc39e20e7 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Thu, 13 Nov 2025 20:15:46 +0900 Subject: [PATCH 2/3] GNUmakefile:curl -Ls --- GNUmakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index b2deceed6..010933bf9 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -345,7 +345,7 @@ test_toybox: toybox-src: if [ ! -e "$(TOYBOX_SRC)" ] ; then \ mkdir -p "$(TOYBOX_ROOT)" ; \ - curl "https://github.com/landley/toybox/archive/refs/tags/$(TOYBOX_VER).tar.gz" -o "$(TOYBOX_ROOT)/$(TOYBOX_VER).tar.gz" ; \ + curl -Ls "https://github.com/landley/toybox/archive/refs/tags/$(TOYBOX_VER).tar.gz" -o "$(TOYBOX_ROOT)/$(TOYBOX_VER).tar.gz" ; \ tar -C "$(TOYBOX_ROOT)" -xf "$(TOYBOX_ROOT)/$(TOYBOX_VER).tar.gz" ; \ sed -i -e "s|TESTDIR=\".*\"|TESTDIR=\"$(BUILDDIR)\"|g" $(TOYBOX_SRC)/scripts/test.sh; \ sed -i -e "s/ || exit 1//g" $(TOYBOX_SRC)/scripts/test.sh; \ @@ -354,7 +354,7 @@ toybox-src: busybox-src: if [ ! -e "$(BUSYBOX_SRC)" ] ; then \ mkdir -p "$(BUSYBOX_ROOT)" ; \ - curl "https://busybox.net/downloads/busybox-$(BUSYBOX_VER).tar.bz2" -o "$(BUSYBOX_ROOT)/$(BUSYBOX_VER).tar.bz2" ; \ + curl -Ls "https://busybox.net/downloads/busybox-$(BUSYBOX_VER).tar.bz2" -o "$(BUSYBOX_ROOT)/$(BUSYBOX_VER).tar.bz2" ; \ tar -C "$(BUSYBOX_ROOT)" -xf "$(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER).tar.bz2" ; \ fi ; From ea1298096986812c31e56124bd6bfb41a75ae968 Mon Sep 17 00:00:00 2001 From: oech3 <79379754+oech3@users.noreply.github.com> Date: Fri, 14 Nov 2025 00:19:39 +0900 Subject: [PATCH 3/3] GNUmakefile: DL busybox fro mirror (better resp) --- GNUmakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index 010933bf9..f262c50ea 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -354,8 +354,8 @@ toybox-src: busybox-src: if [ ! -e "$(BUSYBOX_SRC)" ] ; then \ mkdir -p "$(BUSYBOX_ROOT)" ; \ - curl -Ls "https://busybox.net/downloads/busybox-$(BUSYBOX_VER).tar.bz2" -o "$(BUSYBOX_ROOT)/$(BUSYBOX_VER).tar.bz2" ; \ - tar -C "$(BUSYBOX_ROOT)" -xf "$(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER).tar.bz2" ; \ + curl -Ls "https://github.com/mirror/busybox/archive/refs/tags/$(subst .,_,$(BUSYBOX_VER)).tar.gz" -o "$(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER).tar.gz" ; \ + tar -C "$(BUSYBOX_ROOT)" -xf "$(BUSYBOX_ROOT)/busybox-$(BUSYBOX_VER).tar.gz" ; \ fi ; # This is a busybox-specific config file their test suite wants to parse.