[Backport release-24.11] wget: 1.24.5 -> 1.25.0 (#357202)

This commit is contained in:
Franz Pletz 2024-11-21 10:37:21 +01:00 committed by GitHub
commit aea647643b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 31 deletions

View File

@ -1,33 +1,24 @@
{ lib, stdenv, fetchurl, fetchpatch, gettext, pkg-config, perlPackages
{ lib, stdenv, fetchurl, gettext, pkg-config, perlPackages
, libidn2, zlib, pcre, libuuid, libiconv, libintl
, python3, lzip, darwin
, nukeReferences, python3, lzip, darwin
, withLibpsl ? false, libpsl
, withOpenssl ? true, openssl
}:
stdenv.mkDerivation rec {
pname = "wget";
version = "1.24.5";
version = "1.25.0";
src = fetchurl {
url = "mirror://gnu/wget/wget-${version}.tar.lz";
hash = "sha256-V6EHFR5O+U/flK/+z6xZiWPzcvEyk+2cdAMhBTkLNu4=";
hash = "sha256-GSJcx1awoIj8gRSNxqQKDI8ymvf9hIPxx7L+UPTgih8=";
};
patches = [
./remove-runtime-dep-on-openssl-headers.patch
(fetchpatch {
name = "CVE-2024-38428.patch";
url = "https://git.savannah.gnu.org/cgit/wget.git/patch/?id=ed0c7c7e0e8f7298352646b2fd6e06a11e242ace";
hash = "sha256-4ZVPufgG/h0UkxF9hQBAtF6QAG4GEz9hHeqEsD47q4U=";
})
];
preConfigure = ''
patchShebangs doc
'';
nativeBuildInputs = [ gettext pkg-config perlPackages.perl lzip libiconv libintl ];
nativeBuildInputs = [ gettext pkg-config perlPackages.perl lzip libiconv libintl nukeReferences ];
buildInputs = [ libidn2 zlib pcre libuuid ]
++ lib.optional withOpenssl openssl
++ lib.optional withLibpsl libpsl
@ -40,6 +31,14 @@ stdenv.mkDerivation rec {
"--without-included-regex"
];
preBuild = ''
# avoid runtime references to build-only depends
make -C src version.c
nuke-refs src/version.c
'';
enableParallelBuilding = true;
__darwinAllowLocalNetworking = true;
doCheck = true;
preCheck = ''

View File

@ -1,17 +0,0 @@
diff --git a/src/Makefile.in b/src/Makefile.in
index 1a36a9b..e279c84 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -2211,10 +2211,9 @@ version.c: $(wget_SOURCES) ../lib/libgnu.a
echo '' >> $@
echo '#include "version.h"' >> $@
echo 'const char *version_string = "@VERSION@";' >> $@
- echo 'const char *compilation_string = "'$(COMPILE)'";' \
+ echo 'const char *compilation_string = 0;' \
| $(ESCAPEQUOTE) >> $@
- echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \
+ echo 'const char *link_string = 0;' \
| $(ESCAPEQUOTE) >> $@
css.c: $(srcdir)/css.l