summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2011-09-25 20:57:48 +0200
committerRemi Collet <fedora@famillecollet.com>2011-09-25 20:57:48 +0200
commit8efcec45c604a0487edba04b468258ee0db7e8d4 (patch)
treeb6efb629434e787143d01464c4fc77c915bda6f8
parentd4cc7fc64844d8659f052e4e6f4eb0f107042b54 (diff)
curl: sync with f16
-rw-r--r--0002-curl-7.21.7-5eb2396.patch2
-rw-r--r--0005-curl-7.21.7-61ae7e9.patch4
-rw-r--r--0006-curl-7.21.7-3445fa2.patch146
-rw-r--r--0101-curl-7.21.1-multilib.patch50
-rw-r--r--curl.spec12
5 files changed, 189 insertions, 25 deletions
diff --git a/0002-curl-7.21.7-5eb2396.patch b/0002-curl-7.21.7-5eb2396.patch
index e104e3a..ded2da9 100644
--- a/0002-curl-7.21.7-5eb2396.patch
+++ b/0002-curl-7.21.7-5eb2396.patch
@@ -17,7 +17,7 @@ diff --git a/src/main.c b/src/main.c
index 6dcf333..eae45de 100644
--- a/src/main.c
+++ b/src/main.c
-@@ -4898,6 +4898,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
+@@ -4866,6 +4866,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
outs.stream = stdout;
outs.config = config;
outs.bytes = 0; /* nothing written yet */
diff --git a/0005-curl-7.21.7-61ae7e9.patch b/0005-curl-7.21.7-61ae7e9.patch
index 87a1365..46cfe47 100644
--- a/0005-curl-7.21.7-61ae7e9.patch
+++ b/0005-curl-7.21.7-61ae7e9.patch
@@ -19,7 +19,7 @@ diff --git a/src/main.c b/src/main.c
index 276718b..56cd133 100644
--- a/src/main.c
+++ b/src/main.c
-@@ -5415,8 +5415,6 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
+@@ -5371,8 +5371,6 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
my_setopt(curl, CURLOPT_QUOTE, config->quote);
my_setopt(curl, CURLOPT_POSTQUOTE, config->postquote);
my_setopt(curl, CURLOPT_PREQUOTE, config->prequote);
@@ -28,7 +28,7 @@ index 276718b..56cd133 100644
my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile);
/* cookie jar was added in 7.9 */
if(config->cookiejar)
-@@ -5621,6 +5619,12 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
+@@ -5577,6 +5575,12 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
my_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);
my_setopt(curl, CURLOPT_HEADERDATA, &outs);
}
diff --git a/0006-curl-7.21.7-3445fa2.patch b/0006-curl-7.21.7-3445fa2.patch
new file mode 100644
index 0000000..fe9cf74
--- /dev/null
+++ b/0006-curl-7.21.7-3445fa2.patch
@@ -0,0 +1,146 @@
+From 3445fa2e3f28b359a3acd2a884f4e119b11e0a57 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Fri, 26 Aug 2011 11:10:58 +0200
+Subject: [PATCH] tests: break busy loops in tests 502, 555, and 573
+
+---
+ tests/libtest/lib502.c | 23 +++++++++++++++++++++--
+ tests/libtest/lib555.c | 23 +++++++++++++++++++++--
+ tests/libtest/lib573.c | 23 +++++++++++++++++++++--
+ 3 files changed, 63 insertions(+), 6 deletions(-)
+
+diff --git a/tests/libtest/lib502.c b/tests/libtest/lib502.c
+index 9ade12a..9040b2b 100644
+--- a/tests/libtest/lib502.c
++++ b/tests/libtest/lib502.c
+@@ -73,6 +73,10 @@ int test(char *URL)
+ mp_start = tutil_tvnow();
+
+ while (running) {
++ static struct timeval timeout = /* 100 ms */ { 0, 100000L };
++ fd_set fdread, fdwrite, fdexcep;
++ int maxfd = -1;
++
+ res = (int)curl_multi_perform(m, &running);
+ if (tutil_tvdiff(tutil_tvnow(), mp_start) >
+ MULTI_PERFORM_HANG_TIMEOUT) {
+@@ -83,11 +87,26 @@ int test(char *URL)
+ fprintf(stderr, "nothing left running.\n");
+ break;
+ }
++
++ FD_ZERO(&fdread);
++ FD_ZERO(&fdwrite);
++ FD_ZERO(&fdexcep);
++ curl_multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
++
++ /* 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) {
++ res = ~CURLM_OK;
++ break;
++ }
+ }
+
+ if (mp_timedout) {
+- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
+- fprintf(stderr, "ABORTING TEST, since it seems "
++ fprintf(stderr, "mp_timedout\nABORTING TEST, since it seems "
+ "that it would have run forever.\n");
+ res = TEST_ERR_RUNS_FOREVER;
+ }
+diff --git a/tests/libtest/lib555.c b/tests/libtest/lib555.c
+index c675015..1e73a5a 100644
+--- a/tests/libtest/lib555.c
++++ b/tests/libtest/lib555.c
+@@ -135,6 +135,10 @@ int test(char *URL)
+ mp_start = tutil_tvnow();
+
+ while (running) {
++ static struct timeval timeout = /* 100 ms */ { 0, 100000L };
++ fd_set fdread, fdwrite, fdexcep;
++ int maxfd = -1;
++
+ res = (int)curl_multi_perform(m, &running);
+ if (tutil_tvdiff(tutil_tvnow(), mp_start) >
+ MULTI_PERFORM_HANG_TIMEOUT) {
+@@ -148,11 +152,26 @@ int test(char *URL)
+ fprintf(stderr, "nothing left running.\n");
+ break;
+ }
++
++ FD_ZERO(&fdread);
++ FD_ZERO(&fdwrite);
++ FD_ZERO(&fdexcep);
++ curl_multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
++
++ /* 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) {
++ res = ~CURLM_OK;
++ break;
++ }
+ }
+
+ if (mp_timedout) {
+- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
+- fprintf(stderr, "ABORTING TEST, since it seems "
++ fprintf(stderr, "mp_timedout\nABORTING TEST, since it seems "
+ "that it would have run forever.\n");
+ res = TEST_ERR_RUNS_FOREVER;
+ }
+diff --git a/tests/libtest/lib573.c b/tests/libtest/lib573.c
+index 4661858..b5fafe1 100644
+--- a/tests/libtest/lib573.c
++++ b/tests/libtest/lib573.c
+@@ -76,6 +76,10 @@ int test(char *URL)
+ mp_start = tutil_tvnow();
+
+ while (running) {
++ static struct timeval timeout = /* 100 ms */ { 0, 100000L };
++ fd_set fdread, fdwrite, fdexcep;
++ int maxfd = -1;
++
+ res = (int)curl_multi_perform(m, &running);
+ if (tutil_tvdiff(tutil_tvnow(), mp_start) >
+ MULTI_PERFORM_HANG_TIMEOUT) {
+@@ -86,11 +90,26 @@ int test(char *URL)
+ fprintf(stderr, "nothing left running.\n");
+ break;
+ }
++
++ FD_ZERO(&fdread);
++ FD_ZERO(&fdwrite);
++ FD_ZERO(&fdexcep);
++ curl_multi_fdset(m, &fdread, &fdwrite, &fdexcep, &maxfd);
++
++ /* 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) {
++ res = ~CURLM_OK;
++ break;
++ }
+ }
+
+ if (mp_timedout) {
+- if (mp_timedout) fprintf(stderr, "mp_timedout\n");
+- fprintf(stderr, "ABORTING TEST, since it seems "
++ fprintf(stderr, "mp_timedout\nABORTING TEST, since it seems "
+ "that it would have run forever.\n");
+ res = TEST_ERR_RUNS_FOREVER;
+ }
+--
+1.7.4.4
+
diff --git a/0101-curl-7.21.1-multilib.patch b/0101-curl-7.21.1-multilib.patch
index 83c1cd8..cbb5bab 100644
--- a/0101-curl-7.21.1-multilib.patch
+++ b/0101-curl-7.21.1-multilib.patch
@@ -1,20 +1,13 @@
- curl-config.in | 22 ++++------------------
- libcurl.pc.in | 1 +
- 2 files changed, 5 insertions(+), 18 deletions(-)
+ curl-config.in | 16 +++-------------
+ docs/curl-config.1 | 4 +++-
+ libcurl.pc.in | 1 +
+ 3 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/curl-config.in b/curl-config.in
-index ebda129..b404827 100644
+index 150004d..95d0759 100644
--- a/curl-config.in
+++ b/curl-config.in
-@@ -43,7 +43,6 @@ Available values for OPTION include:
- --libs library linking information
- --prefix curl install prefix
- --protocols newline separated list of enabled protocols
-- --static-libs static libcurl library linking information
- --version output version information
- --vernum output the version information as a number (hexadecimal)
- EOF
-@@ -74,7 +73,7 @@ while test $# -gt 0; do
+@@ -74,7 +74,7 @@ while test $# -gt 0; do
;;
--cc)
@@ -23,7 +16,7 @@ index ebda129..b404827 100644
;;
--prefix)
-@@ -136,25 +135,12 @@ while test $# -gt 0; do
+@@ -136,24 +136,14 @@ while test $# -gt 0; do
;;
--libs)
@@ -37,21 +30,36 @@ index ebda129..b404827 100644
- else
- echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
- fi
-- ;;
--
-- --static-libs)
-- echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
+ pkg-config libcurl --libs
;;
+ --static-libs)
+- echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
+ ;;
+
--configure)
- echo @CONFIGURE_OPTIONS@
-- ;;
+ pkg-config libcurl --variable=configure_options | sed 's/^"//;s/"$//'
-+ ;;
+ ;;
*)
- echo "unknown option: $1"
+diff --git a/docs/curl-config.1 b/docs/curl-config.1
+index c4f4e2b..3e0ea60 100644
+--- a/docs/curl-config.1
++++ b/docs/curl-config.1
+@@ -65,7 +65,9 @@ be listed using uppercase and are separated by newlines. There may be none,
+ one, or several protocols in the list. (Added in 7.13.0)
+ .IP "--static-libs"
+ Shows the complete set of libs and other linker options you will need in order
+-to link your application with libcurl statically. (Added in 7.17.1)
++to link your application with libcurl statically. Note that Fedora/RHEL libcurl
++packages do not provide any static libraries, thus cannot be linked statically.
++(Added in 7.17.1)
+ .IP "--version"
+ Outputs version information about the installed libcurl.
+ .IP "--vernum"
+diff --git a/libcurl.pc.in b/libcurl.pc.in
+index 2ba9c39..f8f8b00 100644
--- a/libcurl.pc.in
+++ b/libcurl.pc.in
@@ -29,6 +29,7 @@ libdir=@libdir@
diff --git a/curl.spec b/curl.spec
index 19c2741..6acf439 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,7 +1,7 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.21.7
-Release: 4%{?dist}.1
+Release: 5%{?dist}
License: MIT
Group: Applications/Internet
Source: http://curl.haxx.se/download/%{name}-%{version}.tar.bz2
@@ -21,6 +21,9 @@ Patch3: 0003-curl-7.21.7-5538904.patch
# initialize NSS with no database if the selected database is broken (#728562)
Patch4: 0004-curl-7.21.7-d6f319f.patch
+# break busy loops in tests 502, 555, and 573
+Patch6: 0006-curl-7.21.7-3445fa2.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.21.1-multilib.patch
@@ -254,6 +257,13 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/aclocal/libcurl.m4
%changelog
+* Sun Sep 25 2011 Remi Collet <RPMS@FamilleCollet.com> - 7.21.7-5
+- sync with fedora 16
+
+* Mon Sep 19 2011 Kamil Dudka <kdudka@redhat.com> 7.21.7-5
+- curl-config now provides dummy --static-libs option (#733956)
+- break busy loops in tests 502, 555, and 573
+
* Tue Sep 13 2011 Remi Collet <RPMS@FamilleCollet.com> - 7.21.7-4.1
- raise openldap dependency