diff --git a/config/boards/mba8mpxl-ras314.conf b/config/boards/mba8mpxl-ras314.conf index 78058c0ad9..e97a206f51 100644 --- a/config/boards/mba8mpxl-ras314.conf +++ b/config/boards/mba8mpxl-ras314.conf @@ -16,7 +16,11 @@ ASOUND_STATE="asound.state.tqma" function post_family_tweaks_bsp__mba8mpxl-ras314() { # Wifi & Bluetooth (use firmware from NXP) - wget https://github.com/nxp-imx/imx-firmware/raw/lf-6.6.3_1.0.0/nxp/FwImage_8997/pcieuart8997_combo_v4.bin + curl -fLOJ https://github.com/nxp-imx/imx-firmware/raw/lf-6.6.3_1.0.0/nxp/FwImage_8997/pcieuart8997_combo_v4.bin || { + echo "download of pcieuart8997_combo_v4.bin failed" + rm -f pcieuart8997_combo_v4.bin + exit 1 + } run_host_command_logged mkdir -pv --mode=755 "$destination/lib/firmware/" || exit_with_error "Unable to mkdir firmware" run_host_command_logged mkdir -v --mode=775 "$destination/lib/firmware/mrvl/" || exit_with_error "Unable to mkdir mrvl" run_host_command_logged mv -v "pcieuart8997_combo_v4.bin" "$destination/lib/firmware/mrvl/" || exit_with_error "Unable to copy mrvl firmware" diff --git a/config/boards/orangepi5pro.csc b/config/boards/orangepi5pro.csc index 34bdb62e15..719eec30d3 100644 --- a/config/boards/orangepi5pro.csc +++ b/config/boards/orangepi5pro.csc @@ -83,7 +83,7 @@ function pre_customize_image__orangepi5pro_add_phy_driver() { # Create directory and download .deb (Not installing due to chroot issue with dkms and kernel headers) chroot_sdcard mkdir -p /usr/local/share/eth-driver - chroot_sdcard wget "https://github.com/dante1613/Motorcomm-YT6801/raw/main/tuxedo-yt6801/${deb_file}" -O "/usr/local/share/eth-driver/${deb_file}" + chroot_sdcard curl -fL "https://github.com/dante1613/Motorcomm-YT6801/raw/main/tuxedo-yt6801/${deb_file}" -o "/usr/local/share/eth-driver/${deb_file}" # Make script to Auto-Install Ethernet Driver Only on first boot cat << 'EOF' > "${SDCARD}/usr/local/bin/install-eth-driver.sh" @@ -196,4 +196,4 @@ function post_family_config__orangepi5pro_use_vendor_uboot() { BOOTSOURCE='https://github.com/orangepi-xunlong/u-boot-orangepi.git' BOOTBRANCH='branch:v2017.09-rk3588' BOOTPATCHDIR="legacy" -} \ No newline at end of file +} diff --git a/config/boards/thinkpad-x13s.conf b/config/boards/thinkpad-x13s.conf index 017e9bf129..d43424a3ed 100644 --- a/config/boards/thinkpad-x13s.conf +++ b/config/boards/thinkpad-x13s.conf @@ -189,7 +189,8 @@ function x13s_obtain_firmware() { mkdir -p "${fw_target}/qcom/sc8280xp/LENOVO/21BX" # video acceleration firmware/interconnect stuff; get it from ironrobin's repo; - wget --output-document "${fw_target}/qcom/sc8280xp/LENOVO/21BX/qcvss8280.mbn" "https://raw.githubusercontent.com/ironrobin/x13s-alarm/trunk/x13s-firmware/qcvss8280.mbn" + curl -o "${fw_target}/qcom/sc8280xp/LENOVO/21BX/qcvss8280.mbn" \ + "https://raw.githubusercontent.com/ironrobin/x13s-alarm/trunk/x13s-firmware/qcvss8280.mbn" # add a link to audio fw (cd "${fw_target}/qcom/sc8280xp" && ln -s "LENOVO/21BX/audioreach-tplg.bin" "SC8280XP-LENOVO-X13S-tplg.bin") diff --git a/config/sources/families/imx8m.conf b/config/sources/families/imx8m.conf index ca699ba89d..aac57f45d5 100644 --- a/config/sources/families/imx8m.conf +++ b/config/sources/families/imx8m.conf @@ -32,7 +32,11 @@ esac pre_config_uboot_target() { # get the firmware rm -rf ${IMX_FIRMWARE}* - wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/${IMX_FIRMWARE}.bin -O ${IMX_FIRMWARE}.bin + curl -fL "https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/${IMX_FIRMWARE}.bin" -o "${IMX_FIRMWARE}.bin" || { + echo "download of IMX_FIRMWARE failed"; + rm -f "${IMX_FIRMWARE}.bin" + exit 1 + } chmod +x ${IMX_FIRMWARE}.bin ./${IMX_FIRMWARE}.bin --auto-accept diff --git a/config/sources/families/meson-s4t7.conf b/config/sources/families/meson-s4t7.conf index 81edb446ab..7e8b88b3eb 100644 --- a/config/sources/families/meson-s4t7.conf +++ b/config/sources/families/meson-s4t7.conf @@ -65,7 +65,7 @@ function fetch_sources_tools__meson_s4t7_download_uboot_toolchain() { mkdir -p "${tbasedir}" if [[ ! -d "${tdir}" ]]; then - run_host_command_logged wget --progress=dot:giga -O "${tbasedir}/${tfile}" "${turl}" + run_host_command_logged curl -fL#o "${tbasedir}/${tfile}" "${turl}" run_host_command_logged tar -C "${tbasedir}" -xf "${tbasedir}/${tfile}" run_host_command_logged rm -fv "${tbasedir}/${tfile}" fi @@ -87,7 +87,7 @@ function fetch_sources_tools__meson_s4t7_download_uboot_toolchain() { mkdir -p "${tbasedir}" if [[ ! -d "${tdir}" ]]; then - run_host_command_logged wget --progress=dot:giga -O "${tbasedir}/${tfile}" "${turl}" + run_host_command_logged curl -fL#o "${tbasedir}/${tfile}" "${turl}" run_host_command_logged tar -C "${tbasedir}" -xzf "${tbasedir}/${tfile}" run_host_command_logged rm -fv "${tbasedir}/${tfile}" fi diff --git a/config/templates/customize-image.sh.template b/config/templates/customize-image.sh.template index e1bb43d5ed..d4e234d417 100644 --- a/config/templates/customize-image.sh.template +++ b/config/templates/customize-image.sh.template @@ -111,7 +111,7 @@ InstallOpenMediaVault() { # install OMV extras, enable folder2ram and tweak some settings FILE=$(mktemp) - wget "$OMV_EXTRAS_URL" -qO $FILE && dpkg -i $FILE + curl "$OMV_EXTRAS_URL" -fLso "$FILE" && dpkg -i "$FILE" /usr/sbin/omv-update # Install flashmemory plugin and netatalk by default, use nice logo for the latter, @@ -208,8 +208,9 @@ InstallOpenMediaVault() { # Fix little python bug upstream Debian 9 obviously ignores if [ -f /usr/lib/python3.5/weakref.py ]; then - wget -O /usr/lib/python3.5/weakref.py \ - https://raw.githubusercontent.com/python/cpython/9cd7e17640a49635d1c1f8c2989578a8fc2c1de6/Lib/weakref.py + GITREF="9cd7e17640a49635d1c1f8c2989578a8fc2c1de6" + curl -fLo /usr/lib/python3.5/weakref.py \ + "https://raw.githubusercontent.com/python/cpython/${GITREF}/Lib/weakref.py" fi # clean up and force password change on first boot @@ -226,7 +227,7 @@ UnattendedStorageBenchmark() { apt-get -qq install time - wget -qO /usr/local/bin/sd-card-bench.sh https://raw.githubusercontent.com/ThomasKaiser/sbc-bench/master/sd-card-bench.sh + curl -fLso /usr/local/bin/sd-card-bench.sh "https://raw.githubusercontent.com/ThomasKaiser/sbc-bench/master/sd-card-bench.sh" chmod 755 /usr/local/bin/sd-card-bench.sh sed -i '/^exit\ 0$/i \ diff --git a/lib/functions/artifacts/artifact-armbian-base-files.sh b/lib/functions/artifacts/artifact-armbian-base-files.sh index 64aa055d78..4fc3258e39 100644 --- a/lib/functions/artifacts/artifact-armbian-base-files.sh +++ b/lib/functions/artifacts/artifact-armbian-base-files.sh @@ -29,7 +29,7 @@ function artifact_armbian-base-files_prepare_version() { sleep_seconds="15" do_with_retries 10 apt_find_upstream_package_version_and_download_url "base-files" # download the file, but write it to /dev/null (just for testing it is correct) - # wget --timeout=15 --output-document=/dev/null "${found_package_down_url}" || exit_with_error "Could not download '${found_package_down_url}'" + # curl -fLo /dev/null "${found_package_down_url}" || exit_with_error "Could not download '${found_package_down_url}'" # Set readonly globals with the wanted info; will be used during the actual build of this artifact declare -g -r base_files_wanted_upstream_version="${found_package_version}" @@ -88,7 +88,7 @@ function compile_armbian-base-files() { # Download the deb file declare deb_file="${destination}/${base_files_wanted_upstream_filename}" - run_host_command_logged wget --no-verbose --timeout=60 --output-document="${deb_file}" "${base_files_wanted_deb_down_url}" || exit_with_error "Could not download '${base_files_wanted_deb_down_url}'" + run_host_command_logged curl -fLo "${deb_file}" "${base_files_wanted_deb_down_url}" || exit_with_error "Could not download '${base_files_wanted_deb_down_url}'" # Raw-Extract (with DEBIAN dir) the contents of the deb file into "${destination}" run_host_command_logged dpkg-deb --raw-extract "${deb_file}" "${destination}" || exit_with_error "Could not raw-extract '${deb_file}'" diff --git a/lib/functions/general/bat-cat.sh b/lib/functions/general/bat-cat.sh index 1dc4486045..b552c50516 100644 --- a/lib/functions/general/bat-cat.sh +++ b/lib/functions/general/bat-cat.sh @@ -117,7 +117,7 @@ function try_download_batcat_tooling() { display_alert "BATCAT_FN: ${BATCAT_FN}" "batcat" "debug" display_alert "Downloading required" "batcat tooling${RETRY_FMT_MORE_THAN_ONCE}" "info" - run_host_command_logged wget --no-verbose --progress=dot:giga -O "${BATCAT_BIN}.tar.gz.tmp" "${DOWN_URL}" || { + run_host_command_logged curl -L#o "${BATCAT_BIN}.tar.gz.tmp" "${DOWN_URL}" || { return 1 } run_host_command_logged mv "${BATCAT_BIN}.tar.gz.tmp" "${BATCAT_BIN}.tar.gz" @@ -125,7 +125,7 @@ function try_download_batcat_tooling() { run_host_command_logged rm -rf "${BATCAT_BIN}.tar.gz" # EXTRA: get more syntaxes for batcat. We need Debian syntax for CONTROL files, etc. - run_host_command_logged wget --no-verbose --progress=dot:giga -O "${DIR_BATCAT}/sublime-debian.tar.gz.tmp" "${GITHUB_SOURCE:-"https://github.com"}/barnumbirr/sublime-debian/archive/refs/heads/master.tar.gz" + run_host_command_logged curl -L#o "${DIR_BATCAT}/sublime-debian.tar.gz.tmp" "${GITHUB_SOURCE:-"https://github.com"}/barnumbirr/sublime-debian/archive/refs/heads/master.tar.gz" run_host_command_logged mkdir -p "${DIR_BATCAT}/temp-debian-syntax" run_host_command_logged tar -xzf "${DIR_BATCAT}/sublime-debian.tar.gz.tmp" -C "${DIR_BATCAT}/temp-debian-syntax" sublime-debian-master/Syntaxes diff --git a/lib/functions/general/oci-oras.sh b/lib/functions/general/oci-oras.sh index 307537deec..ae84a501cb 100644 --- a/lib/functions/general/oci-oras.sh +++ b/lib/functions/general/oci-oras.sh @@ -109,7 +109,7 @@ function try_download_oras_tooling() { display_alert "ORAS_BIN: ${ORAS_BIN}" "ORAS" "debug" display_alert "Downloading required" "ORAS tooling${RETRY_FMT_MORE_THAN_ONCE}" "info" - run_host_command_logged wget --no-verbose --progress=dot:giga -O "${ORAS_BIN}.tar.gz.tmp" "${DOWN_URL}" || { + run_host_command_logged curl -fL#o "${ORAS_BIN}.tar.gz.tmp" "${DOWN_URL}" || { return 1 } run_host_command_logged mv "${ORAS_BIN}.tar.gz.tmp" "${ORAS_BIN}.tar.gz" diff --git a/lib/functions/general/shellcheck.sh b/lib/functions/general/shellcheck.sh index 6eca964897..d4cb10a2f9 100644 --- a/lib/functions/general/shellcheck.sh +++ b/lib/functions/general/shellcheck.sh @@ -136,7 +136,7 @@ function try_download_shellcheck_tooling() { display_alert "SHELLCHECK_BIN: ${SHELLCHECK_BIN}" "SHELLCHECK" "debug" display_alert "Downloading required" "SHELLCHECK tooling${RETRY_FMT_MORE_THAN_ONCE}" "info" - run_host_command_logged wget --no-verbose --progress=dot:giga -O "${SHELLCHECK_BIN}.tar.xz.tmp" "${DOWN_URL}" || { + run_host_command_logged curl -fL#o "${SHELLCHECK_BIN}.tar.xz.tmp" "${DOWN_URL}" || { return 1 } diff --git a/lib/tools/shellcheck.sh b/lib/tools/shellcheck.sh index d988b7201b..0bf78d9878 100755 --- a/lib/tools/shellcheck.sh +++ b/lib/tools/shellcheck.sh @@ -51,7 +51,11 @@ if [[ ! -f "${SHELLCHECK_BIN}" ]]; then echo "MACHINE: ${MACHINE}" echo "Down URL: ${DOWN_URL}" echo "SHELLCHECK_BIN: ${SHELLCHECK_BIN}" - wget -O "${SHELLCHECK_BIN}.tar.xz" "${DOWN_URL}" + curl -fLo "${SHELLCHECK_BIN}.tar.xz" "${DOWN_URL}" || { + echo "download of shellcheck failed from ${DOWN_URL}"; + rm -f "${SHELLCHECK_BIN}.tar.xz" + exit 1; + } tar -xf "${SHELLCHECK_BIN}.tar.xz" -C "${DIR_SHELLCHECK}" "shellcheck-v${SHELLCHECK_VERSION}/shellcheck" mv -v "${DIR_SHELLCHECK}/shellcheck-v${SHELLCHECK_VERSION}/shellcheck" "${SHELLCHECK_BIN}" rm -rf "${DIR_SHELLCHECK}/shellcheck-v${SHELLCHECK_VERSION}" "${SHELLCHECK_BIN}.tar.xz" diff --git a/lib/tools/shellfmt.sh b/lib/tools/shellfmt.sh index 71908ec335..98841721e6 100755 --- a/lib/tools/shellfmt.sh +++ b/lib/tools/shellfmt.sh @@ -47,7 +47,11 @@ echo "SHELLFMT_BIN: ${SHELLFMT_BIN}" if [[ ! -f "${SHELLFMT_BIN}" ]]; then echo "Cache miss, downloading..." - wget -O "${SHELLFMT_BIN}" "${DOWN_URL}" + curl -fLo "${SHELLFMT_BIN}" "${DOWN_URL}" || { + echo "shellfmt download failed from ${DOWN_URL}" + rm -f "${SHELLFMT_BIN}" + exit 1; + } chmod +x "${SHELLFMT_BIN}" fi