update to wget-1.14

This commit is contained in:
Karsten Hopp 2012-08-09 15:03:57 +02:00
parent 17e301643c
commit f71e23a6aa
5 changed files with 32 additions and 32 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
wget-1.12.tar.bz2 wget-1.12.tar.bz2
/wget-1.13.4.tar.bz2 /wget-1.13.4.tar.bz2
/wget-1.14.tar.xz

View File

@ -1 +1 @@
12115c3750a4d92f9c6ac62bac372e85 wget-1.13.4.tar.bz2 316f6f59292c9098ad81fd54f658c579 wget-1.14.tar.xz

View File

@ -1,12 +1,15 @@
diff -up wget-1.13.4/src/openssl.c.sslreadtimeout wget-1.13.4/src/openssl.c diff -up wget-1.14/src/openssl.c.ssltimeout wget-1.14/src/openssl.c
--- wget-1.13.4/src/openssl.c.sslreadtimeout 2011-08-29 10:01:24.000000000 +0200 --- wget-1.14/src/openssl.c.ssltimeout 2012-08-09 14:30:14.987964706 +0200
+++ wget-1.13.4/src/openssl.c 2012-05-29 12:30:42.000000000 +0200 +++ wget-1.14/src/openssl.c 2012-08-09 14:44:05.467660741 +0200
@@ -254,19 +254,47 @@ struct openssl_transport_context { @@ -256,19 +256,42 @@ struct openssl_transport_context {
char *last_error; /* last error printed with openssl_errstr */ char *last_error; /* last error printed with openssl_errstr */
}; };
-static int -static int
-openssl_read (int fd, char *buf, int bufsize, void *arg) -openssl_read (int fd, char *buf, int bufsize, void *arg)
-{
- int ret;
- struct openssl_transport_context *ctx = arg;
+struct openssl_read_args { +struct openssl_read_args {
+ int fd; + int fd;
+ struct openssl_transport_context *ctx; + struct openssl_transport_context *ctx;
@ -15,28 +18,24 @@ diff -up wget-1.13.4/src/openssl.c.sslreadtimeout wget-1.13.4/src/openssl.c
+ int retval; + int retval;
+}; +};
+ +
+static void openssl_read_callback(void *arg) +static void openssl_read_callback(void *arg) {
{
- int ret;
- struct openssl_transport_context *ctx = arg;
+ struct openssl_read_args *args = (struct openssl_read_args *) arg; + struct openssl_read_args *args = (struct openssl_read_args *) arg;
+ struct openssl_transport_context *ctx = args->ctx; + struct openssl_transport_context *ctx = args->ctx;
SSL *conn = ctx->conn; SSL *conn = ctx->conn;
+ char *buf = args->buf; + char *buf = args->buf;
+ int bufsize = args->bufsize; + int bufsize = args->bufsize;
+
+ int ret; + int ret;
+ +
do do
ret = SSL_read (conn, buf, bufsize); ret = SSL_read (conn, buf, bufsize);
while (ret == -1 - while (ret == -1
&& SSL_get_error (conn, ret) == SSL_ERROR_SYSCALL - && SSL_get_error (conn, ret) == SSL_ERROR_SYSCALL
+ while (ret == -1 && SSL_get_error (conn, ret) == SSL_ERROR_SYSCALL
&& errno == EINTR); && errno == EINTR);
- return ret;
+ args->retval = ret; + args->retval = ret;
+} +}
+
- return ret;
+static int +static int
+openssl_read (int fd, char *buf, int bufsize, void *arg) +openssl_read (int fd, char *buf, int bufsize, void *arg)
+{ +{
@ -49,12 +48,11 @@ diff -up wget-1.13.4/src/openssl.c.sslreadtimeout wget-1.13.4/src/openssl.c
+ if (run_with_timeout(opt.read_timeout, openssl_read_callback, &args)) { + if (run_with_timeout(opt.read_timeout, openssl_read_callback, &args)) {
+ return -1; + return -1;
+ } + }
+
+ return args.retval; + return args.retval;
} }
static int static int
@@ -384,6 +412,18 @@ static struct transport_implementation o @@ -386,6 +409,18 @@ static struct transport_implementation o
openssl_peek, openssl_errstr, openssl_close openssl_peek, openssl_errstr, openssl_close
}; };
@ -73,20 +71,20 @@ diff -up wget-1.13.4/src/openssl.c.sslreadtimeout wget-1.13.4/src/openssl.c
/* Perform the SSL handshake on file descriptor FD, which is assumed /* Perform the SSL handshake on file descriptor FD, which is assumed
to be connected to an SSL server. The SSL handle provided by to be connected to an SSL server. The SSL handle provided by
OpenSSL is registered with the file descriptor FD using OpenSSL is registered with the file descriptor FD using
@@ -396,6 +436,7 @@ bool @@ -398,6 +433,7 @@ bool
ssl_connect_wget (int fd) ssl_connect_wget (int fd, const char *hostname)
{ {
SSL *conn; SSL *conn;
+ struct scwt_context scwt_ctx; + struct scwt_context scwt_ctx;
struct openssl_transport_context *ctx; struct openssl_transport_context *ctx;
DEBUGP (("Initiating SSL handshake.\n")); DEBUGP (("Initiating SSL handshake.\n"));
@@ -410,7 +451,14 @@ ssl_connect_wget (int fd) @@ -425,7 +461,14 @@ ssl_connect_wget (int fd, const char *ho
if (!SSL_set_fd (conn, FD_TO_SOCKET (fd))) if (!SSL_set_fd (conn, FD_TO_SOCKET (fd)))
goto error; goto error;
SSL_set_connect_state (conn); SSL_set_connect_state (conn);
- if (SSL_connect (conn) <= 0 || conn->state != SSL_ST_OK) - if (SSL_connect (conn) <= 0 || conn->state != SSL_ST_OK)
+ +
+ scwt_ctx.ssl = conn; + scwt_ctx.ssl = conn;
+ if (run_with_timeout(opt.read_timeout, ssl_connect_with_timeout_callback, + if (run_with_timeout(opt.read_timeout, ssl_connect_with_timeout_callback,
+ &scwt_ctx)) { + &scwt_ctx)) {
@ -97,11 +95,11 @@ diff -up wget-1.13.4/src/openssl.c.sslreadtimeout wget-1.13.4/src/openssl.c
goto error; goto error;
ctx = xnew0 (struct openssl_transport_context); ctx = xnew0 (struct openssl_transport_context);
@@ -426,6 +474,7 @@ ssl_connect_wget (int fd) @@ -441,6 +484,7 @@ ssl_connect_wget (int fd, const char *ho
error: error:
DEBUGP (("SSL handshake failed.\n")); DEBUGP (("SSL handshake failed.\n"));
print_errors (); print_errors ();
+ timeout: + timeout:
if (conn) if (conn)
SSL_free (conn); SSL_free (conn);
return false; return false;

View File

@ -3,9 +3,9 @@
@@ -561,7 +561,7 @@ @@ -561,7 +561,7 @@
PACKAGE_NAME='wget' PACKAGE_NAME='wget'
PACKAGE_TARNAME='wget' PACKAGE_TARNAME='wget'
PACKAGE_VERSION='1.13.4' PACKAGE_VERSION='1.14'
-PACKAGE_STRING='wget 1.13.4' -PACKAGE_STRING='wget 1.14'
+PACKAGE_STRING='wget 1.13.4 (Red Hat modified)' +PACKAGE_STRING='wget 1.14 (Red Hat modified)'
PACKAGE_BUGREPORT='bug-wget@gnu.org' PACKAGE_BUGREPORT='bug-wget@gnu.org'
PACKAGE_URL='' PACKAGE_URL=''

View File

@ -1,17 +1,15 @@
Summary: A utility for retrieving files using the HTTP or FTP protocols Summary: A utility for retrieving files using the HTTP or FTP protocols
Name: wget Name: wget
Version: 1.13.4 Version: 1.14
Release: 5%{?dist} Release: 1%{?dist}
License: GPLv3+ License: GPLv3+
Group: Applications/Internet Group: Applications/Internet
Url: http://www.gnu.org/software/wget/ Url: http://www.gnu.org/software/wget/
Source: ftp://ftp.gnu.org/gnu/wget/wget-%{version}.tar.bz2 Source: ftp://ftp.gnu.org/gnu/wget/wget-%{version}.tar.xz
Patch1: wget-rh-modified.patch Patch1: wget-rh-modified.patch
Patch2: wget-1.12-path.patch Patch2: wget-1.12-path.patch
Patch3: openssl-1.13.4-sslreadtimeout.patch Patch3: wget-1.14-sslreadtimeout.patch
# http://bzr.savannah.gnu.org/lh/wget/trunk/revision/2317
#Patch3: wget-1.12-certificate-subjectAltName.patch
Provides: webclient Provides: webclient
Provides: bundled(gnulib) Provides: bundled(gnulib)
Requires(post): /sbin/install-info Requires(post): /sbin/install-info
@ -69,6 +67,9 @@ rm -rf $RPM_BUILD_ROOT
%{_infodir}/* %{_infodir}/*
%changelog %changelog
* Thu Aug 09 2012 Karsten Hopp <karsten@redhat.com> 1.14-1
- Update to wget-1.14
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13.4-5 * Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild