From 97ff04041e21d4b42b7de86058c76c214bab4472 Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 22 Apr 2024 07:15:36 +0000 Subject: [PATCH] net-misc/wget: Sync with Gentoo It's from Gentoo commit e499bab5e3954a68c5f62be43689aa41244067f9. --- .../portage-stable/net-misc/wget/Manifest | 2 + .../files/wget-1.24.5-libproxy-no-debug.patch | 50 ++++++++ .../portage-stable/net-misc/wget/metadata.xml | 1 + .../net-misc/wget/wget-1.24.5.ebuild | 119 ++++++++++++++++++ 4 files changed, 172 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/wget/files/wget-1.24.5-libproxy-no-debug.patch create mode 100644 sdk_container/src/third_party/portage-stable/net-misc/wget/wget-1.24.5.ebuild diff --git a/sdk_container/src/third_party/portage-stable/net-misc/wget/Manifest b/sdk_container/src/third_party/portage-stable/net-misc/wget/Manifest index 4c221b7908..677e1a06ba 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/wget/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-misc/wget/Manifest @@ -1,2 +1,4 @@ DIST wget-1.21.4.tar.gz 5059591 BLAKE2B ced6fb9a20343d41e4d8e0c8f171c60535847504fa4c32abc81d104a1594dc7b7c97b5b301836e31dacc7a0f2155c0a2e70e42ff60dc3fa471deb1dad33ba736 SHA512 7a1539045174f6b97ab6980811c2ac1799edc20db72987b5ba9b1710cffb19669a7736813d15c8da3aa2d4a384246ff946b77ecb0baeb6fd3e12ae591f1bf6a3 DIST wget-1.21.4.tar.gz.sig 854 BLAKE2B 162c4f358e781bbfb0fa73910191c29dd411f48c9b2c8e8fe00a12741153e624955393d769aa7311b03115d04b6b946a84b636f643d7cdc8c8cd81387b9cf143 SHA512 72603493c2d799dca08700175a2010d8736fd6d3cb9bea3987db8814e9f133ab0fbd1477892115f7fbbd1a7d4d416ec370bdbff6dbe8f00d1eea84f0c4f8d84b +DIST wget-1.24.5.tar.gz 5182521 BLAKE2B d33274d599f91384c2a7db0b145ec6b315cf87cbbd02026d686a79220e3f15ca9ad0f9d8b507895f6c8486b7ac2ae5fa5c9ea010e883b6eec68d3aba038b02de SHA512 572aa54717e51a9eb9959e127c7afb696645088f32ff7df2cfe9d243957e34ee235e98988fa94649df023d2e3d62b6973e8c9f2eb92beba820dd96d5de2a950d +DIST wget-1.24.5.tar.gz.sig 854 BLAKE2B 67c084cb8dcbe6184c58203afe11c7426be1f190a6073a68aa658f8480f7046786eb70e47fed4c45b86ea1fda0812a401f530dafd9be816d33d46d54b90223d2 SHA512 f819dc43a466682ace38e8537698e3c7c3919203f77373bdaea1b63ead40c4d3663590209dfeb6187d98edd00e30848a3abd5735795fb47878924f1d9b2ee10d diff --git a/sdk_container/src/third_party/portage-stable/net-misc/wget/files/wget-1.24.5-libproxy-no-debug.patch b/sdk_container/src/third_party/portage-stable/net-misc/wget/files/wget-1.24.5-libproxy-no-debug.patch new file mode 100644 index 0000000000..9f75dc471a --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/wget/files/wget-1.24.5-libproxy-no-debug.patch @@ -0,0 +1,50 @@ +https://bugs.gentoo.org/930060 +https://gitlab.com/gnuwget/wget/-/issues/19 +https://gitlab.com/gnuwget/wget/-/merge_requests/39 + +From 5f0aa59239c36fc945b94d8ab91562d56e5bf776 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Tue, 16 Apr 2024 03:18:40 +0100 +Subject: [PATCH] Fix libproxy build with --disable-debug + +The definition of debug_logprintf in src/log.c is guarded by ENABLE_DEBUG +(although its prototype is unconditionally available in src/log.h). + +The uses of debug_logprintf in src/retr.c aren't guarded by ENABLE_DEBUG. + +Use the DEBUGP macro which is designed for this purpose. + +* src/retr.c (getproxy): Use DEBUGP macro. + +Fixes: https://gitlab.com/gnuwget/wget/-/issues/19 +Copyright-paperwork-exempt: Yes +--- a/src/retr.c ++++ b/src/retr.c +@@ -1498,21 +1498,21 @@ getproxy (struct url *u) + pxProxyFactory *pf = px_proxy_factory_new (); + if (!pf) + { +- debug_logprintf ("Allocating memory for libproxy failed"); ++ DEBUGP (("Allocating memory for libproxy failed")); + return NULL; + } + +- debug_logprintf ("asking libproxy about url '%s'\n", u->url); ++ DEBUGP (("asking libproxy about url '%s'\n", u->url)); + char **proxies = px_proxy_factory_get_proxies (pf, u->url); + if (proxies) + { + if (proxies[0]) + { +- debug_logprintf ("libproxy suggest to use '%s'\n", proxies[0]); ++ DEBUGP (("libproxy suggest to use '%s'\n", proxies[0])); + if (strcmp (proxies[0], "direct://") != 0) + { + proxy = xstrdup (proxies[0]); +- debug_logprintf ("libproxy setting to use '%s'\n", proxy); ++ DEBUGP (("libproxy setting to use '%s'\n", proxy)); + } + } + +-- +GitLab diff --git a/sdk_container/src/third_party/portage-stable/net-misc/wget/metadata.xml b/sdk_container/src/third_party/portage-stable/net-misc/wget/metadata.xml index 07aa81b0e8..bc5cb81f48 100644 --- a/sdk_container/src/third_party/portage-stable/net-misc/wget/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/net-misc/wget/metadata.xml @@ -7,6 +7,7 @@ Enable cookie checks via net-libs/libpsl + Support for automatic proxy configuration management through net-libs/libproxy. Enable support for media-libs/libmetalink Enable support for NTLM (Windows-based) authorization Generate UUIDs for the WARC (Web ARChive file format) using libuuid; otherwise use a simple RNG (random number generator) diff --git a/sdk_container/src/third_party/portage-stable/net-misc/wget/wget-1.24.5.ebuild b/sdk_container/src/third_party/portage-stable/net-misc/wget/wget-1.24.5.ebuild new file mode 100644 index 0000000000..6626e1328e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-misc/wget/wget-1.24.5.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..12} ) +VERIFY_SIG_OPENPGP_KEY_PATH=/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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="cookie-check debug gnutls idn ipv6 libproxy 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(+)] ) + libproxy? ( net-libs/libproxy ) + 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-6.60.0 + dev-perl/HTTP-Message + dev-perl/IO-Socket-SSL + ) + verify-sig? ( >=sec-keys/openpgp-keys-wget-20240415 ) +" + +DOCS=( AUTHORS MAILING-LIST NEWS README ) + +# gnulib FPs +QA_CONFIG_IMPL_DECL_SKIP=( unreachable MIN alignof static_assert ) + +PATCHES=( + "${FILESDIR}"/${PN}-1.24.5-libproxy-no-debug.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_enable libproxy) + $(use_with metalink) + $(use_with ssl ssl $(usex gnutls gnutls openssl)) + $(use_with uuid libuuid) + $(use_with zlib) + ) + + econf "${myeconfargs[@]}" +}