[arch-commits] Commit in curl/repos (10 files)
Dave Reisner
dreisner at nymeria.archlinux.org
Sat Jan 4 17:28:53 UTC 2014
Date: Saturday, January 4, 2014 @ 18:28:52
Author: dreisner
Revision: 203173
archrelease: copy trunk to testing-i686, testing-x86_64
Added:
curl/repos/testing-i686/
curl/repos/testing-i686/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch
(from rev 203172, curl/trunk/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch)
curl/repos/testing-i686/0001-connect-Try-all-addresses-in-first-connection-attemp.patch
(from rev 203172, curl/trunk/0001-connect-Try-all-addresses-in-first-connection-attemp.patch)
curl/repos/testing-i686/PKGBUILD
(from rev 203172, curl/trunk/PKGBUILD)
curl/repos/testing-i686/curlbuild.h
(from rev 203172, curl/trunk/curlbuild.h)
curl/repos/testing-x86_64/
curl/repos/testing-x86_64/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch
(from rev 203172, curl/trunk/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch)
curl/repos/testing-x86_64/0001-connect-Try-all-addresses-in-first-connection-attemp.patch
(from rev 203172, curl/trunk/0001-connect-Try-all-addresses-in-first-connection-attemp.patch)
curl/repos/testing-x86_64/PKGBUILD
(from rev 203172, curl/trunk/PKGBUILD)
curl/repos/testing-x86_64/curlbuild.h
(from rev 203172, curl/trunk/curlbuild.h)
--------------------------------------------------------------------------------+
testing-i686/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch | 47 ++++++
testing-i686/0001-connect-Try-all-addresses-in-first-connection-attemp.patch | 47 ++++++
testing-i686/PKGBUILD | 75 ++++++++++
testing-i686/curlbuild.h | 9 +
testing-x86_64/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch | 47 ++++++
testing-x86_64/0001-connect-Try-all-addresses-in-first-connection-attemp.patch | 47 ++++++
testing-x86_64/PKGBUILD | 75 ++++++++++
testing-x86_64/curlbuild.h | 9 +
8 files changed, 356 insertions(+)
Copied: curl/repos/testing-i686/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch (from rev 203172, curl/trunk/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch)
===================================================================
--- testing-i686/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch (rev 0)
+++ testing-i686/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch 2014-01-04 17:28:52 UTC (rev 203173)
@@ -0,0 +1,47 @@
+From 2715d7f948c8eb7cd3cba38f3dff6d4148e7cfaf Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel at haxx.se>
+Date: Sun, 22 Dec 2013 23:36:11 +0100
+Subject: [PATCH] FILE: don't wait due to CURLOPT_MAX_RECV_SPEED_LARGE
+
+The FILE:// code doesn't support this option - and it doesn't make sense
+to support it as long as it works as it does since then it'd only block
+even longer.
+
+But: setting CURLOPT_MAX_RECV_SPEED_LARGE would make the transfer first
+get done and then libcurl would wait until the average speed would get
+low enough. This happened because the transfer happens completely in the
+DO state for FILE:// but then it would still unconditionally continue in
+to the PERFORM state where the speed check is made.
+
+Starting now, the code will skip from DO_DONE to DONE immediately if no
+socket is set to be recv()ed or send()ed to.
+
+Bug: http://curl.haxx.se/bug/view.cgi?id=1312
+Reported-by: Mohammad AlSaleh
+---
+ lib/multi.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/lib/multi.c b/lib/multi.c
+index ec45ecb..191c9b8 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -1381,7 +1381,14 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
+ Curl_move_handle_from_send_to_recv_pipe(data, data->easy_conn);
+ /* Check if we can move pending requests to send pipe */
+ Curl_multi_process_pending_handles(multi);
+- multistate(data, CURLM_STATE_WAITPERFORM);
++
++ /* Only perform the transfer if there's a good socket to work with.
++ Having both BAD is a signal to skip immediately to DONE */
++ if((data->easy_conn->sockfd != CURL_SOCKET_BAD) ||
++ (data->easy_conn->writesockfd != CURL_SOCKET_BAD))
++ multistate(data, CURLM_STATE_WAITPERFORM);
++ else
++ multistate(data, CURLM_STATE_DONE);
+ result = CURLM_CALL_MULTI_PERFORM;
+ break;
+
+--
+1.8.5.2
+
Copied: curl/repos/testing-i686/0001-connect-Try-all-addresses-in-first-connection-attemp.patch (from rev 203172, curl/trunk/0001-connect-Try-all-addresses-in-first-connection-attemp.patch)
===================================================================
--- testing-i686/0001-connect-Try-all-addresses-in-first-connection-attemp.patch (rev 0)
+++ testing-i686/0001-connect-Try-all-addresses-in-first-connection-attemp.patch 2014-01-04 17:28:52 UTC (rev 203173)
@@ -0,0 +1,47 @@
+From 4e1ece2e44f432c2614f2090155c0aaf2226ea80 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= <bjorn at haxx.se>
+Date: Sat, 28 Dec 2013 13:42:57 +0100
+Subject: [PATCH] connect: Try all addresses in first connection attempt
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes a bug when all addresses in the first family fail immediately, due
+to "Network unreachable" for example, curl would hang and never try the
+next address family.
+
+Iterate through all address families when to trying establish the first
+connection attempt.
+
+Bug: http://curl.haxx.se/bug/view.cgi?id=1315
+Reported-by: Michal Górny and Anthony G. Basile
+---
+ lib/connect.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/lib/connect.c b/lib/connect.c
+index 4b6ee00..588ac28 100644
+--- a/lib/connect.c
++++ b/lib/connect.c
+@@ -1104,12 +1104,12 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
+ conn->tempaddr[0]->ai_next == NULL ? timeout_ms : timeout_ms / 2;
+
+ /* start connecting to first IP */
+- res = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0]));
+- while(res != CURLE_OK &&
+- conn->tempaddr[0] &&
+- conn->tempaddr[0]->ai_next &&
+- conn->tempsock[0] == CURL_SOCKET_BAD)
+- res = trynextip(conn, FIRSTSOCKET, 0);
++ while(conn->tempaddr[0]) {
++ res = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0]));
++ if(res == CURLE_OK)
++ break;
++ conn->tempaddr[0] = conn->tempaddr[0]->ai_next;
++ }
+
+ if(conn->tempsock[0] == CURL_SOCKET_BAD)
+ return res;
+--
+1.8.5.2
+
Copied: curl/repos/testing-i686/PKGBUILD (from rev 203172, curl/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD (rev 0)
+++ testing-i686/PKGBUILD 2014-01-04 17:28:52 UTC (rev 203173)
@@ -0,0 +1,75 @@
+# $Id$
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+# Contributor: Angel Velasquez <angvp at archlinux.org>
+# Contributor: Eric Belanger <eric at archlinux.org>
+# Contributor: Lucien Immink <l.immink at student.fnt.hvu.nl>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgname=curl
+pkgver=7.34.0
+pkgrel=3
+pkgdesc="An URL retrieval utility and library"
+arch=('i686' 'x86_64')
+url="http://curl.haxx.se"
+license=('MIT')
+depends=('ca-certificates' 'krb5' 'libssh2' 'openssl' 'zlib')
+provides=('libcurl.so')
+options=('strip' 'debug')
+source=("http://curl.haxx.se/download/$pkgname-$pkgver.tar.gz"{,.asc}
+ 0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch
+ 0001-connect-Try-all-addresses-in-first-connection-attemp.patch
+ curlbuild.h)
+md5sums=('d5b7edccbd1793e3549842e01331da20'
+ 'SKIP'
+ 'ba766acdb7568aac0b23d479ebecd591'
+ 'ee755b0e886207fc1e8154e426c46ca7'
+ '751bd433ede935c8fae727377625a8ae')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ patch -Np1 <"$srcdir"/0001-connect-Try-all-addresses-in-first-connection-attemp.patch
+ patch -Np1 <"$srcdir"/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --disable-ldap \
+ --disable-ldaps \
+ --enable-ipv6 \
+ --enable-manual \
+ --enable-versioned-symbols \
+ --enable-threaded-resolver \
+ --with-gssapi \
+ --without-libidn \
+ --with-random=/dev/urandom \
+ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
+
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ local ptrsize=$(cpp <<<'__SIZEOF_POINTER__' | sed '/^#/d')
+ case $ptrsize in
+ 8) _curlbuild=curlbuild-64.h ;;
+ 4) _curlbuild=curlbuild-32.h ;;
+ *) error "unknown pointer size for architecture: %s bytes" "$ptrsize"
+ exit 1
+ ;;
+ esac
+
+ # license
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+
+ # devel
+ mv "$pkgdir/usr/include/curl/curlbuild.h" "$pkgdir/usr/include/curl/$_curlbuild"
+ install -m644 "$srcdir/curlbuild.h" "$pkgdir/usr/include/curl/curlbuild.h"
+}
Copied: curl/repos/testing-i686/curlbuild.h (from rev 203172, curl/trunk/curlbuild.h)
===================================================================
--- testing-i686/curlbuild.h (rev 0)
+++ testing-i686/curlbuild.h 2014-01-04 17:28:52 UTC (rev 203173)
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "curlbuild-32.h"
+#elif __WORDSIZE == 64
+#include "curlbuild-64.h"
+#else
+#error "Unknown word size"
+#endif
Copied: curl/repos/testing-x86_64/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch (from rev 203172, curl/trunk/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch)
===================================================================
--- testing-x86_64/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch (rev 0)
+++ testing-x86_64/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch 2014-01-04 17:28:52 UTC (rev 203173)
@@ -0,0 +1,47 @@
+From 2715d7f948c8eb7cd3cba38f3dff6d4148e7cfaf Mon Sep 17 00:00:00 2001
+From: Daniel Stenberg <daniel at haxx.se>
+Date: Sun, 22 Dec 2013 23:36:11 +0100
+Subject: [PATCH] FILE: don't wait due to CURLOPT_MAX_RECV_SPEED_LARGE
+
+The FILE:// code doesn't support this option - and it doesn't make sense
+to support it as long as it works as it does since then it'd only block
+even longer.
+
+But: setting CURLOPT_MAX_RECV_SPEED_LARGE would make the transfer first
+get done and then libcurl would wait until the average speed would get
+low enough. This happened because the transfer happens completely in the
+DO state for FILE:// but then it would still unconditionally continue in
+to the PERFORM state where the speed check is made.
+
+Starting now, the code will skip from DO_DONE to DONE immediately if no
+socket is set to be recv()ed or send()ed to.
+
+Bug: http://curl.haxx.se/bug/view.cgi?id=1312
+Reported-by: Mohammad AlSaleh
+---
+ lib/multi.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/lib/multi.c b/lib/multi.c
+index ec45ecb..191c9b8 100644
+--- a/lib/multi.c
++++ b/lib/multi.c
+@@ -1381,7 +1381,14 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
+ Curl_move_handle_from_send_to_recv_pipe(data, data->easy_conn);
+ /* Check if we can move pending requests to send pipe */
+ Curl_multi_process_pending_handles(multi);
+- multistate(data, CURLM_STATE_WAITPERFORM);
++
++ /* Only perform the transfer if there's a good socket to work with.
++ Having both BAD is a signal to skip immediately to DONE */
++ if((data->easy_conn->sockfd != CURL_SOCKET_BAD) ||
++ (data->easy_conn->writesockfd != CURL_SOCKET_BAD))
++ multistate(data, CURLM_STATE_WAITPERFORM);
++ else
++ multistate(data, CURLM_STATE_DONE);
+ result = CURLM_CALL_MULTI_PERFORM;
+ break;
+
+--
+1.8.5.2
+
Copied: curl/repos/testing-x86_64/0001-connect-Try-all-addresses-in-first-connection-attemp.patch (from rev 203172, curl/trunk/0001-connect-Try-all-addresses-in-first-connection-attemp.patch)
===================================================================
--- testing-x86_64/0001-connect-Try-all-addresses-in-first-connection-attemp.patch (rev 0)
+++ testing-x86_64/0001-connect-Try-all-addresses-in-first-connection-attemp.patch 2014-01-04 17:28:52 UTC (rev 203173)
@@ -0,0 +1,47 @@
+From 4e1ece2e44f432c2614f2090155c0aaf2226ea80 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= <bjorn at haxx.se>
+Date: Sat, 28 Dec 2013 13:42:57 +0100
+Subject: [PATCH] connect: Try all addresses in first connection attempt
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes a bug when all addresses in the first family fail immediately, due
+to "Network unreachable" for example, curl would hang and never try the
+next address family.
+
+Iterate through all address families when to trying establish the first
+connection attempt.
+
+Bug: http://curl.haxx.se/bug/view.cgi?id=1315
+Reported-by: Michal Górny and Anthony G. Basile
+---
+ lib/connect.c | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/lib/connect.c b/lib/connect.c
+index 4b6ee00..588ac28 100644
+--- a/lib/connect.c
++++ b/lib/connect.c
+@@ -1104,12 +1104,12 @@ CURLcode Curl_connecthost(struct connectdata *conn, /* context */
+ conn->tempaddr[0]->ai_next == NULL ? timeout_ms : timeout_ms / 2;
+
+ /* start connecting to first IP */
+- res = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0]));
+- while(res != CURLE_OK &&
+- conn->tempaddr[0] &&
+- conn->tempaddr[0]->ai_next &&
+- conn->tempsock[0] == CURL_SOCKET_BAD)
+- res = trynextip(conn, FIRSTSOCKET, 0);
++ while(conn->tempaddr[0]) {
++ res = singleipconnect(conn, conn->tempaddr[0], &(conn->tempsock[0]));
++ if(res == CURLE_OK)
++ break;
++ conn->tempaddr[0] = conn->tempaddr[0]->ai_next;
++ }
+
+ if(conn->tempsock[0] == CURL_SOCKET_BAD)
+ return res;
+--
+1.8.5.2
+
Copied: curl/repos/testing-x86_64/PKGBUILD (from rev 203172, curl/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2014-01-04 17:28:52 UTC (rev 203173)
@@ -0,0 +1,75 @@
+# $Id$
+# Maintainer: Dave Reisner <dreisner at archlinux.org>
+# Contributor: Angel Velasquez <angvp at archlinux.org>
+# Contributor: Eric Belanger <eric at archlinux.org>
+# Contributor: Lucien Immink <l.immink at student.fnt.hvu.nl>
+# Contributor: Daniel J Griffiths <ghost1227 at archlinux.us>
+
+pkgname=curl
+pkgver=7.34.0
+pkgrel=3
+pkgdesc="An URL retrieval utility and library"
+arch=('i686' 'x86_64')
+url="http://curl.haxx.se"
+license=('MIT')
+depends=('ca-certificates' 'krb5' 'libssh2' 'openssl' 'zlib')
+provides=('libcurl.so')
+options=('strip' 'debug')
+source=("http://curl.haxx.se/download/$pkgname-$pkgver.tar.gz"{,.asc}
+ 0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch
+ 0001-connect-Try-all-addresses-in-first-connection-attemp.patch
+ curlbuild.h)
+md5sums=('d5b7edccbd1793e3549842e01331da20'
+ 'SKIP'
+ 'ba766acdb7568aac0b23d479ebecd591'
+ 'ee755b0e886207fc1e8154e426c46ca7'
+ '751bd433ede935c8fae727377625a8ae')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ patch -Np1 <"$srcdir"/0001-connect-Try-all-addresses-in-first-connection-attemp.patch
+ patch -Np1 <"$srcdir"/0001-FILE-don-t-wait-due-to-CURLOPT_MAX_RECV_SPEED_LARGE.patch
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --disable-ldap \
+ --disable-ldaps \
+ --enable-ipv6 \
+ --enable-manual \
+ --enable-versioned-symbols \
+ --enable-threaded-resolver \
+ --with-gssapi \
+ --without-libidn \
+ --with-random=/dev/urandom \
+ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
+
+ make
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+
+ local ptrsize=$(cpp <<<'__SIZEOF_POINTER__' | sed '/^#/d')
+ case $ptrsize in
+ 8) _curlbuild=curlbuild-64.h ;;
+ 4) _curlbuild=curlbuild-32.h ;;
+ *) error "unknown pointer size for architecture: %s bytes" "$ptrsize"
+ exit 1
+ ;;
+ esac
+
+ # license
+ install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+
+ # devel
+ mv "$pkgdir/usr/include/curl/curlbuild.h" "$pkgdir/usr/include/curl/$_curlbuild"
+ install -m644 "$srcdir/curlbuild.h" "$pkgdir/usr/include/curl/curlbuild.h"
+}
Copied: curl/repos/testing-x86_64/curlbuild.h (from rev 203172, curl/trunk/curlbuild.h)
===================================================================
--- testing-x86_64/curlbuild.h (rev 0)
+++ testing-x86_64/curlbuild.h 2014-01-04 17:28:52 UTC (rev 203173)
@@ -0,0 +1,9 @@
+#include <bits/wordsize.h>
+
+#if __WORDSIZE == 32
+#include "curlbuild-32.h"
+#elif __WORDSIZE == 64
+#include "curlbuild-64.h"
+#else
+#error "Unknown word size"
+#endif
More information about the arch-commits
mailing list