Update to wget-1.21.4.

This commit is contained in:
Jonas 'Sortie' Termansen 2024-01-27 22:46:56 +01:00
parent d461550fca
commit 9b778effb3
3 changed files with 54 additions and 47 deletions

View File

@ -124,30 +124,21 @@ diff -Paur --no-dereference -- wget.upstream/configure wget/configure
+export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does. +export gl_cv_struct_dirent_d_ino=yes # Only if the OS actually supports this, Sortix does.
+export ac_cv_func_realloc_0_nonnull=yes # TODO: Investigate this, found in flex. +export ac_cv_func_realloc_0_nonnull=yes # TODO: Investigate this, found in flex.
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for wget 1.18. # Generated by GNU Autoconf 2.71 for wget 1.21.4.
# #
@@ -39179,6 +39299,8 @@ @@ -65572,6 +65692,8 @@
esac esac
fi fi
GPGME_CONFIG=$ac_cv_path_GPGME_CONFIG GPGME_CONFIG=$ac_cv_path_GPGME_CONFIG
+# PATCH: Not cross-compile safe. +# PATCH: Not cross-compile safe.
+GPGME_CONFIG=no +GPGME_CONFIG=no
if test -n "$GPGME_CONFIG"; then if test -n "$GPGME_CONFIG"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GPGME_CONFIG" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GPGME_CONFIG" >&5
$as_echo "$GPGME_CONFIG" >&6; } printf "%s\n" "$GPGME_CONFIG" >&6; }
@@ -39841,7 +39963,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_idn_stringprep_check_version" >&5
$as_echo "$ac_cv_lib_idn_stringprep_check_version" >&6; }
if test "x$ac_cv_lib_idn_stringprep_check_version" = xyes; then :
- iri=yes LIBS="${LIBS} -lidn"
+ iri=yes LIBS="${LIBS} -lidn $LIBINTL"
else
iri=no
fi
diff -Paur --no-dereference -- wget.upstream/lib/flock.c wget/lib/flock.c diff -Paur --no-dereference -- wget.upstream/lib/flock.c wget/lib/flock.c
--- wget.upstream/lib/flock.c --- wget.upstream/lib/flock.c
+++ wget/lib/flock.c +++ wget/lib/flock.c
@@ -211,6 +211,16 @@ @@ -215,6 +215,16 @@
return r; return r;
} }
@ -164,25 +155,22 @@ diff -Paur --no-dereference -- wget.upstream/lib/flock.c wget/lib/flock.c
# else /* !HAVE_STRUCT_FLOCK_L_TYPE */ # else /* !HAVE_STRUCT_FLOCK_L_TYPE */
# error "This platform lacks flock function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib." # error "This platform lacks flock function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
diff -Paur --no-dereference -- wget.upstream/src/hsts.c wget/src/hsts.c diff -Paur --no-dereference -- wget.upstream/lib/getgroups.c wget/lib/getgroups.c
--- wget.upstream/src/hsts.c --- wget.upstream/lib/getgroups.c
+++ wget/src/hsts.c +++ wget/lib/getgroups.c
@@ -325,9 +325,9 @@ @@ -30,7 +30,7 @@
struct hsts_kh *kh = (struct hsts_kh *) it.key; /* Provide a stub that fails with ENOSYS, since there is no group
struct hsts_kh_info *khi = (struct hsts_kh_info *) it.value; information available on mingw. */
int
- if (fprintf (fp, "%s\t%d\t%d\t%lu\t%lu\n", -getgroups (_GL_UNUSED int n, _GL_UNUSED GETGROUPS_T *groups)
+ if (fprintf (fp, "%s\t%d\t%d\t%lli\t%lli\n", +getgroups (_GL_UNUSED int n, _GL_UNUSED gid_t *groups)
kh->host, kh->explicit_port, khi->include_subdomains, {
- khi->created, khi->max_age) < 0) errno = ENOSYS;
+ (long long)khi->created, (long long)khi->max_age) < 0) return -1;
{
logprintf (LOG_ALWAYS, "Could not write the HSTS database correctly.\n");
break;
diff -Paur --no-dereference -- wget.upstream/src/init.c wget/src/init.c diff -Paur --no-dereference -- wget.upstream/src/init.c wget/src/init.c
--- wget.upstream/src/init.c --- wget.upstream/src/init.c
+++ wget/src/init.c +++ wget/src/init.c
@@ -39,13 +39,6 @@ @@ -38,13 +38,6 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
@ -195,11 +183,23 @@ diff -Paur --no-dereference -- wget.upstream/src/init.c wget/src/init.c
-#endif -#endif
#include <regex.h> #include <regex.h>
#ifdef HAVE_LIBPCRE
diff -Paur --no-dereference -- wget.upstream/src/log.c wget/src/log.c
--- wget.upstream/src/log.c
+++ wget/src/log.c
@@ -981,7 +981,7 @@
{
pid_t foreground_pgrp = tcgetpgrp (STDIN_FILENO);
- if (foreground_pgrp != -1 && foreground_pgrp != getpgrp () && !opt.quiet)
+ if (foreground_pgrp != -1 && foreground_pgrp != getpgid (0) && !opt.quiet)
{
/* Process backgrounded */
redirect_output (true,NULL);
diff -Paur --no-dereference -- wget.upstream/src/progress.c wget/src/progress.c diff -Paur --no-dereference -- wget.upstream/src/progress.c wget/src/progress.c
--- wget.upstream/src/progress.c --- wget.upstream/src/progress.c
+++ wget/src/progress.c +++ wget/src/progress.c
@@ -311,9 +311,15 @@ @@ -352,9 +352,15 @@
if (dp->rows == dp->initial_length / ROW_BYTES) if (dp->rows == dp->initial_length / ROW_BYTES)
bytes_this_row -= dp->initial_length % ROW_BYTES; bytes_this_row -= dp->initial_length % ROW_BYTES;
rate = calc_rate (bytes_this_row, dltime - dp->last_timer_value, &units); rate = calc_rate (bytes_this_row, dltime - dp->last_timer_value, &units);
@ -215,7 +215,7 @@ diff -Paur --no-dereference -- wget.upstream/src/progress.c wget/src/progress.c
dp->last_timer_value = dltime; dp->last_timer_value = dltime;
} }
@@ -1093,8 +1099,14 @@ @@ -1250,8 +1256,14 @@
wgint dlquant = hist->total_bytes + bp->recent_bytes; wgint dlquant = hist->total_bytes + bp->recent_bytes;
double dltime = hist->total_time + (dl_total_time - bp->recent_start); double dltime = hist->total_time + (dl_total_time - bp->recent_start);
double dlspeed = calc_rate (dlquant, dltime, &units); double dlspeed = calc_rate (dlquant, dltime, &units);
@ -233,26 +233,28 @@ diff -Paur --no-dereference -- wget.upstream/src/progress.c wget/src/progress.c
diff -Paur --no-dereference -- wget.upstream/src/retr.c wget/src/retr.c diff -Paur --no-dereference -- wget.upstream/src/retr.c wget/src/retr.c
--- wget.upstream/src/retr.c --- wget.upstream/src/retr.c
+++ wget/src/retr.c +++ wget/src/retr.c
@@ -634,9 +634,15 @@ @@ -783,10 +783,16 @@
double dlrate = calc_rate (bytes, secs, &units); double dlrate = calc_rate (bytes, secs, &units);
/* Use more digits for smaller numbers (regardless of unit used), /* Use more digits for smaller numbers (regardless of unit used),
e.g. "1022", "247", "12.5", "2.38". */ e.g. "1022", "247", "12.5", "2.38". */
+#if defined(__sortix__) +#if defined(__sortix__) && !defined(__SORTIX_HAS_FORMAT_FLOAT__)
+ /* PATCH: HACK: Sortix doesn't support floating point printf right now. */ + /* PATCH: HACK: Sortix doesn't support floating point printf right now. */
+ sprintf (res, "%lli %s", (long long)dlrate, + snprintf (res, sizeof(res), "%lli %s",
+ (long long)dlrate,
+ !opt.report_bps ? rate_names[units]: rate_names_bits[units]); + !opt.report_bps ? rate_names[units]: rate_names_bits[units]);
+#else +#else
sprintf (res, "%.*f %s", snprintf (res, sizeof(res), "%.*f %s",
dlrate >= 99.95 ? 0 : dlrate >= 9.995 ? 1 : 2, dlrate >= 99.95 ? 0 : dlrate >= 9.995 ? 1 : 2,
dlrate, !opt.report_bps ? rate_names[units]: rate_names_bits[units]); dlrate, !opt.report_bps ? rate_names[units]: rate_names_bits[units]);
-
+#endif +#endif
return res; return res;
} }
diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c
--- wget.upstream/src/utils.c --- wget.upstream/src/utils.c
+++ wget/src/utils.c +++ wget/src/utils.c
@@ -505,7 +505,9 @@ @@ -504,7 +504,9 @@
} }
/* child: give up the privileges and keep running. */ /* child: give up the privileges and keep running. */
@ -262,7 +264,7 @@ diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c
if (freopen ("/dev/null", "r", stdin) == NULL) if (freopen ("/dev/null", "r", stdin) == NULL)
DEBUGP (("Failed to redirect stdin to /dev/null.\n")); DEBUGP (("Failed to redirect stdin to /dev/null.\n"));
if (freopen ("/dev/null", "w", stdout) == NULL) if (freopen ("/dev/null", "w", stdout) == NULL)
@@ -1583,8 +1585,13 @@ @@ -1708,8 +1710,13 @@
double val = n / 1024.0; double val = n / 1024.0;
/* Print values smaller than the accuracy level (acc) with (decimal) /* Print values smaller than the accuracy level (acc) with (decimal)
* decimal digits, and others without any decimals. */ * decimal digits, and others without any decimals. */
@ -276,7 +278,7 @@ diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c
return buf; return buf;
} }
n /= 1024; n /= 1024;
@@ -1843,9 +1850,11 @@ @@ -1952,9 +1959,11 @@
#endif /* neither TIOCGWINSZ nor WINDOWS */ #endif /* neither TIOCGWINSZ nor WINDOWS */
} }
@ -288,7 +290,7 @@ diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c
/* Return a random number between 0 and MAX-1, inclusive. /* Return a random number between 0 and MAX-1, inclusive.
@@ -1862,7 +1871,9 @@ @@ -1971,7 +1980,9 @@
int int
random_number (int max) random_number (int max)
{ {
@ -299,7 +301,7 @@ diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c
if (!rnd_seeded) if (!rnd_seeded)
{ {
srandom ((long) time (NULL) ^ (long) getpid ()); srandom ((long) time (NULL) ^ (long) getpid ());
@@ -2444,6 +2455,10 @@ @@ -2629,6 +2640,10 @@
static char buf[32]; static char buf[32];
double n = number >= 0 ? number : -number; double n = number >= 0 ? number : -number;
@ -310,7 +312,7 @@ diff -Paur --no-dereference -- wget.upstream/src/utils.c wget/src/utils.c
if (n >= 9.95) if (n >= 9.95)
/* Cut off at 9.95 because the below %.1f would round 9.96 to /* Cut off at 9.95 because the below %.1f would round 9.96 to
"10.0" instead of "10". OTOH 9.94 will print as "9.9". */ "10.0" instead of "10". OTOH 9.94 will print as "9.9". */
@@ -2458,6 +2473,7 @@ @@ -2643,6 +2658,7 @@
else else
/* print numbers close to 0 as 0, not 0.000 */ /* print numbers close to 0 as 0, not 0.000 */
strcpy (buf, "0"); strcpy (buf, "0");

