summaryrefslogtreecommitdiff
path: root/net-misc/wget
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /net-misc/wget
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'net-misc/wget')
-rw-r--r--net-misc/wget/Manifest6
-rw-r--r--net-misc/wget/files/wget-1.21.3-hsts-type.patch211
-rw-r--r--net-misc/wget/metadata.xml27
-rw-r--r--net-misc/wget/wget-1.21.3-r1.ebuild114
-rw-r--r--net-misc/wget/wget-1.21.3.ebuild2
5 files changed, 344 insertions, 16 deletions
diff --git a/net-misc/wget/Manifest b/net-misc/wget/Manifest
index ecfd00f283dd..2fcde3ecf7e0 100644
--- a/net-misc/wget/Manifest
+++ b/net-misc/wget/Manifest
@@ -1,6 +1,8 @@
+AUX wget-1.21.3-hsts-type.patch 8463 BLAKE2B ebee8872161ba4a0288ee973d1edb5d38740dac09e5d6807627bed76d05f167aa4b0a79b48f45b0933bc8444c3977ddfa570591e590ea466149cfc81b5e35789 SHA512 983ce2e62bf8f4562072644d8583eecb491c27b703f2ff9eef818557ecb8d7c64d2f0b764f2dd41a270e52513455f0102b79e90e03420b46b868e832f28c6b4f
DIST wget-1.21.2.tar.gz 5004576 BLAKE2B e11c3a2b89ab26834dc4cbb445bcc6122d3a6b2a5b9c6de1ce9e8f062281f9e5aa1f80ca37a44791ba5aaf6a447015a26afef2199cdb75f1931d5e1ffb1f406b SHA512 3e35f92604486ca459f26df97d392579f1d83a9254519e8ce249b410bacf70dddf716d6caa3b29fd4865163f60410b2b8ad1ca1f7bb3dbb2456386b7647b988d
DIST wget-1.21.3.tar.gz 5079864 BLAKE2B 4ff40a30cb3be82ea492d0eae324a9d43de30a0169d3b219ce25f3d667915f90c7eb1559760d1605340f112e96e028613265e0be73aaba7935c69cc06a4ae4f6 SHA512 29889ecbf590dff0f39183d9e0621741d731a554d990e5c995a4644725dca62e8e19601d40db0ef7d62ebf54e5457c7409965e4832b6e60e4ccbc9c8caa30718
DIST wget-1.21.3.tar.gz.sig 854 BLAKE2B 71f69492397ae9e36284be9acdd1c94da34a7397c14a6de1a867c0d1e807bf961f8a2e098ab5629425691ce595227fb08f046416245fda2a6025929079f2d7c2 SHA512 b9f41496e0083545bc703c97b0758500f337527647cdc422152d7855d05351e3a62685269238c78300eafdbfaed8afecaeb988901a3d8a6b002e9fb3d70efe4f
EBUILD wget-1.21.2.ebuild 2873 BLAKE2B b0ca4fa3105c73c9623e788863cd6c46b6da3d4d2f7f158538a7b5468560648d89bfef1900818ddf64343cc8e5d3675b1324835c30964767b51fab2c94e44e90 SHA512 4c2c0e9751fd37ce85be5c9abfa028f0813d17b7d0c902792406e4a94c30590781d00d243e936fd4a107090921d5ec4023c358e712c84aed44bb99d6982936b9
-EBUILD wget-1.21.3.ebuild 3211 BLAKE2B d7e79dcb543bb11440a42c7a016f8f0acea77b0df425c31d7361cd89bf16b33a3d4b1ee390764355c820ba681d04f04167e8ae64ea205bd936a4ade4234dd8f2 SHA512 308a901a46b044c3e2b0786a67e1c1bf323e0cda062171511d3971d34887be1fb50f97af8fe6fc7e50e9b78f09e3877b1cfcabb63328bd053b9bd227047e1ecd
-MISC metadata.xml 740 BLAKE2B 1b36b1f6e8add5fcbbc757974dd8d9f89b4fb62ad1cdde882ec464e2348773e28f923c89259fa56b8d080be1b1975d91c113e4f10553fdd87c3d270bf29c393d SHA512 25e2e34967bd2a04f5aae19849353c798084031888a3aa300a4f9d4ef9029c41a4cc013a842c906dcc2720af155085e047ed99e45a102589f59625bc60042238
+EBUILD wget-1.21.3-r1.ebuild 3260 BLAKE2B fc3207fe851535b13d306193500a9610461d6d655d14544fec8bc5bfa41689604b5656dbcb4ae2a0120a6c5fbd28ab34a5419fb08bc2a65c11b2c06174fdd555 SHA512 6aa9368503381bdb747844994706f010a772cca1c34126c4ca0bd25e22492afd1427d1036892f3eed870b9a7f7993ef2983317848c47be21a988b149ee88f69a
+EBUILD wget-1.21.3.ebuild 3203 BLAKE2B fb43f5fdfe06d756846ed4eb98869777643b7c0cfd373d1ebd6b81bf5067ea74bbb967aaf3549c3544bfd462db81fc20df837b0388624aeacce261a8522d44c7 SHA512 a1008cb3d17be6f4cbf0e6aae87b8891b5d555a6d6967e227383881664e828865f8c8c2e87f8df8308d6d7e500cd1660085dfb16ad241b436bff8f13830b9c73
+MISC metadata.xml 803 BLAKE2B 9bdb761fa36afd7a03f4631ed314230776de4af2c3e153a3631ee8f9e801233e44abe68ba5ec874bcfaef53d2cb1100a671768169d58d6e2c96387be5210abc9 SHA512 4ddbdc883a155f4eddeb5cd6e031b4824f1f50586ceaedd1b72a8d2ce9d3dffe440a0554e4a9a07f1295f79a5958bcb533ae324919c64daf77caff577318dfc1
diff --git a/net-misc/wget/files/wget-1.21.3-hsts-type.patch b/net-misc/wget/files/wget-1.21.3-hsts-type.patch
new file mode 100644
index 000000000000..bac1330ddc79
--- /dev/null
+++ b/net-misc/wget/files/wget-1.21.3-hsts-type.patch
@@ -0,0 +1,211 @@
+https://bugs.gentoo.org/850676
+https://git.savannah.gnu.org/cgit/wget.git/commit/?id=cb114fbbf73eb687d28b01341c8d4266ffa96c9d
+
+From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
+Date: Sun, 20 Mar 2022 12:18:20 +0100
+Subject: Fix HSTS portability by using int64_t instead of time_t.
+
+* src/hsts.c: Use int64_t instead of time_t.
+* src/http.c: Use int64_t for parsing Strict-Transport-Security.
+--- a/src/hsts.c
++++ b/src/hsts.c
+@@ -61,8 +61,8 @@ struct hsts_kh {
+ };
+
+ struct hsts_kh_info {
+- time_t created;
+- time_t max_age;
++ int64_t created;
++ int64_t max_age;
+ bool include_subdomains;
+ };
+
+@@ -166,7 +166,7 @@ end:
+ static bool
+ hsts_new_entry_internal (hsts_store_t store,
+ const char *host, int port,
+- time_t created, time_t max_age,
++ int64_t created, int64_t max_age,
+ bool include_subdomains,
+ bool check_validity,
+ bool check_expired,
+@@ -216,21 +216,21 @@ bail:
+ static bool
+ hsts_add_entry (hsts_store_t store,
+ const char *host, int port,
+- time_t max_age, bool include_subdomains)
++ int64_t max_age, bool include_subdomains)
+ {
+- time_t t = time (NULL);
++ int64_t t = (int64_t) time (NULL);
+
+ /* It might happen time() returned -1 */
+- return (t == (time_t)(-1) ?
++ return (t == -1) ?
+ false :
+- hsts_new_entry_internal (store, host, port, t, max_age, include_subdomains, false, true, false));
++ hsts_new_entry_internal (store, host, port, t, max_age, include_subdomains, false, true, false);
+ }
+
+ /* Creates a new entry, unless an identical one already exists. */
+ static bool
+ hsts_new_entry (hsts_store_t store,
+ const char *host, int port,
+- time_t created, time_t max_age,
++ int64_t created, int64_t max_age,
+ bool include_subdomains)
+ {
+ return hsts_new_entry_internal (store, host, port, created, max_age, include_subdomains, true, true, true);
+@@ -245,7 +245,7 @@ hsts_remove_entry (hsts_store_t store, struct hsts_kh *kh)
+ static bool
+ hsts_store_merge (hsts_store_t store,
+ const char *host, int port,
+- time_t created, time_t max_age,
++ int64_t created, int64_t max_age,
+ bool include_subdomains)
+ {
+ enum hsts_kh_match match_type = NO_MATCH;
+@@ -276,11 +276,11 @@ hsts_read_database (hsts_store_t store, FILE *fp, bool merge_with_existing_entri
+ size_t len = 0;
+ int items_read;
+ bool result = false;
+- bool (*func)(hsts_store_t, const char *, int, time_t, time_t, bool);
++ bool (*func)(hsts_store_t, const char *, int, int64_t, int64_t, bool);
+
+ char host[256];
+ int port;
+- time_t created, max_age;
++ int64_t created, max_age;
+ int include_subdomains;
+
+ func = (merge_with_existing_entries ? hsts_store_merge : hsts_new_entry);
+@@ -326,10 +326,9 @@ hsts_store_dump (hsts_store_t store, FILE *fp)
+ struct hsts_kh *kh = (struct hsts_kh *) it.key;
+ struct hsts_kh_info *khi = (struct hsts_kh_info *) it.value;
+
+- if (fprintf (fp, "%s\t%d\t%d\t%lu\t%lu\n",
++ if (fprintf (fp, "%s\t%d\t%d\t%" PRId64 "\t%" PRId64 "\n",
+ kh->host, kh->explicit_port, khi->include_subdomains,
+- (unsigned long) khi->created,
+- (unsigned long) khi->max_age) < 0)
++ khi->created, khi->max_age) < 0)
+ {
+ logprintf (LOG_ALWAYS, "Could not write the HSTS database correctly.\n");
+ break;
+@@ -439,7 +438,7 @@ hsts_match (hsts_store_t store, struct url *u)
+ bool
+ hsts_store_entry (hsts_store_t store,
+ enum url_scheme scheme, const char *host, int port,
+- time_t max_age, bool include_subdomains)
++ int64_t max_age, bool include_subdomains)
+ {
+ bool result = false;
+ enum hsts_kh_match match = NO_MATCH;
+@@ -464,9 +463,9 @@ hsts_store_entry (hsts_store_t store,
+ * 'created' field too. The RFC also states that we have to
+ * update the entry each time we see HSTS header.
+ * See also Section 11.2. */
+- time_t t = time (NULL);
++ int64_t t = (int64_t) time (NULL);
+
+- if (t != (time_t)(-1) && t != entry->created)
++ if (t != -1 && t != entry->created)
+ {
+ entry->created = t;
+ entry->max_age = max_age;
+@@ -792,7 +791,7 @@ test_hsts_read_database (void)
+ hsts_store_t table;
+ char *file = NULL;
+ FILE *fp = NULL;
+- time_t created = time(NULL) - 10;
++ int64_t created = time(NULL) - 10;
+
+ if (opt.homedir)
+ {
+@@ -801,9 +800,9 @@ test_hsts_read_database (void)
+ if (fp)
+ {
+ fputs ("# dummy comment\n", fp);
+- fprintf (fp, "foo.example.com\t0\t1\t%lu\t123\n",(unsigned long) created);
+- fprintf (fp, "bar.example.com\t0\t0\t%lu\t456\n", (unsigned long) created);
+- fprintf (fp, "test.example.com\t8080\t0\t%lu\t789\n", (unsigned long) created);
++ fprintf (fp, "foo.example.com\t0\t1\t%" PRId64 "\t123\n", created);
++ fprintf (fp, "bar.example.com\t0\t0\t%" PRId64 "\t456\n", created);
++ fprintf (fp, "test.example.com\t8080\t0\t%" PRId64 "\t789\n", created);
+ fclose (fp);
+
+ table = hsts_store_open (file);
+--- a/src/hsts.h
++++ b/src/hsts.h
+@@ -46,7 +46,7 @@ bool hsts_store_has_changed (hsts_store_t);
+
+ bool hsts_store_entry (hsts_store_t,
+ enum url_scheme, const char *, int,
+- time_t, bool);
++ int64_t, bool);
+ bool hsts_match (hsts_store_t, struct url *);
+
+ #endif /* HAVE_HSTS */
+--- a/src/http.c
++++ b/src/http.c
+@@ -1300,7 +1300,7 @@ parse_content_disposition (const char *hdr, char **filename)
+
+ #ifdef HAVE_HSTS
+ static bool
+-parse_strict_transport_security (const char *header, time_t *max_age, bool *include_subdomains)
++parse_strict_transport_security (const char *header, int64_t *max_age, bool *include_subdomains)
+ {
+ param_token name, value;
+ const char *c_max_age = NULL;
+@@ -1330,7 +1330,7 @@ parse_strict_transport_security (const char *header, time_t *max_age, bool *incl
+ * Also, time_t is normally defined as a long, so this should not break.
+ */
+ if (max_age)
+- *max_age = (time_t) strtol (c_max_age, NULL, 10);
++ *max_age = (int64_t) strtoll (c_max_age, NULL, 10);
+ if (include_subdomains)
+ *include_subdomains = is;
+
+@@ -3184,9 +3184,6 @@ gethttp (const struct url *u, struct url *original_url, struct http_stat *hs,
+ #else
+ extern hsts_store_t hsts_store;
+ #endif
+- const char *hsts_params;
+- time_t max_age;
+- bool include_subdomains;
+ #endif
+
+ int sock = -1;
+@@ -3674,21 +3671,24 @@ gethttp (const struct url *u, struct url *original_url, struct http_stat *hs,
+ #ifdef HAVE_HSTS
+ if (opt.hsts && hsts_store)
+ {
+- hsts_params = resp_header_strdup (resp, "Strict-Transport-Security");
++ int64_t max_age;
++ const char *hsts_params = resp_header_strdup (resp, "Strict-Transport-Security");
++ bool include_subdomains;
++
+ if (parse_strict_transport_security (hsts_params, &max_age, &include_subdomains))
+ {
+ /* process strict transport security */
+ if (hsts_store_entry (hsts_store, u->scheme, u->host, u->port, max_age, include_subdomains))
+- DEBUGP(("Added new HSTS host: %s:%u (max-age: %lu, includeSubdomains: %s)\n",
++ DEBUGP(("Added new HSTS host: %s:%" PRIu32 " (max-age: %" PRId64 ", includeSubdomains: %s)\n",
+ u->host,
+- (unsigned) u->port,
+- (unsigned long) max_age,
++ (uint32_t) u->port,
++ max_age,
+ (include_subdomains ? "true" : "false")));
+ else
+- DEBUGP(("Updated HSTS host: %s:%u (max-age: %lu, includeSubdomains: %s)\n",
++ DEBUGP(("Updated HSTS host: %s:%" PRIu32 " (max-age: %" PRId64 ", includeSubdomains: %s)\n",
+ u->host,
+- (unsigned) u->port,
+- (unsigned long) max_age,
++ (uint32_t) u->port,
++ max_age,
+ (include_subdomains ? "true" : "false")));
+ }
+ xfree (hsts_params);
+cgit v1.1
diff --git a/net-misc/wget/metadata.xml b/net-misc/wget/metadata.xml
index 574ac5004315..07aa81b0e850 100644
--- a/net-misc/wget/metadata.xml
+++ b/net-misc/wget/metadata.xml
@@ -1,17 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
-<use>
- <flag name="cookie-check">Enable cookie checks via <pkg>net-libs/libpsl</pkg></flag>
- <flag name="metalink">Enable support for <pkg>media-libs/libmetalink</pkg></flag>
- <flag name="ntlm">Enable support for NTLM (Windows-based) authorization</flag>
- <flag name="uuid">Generate UUIDs for the WARC (Web ARChive file format) using libuuid; otherwise use a simple RNG (random number generator)</flag>
-</use>
-<upstream>
- <remote-id type="cpe">cpe:/a:gnu:wget</remote-id>
-</upstream>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
+ <use>
+ <flag name="cookie-check">Enable cookie checks via <pkg>net-libs/libpsl</pkg></flag>
+ <flag name="metalink">Enable support for <pkg>media-libs/libmetalink</pkg></flag>
+ <flag name="ntlm">Enable support for NTLM (Windows-based) authorization</flag>
+ <flag name="uuid">Generate UUIDs for the WARC (Web ARChive file format) using libuuid; otherwise use a simple RNG (random number generator)</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:gnu:wget</remote-id>
+ <remote-id type="gitlab">gnuwget/wget</remote-id>
+ </upstream>
</pkgmetadata>
diff --git a/net-misc/wget/wget-1.21.3-r1.ebuild b/net-misc/wget/wget-1.21.3-r1.ebuild
new file mode 100644
index 000000000000..922b3579b4f0
--- /dev/null
+++ b/net-misc/wget/wget-1.21.3-r1.ebuild
@@ -0,0 +1,114 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/wget.asc
+inherit flag-o-matic python-any-r1 toolchain-funcs verify-sig
+
+DESCRIPTION="Network utility to retrieve files from the WWW"
+HOMEPAGE="https://www.gnu.org/software/wget/"
+SRC_URI="mirror://gnu/wget/${P}.tar.gz"
+SRC_URI+=" verify-sig? ( mirror://gnu/wget/${P}.tar.gz.sig )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="cookie-check debug gnutls idn ipv6 metalink nls ntlm pcre +ssl static test uuid zlib"
+REQUIRED_USE="ntlm? ( !gnutls ssl ) gnutls? ( ssl )"
+RESTRICT="!test? ( test )"
+
+# * Force a newer libidn2 to avoid libunistring deps. #bug #612498
+# * Metalink can use gpgme automagically (so let's always depend on it)
+# for signed metalink resources.
+LIB_DEPEND="
+ cookie-check? ( net-libs/libpsl )
+ idn? ( >=net-dns/libidn2-0.14:=[static-libs(+)] )
+ metalink? (
+ app-crypt/gpgme
+ media-libs/libmetalink
+ )
+ pcre? ( dev-libs/libpcre2[static-libs(+)] )
+ ssl? (
+ gnutls? ( net-libs/gnutls:=[static-libs(+)] )
+ !gnutls? ( dev-libs/openssl:=[static-libs(+)] )
+ )
+ uuid? ( sys-apps/util-linux[static-libs(+)] )
+ zlib? ( sys-libs/zlib[static-libs(+)] )
+"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )"
+DEPEND="
+ ${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+"
+BDEPEND="
+ app-arch/xz-utils
+ dev-lang/perl
+ sys-apps/texinfo
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? (
+ ${PYTHON_DEPS}
+ dev-perl/HTTP-Daemon
+ dev-perl/HTTP-Message
+ dev-perl/IO-Socket-SSL
+ )
+ verify-sig? ( sec-keys/openpgp-keys-wget )
+"
+
+DOCS=( AUTHORS MAILING-LIST NEWS README )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-hsts-type.patch
+)
+
+pkg_setup() {
+ use test && python-any-r1_pkg_setup
+}
+
+src_prepare() {
+ default
+ sed -i -e "s:/usr/local/etc:${EPREFIX}/etc:g" doc/{sample.wgetrc,wget.texi} || die
+}
+
+src_configure() {
+ # fix compilation on Solaris, we need filio.h for FIONBIO as used in
+ # the included gnutls -- force ioctl.h to include this header
+ [[ ${CHOST} == *-solaris* ]] && append-cppflags -DBSD_COMP=1
+
+ if use static ; then
+ append-ldflags -static
+ tc-export PKG_CONFIG
+ PKG_CONFIG+=" --static"
+ fi
+
+ # There is no flag that controls this. libunistring-prefix only
+ # controls the search path (which is why we turn it off below).
+ # Further, libunistring is only needed w/older libidn2 installs,
+ # and since we force the latest, we can force off libunistring. # bug #612498
+ local myeconfargs=(
+ ac_cv_libunistring=no
+ --disable-assert
+ --disable-pcre
+ --disable-rpath
+ --without-included-libunistring
+ --without-libunistring-prefix
+ $(use_enable debug)
+ $(use_enable idn iri)
+ $(use_enable ipv6)
+ $(use_enable nls)
+ $(use_enable ntlm)
+ $(use_enable pcre pcre2)
+ $(use_enable ssl digest)
+ $(use_enable ssl opie)
+ $(use_with cookie-check libpsl)
+ $(use_enable idn iri)
+ $(use_with metalink)
+ $(use_with ssl ssl $(usex gnutls gnutls openssl))
+ $(use_with uuid libuuid)
+ $(use_with zlib)
+ )
+
+ econf "${myeconfargs[@]}"
+}
diff --git a/net-misc/wget/wget-1.21.3.ebuild b/net-misc/wget/wget-1.21.3.ebuild
index af2f49b03f74..3b93ad5504e4 100644
--- a/net-misc/wget/wget-1.21.3.ebuild
+++ b/net-misc/wget/wget-1.21.3.ebuild
@@ -14,7 +14,7 @@ SRC_URI+=" verify-sig? ( mirror://gnu/wget/${P}.tar.gz.sig )"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="cookie-check debug gnutls idn ipv6 metalink nls ntlm pcre +ssl static test uuid zlib"
REQUIRED_USE="ntlm? ( !gnutls ssl ) gnutls? ( ssl )"
RESTRICT="!test? ( test )"