Package: jigdo-file Version: 0.8.2-1 Severity: normal Tags: patch X-Debbugs-Cc: shawnland...@outlook.com
(from the patch which is included) jigdo-lite: parallel wget download if xargs is available Jigdo downloads are significantly slower than iso downloads because there is a new connection between each file, with a pause. This slow-down is greater the faster the connection, so wouldn't be that big with a 56kbps connection, and has increased since this software was developed. No change if "xargs" from "findutils" is not available. There is still a pause, yet to be removed, when commiting each batch of files to the iso9660. Signed-off-by: Shawn Paul Landden <shawnland...@outlook.com> -- System Information: Debian Release: 12.1 Architecture: amd64 (x86_64) Kernel: Linux 6.5.0-2-amd64 (SMP w/2 CPU threads; PREEMPT) Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages jigdo-file depends on: ii libbz2-1.0 1.0.8-5+b1 ii libc6 2.37-12 ii libdb5.3 5.3.28+dfsg2-1 ii libgcc-s1 13.2.0-5 ii libstdc++6 13.2.0-5 ii wget 1.21.3-1+b2 ii zlib1g 1:1.2.13.dfsg-1 jigdo-file recommends no packages. jigdo-file suggests no packages. -- no debconf information *** 0001-jigdo-lite-parallel-wget-download-if-xargs-is-availa.patch >From b995741f09b3b8f52d3315b063552ee63e5b5834 Mon Sep 17 00:00:00 2001 From: Shawn Paul Landden <shawnland...@outlook.com> Date: Mon, 16 Oct 2023 21:19:09 -0700 Subject: [PATCH] jigdo-lite: parallel wget download if xargs is available Jigdo downloads are significantly slower than iso downloads because there is a new connection between each file, with a pause. This slow-down is greater the faster the connection, so wouldn't be that big with a 56kbps connection, and has increased since this software was developed. No change if "xargs" from "findutils" is not available. There is still a pause, yet to be removed, when commiting each batch of files to the iso9660. Signed-off-by: Shawn Paul Landden <shawnland...@outlook.com> --- debian/control | 1 + scripts/jigdo-lite | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index c1bab0e..190aad1 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Standards-Version: 4.1.1 Package: jigdo-file Architecture: any Depends: wget, ${shlibs:Depends}, ${misc:Depends} +Recommends: findutils Conflicts: jigdo (<< 0.6.9) Homepage: https://www.einval.com/~steve/software/jigdo/ Description: Download Debian CD/DVD/USB images from any Debian mirror diff --git a/scripts/jigdo-lite b/scripts/jigdo-lite index e9e4f2c..1a33814 100755 --- a/scripts/jigdo-lite +++ b/scripts/jigdo-lite @@ -71,14 +71,18 @@ strNotEmpty() { test "x$1" != "x"; } # Download a file, storing it in the current dir fetch() { if test "$#" -eq 0; then return 0; fi - wget --user-agent="$userAgent" $wgetOpts "$@" || return 1 + if test -n `command -v xargs`; then + echo "$@" | xargs -n 1 -P 5 --delimiter="\x20" wget --user-agent="$userAgent" $wgetOpts --force-directories --directory-prefix="$imageTmp" -- || return 1 + else + wget --user-agent="$userAgent" $wgetOpts --force-directories --directory-prefix="$imageTmp" -- "$@" || return 1 + fi } #______________________________________________________________________ # Given URLs, fetch them into $imageTmp, then merge them into image fetchAndMerge() { if test "$#" -eq 0; then return 0; fi - fetch --force-directories --directory-prefix="$imageTmp" -- "$@" + fetch "$@" # Merge into the image $jigdoFile $jigdoOpts --no-cache make-image --image="$image" \ --jigdo="$jigdoF" --template="$template" "$imageTmp" -- 2.42.0
>From b995741f09b3b8f52d3315b063552ee63e5b5834 Mon Sep 17 00:00:00 2001 From: Shawn Paul Landden <shawnland...@outlook.com> Date: Mon, 16 Oct 2023 21:19:09 -0700 Subject: [PATCH] jigdo-lite: parallel wget download if xargs is available Jigdo downloads are significantly slower than iso downloads because there is a new connection between each file, with a pause. This slow-down is greater the faster the connection, so wouldn't be that big with a 56kbps connection, and has increased since this software was developed. No change if "xargs" from "findutils" is not available. There is still a pause, yet to be removed, when commiting each batch of files to the iso9660. Signed-off-by: Shawn Paul Landden <shawnland...@outlook.com> --- debian/control | 1 + scripts/jigdo-lite | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index c1bab0e..190aad1 100644 --- a/debian/control +++ b/debian/control @@ -8,6 +8,7 @@ Standards-Version: 4.1.1 Package: jigdo-file Architecture: any Depends: wget, ${shlibs:Depends}, ${misc:Depends} +Recommends: findutils Conflicts: jigdo (<< 0.6.9) Homepage: https://www.einval.com/~steve/software/jigdo/ Description: Download Debian CD/DVD/USB images from any Debian mirror diff --git a/scripts/jigdo-lite b/scripts/jigdo-lite index e9e4f2c..1a33814 100755 --- a/scripts/jigdo-lite +++ b/scripts/jigdo-lite @@ -71,14 +71,18 @@ strNotEmpty() { test "x$1" != "x"; } # Download a file, storing it in the current dir fetch() { if test "$#" -eq 0; then return 0; fi - wget --user-agent="$userAgent" $wgetOpts "$@" || return 1 + if test -n `command -v xargs`; then + echo "$@" | xargs -n 1 -P 5 --delimiter="\x20" wget --user-agent="$userAgent" $wgetOpts --force-directories --directory-prefix="$imageTmp" -- || return 1 + else + wget --user-agent="$userAgent" $wgetOpts --force-directories --directory-prefix="$imageTmp" -- "$@" || return 1 + fi } #______________________________________________________________________ # Given URLs, fetch them into $imageTmp, then merge them into image fetchAndMerge() { if test "$#" -eq 0; then return 0; fi - fetch --force-directories --directory-prefix="$imageTmp" -- "$@" + fetch "$@" # Merge into the image $jigdoFile $jigdoOpts --no-cache make-image --image="$image" \ --jigdo="$jigdoF" --template="$template" "$imageTmp" -- 2.42.0