- new upstream release, drop applied patches

This commit is contained in:
Kamil Dudka 2010-06-16 13:24:18 +00:00
parent 4a5f304d06
commit 7f060691db
13 changed files with 21 additions and 2213 deletions

View File

@ -1 +1 @@
curl-7.20.1.tar.lzma
curl-7.21.0.tar.lzma

View File

@ -2,10 +2,10 @@
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2d394e1..39cc418 100644
index af30b8a..ca6c7cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -252,7 +252,10 @@ dnl **********************************************************************
@@ -253,7 +253,10 @@ dnl **********************************************************************
CURL_CHECK_COMPILER
CURL_SET_COMPILER_BASIC_OPTS

View File

@ -2,15 +2,15 @@
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
index 66ada48..454da4b 100644
index 61b1b48..90d5084 100644
--- a/tests/data/Makefile.am
+++ b/tests/data/Makefile.am
@@ -64,7 +64,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
@@ -65,7 +65,7 @@ EXTRA_DIST = test1 test108 test117 test127 test20 test27 test34 test46 \
test1097 test560 test561 test1098 test1099 test562 test563 test1100 \
test564 test1101 test1102 test1103 test1104 test299 test310 test311 \
test312 test1105 test565 test800 test1106 test801 test566 test802 test803 \
- test1107 test1108 test1109 test1110 test1111 test1112 test129 test567 \
+ test1107 test1108 test1109 test1110 test1111 test129 test567 \
test568 test569 test570 test571 test804 test572 test313
test568 test569 test570 test571 test572 test804 test805 test806 test807 \
test573 test313 test1115
filecheck:

View File

@ -1,53 +0,0 @@
CHANGES | 4 ++++
src/main.c | 23 ++++++++++++++++++++---
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/CHANGES b/CHANGES
index 7928690..db2d68b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,10 @@
Changelog
+Daniel Stenberg (19 Apr 2010)
+- -J/--remote-header-name didn't strip trailing carriage returns or linefeeds
+ properly, so they could be used in the file name.
+
Kamil Dudka (11 May 2010)
- CRL support in libcurl-NSS has been completely broken. Now it works. Original
bug report: https://bugzilla.redhat.com/581926
diff --git a/src/main.c b/src/main.c
index 6e3ef3d..d532846 100644
--- a/src/main.c
+++ b/src/main.c
@@ -4200,9 +4200,26 @@ parse_filename(char *ptr, size_t len)
}
}
- q = strrchr(p, quote);
- if (q)
- *q = 0;
+ if(quote) {
+ /* if the file name started with a quote, then scan for the end quote and
+ stop there */
+ q = strrchr(p, quote);
+ if (q)
+ *q = 0;
+ }
+ else
+ q = NULL; /* no start quote, so no end has been found */
+
+ if(!q) {
+ /* make sure the file name doesn't end in \r or \n */
+ q = strchr(p, '\r');
+ if(q)
+ *q = 0;
+
+ q = strchr(p, '\n');
+ if(q)
+ *q = 0;
+ }
if (copy!=p)
memmove(copy, p, strlen(p)+1);

View File

