Update to wget-1.13.4.

Tested on i386, amd64 and sparc64.

Note: untested on gcc2 architectures, but it's broken anyway since
gperf fails to build there due to an internal compiler error (as
found by sebastia@ on his vax).

OK sthen@
This commit is contained in:
dcoppa 2011-10-12 10:14:30 +00:00
parent 6aa53d1bc9
commit 80daaa02ce
14 changed files with 74 additions and 188 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.55 2010/11/19 22:31:39 espie Exp $
# $OpenBSD: Makefile,v 1.56 2011/10/12 10:14:30 dcoppa Exp $
COMMENT = retrieve files from the web via HTTP, HTTPS and FTP
DISTNAME = wget-1.12
REVISION = 1
DISTNAME = wget-1.13.4
CATEGORIES = net
HOMEPAGE = http://www.gnu.org/software/wget/
@ -14,7 +13,7 @@ PERMIT_PACKAGE_FTP = Yes
PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = c crypto ssl idn
WANTLIB = c crypto idn ssl z
LIB_DEPENDS = devel/libidn
MASTER_SITES = ${MASTER_SITE_GNU:=wget/}
@ -24,6 +23,7 @@ MODULES = devel/gettext
CONFIGURE_STYLE = gnu
CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS += --with-ssl=openssl
USE_GROFF = Yes
pre-build:

View File

@ -1,5 +1,5 @@
MD5 (wget-1.12.tar.gz) = FBRhucBORU3IkzydHyq/gw==
RMD160 (wget-1.12.tar.gz) = Iy0Kpvs2cxwWLStzdKqatZ5nG30=
SHA1 (wget-1.12.tar.gz) = UNTtJEHmfbeqUGHYpN3kHuDpQkg=
SHA256 (wget-1.12.tar.gz) = dXjtCXThLKpxEgWB+jli7lpp9xdd3D1qbbDs3LpltXI=
SIZE (wget-1.12.tar.gz) = 2464747
MD5 (wget-1.13.4.tar.gz) = HfSJl2oRi5y+GwNQKtv8Jw==
RMD160 (wget-1.13.4.tar.gz) = YQYr/Uwo+Fox9ZnpD4P6hLoccdA=
SHA1 (wget-1.13.4.tar.gz) = 4l4bSHAm3dkCbKfSavIfBEyITSg=
SHA256 (wget-1.13.4.tar.gz) = JMdxC8nyIM4j2Kng9Wc7DvwcrOYttt4CObWGPsyTTc0=
SIZE (wget-1.13.4.tar.gz) = 2815185

View File

