Package: wget Severity: important Version: 1.21-1 When downloading a file greater than 2GB on a 32-bit system wget on bullseye will truncate it to 2GB. No error is reported, the length of the file is simply reported as less than it's true length. This was reported to me by raspberry pi staff, but I can reproduce it in a Debian i386 environment, so it's not raspberry pi, raspbian or arm specific.
I confirmed that the issue did not affect bookworm and after some searching found the upstream commit and bug report that fix it. https://gitlab.com/gnuwget/wget/-/commit/90631a6fe54eabd9c80ede5c70bc916719e76cfe I have applied the patch to the Debian package, built it in a raspbian bullseye environment, tested that the issue is fixed and uploaded the fix to raspbian. I have also attatched a debdiff. I have rated this issue as important, being unable to download large files (for example OS images) is a significant restriction on the usefulness of wget. There is a possible argument that it deserves grave severity based on "non-serious data loss" (for example if someone used wget to copy a file to another system before deleting the original) but I think that argument is tenuous, so I decided to stick with important. I believe this issue is important enough to fix in Debian stable. Do you agree and if so do you want to handle the proposed-updates process or should I do it. If I get no response I will start the PU process in a week or so.
diff -Nru wget-1.21/debian/changelog wget-1.21/debian/changelog --- wget-1.21/debian/changelog 2021-01-02 10:58:25.000000000 +0000 +++ wget-1.21/debian/changelog 2021-11-15 20:06:53.000000000 +0000 @@ -1,3 +1,9 @@ +wget (1.21-1rpi1) bullseye-staging; urgency=medium + + * Apply upstream patch to fix downloads over 2GB on 32-bit systems. + + -- Peter Michael Green <plugw...@raspbian.org> Mon, 15 Nov 2021 20:06:53 +0000 + wget (1.21-1) unstable; urgency=medium * new upstream release from 2020-12-31 diff -Nru wget-1.21/debian/patches/fix-large-downloads-on-32-bit wget-1.21/debian/patches/fix-large-downloads-on-32-bit --- wget-1.21/debian/patches/fix-large-downloads-on-32-bit 1970-01-01 00:00:00.000000000 +0000 +++ wget-1.21/debian/patches/fix-large-downloads-on-32-bit 2021-11-15 20:06:53.000000000 +0000 @@ -0,0 +1,26 @@ +Debian patch based on the upstream commit below, defuzzed +in the context of the debian package. + +commit 90631a6fe54eabd9c80ede5c70bc916719e76cfe +Author: Tim Rühsen <tim.rueh...@gmx.de> +Date: Sun Apr 11 12:53:16 2021 +0200 + + * src/wget.h: Use strtoll() for str_to_wgint + + This fixes a regression reported at https://savannah.gnu.org/bugs/?60353. + + Reported-by: Michal Ruprich + +Index: wget-1.21/src/wget.h +=================================================================== +--- wget-1.21.orig/src/wget.h ++++ wget-1.21/src/wget.h +@@ -144,7 +144,7 @@ typedef int64_t wgint; + #define WGINT_MAX INT64_MAX + typedef wgint SUM_SIZE_INT; + +-#define str_to_wgint strtol ++#define str_to_wgint strtoll + + #include "options.h" + diff -Nru wget-1.21/debian/patches/series wget-1.21/debian/patches/series --- wget-1.21/debian/patches/series 2019-07-20 16:10:06.000000000 +0000 +++ wget-1.21/debian/patches/series 2021-11-15 20:06:53.000000000 +0000 @@ -1,3 +1,4 @@ wget-doc-remove-usr-local-in-sample.wgetrc wget-doc-remove-usr-local-in-wget.texi wget-passive_ftp-default +fix-large-downloads-on-32-bit