@ -1,51 +0,0 @@
From 82e9b78a388ab539c8784cd853adf6e4a97d52c5 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Sat, 24 Apr 2010 23:21:13 +0200
Subject: [PATCH] nss: fix SSL handshake timeout underflow
lib/nss.c | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/CHANGES b/CHANGES
index 99f04a5..7433364 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,6 +10,9 @@ Kamil Dudka (24 Apr 2010)
- Fixed test536 in order to not fail with threaded DNS resolver and tweaked
comments in certain examples using curl_multi_fdset().
+- Fixed SSL handshake timeout underflow in libcurl-NSS, which caused test405
+ to hang on a slow machine.
+
Version 7.20.1 (14 April 2010)
Daniel Stenberg (9 Apr 2010)
diff --git a/lib/nss.c b/lib/nss.c
index 0f8ebd5..addb94b 100644
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -1025,6 +1025,7 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
int curlerr;
const int *cipher_to_enable;
PRSocketOptionData sock_opt;
+ long time_left;
PRUint32 timeout;
curlerr = CURLE_SSL_CONNECT_ERROR;
@@ -1302,8 +1303,15 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
SSL_SetURL(connssl->handle, conn->host.name);
+ /* check timeout situation */
+ time_left = Curl_timeleft(conn, NULL, TRUE);
+ if(time_left < 0L) {
+ failf(data, "timed out before SSL handshake");
+ goto error;
+ }
+ timeout = PR_MillisecondsToInterval((PRUint32) time_left);
+
/* Force the handshake now */
- timeout = PR_MillisecondsToInterval((PRUint32)Curl_timeleft(conn, NULL, TRUE));
if(SSL_ForceHandshakeWithTimeout(connssl->handle, timeout) != SECSuccess) {
if(conn->data->set.ssl.certverifyresult == SSL_ERROR_BAD_CERT_DOMAIN)
curlerr = CURLE_PEER_FAILED_VERIFICATION;

File diff suppressed because it is too large Load Diff

View File

@ -1,222 +0,0 @@
CHANGES | 4 ++
lib/nss.c | 151 +++++++++++++++++++++++++++++++++---------------------------
2 files changed, 87 insertions(+), 68 deletions(-)
diff --git a/CHANGES b/CHANGES
index 7433364..7928690 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,10 @@
Changelog
+Kamil Dudka (11 May 2010)
+- CRL support in libcurl-NSS has been completely broken. Now it works. Original
+ bug report: https://bugzilla.redhat.com/581926
+
Kamil Dudka (24 Apr 2010)
- Fixed test536 in order to not fail with threaded DNS resolver and tweaked
comments in certain examples using curl_multi_fdset().
diff --git a/lib/nss.c b/lib/nss.c
index addb94b..5e94d31 100644
--- a/lib/nss.c
+++ b/lib/nss.c
@@ -63,6 +63,7 @@
#include <secport.h>
#include <certdb.h>
#include <base64.h>
+#include <cert.h>
#include "curl_memory.h"
#include "rawstr.h"
@@ -79,6 +80,7 @@
PRFileDesc *PR_ImportTCPSocket(PRInt32 osfd);
PRLock * nss_initlock = NULL;
+PRLock * nss_crllock = NULL;
volatile int initialized = 0;
@@ -411,78 +413,90 @@ static int nss_load_cert(struct ssl_connect_data *ssl,
return 1;
}
-static int nss_load_crl(const char* crlfilename, PRBool ascii)
+/* add given CRL to cache if it is not already there */
+static SECStatus nss_cache_crl(SECItem *crlDER)
{
- PRFileDesc *infile;
- PRStatus prstat;
- PRFileInfo info;
- PRInt32 nb;
- int rv;
- SECItem crlDER;
- CERTSignedCrl *crl=NULL;
- PK11SlotInfo *slot=NULL;
-
- infile = PR_Open(crlfilename,PR_RDONLY,0);
- if (!infile) {
- return 0;
+ CERTCertDBHandle *db = CERT_GetDefaultCertDB();
+ CERTSignedCrl *crl = SEC_FindCrlByDERCert(db, crlDER, 0);
+ if(crl) {
+ /* CRL already cached */
+ SEC_DestroyCrl(crl);
+ SECITEM_FreeItem(crlDER, PR_FALSE);
+ return SECSuccess;
}
- crlDER.data = NULL;
- prstat = PR_GetOpenFileInfo(infile,&info);
- if (prstat!=PR_SUCCESS)
- return 0;
- if (ascii) {
- SECItem filedata;
- char *asc,*body;
- filedata.data = NULL;
- if (!SECITEM_AllocItem(NULL,&filedata,info.size))
- return 0;
- nb = PR_Read(infile,filedata.data,info.size);
- if (nb!=info.size)
- return 0;
- asc = (char*)filedata.data;
- if (!asc)
- return 0;
- body=strstr(asc,"-----BEGIN");
- if (body != NULL) {
- char *trailer=NULL;
- asc = body;
- body = PORT_Strchr(asc,'\n');
- if (!body)
- body = PORT_Strchr(asc,'\r');
- if (body)
- trailer = strstr(++body,"-----END");
- if (trailer!=NULL)
- *trailer='\0';
- else
- return 0;
- }
- else {
- body = asc;
- }
- rv = ATOB_ConvertAsciiToItem(&crlDER,body);
- PORT_Free(filedata.data);
- if (rv)
- return 0;
+ /* acquire lock before call of CERT_CacheCRL() */
+ PR_Lock(nss_crllock);
+ if(SECSuccess != CERT_CacheCRL(db, crlDER)) {
+ /* unable to cache CRL */
+ PR_Unlock(nss_crllock);
+ SECITEM_FreeItem(crlDER, PR_FALSE);
+ return SECFailure;
}
- else {
- if (!SECITEM_AllocItem(NULL,&crlDER,info.size))
- return 0;
- nb = PR_Read(infile,crlDER.data,info.size);
- if (nb!=info.size)
- return 0;
+
+ /* we need to clear session cache, so that the CRL could take effect */
+ SSL_ClearSessionCache();
+ PR_Unlock(nss_crllock);
+ return SECSuccess;
+}
+
+static SECStatus nss_load_crl(const char* crlfilename)
+{
+ PRFileDesc *infile;
+ PRFileInfo info;
+ SECItem filedata = { 0, NULL, 0 };
+ SECItem crlDER = { 0, NULL, 0 };
+ char *body;
+
+ infile = PR_Open(crlfilename, PR_RDONLY, 0);
+ if(!infile)
+ return SECFailure;
+
+ if(PR_SUCCESS != PR_GetOpenFileInfo(infile, &info))
+ goto fail;
+
+ if(!SECITEM_AllocItem(NULL, &filedata, info.size + /* zero ended */ 1))
+ goto fail;
+
+ if(info.size != PR_Read(infile, filedata.data, info.size))
+ goto fail;
+
+ /* place a trailing zero right after the visible data */
+ body = (char*)filedata.data;
+ body[--filedata.len] = '\0';
+
+ body = strstr(body, "-----BEGIN");
+ if(body) {
+ /* assume ASCII */
+ char *trailer;
+ char *begin = PORT_Strchr(body, '\n');
+ if(!begin)
+ begin = PORT_Strchr(body, '\r');
+ if(!begin)
+ goto fail;
+
+ trailer = strstr(++begin, "-----END");
+ if(!trailer)
+ goto fail;
+
+ /* retrieve DER from ASCII */
+ *trailer = '\0';
+ if(ATOB_ConvertAsciiToItem(&crlDER, begin))
+ goto fail;
+
+ SECITEM_FreeItem(&filedata, PR_FALSE);
}
+ else
+ /* assume DER */
+ crlDER = filedata;
- slot = PK11_GetInternalKeySlot();
- crl = PK11_ImportCRL(slot,&crlDER,
- NULL,SEC_CRL_TYPE,
- NULL,CRL_IMPORT_DEFAULT_OPTIONS,
- NULL,(CRL_DECODE_DEFAULT_OPTIONS|
- CRL_DECODE_DONT_COPY_DER));
- if (slot) PK11_FreeSlot(slot);
- if (!crl) return 0;
- SEC_DestroyCrl(crl);
- return 1;
+ PR_Close(infile);
+ return nss_cache_crl(&crlDER);
+
+fail:
+ PR_Close(infile);
+ SECITEM_FreeItem(&filedata, PR_FALSE);
+ return SECFailure;
}
static int nss_load_key(struct connectdata *conn, int sockindex,
@@ -889,6 +903,7 @@ int Curl_nss_init(void)
if (nss_initlock == NULL) {
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 256);
nss_initlock = PR_NewLock();
+ nss_crllock = PR_NewLock();
}
/* We will actually initialize NSS later */
@@ -918,6 +933,7 @@ void Curl_nss_cleanup(void)
PR_Unlock(nss_initlock);
PR_DestroyLock(nss_initlock);
+ PR_DestroyLock(nss_crllock);
nss_initlock = NULL;
initialized = 0;
@@ -1244,8 +1260,7 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
data->set.ssl.CApath ? data->set.ssl.CApath : "none");
if (data->set.ssl.CRLfile) {
- int rc = nss_load_crl(data->set.ssl.CRLfile, PR_FALSE);
- if (!rc) {
+ if(SECSuccess != nss_load_crl(data->set.ssl.CRLfile)) {
curlerr = CURLE_SSL_CRL_BADFILE;
goto error;
}

View File

@ -1,236 +0,0 @@
From d487ade72c5f31703ce097e8460e0225fad80348 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Sat, 24 Apr 2010 12:14:21 +0200
Subject: [PATCH] test536: do not fail with threaded DNS resolver
Also tweaked comments in certain examples using curl_multi_fdset().
---
CHANGES | 4 ++++
docs/examples/fopen.c | 8 +++++---
docs/examples/multi-app.c | 8 +++++---
docs/examples/multi-debugcallback.c | 8 +++++---
docs/examples/multi-double.c | 8 +++++---
docs/examples/multi-post.c | 8 +++++---
docs/examples/multi-single.c | 8 +++++---
tests/libtest/lib536.c | 16 ++++++++++++----
8 files changed, 46 insertions(+), 22 deletions(-)
diff --git a/CHANGES b/CHANGES
index 9ae615a..99f04a5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,10 @@
Changelog
+Kamil Dudka (24 Apr 2010)
+- Fixed test536 in order to not fail with threaded DNS resolver and tweaked
+ comments in certain examples using curl_multi_fdset().
+
Version 7.20.1 (14 April 2010)
Daniel Stenberg (9 Apr 2010)
diff --git a/docs/examples/fopen.c b/docs/examples/fopen.c
index e3814e6..35e24b1 100644
--- a/docs/examples/fopen.c
+++ b/docs/examples/fopen.c
@@ -131,7 +131,6 @@ fill_buffer(URL_FILE *file,int want,int waittime)
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
- int maxfd;
struct timeval timeout;
int rc;
@@ -144,6 +143,7 @@ fill_buffer(URL_FILE *file,int want,int waittime)
/* attempt to fill buffer */
do
{
+ int maxfd = -1;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
FD_ZERO(&fdexcep);
@@ -156,8 +156,10 @@ fill_buffer(URL_FILE *file,int want,int waittime)
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
/* In a real-world program you OF COURSE check the return code of the
- function calls, *and* you make sure that maxfd is bigger than -1
- so that the call to select() below makes sense! */
+ function calls. On success, the value of maxfd is guaranteed to be
+ greater or equal than -1. We call select(maxfd + 1, ...), specially
+ in case of (maxfd == -1), we call select(0, ...), which is basically
+ equal to sleep. */
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
diff --git a/docs/examples/multi-app.c b/docs/examples/multi-app.c
index a86dd0e..38b50cd 100644
--- a/docs/examples/multi-app.c
+++ b/docs/examples/multi-app.c
@@ -66,7 +66,7 @@ int main(int argc, char **argv)
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
- int maxfd;
+ int maxfd = -1;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
@@ -80,8 +80,10 @@ int main(int argc, char **argv)
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
/* In a real-world program you OF COURSE check the return code of the
- function calls, *and* you make sure that maxfd is bigger than -1 so
- that the call to select() below makes sense! */
+ function calls. On success, the value of maxfd is guaranteed to be
+ greater or equal than -1. We call select(maxfd + 1, ...), specially in
+ case of (maxfd == -1), we call select(0, ...), which is basically equal
+ to sleep. */
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c
index b10b47c..8e964c6 100644
--- a/docs/examples/multi-debugcallback.c
+++ b/docs/examples/multi-debugcallback.c
@@ -140,7 +140,7 @@ int main(int argc, char **argv)
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
- int maxfd;
+ int maxfd = -1;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
@@ -154,8 +154,10 @@ int main(int argc, char **argv)
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
/* In a real-world program you OF COURSE check the return code of the
- function calls, *and* you make sure that maxfd is bigger than -1
- so that the call to select() below makes sense! */
+ function calls. On success, the value of maxfd is guaranteed to be
+ greater or equal than -1. We call select(maxfd + 1, ...), specially in
+ case of (maxfd == -1), we call select(0, ...), which is basically equal
+ to sleep. */
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
diff --git a/docs/examples/multi-double.c b/docs/examples/multi-double.c
index ef3bf92..bc5b446 100644
--- a/docs/examples/multi-double.c
+++ b/docs/examples/multi-double.c
@@ -57,7 +57,7 @@ int main(int argc, char **argv)
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
- int maxfd;
+ int maxfd = -1;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
@@ -71,8 +71,10 @@ int main(int argc, char **argv)
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
/* In a real-world program you OF COURSE check the return code of the
- function calls, *and* you make sure that maxfd is bigger than -1 so
- that the call to select() below makes sense! */
+ function calls. On success, the value of maxfd is guaranteed to be
+ greater or equal than -1. We call select(maxfd + 1, ...), specially in
+ case of (maxfd == -1), we call select(0, ...), which is basically equal
+ to sleep. */
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
diff --git a/docs/examples/multi-post.c b/docs/examples/multi-post.c
index 229e843..0d3f78e 100644
--- a/docs/examples/multi-post.c
+++ b/docs/examples/multi-post.c
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
- int maxfd;
+ int maxfd = -1;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
@@ -91,8 +91,10 @@ int main(int argc, char *argv[])
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
/* In a real-world program you OF COURSE check the return code of the
- function calls, *and* you make sure that maxfd is bigger than -1
- so that the call to select() below makes sense! */
+ function calls. On success, the value of maxfd is guaranteed to be
+ greater or equal than -1. We call select(maxfd + 1, ...), specially in
+ case of (maxfd == -1), we call select(0, ...), which is basically equal
+ to sleep. */
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
diff --git a/docs/examples/multi-single.c b/docs/examples/multi-single.c
index 3e236f3..cba4f32 100644
--- a/docs/examples/multi-single.c
+++ b/docs/examples/multi-single.c
@@ -51,7 +51,7 @@ int main(int argc, char **argv)
fd_set fdread;
fd_set fdwrite;
fd_set fdexcep;
- int maxfd;
+ int maxfd = -1;
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
@@ -65,8 +65,10 @@ int main(int argc, char **argv)
curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
/* In a real-world program you OF COURSE check the return code of the
- function calls, *and* you make sure that maxfd is bigger than -1 so
- that the call to select() below makes sense! */
+ function calls. On success, the value of maxfd is guaranteed to be
+ greater or equal than -1. We call select(maxfd + 1, ...), specially in
+ case of (maxfd == -1), we call select(0, ...), which is basically equal
+ to sleep. */
rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
diff --git a/tests/libtest/lib536.c b/tests/libtest/lib536.c
index 04bc696..e0c19f6 100644
--- a/tests/libtest/lib536.c
+++ b/tests/libtest/lib536.c
@@ -21,7 +21,7 @@
static CURLMcode perform(CURLM * multi)
{
- int handles, maxfd;
+ int handles;
CURLMcode code;
fd_set fdread, fdwrite, fdexcep;
struct timeval mp_start;
@@ -31,6 +31,9 @@ static CURLMcode perform(CURLM * multi)
mp_start = tutil_tvnow();
for (;;) {
+ static struct timeval timeout = /* 100 ms */ { 0, 100000L };
+ int maxfd = -1;
+
code = curl_multi_perform(multi, &handles);
if (tutil_tvdiff(tutil_tvnow(), mp_start) >
MULTI_PERFORM_HANG_TIMEOUT) {
@@ -53,9 +56,14 @@ static CURLMcode perform(CURLM * multi)
FD_ZERO(&fdwrite);
FD_ZERO(&fdexcep);
curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);
- if (maxfd < 0)
- return (CURLMcode) ~CURLM_OK;
- if (select(maxfd + 1, &fdread, &fdwrite, &fdexcep, 0) == -1)
+
+ /* In a real-world program you OF COURSE check the return code of the
+ function calls. On success, the value of maxfd is guaranteed to be
+ greater or equal than -1. We call select(maxfd + 1, ...), specially in
+ case of (maxfd == -1), we call select(0, ...), which is basically equal
+ to sleep. */
+
+ if (select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout) == -1)
return (CURLMcode) ~CURLM_OK;
}

View File

@ -1,24 +0,0 @@
diff -up curl-7.20.1/tests/data/test513.delay curl-7.20.1/tests/data/test513
--- curl-7.20.1/tests/data/test513.delay 2010-04-22 10:00:08.326108258 +0100
+++ curl-7.20.1/tests/data/test513 2010-04-22 11:09:08.342100834 +0100
@@ -17,7 +17,7 @@ lib513
<name>
send HTTP POST using read callback that returns CURL_READFUNC_ABORT
</name>
- <command>
+ <command delay="1">
http://%HOSTIP:%HTTPPORT/513
</command>
</client>
diff -up curl-7.20.1/tests/data/test514.delay curl-7.20.1/tests/data/test514
--- curl-7.20.1/tests/data/test514.delay 2010-04-22 10:00:08.326108258 +0100
+++ curl-7.20.1/tests/data/test514 2010-04-22 11:09:40.192203636 +0100
@@ -29,7 +29,7 @@ lib514
<name>
First set options to POST and then to make HEAD
</name>
- <command>
+ <command delay="1">
http://%HOSTIP:%HTTPPORT/514
</command>
</client>

View File

@ -1,35 +0,0 @@
configure.ac | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/configure.ac b/configure.ac
index 39cc418..4892fda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2285,6 +2285,18 @@ AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
CURL_CHECK_LIB_ARES
AM_CONDITIONAL(USE_EMBEDDED_ARES, test x$embedded_ares = xyes)
+AC_CHECK_HEADER(pthread.h,
+ [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -pthread"
+ AC_CHECK_LIB(pthread, pthread_create,
+ [ AC_MSG_NOTICE([using POSIX threaded DNS lookup])
+ AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
+ USE_THREADS_POSIX=1
+ ],
+ [ CFLAGS="$save_CFLAGS"])
+ ])
+
dnl ************************************************************
dnl disable verbose text strings
dnl
@@ -2478,7 +2490,7 @@ fi
if test "x$HAVE_LIBZ" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
fi
-if test "x$USE_ARES" = "x1"; then
+if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1"; then
SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
fi
if test "x$IDN_ENABLED" = "x1"; then

7
curl-7.21.0.tar.lzma.asc Normal file
View File

@ -0,0 +1,7 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEABECAAYFAkwYupcACgkQeOEcayedXJFKYACfX1AQNaGZ6d4OGhozLjT2C7vR
rIwAnRxAbyuCg4K1FIBhcKhHjLpQs9Zm
=AHBg
-----END PGP SIGNATURE-----

View File

@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.20.1
Release: 6%{?dist}
Version: 7.21.0
Release: 1%{?dist}
License: MIT
Group: Applications/Internet
Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
@ -11,26 +11,6 @@ Source3: hide_selinux.c
# upstream commit e32fe30d0cf7c1f7045ac0bd29322e7fb4feb5c8
Patch0: curl-7.20.0-e32fe30.patch
# upstream commit d487ade72c5f31703ce097e8460e0225fad80348
Patch1: curl-7.20.1-d487ade.patch
# upstream commit 82e9b78a388ab539c8784cd853adf6e4a97d52c5
Patch2: curl-7.20.1-82e9b78.patch
# rhbz #581926
# upstream commit 2e8b21833a581cc5389833ec4fdeeaa6fb7be538
# upstream commit 3e759f4fb6018b353bd4a1d608be3a3d7b2c9645
# upstream commit 016ce4b1daa0f8d44a0da7105e1e1c97531e8b87
Patch3: curl-7.20.1-crl.patch
# rhbz #581926 - test-case
# http://curl.haxx.se/mail/lib-2010-04/0214.html
# (the CA pass phrase used in the patch is 'libcurl')
Patch4: curl-7.20.1-crl-test.patch
# upstream commit 47dda4a1d43c9341753388ab3babb0d27cf34840
Patch5: curl-7.20.1-47dda4a.patch
# patch making libcurl multilib ready
Patch101: curl-7.20.0-multilib.patch
@ -40,17 +20,9 @@ Patch102: curl-7.20.0-lrt.patch
# prevent configure script from discarding -g in CFLAGS (#496778)
Patch103: curl-7.19.4-debug.patch
# suppress occasional failure of curl test-suite on s390; caused more likely
# by the test-suite infrastructure than (lib)curl itself
# http://curl.haxx.se/mail/lib-2009-12/0031.html
Patch104: curl-7.20.1-test-delay.patch
# use localhost6 instead of ip6-localhost in the curl test-suite
Patch105: curl-7.19.7-localhost6.patch
# experimentally enabled threaded DNS lookup
Patch106: curl-7.20.1-threaded-dns.patch
# exclude test1112 from the test suite (#565305)
Patch107: curl-7.20.0-disable-test1112.patch
@ -122,22 +94,11 @@ done
# revert an upstream commit which breaks Fedora builds
%patch0 -p1 -R
# upstream patches (already applied)
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch5 -p1
# upstream patches (not yet applied)
%patch4 -p1
# Fedora patches
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
# exclude test1112 from the test suite (#565305)
%patch107 -p1
@ -153,6 +114,7 @@ sed -i s/899\\\([0-9]\\\)/%{?__isa_bits}9\\1/ tests/data/test*
--enable-ipv6 \
--enable-ldaps \
--enable-manual \
--enable-threaded-resolver \
--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt \
--with-gssapi \
--with-libidn \
@ -244,6 +206,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/aclocal/libcurl.m4
%changelog
* Wed Jun 16 2010 Kamil Dudka <kdudka@redhat.com> 7.21.0-1
- new upstream release, drop applied patches
* Tue May 25 2010 Kamil Dudka <kdudka@redhat.com> 7.20.1-6
- fix -J/--remote-header-name to strip CR-LF (upstream patch)

View File

@ -1 +1 @@
e259b58aab40dd4e7b72f52e96a498e4 curl-7.20.1.tar.lzma
de2820f567c29f895a2b36fcfa2c1178 curl-7.21.0.tar.lzma