[packages/wget] - up to 1.15
arekm
arekm at pld-linux.org
Sun Jan 19 22:14:57 CET 2014
commit 3f94de76e90559cbe162c09c144428b443913c9b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Jan 19 22:14:34 2014 +0100
- up to 1.15
wget-info.patch | 35 +-----
wget-pod.patch | 15 ---
wget-ssl-certs.patch | 4 +-
wget-ssl-timeout.patch | 312 -------------------------------------------------
wget.spec | 10 +-
5 files changed, 8 insertions(+), 368 deletions(-)
---
diff --git a/wget.spec b/wget.spec
index 3879a89..ab924d6 100644
--- a/wget.spec
+++ b/wget.spec
@@ -16,20 +16,18 @@ Summary(ru.UTF-8): Утилита для получения файлов по п
Summary(uk.UTF-8): Утиліта для отримання файлів по протоколам HTTP та FTP
Summary(zh_CN.UTF-8): [通讯]功能强大的下载程序,支持断点续传
Name: wget
-Version: 1.14
-Release: 5
+Version: 1.15
+Release: 1
License: GPL v3+ with OpenSSL exception
Group: Networking/Utilities
Source0: http://ftp.gnu.org/gnu/wget/%{name}-%{version}.tar.xz
-# Source0-md5: 316f6f59292c9098ad81fd54f658c579
+# Source0-md5: 7a279d5ac5594919124d5526e7143e28
Source1: http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-man-pages.tar.bz2
# Source1-md5: d8b2b56ec7461606c22edbafaf8a418f
Patch0: %{name}-info.patch
Patch1: %{name}-wgetrc_path.patch
Patch2: %{name}-home_etc.patch
Patch3: %{name}-ssl-certs.patch
-Patch4: %{name}-pod.patch
-Patch5: %{name}-ssl-timeout.patch
URL: http://www.gnu.org/software/wget/
BuildRequires: autoconf >= 2.61
BuildRequires: automake >= 1:1.9
@@ -122,8 +120,6 @@ Proxy серверів, настроюваність.
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
-%patch5 -p1
%{__rm} doc/wget.info doc/sample.wgetrc.munged_for_texi_inclusion po/stamp-po
# temp hack for 1.13.4
diff --git a/wget-info.patch b/wget-info.patch
index 0a3f8cf..04397f1 100644
--- a/wget-info.patch
+++ b/wget-info.patch
@@ -12,42 +12,13 @@
@end direntry
@ifnottex
-@@ -876,7 +876,7 @@
- actions of one.
-
- @cindex proxy
-- at itemx --no-proxy
-+ at item --no-proxy
- Don't use proxies, even if the appropriate @code{*_proxy} environment
- variable is defined.
-
-@@ -977,9 +977,9 @@
- whose encoding does not match the one used locally.
-
+@@ -988,7 +988,7 @@ whose encoding does not match the one us
@cindex IPv6
-- at itemx -4
-+ at item -4
+ @item -4
@itemx --inet4-only
- at itemx -6
+ at item -6
@itemx --inet6-only
Force connecting to IPv4 or IPv6 addresses. With @samp{--inet4-only}
or @samp{-4}, Wget will only connect to IPv4 hosts, ignoring AAAA
-@@ -3092,7 +3092,7 @@
- Change setting of passive @sc{ftp}, equivalent to the
- @samp{--passive-ftp} option.
-
-- at itemx password = @var{string}
-+ at item password = @var{string}
- Specify password @var{string} for both @sc{ftp} and @sc{http} file retrieval.
- This command can be overridden using the @samp{ftp_password} and
- @samp{http_password} command for @sc{ftp} and @sc{http} respectively.
-@@ -3603,7 +3603,7 @@
- may be specified from within Wget itself.
-
- @table @samp
-- at itemx --no-proxy
-+ at item --no-proxy
- @itemx proxy = on/off
- This option and the corresponding command may be used to suppress the
- use of proxy, even if the appropriate environment variables are set.
+
diff --git a/wget-pod.patch b/wget-pod.patch
deleted file mode 100644
index 61a478b..0000000
--- a/wget-pod.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- wget-1.14/doc/texi2pod.pl.orig 2013-12-06 20:29:19.785649931 +0100
-+++ wget-1.14/doc/texi2pod.pl 2013-12-06 20:32:09.288982037 +0100
-@@ -291,7 +291,11 @@
- if (defined $1) {
- my $thing = $1;
- if ($ic =~ /\@asis/) {
-- $_ = "\n=item $thing\n";
-+ if ($thing =~ /^[0-9]+$/) {
-+ $_ = "\n=item C\<$thing\>\n";
-+ } else {
-+ $_ = "\n=item $thing\n";
-+ }
- } else {
- # Entity escapes prevent munging by the <> processing below.
- $_ = "\n=item $ic\<$thing\>\n";
diff --git a/wget-ssl-certs.patch b/wget-ssl-certs.patch
index d3d3e2d..ccfe850 100644
--- a/wget-ssl-certs.patch
+++ b/wget-ssl-certs.patch
@@ -2,8 +2,8 @@
+++ wget-1.11.4/doc/sample.wgetrc 2008-11-03 18:51:32.512671690 +0200
@@ -110,3 +110,8 @@
- # Force the default remote server encoding
- #remoteencoding = UTF-8
+ # Tune HTTPS security (auto, SSLv2, SSLv3, TLSv1, PFS)
+ #secureprotocol = auto
+
+# file with the bundle of CA's.
+ca_certificate = /etc/certs/ca-certificates.crt
diff --git a/wget-ssl-timeout.patch b/wget-ssl-timeout.patch
deleted file mode 100644
index bbda6f0..0000000
--- a/wget-ssl-timeout.patch
+++ /dev/null
@@ -1,312 +0,0 @@
-From ae80fd2ec75fafdbec9895b9d973f2966209d588 Mon Sep 17 00:00:00 2001
-From: mancha <mancha1 at hush.com>
-Date: Sun, 05 May 2013 05:16:58 +0000
-Subject: gnutls: do not abort on non-fatal alerts during handshake
-
-Signed-off-by: mancha <mancha1 at hush.com>
----
-(limited to 'src/gnutls.c')
-
-diff --git a/src/gnutls.c b/src/gnutls.c
-index 769b005..54422fc 100644
---- a/src/gnutls.c
-+++ b/src/gnutls.c
-@@ -376,8 +376,9 @@ ssl_connect_wget (int fd, const char *hostname)
- {
- struct wgnutls_transport_context *ctx;
- gnutls_session_t session;
-- int err;
-+ int err,alert;
- gnutls_init (&session, GNUTLS_CLIENT);
-+ const char *str;
-
- /* We set the server name but only if it's not an IP address. */
- if (! is_valid_ip_address (hostname))
-@@ -440,10 +441,28 @@ ssl_connect_wget (int fd, const char *hostname)
- return false;
- }
-
-- err = gnutls_handshake (session);
-+ /* We don't stop the handshake process for non-fatal errors */
-+ do
-+ {
-+ err = gnutls_handshake (session);
-+ if (err < 0)
-+ {
-+ logprintf (LOG_NOTQUIET, "GnuTLS: %s\n", gnutls_strerror (err));
-+ if (err == GNUTLS_E_WARNING_ALERT_RECEIVED ||
-+ err == GNUTLS_E_FATAL_ALERT_RECEIVED)
-+ {
-+ alert = gnutls_alert_get (session);
-+ str = gnutls_alert_get_name (alert);
-+ if (str == NULL)
-+ str = "(unknown)";
-+ logprintf (LOG_NOTQUIET, "GnuTLS: received alert [%d]: %s\n", alert, str);
-+ }
-+ }
-+ }
-+ while (err == GNUTLS_E_WARNING_ALERT_RECEIVED && gnutls_error_is_fatal (err) == 0);
-+
- if (err < 0)
- {
-- logprintf (LOG_NOTQUIET, "GnuTLS: %s\n", gnutls_strerror (err));
- gnutls_deinit (session);
- return false;
- }
---
-cgit v0.9.0.2
-From 91f0f99e9a607cc72cd5dc8aa1f57a299f30948e Mon Sep 17 00:00:00 2001
-From: Tim Ruehsen <tim.ruehsen at gmx.de>
-Date: Thu, 11 Jul 2013 12:29:20 +0000
-Subject: gnutls: honor connect timeout
-
----
-diff --git a/src/gnutls.c b/src/gnutls.c
-index 54422fc..06f9020 100644
---- a/src/gnutls.c
-+++ b/src/gnutls.c
-@@ -374,6 +374,9 @@ static struct transport_implementation wgnutls_transport =
- bool
- ssl_connect_wget (int fd, const char *hostname)
- {
-+#ifdef F_GETFL
-+ int flags = 0;
-+#endif
- struct wgnutls_transport_context *ctx;
- gnutls_session_t session;
- int err,alert;
-@@ -441,11 +444,54 @@ ssl_connect_wget (int fd, const char *hostname)
- return false;
- }
-
-+ if (opt.connect_timeout)
-+ {
-+#ifdef F_GETFL
-+ flags = fcntl (fd, F_GETFL, 0);
-+ if (flags < 0)
-+ return flags;
-+ if (fcntl (fd, F_SETFL, flags | O_NONBLOCK))
-+ return -1;
-+#else
-+ /* XXX: Assume it was blocking before. */
-+ const int one = 1;
-+ if (ioctl (fd, FIONBIO, &one) < 0)
-+ return -1;
-+#endif
-+ }
-+
- /* We don't stop the handshake process for non-fatal errors */
- do
- {
- err = gnutls_handshake (session);
-- if (err < 0)
-+
-+ if (opt.connect_timeout && err == GNUTLS_E_AGAIN)
-+ {
-+ if (gnutls_record_get_direction (session))
-+ {
-+ /* wait for writeability */
-+ err = select_fd (fd, opt.connect_timeout, WAIT_FOR_WRITE);
-+ }
-+ else
-+ {
-+ /* wait for readability */
-+ err = select_fd (fd, opt.connect_timeout, WAIT_FOR_READ);
-+ }
-+
-+ if (err <= 0)
-+ {
-+ if (err == 0)
-+ {
-+ errno = ETIMEDOUT;
-+ err = -1;
-+ }
-+ break;
-+ }
-+
-+ if (err <= 0)
-+ break;
-+ }
-+ else if (err < 0)
- {
- logprintf (LOG_NOTQUIET, "GnuTLS: %s\n", gnutls_strerror (err));
- if (err == GNUTLS_E_WARNING_ALERT_RECEIVED ||
-@@ -461,6 +507,18 @@ ssl_connect_wget (int fd, const char *hostname)
- }
- while (err == GNUTLS_E_WARNING_ALERT_RECEIVED && gnutls_error_is_fatal (err) == 0);
-
-+ if (opt.connect_timeout)
-+ {
-+#ifdef F_GETFL
-+ if (fcntl (fd, F_SETFL, flags) < 0)
-+ return -1;
-+#else
-+ const int zero = 0;
-+ if (ioctl (fd, FIONBIO, &zero) < 0)
-+ return -1;
-+#endif
-+ }
-+
- if (err < 0)
- {
- gnutls_deinit (session);
---
-cgit v0.9.0.2
-From b8f036d16c508efde5bacfab9a96d8b6c6aeeeb2 Mon Sep 17 00:00:00 2001
-From: Karsten Hopp <karsten at redhat.com>
-Date: Thu, 11 Jul 2013 09:27:35 +0000
-Subject: Fix timeout option when used with SSL
-
-Previously wget didn't honor the --timeout option if the remote host did
-not answer SSL handshake
-
-Signed-off-by: Tomas Hozza <thozza at redhat.com>
----
-diff --git a/src/openssl.c b/src/openssl.c
-index 3924e41..e2eec4f 100644
---- a/src/openssl.c
-+++ b/src/openssl.c
-@@ -251,24 +251,50 @@ ssl_init (void)
- return false;
- }
-
--struct openssl_transport_context {
-+struct openssl_transport_context
-+{
- SSL *conn; /* SSL connection handle */
- char *last_error; /* last error printed with openssl_errstr */
- };
-
--static int
--openssl_read (int fd, char *buf, int bufsize, void *arg)
-+struct openssl_read_args
- {
-- int ret;
-- struct openssl_transport_context *ctx = arg;
-+ int fd;
-+ struct openssl_transport_context *ctx;
-+ char *buf;
-+ int bufsize;
-+ int retval;
-+};
-+
-+static void openssl_read_callback(void *arg)
-+{
-+ struct openssl_read_args *args = (struct openssl_read_args *) arg;
-+ struct openssl_transport_context *ctx = args->ctx;
- SSL *conn = ctx->conn;
-+ char *buf = args->buf;
-+ int bufsize = args->bufsize;
-+ int ret;
-+
- do
- ret = SSL_read (conn, buf, bufsize);
-- while (ret == -1
-- && SSL_get_error (conn, ret) == SSL_ERROR_SYSCALL
-+ while (ret == -1 && SSL_get_error (conn, ret) == SSL_ERROR_SYSCALL
- && errno == EINTR);
-+ args->retval = ret;
-+}
-
-- return ret;
-+static int
-+openssl_read (int fd, char *buf, int bufsize, void *arg)
-+{
-+ struct openssl_read_args args;
-+ args.fd = fd;
-+ args.buf = buf;
-+ args.bufsize = bufsize;
-+ args.ctx = (struct openssl_transport_context*) arg;
-+
-+ if (run_with_timeout(opt.read_timeout, openssl_read_callback, &args)) {
-+ return -1;
-+ }
-+ return args.retval;
- }
-
- static int
-@@ -386,6 +412,19 @@ static struct transport_implementation openssl_transport = {
- openssl_peek, openssl_errstr, openssl_close
- };
-
-+struct scwt_context
-+{
-+ SSL *ssl;
-+ int result;
-+};
-+
-+static void
-+ssl_connect_with_timeout_callback(void *arg)
-+{
-+ struct scwt_context *ctx = (struct scwt_context *)arg;
-+ ctx->result = SSL_connect(ctx->ssl);
-+}
-+
- /* Perform the SSL handshake on file descriptor FD, which is assumed
- to be connected to an SSL server. The SSL handle provided by
- OpenSSL is registered with the file descriptor FD using
-@@ -398,6 +437,7 @@ bool
- ssl_connect_wget (int fd, const char *hostname)
- {
- SSL *conn;
-+ struct scwt_context scwt_ctx;
- struct openssl_transport_context *ctx;
-
- DEBUGP (("Initiating SSL handshake.\n"));
-@@ -425,7 +465,14 @@ ssl_connect_wget (int fd, const char *hostname)
- if (!SSL_set_fd (conn, FD_TO_SOCKET (fd)))
- goto error;
- SSL_set_connect_state (conn);
-- if (SSL_connect (conn) <= 0 || conn->state != SSL_ST_OK)
-+
-+ scwt_ctx.ssl = conn;
-+ if (run_with_timeout(opt.read_timeout, ssl_connect_with_timeout_callback,
-+ &scwt_ctx)) {
-+ DEBUGP (("SSL handshake timed out.\n"));
-+ goto timeout;
-+ }
-+ if (scwt_ctx.result <= 0 || conn->state != SSL_ST_OK)
- goto error;
-
- ctx = xnew0 (struct openssl_transport_context);
-@@ -441,6 +488,7 @@ ssl_connect_wget (int fd, const char *hostname)
- error:
- DEBUGP (("SSL handshake failed.\n"));
- print_errors ();
-+ timeout:
- if (conn)
- SSL_free (conn);
- return false;
---
-cgit v0.9.0.2
-From 3b6a3e84a013b53b03a8965e91aa0e9478c77841 Mon Sep 17 00:00:00 2001
-From: Tim Ruehsen <tim.ruehsen at gmx.de>
-Date: Thu, 26 Dec 2013 20:17:07 +0000
-Subject: fix GnuTLS connect timeout
-
----
-diff --git a/src/gnutls.c b/src/gnutls.c
-index 9b4b1ec..4f0fa96 100644
---- a/src/gnutls.c
-+++ b/src/gnutls.c
-@@ -526,8 +526,7 @@ ssl_connect_wget (int fd, const char *hostname)
- break;
- }
-
-- if (err <= 0)
-- break;
-+ err = GNUTLS_E_AGAIN;
- }
- else if (err < 0)
- {
-@@ -543,7 +542,7 @@ ssl_connect_wget (int fd, const char *hostname)
- }
- }
- }
-- while (err == GNUTLS_E_WARNING_ALERT_RECEIVED && gnutls_error_is_fatal (err) == 0);
-+ while (err && gnutls_error_is_fatal (err) == 0);
-
- if (opt.connect_timeout)
- {
---
-cgit v0.9.0.2
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/wget.git/commitdiff/3f94de76e90559cbe162c09c144428b443913c9b
More information about the pld-cvs-commit
mailing list