@ -1,6 +1,6 @@
--- doc/Makefile.in.orig Tue Sep 22 18:40:11 2009
+++ doc/Makefile.in Thu Oct 1 14:53:44 2009
@@ -598,7 +598,7 @@
--- doc/Makefile.in.orig Thu Oct 6 09:25:28 2011
+++ doc/Makefile.in Thu Oct 6 09:27:11 2011
@@ -1061,7 +1061,7 @@ manext = 1
RM = rm -f
TEXI2POD = $(srcdir)/texi2pod.pl
MAN = wget.$(manext)
@ -9,7 +9,7 @@
SAMPLERCTEXI = sample.wgetrc.munged_for_texi_inclusion
#
@@ -1067,23 +1067,9 @@
@@ -1558,22 +1558,8 @@ install.man: $(MAN)
# install sample.wgetrc
install.wgetrc: $(srcdir)/sample.wgetrc
@ -29,10 +29,8 @@
- else \
- $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRC); \
- fi
-
+ $(mkinstalldirs) $(DESTDIR)$(WGETRCDIR)
+ $(INSTALL_DATA) $(srcdir)/sample.wgetrc $(DESTDIR)$(WGETRCDIR)
+
# uninstall man page
uninstall.man:
$(RM) $(DESTDIR)$(mandir)/man$(manext)/$(MAN)

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-doc_wget_texi,v 1.3 2008/10/09 18:50:45 sthen Exp $
--- doc/wget.texi.orig Mon Jun 30 03:10:16 2008
+++ doc/wget.texi Thu Oct 9 15:36:39 2008
@@ -11,6 +11,11 @@
$OpenBSD: patch-doc_wget_texi,v 1.4 2011/10/12 10:14:30 dcoppa Exp $
--- doc/wget.texi.orig Sat Aug 6 12:22:58 2011
+++ doc/wget.texi Thu Oct 6 10:25:12 2011
@@ -10,6 +10,11 @@
@setchapternewpage on
@c %**end of header
@ -13,12 +13,14 @@ $OpenBSD: patch-doc_wget_texi,v 1.3 2008/10/09 18:50:45 sthen Exp $
@iftex
@c Remove this if you don't use A4 paper.
@afourpaper
@@ -191,12 +196,12 @@ gauge can be customized to your preferences.
@@ -190,14 +195,14 @@ gauge can be customized to your preferences.
Most of the features are fully configurable, either through command line
options, or via the initialization file @file{.wgetrc} (@pxref{Startup
File}). Wget allows you to define @dfn{global} startup files
-(@file{/usr/local/etc/wgetrc} by default) for site settings.
+(@file{${SYSCONFDIR}/wgetrc} by default) for site settings.
-(@file{/usr/local/etc/wgetrc} by default) for site settings. You can also
+(@file{${SYSCONFDIR}/wgetrc} by default) for site settings. You can also
specify the location of a startup file with the --config option.
@ignore
@c man begin FILES
@ -28,7 +30,7 @@ $OpenBSD: patch-doc_wget_texi,v 1.3 2008/10/09 18:50:45 sthen Exp $
Default location of the @dfn{global} startup file.
@item .wgetrc
@@ -2516,9 +2521,8 @@ commands.
@@ -2696,9 +2701,8 @@ commands.
@cindex location of wgetrc
When initializing, Wget will look for a @dfn{global} startup file,
@ -40,7 +42,7 @@ $OpenBSD: patch-doc_wget_texi,v 1.3 2008/10/09 18:50:45 sthen Exp $
Then it will look for the user's file. If the environmental variable
@code{WGETRC} is set, Wget will try to load that file. Failing that, no
@@ -2528,7 +2532,7 @@ If @code{WGETRC} is not set, Wget will try to load @fi
@@ -2708,7 +2712,7 @@ If @code{WGETRC} is not set, Wget will try to load @fi
The fact that user's settings are loaded after the system-wide ones
means that in case of collision user's wgetrc @emph{overrides} the
@ -48,4 +50,4 @@ $OpenBSD: patch-doc_wget_texi,v 1.3 2008/10/09 18:50:45 sthen Exp $
+system-wide wgetrc (in @file{${SYSCONFDIR}/wgetrc} by default).
Fascist admins, away!
@node Wgetrc Syntax
@node Wgetrc Syntax, Wgetrc Commands, Wgetrc Location, Startup File

View File

@ -1,16 +1,16 @@
$OpenBSD: patch-src_Makefile_in,v 1.1 2010/09/13 11:32:39 jasper Exp $
$OpenBSD: patch-src_Makefile_in,v 1.2 2011/10/12 10:14:30 dcoppa Exp $
Fix linking order so this works on static arches too.
(libidn before libintl before libiconv).
--- src/Makefile.in.orig Mon Sep 13 04:58:52 2010
+++ src/Makefile.in Mon Sep 13 04:59:26 2010
@@ -476,7 +476,7 @@ LIBINTL = @LIBINTL@
LIBMD5_LIBDEPS = @LIBMD5_LIBDEPS@
LIBMD5_LTLIBDEPS = @LIBMD5_LTLIBDEPS@
--- src/Makefile.in.orig Thu Oct 6 09:39:27 2011
+++ src/Makefile.in Thu Oct 6 09:41:44 2011
@@ -803,7 +803,7 @@ LIBMULTITHREAD = @LIBMULTITHREAD@
LIBOBJS = @LIBOBJS@
-LIBS = @LIBSSL@ @LIBGNUTLS@ @LIBICONV@ @LIBINTL@ @LIBS@
+LIBS = @LIBSSL@ @LIBGNUTLS@ @LIBS@ @LIBINTL@ @LIBICONV@
LIBPTH = @LIBPTH@
LIBPTH_PREFIX = @LIBPTH_PREFIX@
-LIBS = @LIBICONV@ @LIBINTL@ @LIBS@ $(LIB_CLOCK_GETTIME)
+LIBS = @LIBS@ @LIBINTL@ @LIBICONV@ $(LIB_CLOCK_GETTIME)
LIBSOCKET = @LIBSOCKET@
LIBSSL = @LIBSSL@
LIBSSL_PREFIX = @LIBSSL_PREFIX@
LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@

View File

