[curl/f13/master] cumulative update for the f13 branch
Kamil Dudka
kdudka at fedoraproject.org
Mon Aug 23 14:29:10 UTC 2010
commit 1242dbd7e8381a6a3583f3595c85d349f7411554
Author: Kamil Dudka <kdudka at redhat.com>
Date: Mon Aug 23 16:28:43 2010 +0200
cumulative update for the f13 branch
- modify system headers to work around a gcc bug (#617757)
- curl -T now ignores file size of special files (#622520)
- fix kerberos proxy authentication for https (#625676)
- fix curl -J to chop filename at next semicolon
(upstream commit d76874a)
0007-curl-7.20.1-a6e088e.patch | 183 ++++++++++++++++++++++++++++++++++++++++
0008-curl-7.20.1-5907777.patch | 36 ++++++++
0009-curl-7.20.1-13b8fc4.patch | 67 +++++++++++++++
0010-curl-7.20.1-d76874a.patch | 63 ++++++++++++++
curl.spec | 24 +++++-
5 files changed, 372 insertions(+), 1 deletions(-)
---
diff --git a/0007-curl-7.20.1-a6e088e.patch b/0007-curl-7.20.1-a6e088e.patch
new file mode 100644
index 0000000..54ec5b1
--- /dev/null
+++ b/0007-curl-7.20.1-a6e088e.patch
@@ -0,0 +1,183 @@
+ CHANGES | 5 ++
+ include/curl/typecheck-gcc.h | 135 ++++++++++++++++++++++++-----------------
+ 2 files changed, 84 insertions(+), 56 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index ccb5e57..fad0bc4 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -6,6 +6,11 @@
+
+ Changelog
+
++Kamil Dudka (12 Aug 2010)
++- typecheck-gcc: work around gcc upstream bug #32061
++
++ original bug report at https://bugzilla.redhat.com/617757
++
+ Kamil Dudka (30 Jun 2010)
+ - http_ntlm: add support for NSS
+
+diff --git a/include/curl/typecheck-gcc.h b/include/curl/typecheck-gcc.h
+index c4fad51..9af90dd 100644
+--- a/include/curl/typecheck-gcc.h
++++ b/include/curl/typecheck-gcc.h
+@@ -25,11 +25,16 @@
+ /* wraps curl_easy_setopt() with typechecking */
+
+ /* To add a new kind of warning, add an
+- * if(_curl_is_sometype_option(_curl_opt) && ! _curl_is_sometype(value))
+- * _curl_easy_setopt_err_sometype();
++ * if(_curl_is_sometype_option(_curl_opt))
++ * if(!_curl_is_sometype(value))
++ * _curl_easy_setopt_err_sometype();
+ * block and define _curl_is_sometype_option, _curl_is_sometype and
+ * _curl_easy_setopt_err_sometype below
+ *
++ * NOTE: We use two nested 'if' statements here instead of the && operator, in
++ * order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x
++ * when compiling with -Wlogical-op.
++ *
+ * To add an option that uses the same type as an existing option, you'll just
+ * need to extend the appropriate _curl_*_option macro
+ */
+@@ -37,51 +42,66 @@
+ __extension__ ({ \
+ __typeof__ (option) _curl_opt = option; \
+ if (__builtin_constant_p(_curl_opt)) { \
+- if (_curl_is_long_option(_curl_opt) && !_curl_is_long(value)) \
+- _curl_easy_setopt_err_long(); \
+- if (_curl_is_off_t_option(_curl_opt) && !_curl_is_off_t(value)) \
+- _curl_easy_setopt_err_curl_off_t(); \
+- if (_curl_is_string_option(_curl_opt) && !_curl_is_string(value)) \
+- _curl_easy_setopt_err_string(); \
+- if (_curl_is_write_cb_option(_curl_opt) && !_curl_is_write_cb(value)) \
+- _curl_easy_setopt_err_write_callback(); \
+- if ((_curl_opt) == CURLOPT_READFUNCTION && !_curl_is_read_cb(value)) \
+- _curl_easy_setopt_err_read_cb(); \
+- if ((_curl_opt) == CURLOPT_IOCTLFUNCTION && !_curl_is_ioctl_cb(value)) \
+- _curl_easy_setopt_err_ioctl_cb(); \
+- if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION && !_curl_is_sockopt_cb(value))\
+- _curl_easy_setopt_err_sockopt_cb(); \
+- if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION && \
+- !_curl_is_opensocket_cb(value)) \
+- _curl_easy_setopt_err_opensocket_cb(); \
+- if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION && \
+- !_curl_is_progress_cb(value)) \
+- _curl_easy_setopt_err_progress_cb(); \
+- if ((_curl_opt) == CURLOPT_DEBUGFUNCTION && !_curl_is_debug_cb(value)) \
+- _curl_easy_setopt_err_debug_cb(); \
+- if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION && \
+- !_curl_is_ssl_ctx_cb(value)) \
+- _curl_easy_setopt_err_ssl_ctx_cb(); \
+- if (_curl_is_conv_cb_option(_curl_opt) && !_curl_is_conv_cb(value)) \
+- _curl_easy_setopt_err_conv_cb(); \
+- if ((_curl_opt) == CURLOPT_SEEKFUNCTION && !_curl_is_seek_cb(value)) \
+- _curl_easy_setopt_err_seek_cb(); \
+- if (_curl_is_cb_data_option(_curl_opt) && !_curl_is_cb_data(value)) \
+- _curl_easy_setopt_err_cb_data(); \
+- if ((_curl_opt) == CURLOPT_ERRORBUFFER && !_curl_is_error_buffer(value)) \
+- _curl_easy_setopt_err_error_buffer(); \
+- if ((_curl_opt) == CURLOPT_STDERR && !_curl_is_FILE(value)) \
+- _curl_easy_setopt_err_FILE(); \
+- if (_curl_is_postfields_option(_curl_opt) && !_curl_is_postfields(value)) \
+- _curl_easy_setopt_err_postfields(); \
+- if ((_curl_opt) == CURLOPT_HTTPPOST && \
+- !_curl_is_arr((value), struct curl_httppost)) \
+- _curl_easy_setopt_err_curl_httpost(); \
+- if (_curl_is_slist_option(_curl_opt) && \
+- !_curl_is_arr((value), struct curl_slist)) \
+- _curl_easy_setopt_err_curl_slist(); \
+- if ((_curl_opt) == CURLOPT_SHARE && !_curl_is_ptr((value), CURLSH)) \
+- _curl_easy_setopt_err_CURLSH(); \
++ if (_curl_is_long_option(_curl_opt)) \
++ if (!_curl_is_long(value)) \
++ _curl_easy_setopt_err_long(); \
++ if (_curl_is_off_t_option(_curl_opt)) \
++ if (!_curl_is_off_t(value)) \
++ _curl_easy_setopt_err_curl_off_t(); \
++ if (_curl_is_string_option(_curl_opt)) \
++ if (!_curl_is_string(value)) \
++ _curl_easy_setopt_err_string(); \
++ if (_curl_is_write_cb_option(_curl_opt)) \
++ if (!_curl_is_write_cb(value)) \
++ _curl_easy_setopt_err_write_callback(); \
++ if ((_curl_opt) == CURLOPT_READFUNCTION) \
++ if (!_curl_is_read_cb(value)) \
++ _curl_easy_setopt_err_read_cb(); \
++ if ((_curl_opt) == CURLOPT_IOCTLFUNCTION) \
++ if (!_curl_is_ioctl_cb(value)) \
++ _curl_easy_setopt_err_ioctl_cb(); \
++ if ((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \
++ if (!_curl_is_sockopt_cb(value)) \
++ _curl_easy_setopt_err_sockopt_cb(); \
++ if ((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \
++ if (!_curl_is_opensocket_cb(value)) \
++ _curl_easy_setopt_err_opensocket_cb(); \
++ if ((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \
++ if (!_curl_is_progress_cb(value)) \
++ _curl_easy_setopt_err_progress_cb(); \
++ if ((_curl_opt) == CURLOPT_DEBUGFUNCTION) \
++ if (!_curl_is_debug_cb(value)) \
++ _curl_easy_setopt_err_debug_cb(); \
++ if ((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \
++ if (!_curl_is_ssl_ctx_cb(value)) \
++ _curl_easy_setopt_err_ssl_ctx_cb(); \
++ if (_curl_is_conv_cb_option(_curl_opt)) \
++ if (!_curl_is_conv_cb(value)) \
++ _curl_easy_setopt_err_conv_cb(); \
++ if ((_curl_opt) == CURLOPT_SEEKFUNCTION) \
++ if (!_curl_is_seek_cb(value)) \
++ _curl_easy_setopt_err_seek_cb(); \
++ if (_curl_is_cb_data_option(_curl_opt)) \
++ if (!_curl_is_cb_data(value)) \
++ _curl_easy_setopt_err_cb_data(); \
++ if ((_curl_opt) == CURLOPT_ERRORBUFFER) \
++ if (!_curl_is_error_buffer(value)) \
++ _curl_easy_setopt_err_error_buffer(); \
++ if ((_curl_opt) == CURLOPT_STDERR) \
++ if (!_curl_is_FILE(value)) \
++ _curl_easy_setopt_err_FILE(); \
++ if (_curl_is_postfields_option(_curl_opt)) \
++ if (!_curl_is_postfields(value)) \
++ _curl_easy_setopt_err_postfields(); \
++ if ((_curl_opt) == CURLOPT_HTTPPOST) \
++ if (!_curl_is_arr((value), struct curl_httppost)) \
++ _curl_easy_setopt_err_curl_httpost(); \
++ if (_curl_is_slist_option(_curl_opt)) \
++ if (!_curl_is_arr((value), struct curl_slist)) \
++ _curl_easy_setopt_err_curl_slist(); \
++ if ((_curl_opt) == CURLOPT_SHARE) \
++ if (!_curl_is_ptr((value), CURLSH)) \
++ _curl_easy_setopt_err_CURLSH(); \
+ } \
+ curl_easy_setopt(handle, _curl_opt, value); \
+ })
+@@ -92,15 +112,18 @@ __extension__ ({ \
+ __extension__ ({ \
+ __typeof__ (info) _curl_info = info; \
+ if (__builtin_constant_p(_curl_info)) { \
+- if (_curl_is_string_info(_curl_info) && !_curl_is_arr((arg), char *)) \
+- _curl_easy_getinfo_err_string(); \
+- if (_curl_is_long_info(_curl_info) && !_curl_is_arr((arg), long)) \
+- _curl_easy_getinfo_err_long(); \
+- if (_curl_is_double_info(_curl_info) && !_curl_is_arr((arg), double)) \
+- _curl_easy_getinfo_err_double(); \
+- if (_curl_is_slist_info(_curl_info) && \
+- !_curl_is_arr((arg), struct curl_slist *)) \
+- _curl_easy_getinfo_err_curl_slist(); \
++ if (_curl_is_string_info(_curl_info)) \
++ if (!_curl_is_arr((arg), char *)) \
++ _curl_easy_getinfo_err_string(); \
++ if (_curl_is_long_info(_curl_info)) \
++ if (!_curl_is_arr((arg), long)) \
++ _curl_easy_getinfo_err_long(); \
++ if (_curl_is_double_info(_curl_info)) \
++ if (!_curl_is_arr((arg), double)) \
++ _curl_easy_getinfo_err_double(); \
++ if (_curl_is_slist_info(_curl_info)) \
++ if (!_curl_is_arr((arg), struct curl_slist *)) \
++ _curl_easy_getinfo_err_curl_slist(); \
+ } \
+ curl_easy_getinfo(handle, _curl_info, arg); \
+ })
diff --git a/0008-curl-7.20.1-5907777.patch b/0008-curl-7.20.1-5907777.patch
new file mode 100644
index 0000000..692e5a9
--- /dev/null
+++ b/0008-curl-7.20.1-5907777.patch
@@ -0,0 +1,36 @@
+ CHANGES | 5 +++++
+ src/main.c | 5 ++++-
+ 2 files changed, 9 insertions(+), 1 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index fad0bc4..ac2f939 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -6,6 +6,11 @@
+
+ Changelog
+
++Kamil Dudka (15 Aug 2010)
++- curl -T: ignore file size of special files
++
++ original bug report at https://bugzilla.redhat.com/622520
++
+ Kamil Dudka (12 Aug 2010)
+ - typecheck-gcc: work around gcc upstream bug #32061
+
+diff --git a/src/main.c b/src/main.c
+index d532846..7106bac 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -4757,7 +4757,10 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
+ goto quit_urls;
+ }
+ infdopen=TRUE;
+- uploadfilesize=fileinfo.st_size;
++
++ /* we ignore file size for char/block devices, sockets, etc. */
++ if(S_IFREG == (fileinfo.st_mode & S_IFMT))
++ uploadfilesize=fileinfo.st_size;
+
+ }
+ else if(uploadfile && stdin_upload(uploadfile)) {
diff --git a/0009-curl-7.20.1-13b8fc4.patch b/0009-curl-7.20.1-13b8fc4.patch
new file mode 100644
index 0000000..69b82a2
--- /dev/null
+++ b/0009-curl-7.20.1-13b8fc4.patch
@@ -0,0 +1,67 @@
+ CHANGES | 10 ++++++++++
+ lib/http_negotiate.c | 15 ++++++++++-----
+ 2 files changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index ac2f939..e28f187 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -6,6 +6,16 @@
+
+ Changelog
+
++Daniel Stenberg (16 Aug 2010)
++- negotiation: Wrong proxy authorization
++
++ There's an error in http_negotiation.c where a mistake is using only
++ userpwd even for proxy requests. Ludek provided a patch, but I decided
++ to write the fix slightly different using his patch as inspiration.
++
++ Reported by: Ludek Finstrle
++ Bug: http://curl.haxx.se/bug/view.cgi?id=3046066
++
+ Kamil Dudka (15 Aug 2010)
+ - curl -T: ignore file size of special files
+
+diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
+index 956f734..3577705 100644
+--- a/lib/http_negotiate.c
++++ b/lib/http_negotiate.c
+@@ -5,7 +5,7 @@
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+- * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel at haxx.se>, et al.
++ * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel at haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+@@ -277,6 +277,7 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
+ &conn->data->state.negotiate;
+ char *encoded = NULL;
+ size_t len;
++ char *userp;
+
+ #ifdef HAVE_SPNEGO /* Handle SPNEGO */
+ if(checkprefix("Negotiate", neg_ctx->protocol)) {
+@@ -324,12 +325,16 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
+ if(len == 0)
+ return CURLE_OUT_OF_MEMORY;
+
+- conn->allocptr.userpwd =
+- aprintf("%sAuthorization: %s %s\r\n", proxy ? "Proxy-" : "",
+- neg_ctx->protocol, encoded);
++ userp = aprintf("%sAuthorization: %s %s\r\n", proxy ? "Proxy-" : "",
++ neg_ctx->protocol, encoded);
++
++ if(proxy)
++ conn->allocptr.proxyuserpwd = userp;
++ else
++ conn->allocptr.userpwd = userp;
+ free(encoded);
+ Curl_cleanup_negotiate (conn->data);
+- return (conn->allocptr.userpwd == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK;
++ return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK;
+ }
+
+ static void cleanup(struct negotiatedata *neg_ctx)
diff --git a/0010-curl-7.20.1-d76874a.patch b/0010-curl-7.20.1-d76874a.patch
new file mode 100644
index 0000000..1384c1b
--- /dev/null
+++ b/0010-curl-7.20.1-d76874a.patch
@@ -0,0 +1,63 @@
+ CHANGES | 13 +++++++++++++
+ src/main.c | 10 +++++++++-
+ 2 files changed, 22 insertions(+), 1 deletions(-)
+
+diff --git a/CHANGES b/CHANGES
+index e28f187..9119423 100644
+--- a/CHANGES
++++ b/CHANGES
+@@ -26,6 +26,19 @@ Kamil Dudka (12 Aug 2010)
+
+ original bug report at https://bugzilla.redhat.com/617757
+
++Daniel Stenberg (21 Jul 2010)
++- [Jeff Pohlmeyer brought this change]
++
++ remote-header-name: chop filename at next semicolon
++
++ The --remote-header-name option for the command-line tool assumes that
++ everything beyond the filename= field is part of the filename, but that
++ might not always be the case, for example:
++
++ Content-Disposition: attachment; filename=file.txt; modification-date=...
++
++ This fix chops the filename off at the next semicolon, if there is one.
++
+ Kamil Dudka (30 Jun 2010)
+ - http_ntlm: add support for NSS
+
+diff --git a/src/main.c b/src/main.c
+index 7106bac..73be757 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -4234,6 +4234,7 @@ header_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+ const char* str = (char*)ptr;
+ const size_t cb = size*nmemb;
+ const char* end = (char*)ptr + cb;
++ size_t len;
+
+ if (cb > 20 && curlx_strnequal(str, "Content-disposition:", 20)) {
+ char *p = (char*)str + 20;
+@@ -4242,6 +4243,7 @@ header_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+ (encoded filenames (*=) are not supported) */
+ for(;;) {
+ char *filename;
++ char *semi;
+
+ while (*p && (p < end) && !ISALPHA(*p))
+ p++;
+@@ -4255,7 +4257,13 @@ header_callback(void *ptr, size_t size, size_t nmemb, void *stream)
+ continue;
+ }
+ p+=9;
+- filename = parse_filename(p, cb - (p - str));
++ semi = strchr(p, ';');
++
++ /* this expression below typecasts 'cb' only to avoid
++ warning: signed and unsigned type in conditional expression
++ */
++ len = semi ? (semi - p) : (ssize_t)cb - (p - str);
++ filename = parse_filename(p, len);
+ if (filename) {
+ outs->filename = filename;
+ break;
diff --git a/curl.spec b/curl.spec
index 791bcce..3351ab9 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.20.1
-Release: 3%{?dist}
+Release: 4%{?dist}
License: MIT
Group: Applications/Internet
Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
@@ -33,6 +33,18 @@ Patch5: 0005-curl-7.20.1-47dda4a.patch
# patch adding support for NTLM authentication (#603783)
Patch6: 0006-curl-7.21.0-f3b77e5.patch
+# modify system headers to work around a gcc bug (#617757)
+Patch7: 0007-curl-7.20.1-a6e088e.patch
+
+# curl -T now ignores file size of special files (#622520)
+Patch8: 0008-curl-7.20.1-5907777.patch
+
+# fix kerberos proxy authentication for https (#625676)
+Patch9: 0009-curl-7.20.1-13b8fc4.patch
+
+# remote-header-name: chop filename at next semicolon
+Patch10: 0010-curl-7.20.1-d76874a.patch
+
# patch making libcurl multilib ready
Patch101: 0101-curl-7.20.0-multilib.patch
@@ -139,6 +151,10 @@ done
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
# Fedora patches
%patch101 -p1
@@ -243,6 +259,12 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/aclocal/libcurl.m4
%changelog
+* Mon Aug 23 2010 Kamil Dudka <kdudka at redhat.com> 7.20.1-4
+- modify system headers to work around a gcc bug (#617757)
+- curl -T now ignores file size of special files (#622520)
+- fix kerberos proxy authentication for https (#625676)
+- fix curl -J to chop filename at next semicolon (upstream commit d76874a)
+
* Wed Jun 30 2010 Kamil Dudka <kdudka at redhat.com> 7.20.1-3
- add support for NTLM authentication (#603783)
More information about the scm-commits
mailing list