Merged with trunk

svn path=/nixpkgs/branches/stdenv-updates/; revision=10145
This commit is contained in:
Yury G. Kudryashov
2008-01-15 00:55:21 +00:00
parent e17a21b820
commit a7703662a4
125 changed files with 2379 additions and 487 deletions
@@ -0,0 +1,156 @@
diff -rc curl-7.17.1-orig/lib/connect.c curl-7.17.1/lib/connect.c
*** curl-7.17.1-orig/lib/connect.c 2007-10-22 16:30:17.000000000 +0200
--- curl-7.17.1/lib/connect.c 2007-12-19 18:30:32.000000000 +0100
***************
*** 99,105 ****
singleipconnect(struct connectdata *conn,
const Curl_addrinfo *ai, /* start connecting to this */
long timeout_ms,
! bool *connected);
/*
* Curl_nonblock() set the given socket to either blocking or non-blocking
--- 99,106 ----
singleipconnect(struct connectdata *conn,
const Curl_addrinfo *ai, /* start connecting to this */
long timeout_ms,
! bool *connected,
! bool *timed_out);
/*
* Curl_nonblock() set the given socket to either blocking or non-blocking
***************
*** 492,497 ****
--- 493,499 ----
{
curl_socket_t sockfd;
Curl_addrinfo *ai;
+ bool timed_out;
/* first close the failed socket */
sclose(conn->sock[sockindex]);
***************
*** 505,511 ****
ai = conn->ip_addr->ai_next;
while (ai) {
! sockfd = singleipconnect(conn, ai, 0L, connected);
if(sockfd != CURL_SOCKET_BAD) {
/* store the new socket descriptor */
conn->sock[sockindex] = sockfd;
--- 507,513 ----
ai = conn->ip_addr->ai_next;
while (ai) {
! sockfd = singleipconnect(conn, ai, 0L, connected, &timed_out);
if(sockfd != CURL_SOCKET_BAD) {
/* store the new socket descriptor */
conn->sock[sockindex] = sockfd;
***************
*** 669,675 ****
singleipconnect(struct connectdata *conn,
const Curl_addrinfo *ai,
long timeout_ms,
! bool *connected)
{
char addr_buf[128];
int rc;
--- 671,678 ----
singleipconnect(struct connectdata *conn,
const Curl_addrinfo *ai,
long timeout_ms,
! bool *connected,
! bool *timed_out)
{
char addr_buf[128];
int rc;
***************
*** 689,694 ****
--- 692,699 ----
struct curl_sockaddr *addr=(struct curl_sockaddr*)&addr_storage;
const void *iptoprint;
+ *timed_out = FALSE;
+
addr->family=ai->ai_family;
addr->socktype=conn->socktype;
addr->protocol=ai->ai_protocol;
***************
*** 790,797 ****
infof(data, "connected\n");
return sockfd;
}
! else if(WAITCONN_TIMEOUT == rc)
infof(data, "Timeout\n");
else {
data->state.os_errno = error;
infof(data, "%s\n", Curl_strerror(conn, error));
--- 795,804 ----
infof(data, "connected\n");
return sockfd;
}
! else if(WAITCONN_TIMEOUT == rc) {
! *timed_out = TRUE;
infof(data, "Timeout\n");
+ }
else {
data->state.os_errno = error;
infof(data, "%s\n", Curl_strerror(conn, error));
***************
*** 822,829 ****
Curl_addrinfo *ai;
Curl_addrinfo *curr_addr;
int timeout_set = 0;
- struct timeval after;
struct timeval before = Curl_tvnow();
/*************************************************************
--- 829,836 ----
Curl_addrinfo *ai;
Curl_addrinfo *curr_addr;
int timeout_set = 0;
+ bool timed_out;
struct timeval before = Curl_tvnow();
/*************************************************************
***************
*** 891,909 ****
curr_addr = curr_addr->ai_next, aliasindex++) {
/* start connecting to the IP curr_addr points to */
! sockfd = singleipconnect(conn, curr_addr, timeout_per_addr, connected);
if(sockfd != CURL_SOCKET_BAD)
break;
! /* get a new timeout for next attempt */
! after = Curl_tvnow();
! timeout_ms -= Curl_tvdiff(after, before);
! if(timeout_ms < 0) {
failf(data, "connect() timed out!");
return CURLE_OPERATION_TIMEDOUT;
}
- before = after;
} /* end of connect-to-each-address loop */
if (sockfd == CURL_SOCKET_BAD) {
--- 898,914 ----
curr_addr = curr_addr->ai_next, aliasindex++) {
/* start connecting to the IP curr_addr points to */
! sockfd = singleipconnect(conn, curr_addr, timeout_per_addr, connected, &timed_out);
if(sockfd != CURL_SOCKET_BAD)
break;
! /* if this is the last address and it timed out, propagate the
! timeout to the caller */
! if(!curr_addr->ai_next && timed_out) {
failf(data, "connect() timed out!");
return CURLE_OPERATION_TIMEDOUT;
}
} /* end of connect-to-each-address loop */
if (sockfd == CURL_SOCKET_BAD) {
+14 -3
View File
@@ -4,10 +4,10 @@ assert zlibSupport -> zlib != null;
assert sslSupport -> openssl != null;
stdenv.mkDerivation {
name = "curl-7.16.2";
name = "curl-7.17.1";
src = fetchurl {
url = http://curl.haxx.se/download/curl-7.16.2.tar.bz2;
sha256 = "18mzp56y8qhlvi27av7866mvsiyiigb7c5qdppjr8qizsj0kx0rf";
url = http://curl.haxx.se/download/curl-7.17.1.tar.bz2;
sha256 = "0yz50r75jhfr2ya6wqi6n90bn4ij30299pjglmlckzq6jp28wrkz";
};
buildInputs =
stdenv.lib.optional zlibSupport zlib ++
@@ -19,4 +19,15 @@ stdenv.mkDerivation {
CXX = "g++";
CXXCPP = "g++ -E";
inherit sslSupport openssl;
patches = [
/* Fixes broken retry support when a timeout is used. The
select() system call (used to wait for the connection to come
up) can return slightly before the computed deadline (a few
milliseconds). Curl will think the problem is something else,
proceed with the next IP address (which usually doesn't exist),
then barf with a CURLE_COULDNT_CONNECT error, which is
considered non-transient so it won't retry. */
./connect-timeout.patch
];
}
@@ -13,7 +13,9 @@ stdenv.mkDerivation {
installPhase = "python setup.py install --prefix=$out ;"+
" echo 'export PYTHONPATH=$PYTHONPATH:'$out'/lib/python2.4/site-packages:"+
wxPython26+"/lib/python2.4/site-packages:"+
wxPython26+"/lib/python2.4/site-packages/wx-2.6-gtk2-unicode; "+
"'$out'/lib/python2.5/site-packages:"+
wxPython26+"/lib/python2.4/site-packages/wx-2.6-gtk2-unicode:"+
wxPython26+"/lib/python2.5/site-packages/wx-2.6-gtk2-unicode; "+
"python `which btdownloadgui.py` --ipv6_enabled 1 --ipv6_binds_v4 0 \"$@\";' >"+
"$out/bin/bittornado ; chmod a+rx $out/bin/bittornado;";
+8 -3
View File
@@ -1,10 +1,15 @@
{stdenv, fetchurl, pkgconfig, glib, fuse}:
stdenv.mkDerivation {
name = "sshfs-fuse-1.7";
name = "sshfs-fuse-1.9";
src = fetchurl {
url = mirror://sourceforge/fuse/sshfs-fuse-1.7.tar.gz;
md5 = "e91a2fed1da952a375798408dc6e41a0";
url = mirror://sourceforge/fuse/sshfs-fuse-1.9.tar.gz;
sha256 = "10ishsghdwd6a1cd36gp26qpch6z8d6wjs7aw8vs0ffnvrs4hdza";
};
buildInputs = [pkgconfig glib fuse];
meta = {
homepage = http://fuse.sourceforge.net/sshfs.html;
description = "FUSE-based filesystem that allows remote filesystems to be mounted over SSH";
};
}
+3 -3
View File
@@ -1,10 +1,10 @@
{stdenv, fetchurl, libpcap}:
stdenv.mkDerivation {
name = "tcpdump-3.9.5";
name = "tcpdump-3.9.8";
src = fetchurl {
url = http://www.tcpdump.org/release/tcpdump-3.9.5.tar.gz;
md5 = "2135e7b1f09af0eaf66d2af822bed44a";
url = http://www.tcpdump.org/release/tcpdump-3.9.8.tar.gz;
sha256 = "16fjm1ih56mwqniffp63adbxwfj5n10x1a7l22j3cx683pmwh293";
};
buildInputs = [libpcap];
}