Control: tags 913380 + patch
Control: tags 913380 + pending

Dear maintainer,

I've prepared an NMU for tarantool (versioned as 1.9.1.26.g63eb81e3c-1.1)
and uploaded it to DELAYED/14. Please feel free to tell me if I should 
cancel it.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

diff -Nru tarantool-1.9.1.26.g63eb81e3c/debian/changelog tarantool-1.9.1.26.g63eb81e3c/debian/changelog
--- tarantool-1.9.1.26.g63eb81e3c/debian/changelog	2018-06-08 23:03:14.000000000 +0300
+++ tarantool-1.9.1.26.g63eb81e3c/debian/changelog	2018-11-30 12:45:36.000000000 +0200
@@ -1,3 +1,10 @@
+tarantool (1.9.1.26.g63eb81e3c-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add upstream fix for FTBFS with curl >= 7.62. (Closes: #913380)
+
+ -- Adrian Bunk <b...@debian.org>  Fri, 30 Nov 2018 12:45:36 +0200
+
 tarantool (1.9.1.26.g63eb81e3c-1) unstable; urgency=medium
 
   * New upstream version.
diff -Nru tarantool-1.9.1.26.g63eb81e3c/debian/patches/0001-httpc-fix-compilation-with-libcurl-7.62.0.patch tarantool-1.9.1.26.g63eb81e3c/debian/patches/0001-httpc-fix-compilation-with-libcurl-7.62.0.patch
--- tarantool-1.9.1.26.g63eb81e3c/debian/patches/0001-httpc-fix-compilation-with-libcurl-7.62.0.patch	1970-01-01 02:00:00.000000000 +0200
+++ tarantool-1.9.1.26.g63eb81e3c/debian/patches/0001-httpc-fix-compilation-with-libcurl-7.62.0.patch	2018-11-30 12:43:40.000000000 +0200
@@ -0,0 +1,49 @@
+From 02da15f7109b8bb7921eb97a751607b9dd2885b2 Mon Sep 17 00:00:00 2001
+From: Vladimir Davydov <vdavydov....@gmail.com>
+Date: Thu, 1 Nov 2018 13:35:24 +0300
+Subject: [PATCH] httpc: fix compilation with libcurl >= 7.62.0
+
+Starting from libcurl 7.62.0, CURL_SSL_CACERT is defined as a macro
+alias to CURLE_PEER_FAILED_VERIFICATION, see
+
+  https://github.com/curl/curl/commit/3f3b26d6feb0667714902e836af608094235fca2
+
+This breaks compilation:
+
+  httpc.c:337:7: error: duplicate case value 'CURLE_PEER_FAILED_VERIFICATION'
+          case CURLE_PEER_FAILED_VERIFICATION:
+               ^
+  httpc.c:336:7: note: previous case defined here
+          case CURLE_SSL_CACERT:
+               ^
+  curl.h:589:26: note: expanded from macro 'CURLE_SSL_CACERT'
+  #define CURLE_SSL_CACERT CURLE_PEER_FAILED_VERIFICATION
+                           ^
+
+Fix this by using CURLE_SSL_CACERT only if libcurl version is less
+than 7.62.0.
+
+Note, we can't use CURL_AT_LEAST_VERSION to check libcurl version,
+because it isn't available in libcurl shipped with CentOS 6.
+---
+ src/httpc.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/httpc.c b/src/httpc.c
+index 4d48a313d..950f8b32f 100644
+--- a/src/httpc.c
++++ b/src/httpc.c
+@@ -333,7 +333,9 @@ httpc_execute(struct httpc_request *req, double timeout)
+ 			++env->stat.http_other_responses;
+ 		}
+ 		break;
+-	case CURLE_SSL_CACERT:
++#if LIBCURL_VERSION_NUM < 0x073e00
++	case CURLE_SSL_CACERT: /* deprecated in libcurl 7.62.0 */
++#endif
+ 	case CURLE_PEER_FAILED_VERIFICATION:
+ 		/* 495 SSL Certificate Error (nginx non-standard) */
+ 		req->status = 495;
+-- 
+2.11.0
+
diff -Nru tarantool-1.9.1.26.g63eb81e3c/debian/patches/series tarantool-1.9.1.26.g63eb81e3c/debian/patches/series
--- tarantool-1.9.1.26.g63eb81e3c/debian/patches/series	1970-01-01 02:00:00.000000000 +0200
+++ tarantool-1.9.1.26.g63eb81e3c/debian/patches/series	2018-11-30 12:44:26.000000000 +0200
@@ -0,0 +1 @@
+0001-httpc-fix-compilation-with-libcurl-7.62.0.patch

Reply via email to