20419429 Upgrade curl to version 7.40.0 (add missing files) s11u2-sru
authorYiteng Zhang <yiteng.zhang@oracle.com>
Thu, 20 Aug 2015 02:21:19 -0700
branchs11u2-sru
changeset 4800 5aa28a7db635
parent 4799 f6da2b76c51b
child 4803 078fb37a71ea
20419429 Upgrade curl to version 7.40.0 (add missing files)
components/curl/patches/009-runtests.pl.patch
components/curl/patches/010-fix-tests.patch
components/curl/patches/013-curl_sasl_gssapi.c.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/curl/patches/009-runtests.pl.patch	Thu Aug 20 02:21:19 2015 -0700
@@ -0,0 +1,24 @@
+The various curl NTLM tests try to LD_PRELOAD a test library
+called .../tests/libtest/.libs/libhostname.so that's been
+created as a pre-requisite to running the numerous Perl tests.
+
+This patch adjusts LD_PRELOAD to be LD_PRELOAD_32 or LD_PRELOAD_64
+depending upong whether we are running the 32 or 64 bit tests.
+
+As this is Solaris specific, this patch will not be pushed upstream.
+
+--- tests/runtests.pl.orig	2014-09-10 12:26:52.624143266 -0700
++++ tests/runtests.pl	2014-09-10 16:51:13.663390869 -0700
+@@ -3060,6 +3060,12 @@
+                             # print "Skipping LD_PRELOAD due to no release shared build\n";
+                             next;
+                         }
++                        # make this LD_PRELOAD_{bits}
++                        open(FP, "/bin/file $content |");
++                        my $bits = <FP>;
++                        if ($bits =~ /^.+ELF\s(\d\d)-bit.+$/) {
++                            $var .= '_'.$1;
++                        }
+                     }
+                     $ENV{$var} = "$content";
+                 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/curl/patches/010-fix-tests.patch	Thu Aug 20 02:21:19 2015 -0700
@@ -0,0 +1,72 @@
+Adjust the Python http_pipe.py script to work with our default version of
+Python.
+
+This change will be sent back up stream for consideration.
+
+--- tests/http_pipe.py.orig	2014-09-10 15:59:26.498743943 -0700
++++ tests/http_pipe.py	2014-09-10 15:58:59.502589711 -0700
+@@ -435,7 +435,7 @@
+ if args.pidfile:
+     pid = os.getpid()
+     f = open(args.pidfile, 'w')
+-    f.write('{}'.format(pid))
++    f.write('{0}'.format(pid))
+     f.close()
+ 
+ server = PipelineServer(('0.0.0.0', args.port), PipelineRequestHandler)
+
+
+# ----------------------------------------------------------------------------
+Tests #530 and #584 fail with curl version 7.40.0. This is discussed at:
+
+  http://curl.haxx.se/mail/lib-2014-08/0161.html
+
+with the patch at:
+
+http://curl.haxx.se/mail/lib-2014-06/att-0139/0001-Delay-Curl_addHandleToPipeline-by-a-milisecond.patch
+
+addressing the problem.
+
+Upstream is already aware of this issue.
+
+--- lib/url.c.orig	2015-01-26 13:49:21.041657976 -0800
++++ lib//url.c	2015-01-26 13:50:45.391515086 -0800
+@@ -2748,6 +2748,7 @@
+ {
+   if(!Curl_llist_insert_next(pipeline, pipeline->tail, data))
+     return CURLE_OUT_OF_MEMORY;
++  Curl_wait_ms(1);
+   return CURLE_OK;
+ }
+
+# ---------------------------------------------------------------------------
+Tests #46 fail with curl version <= 7.43.0. This is discussed and fixed at:
+
+  https://github.com/bagder/curl/commit/002d58f1e8d8e725ba6d676599838983561feff9?diff=unified
+
+Upstream has already fixed this issue in curl version 7.44.0.
+
+--- tests/data/test46.orig	Wed Aug 12 12:50:02 2015 -0700
++++ tests/data/test46	Wed Aug 12 12:51:57 2015 -0700
+@@ -51,8 +51,8 @@
+ 
+ www.fake.come	FALSE	/	FALSE	1022144953	cookiecliente	si
+ www.loser.com	FALSE	/	FALSE	1139150993	UID	99
+-%HOSTIP	FALSE	/	FALSE	1439150993	mooo	indeed
+-#HttpOnly_%HOSTIP	FALSE	/want	FALSE	1439150993	mooo2	indeed2
++%HOSTIP	FALSE	/	FALSE	1739150993	mooo	indeed
++#HttpOnly_%HOSTIP	FALSE	/want	FALSE	1739150993	mooo2	indeed2
+ %HOSTIP	FALSE	/want	FALSE	0	empty	
+ </file>
+ </client>
+@@ -76,8 +76,8 @@
+ 
+ www.fake.come	FALSE	/	FALSE	1022144953	cookiecliente	si
+ www.loser.com	FALSE	/	FALSE	1139150993	UID	99
+-%HOSTIP	FALSE	/	FALSE	1439150993	mooo	indeed
+-#HttpOnly_%HOSTIP	FALSE	/want	FALSE	1439150993	mooo2	indeed2
++%HOSTIP	FALSE	/	FALSE	1739150993	mooo	indeed
++#HttpOnly_%HOSTIP	FALSE	/want	FALSE	1739150993	mooo2	indeed2
+ %HOSTIP	FALSE	/want	FALSE	0	empty	
+ %HOSTIP	FALSE	/	FALSE	2054030187	ckyPersistent	permanent
+ %HOSTIP	FALSE	/	FALSE	0	ckySession	temporary
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/curl/patches/013-curl_sasl_gssapi.c.patch	Thu Aug 20 02:21:19 2015 -0700
@@ -0,0 +1,20 @@
+From: https://www.mail-archive.com/[email protected]/msg21757.html
+Quanah Gibson-Mount Thu, 15 Jan 2015 12:27:13 -0800
+Unfortunately, it appears that curl is still not tested against Heimdal
+Kerberos.
+
+This problem has been reported upstream.
+
+--- lib/curl_sasl_gssapi.c.orig	2015-01-26 08:22:32.369117065 -0800
++++ lib/curl_sasl_gssapi.c	2015-01-26 08:36:35.452740440 -0800
+@@ -31,6 +31,10 @@
+ #define NCOMPAT 1
+ #endif
+ 
++#ifdef HAVE_GSSHEIMDAL
++#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
++#endif
++
+ #define GSSAUTH_P_NONE      1
+ #define GSSAUTH_P_INTEGRITY 2
+ #define GSSAUTH_P_PRIVACY   4