View File

@ -1,12 +1,13 @@
NAME=wget NAME=wget
BUILD_LIBRARIES='libz libiconv? libintl? libssl libpsl? libmetalink? libuuid? libpcre? libidn?' BUILD_LIBRARIES='libz libiconv? libintl? libssl libpsl? libmetalink? libuuid? libpcre? libidn?'
VERSION=1.18 VERSION=1.21.4
DISTNAME=$NAME-$VERSION DISTNAME=$NAME-$VERSION
COMPRESSION=tar.xz COMPRESSION=tar.gz
ARCHIVE=$DISTNAME.$COMPRESSION ARCHIVE=$DISTNAME.$COMPRESSION
SHA256SUM=b5b55b75726c04c06fe253daec9329a6f1a3c0c1878e3ea76ebfebc139ea9cc1 SHA256SUM=81542f5cefb8faacc39bbbc6c82ded80e3e4a88505ae72ea51df27525bcde04c
UPSTREAM_SITE=https://ftp.gnu.org/gnu/wget UPSTREAM_SITE=https://ftp.gnu.org/gnu/wget
UPSTREAM_ARCHIVE=$ARCHIVE UPSTREAM_ARCHIVE=$ARCHIVE
LICENSE=GPL-3.0-or-later
BUILD_SYSTEM=configure BUILD_SYSTEM=configure
CONFIGURE_ARGS='--with-ssl=openssl' CONFIGURE_ARGS='--with-ssl=openssl'
MAKE_VARS='V=1' MAKE_VARS='V=1'

View File

@ -1,4 +1,8 @@
rm -rf -- 'doc/stamp-vti' rm -rf -- 'doc/stamp-vti'
rm -rf -- 'gnulib_po/stamp-po'
rm -rf -- 'po/stamp-po'
rm -rf -- 'src/build_info.c' rm -rf -- 'src/build_info.c'
rm -rf -- 'src/css.c' rm -rf -- 'src/css.c'
rm -rf -- 'src/css_.c' rm -rf -- 'src/css_.c'
rm -rf -- 'tests/certs/interca.conf'
rm -rf -- 'tests/certs/rootca.conf'