@ -1,31 +0,0 @@
$OpenBSD: patch-src_http_c,v 1.1 2010/09/13 16:48:11 jasper Exp $
By default, on server redirects, use the original URL to get the
local file name. Fixes CVE-2010-2252.
Diff from upstream.
--- src/http.c.orig Tue Sep 22 05:02:18 2009
+++ src/http.c Mon Sep 13 10:13:32 2010
@@ -2410,8 +2410,9 @@ File %s already there; not retrieving.\n\n"), quote (h
/* The genuine HTTP loop! This is the part where the retrieval is
retried, and retried, and retried, and... */
uerr_t
-http_loop (struct url *u, char **newloc, char **local_file, const char *referer,
- int *dt, struct url *proxy, struct iri *iri)
+http_loop (struct url *u, struct url *original_url, char **newloc,
+ char **local_file, const char *referer, int *dt, struct url *proxy,
+ struct iri *iri)
{
int count;
bool got_head = false; /* used for time-stamping and filename detection */
@@ -2457,7 +2458,8 @@ http_loop (struct url *u, char **newloc, char **local_
}
else if (!opt.content_disposition)
{
- hstat.local_file = url_file_name (u);
+ hstat.local_file =
+ url_file_name (opt.trustservernames ? u : original_url);
got_name = true;
}

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-src_http_h,v 1.1 2010/09/13 16:48:11 jasper Exp $
By default, on server redirects, use the original URL to get the
local file name. Fixes CVE-2010-2252.
Diff from upstream.
--- src/http.h.orig Sat Sep 5 00:31:54 2009
+++ src/http.h Mon Sep 13 16:47:49 2010
@@ -33,8 +33,8 @@ as that of the covered work. */
struct url;
-uerr_t http_loop (struct url *, char **, char **, const char *, int *,
- struct url *, struct iri *);
+uerr_t http_loop (struct url *, struct url *, char **, char **, const char *,
+ int *, struct url *, struct iri *);
void save_cookies (void);
void http_cleanup (void);
time_t http_atotm (const char *);

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_init_c,v 1.1 2010/09/13 16:48:11 jasper Exp $
By default, on server redirects, use the original URL to get the
local file name. Fixes CVE-2010-2252.
Diff from upstream.
--- src/init.c.orig Tue Sep 22 05:02:41 2009
+++ src/init.c Mon Sep 13 10:13:32 2010
@@ -243,6 +243,7 @@ static const struct {
{ "timeout", NULL, cmd_spec_timeout },
{ "timestamping", &opt.timestamping, cmd_boolean },
{ "tries", &opt.ntry, cmd_number_inf },
+ { "trustservernames", &opt.trustservernames, cmd_boolean },
{ "useproxy", &opt.use_proxy, cmd_boolean },
{ "user", &opt.user, cmd_string },
{ "useragent", NULL, cmd_spec_useragent },

View File

@ -1,17 +0,0 @@
$OpenBSD: patch-src_main_c,v 1.1 2010/09/13 16:48:11 jasper Exp $
By default, on server redirects, use the original URL to get the
local file name. Fixes CVE-2010-2252.
Diff from upstream.
--- src/main.c.orig Tue Sep 22 05:03:11 2009
+++ src/main.c Mon Sep 13 10:13:32 2010
@@ -675,6 +675,8 @@ Recursive accept/reject:\n"),
N_("\
-I, --include-directories=LIST list of allowed directories.\n"),
N_("\
+ --trust-server-names use the name specified by the redirection url last component.\n"),
+ N_("\
-X, --exclude-directories=LIST list of excluded directories.\n"),
N_("\
-np, --no-parent don't ascend to the parent directory.\n"),

View File

@ -1,24 +1,24 @@
$OpenBSD: patch-src_openssl_c,v 1.3 2010/09/07 20:54:48 jasper Exp $
$OpenBSD: patch-src_openssl_c,v 1.4 2011/10/12 10:14:30 dcoppa Exp $
Fix build with GCC2.
--- src/openssl.c.orig Tue Sep 7 14:41:11 2010
+++ src/openssl.c Tue Sep 7 14:42:44 2010
@@ -490,6 +490,8 @@ ssl_check_certificate (int fd, const char *host)
long vresult;
--- src/openssl.c.orig Thu Oct 6 09:42:04 2011
+++ src/openssl.c Thu Oct 6 09:43:29 2011
@@ -498,6 +498,8 @@ ssl_check_certificate (int fd, const char *host)
bool success = true;
bool alt_name_checked = false;
+ X509_NAME *xname;
+
/* If the user has specified --no-check-cert, we still want to warn
him about problems with the server's certificate. */
const char *severity = opt.check_cert ? _("ERROR") : _("WARNING");
@@ -569,7 +571,7 @@ ssl_check_certificate (int fd, const char *host)
- Ensure that ASN1 strings from the certificate are encoded as
UTF-8 which can be meaningfully compared to HOST. */
- X509_NAME *xname = X509_get_subject_name(cert);
+ xname = X509_get_subject_name(cert);
common_name[0] = '\0';
X509_NAME_get_text_by_NID (xname, NID_commonName, common_name,
sizeof (common_name));
@@ -646,7 +648,7 @@ ssl_check_certificate (int fd, const char *host)
if (alt_name_checked == false)
{
/* Test commomName */
- X509_NAME *xname = X509_get_subject_name(cert);
+ xname = X509_get_subject_name(cert);
common_name[0] = '\0';
X509_NAME_get_text_by_NID (xname, NID_commonName, common_name,
sizeof (common_name));

View File

@ -1,16 +0,0 @@
$OpenBSD: patch-src_options_h,v 1.1 2010/09/13 16:48:11 jasper Exp $
By default, on server redirects, use the original URL to get the
local file name. Fixes CVE-2010-2252.
Diff from upstream.
--- src/options.h.orig Tue Sep 22 05:03:47 2009
+++ src/options.h Mon Sep 13 10:13:32 2010
@@ -242,6 +242,7 @@ struct options
char *encoding_remote;
char *locale;
+ bool trustservernames;
#ifdef __VMS
int ftp_stmlf; /* Force Stream_LF format for binary FTP. */
#endif /* def __VMS */

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-src_retr_c,v 1.1 2010/09/13 16:48:11 jasper Exp $
By default, on server redirects, use the original URL to get the
local file name. Fixes CVE-2010-2252.
Diff from upstream.
--- src/retr.c.orig Fri Sep 4 18:31:54 2009
+++ src/retr.c Mon Sep 13 10:13:32 2010
@@ -689,7 +689,8 @@ retrieve_url (struct url * orig_parsed, const char *or
#endif
|| (proxy_url && proxy_url->scheme == SCHEME_HTTP))
{
- result = http_loop (u, &mynewloc, &local_file, refurl, dt, proxy_url, iri);
+ result = http_loop (u, orig_parsed, &mynewloc, &local_file, refurl, dt,
+ proxy_url, iri);
}
else if (u->scheme == SCHEME_FTP)
{

View File

@ -1,24 +1,32 @@
$OpenBSD: patch-src_sysdep_h,v 1.1 2010/09/07 20:54:48 jasper Exp $
$OpenBSD: patch-src_sysdep_h,v 1.2 2011/10/12 10:14:30 dcoppa Exp $
Fix build with GCC2 where the configure test fails
to pickup stdbool.h. So it creates the lib/stdbool.h
which these definitions would override.
--- src/sysdep.h.orig Tue Sep 7 14:28:56 2010
+++ src/sysdep.h Tue Sep 7 14:32:01 2010
@@ -136,6 +136,7 @@ void *alloca (size_t);
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
+# if !(defined(__GNUC__) && __GNUC__ < 3)
# if ! HAVE__BOOL
# ifdef __cplusplus
typedef bool _Bool;
@@ -147,6 +148,7 @@ typedef unsigned char _Bool;
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
+#endif
--- src/sysdep.h.orig Thu Oct 6 09:43:49 2011
+++ src/sysdep.h Thu Oct 6 09:47:13 2011
@@ -119,7 +119,23 @@ void *alloca (size_t);
#endif
/* Provided by gnulib on systems that don't have it: */
+#if HAVE_STDBOOL_H
# include <stdbool.h>
+#else
+# if !(defined(__GNUC__) && __GNUC__ < 3)
+# if ! HAVE__BOOL
+# ifdef __cplusplus
+typedef bool _Bool;
+# else
+typedef unsigned char _Bool;
+# endif
+# endif
+# define bool _Bool
+# define false 0
+# define true 1
+# define __bool_true_false_are_defined 1
+#endif
+#endif
/* Needed for compilation under OS/2 and MSDOS */
#if defined(__EMX__) || defined(MSDOS)

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.24 2009/11/03 10:45:46 sthen Exp $
@comment $OpenBSD: PLIST,v 1.25 2011/10/12 10:14:30 dcoppa Exp $
@bin bin/wget
@info info/wget.info
@comment lib/charset.alias
@ -13,14 +13,9 @@ share/locale/cs/LC_MESSAGES/wget.mo
share/locale/da/LC_MESSAGES/wget.mo
share/locale/de/LC_MESSAGES/wget.mo
share/locale/el/LC_MESSAGES/wget.mo
share/locale/en@boldquot/LC_MESSAGES/wget.mo
share/locale/en@quot/LC_MESSAGES/wget.mo
share/locale/en_GB/
share/locale/en_GB/LC_MESSAGES/
share/locale/en_GB/LC_MESSAGES/wget.mo
share/locale/en_US/
share/locale/en_US/LC_MESSAGES/
share/locale/en_US/LC_MESSAGES/wget.mo
share/locale/eo/LC_MESSAGES/wget.mo
share/locale/es/LC_MESSAGES/wget.mo
share/locale/et/LC_MESSAGES/wget.mo