summary refs log tree commit diff
path: root/pkgs/development/libraries/libcouchbase
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2019-10-05 13:49:52 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2019-10-05 14:19:12 +0200
commitfd41a333d806b9d4ac4a5f39775b650edc5756f6 (patch)
tree012706043a8cea8468762aae9dd25dd0dd2d8e0a /pkgs/development/libraries/libcouchbase
parentd72f4e2ae0a0c47d9b476a30ccbffa3b3b7788be (diff)
downloadnixpkgs-fd41a333d806b9d4ac4a5f39775b650edc5756f6.tar
nixpkgs-fd41a333d806b9d4ac4a5f39775b650edc5756f6.tar.gz
nixpkgs-fd41a333d806b9d4ac4a5f39775b650edc5756f6.tar.bz2
nixpkgs-fd41a333d806b9d4ac4a5f39775b650edc5756f6.tar.lz
nixpkgs-fd41a333d806b9d4ac4a5f39775b650edc5756f6.tar.xz
nixpkgs-fd41a333d806b9d4ac4a5f39775b650edc5756f6.tar.zst
nixpkgs-fd41a333d806b9d4ac4a5f39775b650edc5756f6.zip
libcouchbase: fix build
This applies an upstream fix from libcouchbase to fix a timeout issue
with openssl 1.1.

See also https://hydra.nixos.org/build/102495724

ZHF #68361
Diffstat (limited to 'pkgs/development/libraries/libcouchbase')
-rw-r--r--pkgs/development/libraries/libcouchbase/0001-Fix-timeouts-in-libcouchbase-testsuite.patch36
-rw-r--r--pkgs/development/libraries/libcouchbase/default.nix2
2 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libcouchbase/0001-Fix-timeouts-in-libcouchbase-testsuite.patch b/pkgs/development/libraries/libcouchbase/0001-Fix-timeouts-in-libcouchbase-testsuite.patch
new file mode 100644
index 00000000000..1c57757f855
--- /dev/null
+++ b/pkgs/development/libraries/libcouchbase/0001-Fix-timeouts-in-libcouchbase-testsuite.patch
@@ -0,0 +1,36 @@
+From 58237e64fa77ec5cdec658b3295f71ec899175fa Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Sat, 5 Oct 2019 13:47:59 +0200
+Subject: [PATCH] Fix timeouts in libcouchbase testsuite
+
+Nix-specific patch. Basically
+https://github.com/couchbase/libcouchbase/commit/b272f6ab88be523bbcf9d5c4252d07fccb023fe5, but
+rebased onto 2.10.4.
+---
+ src/ssl/ssl_e.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/ssl/ssl_e.c b/src/ssl/ssl_e.c
+index f4506cf..734a3e6 100644
+--- a/src/ssl/ssl_e.c
++++ b/src/ssl/ssl_e.c
+@@ -210,10 +210,16 @@ flush_ssl_data(lcbio_ESSL *es)
+      * calls. While we could have done this inline with the send() call this
+      * would make future optimization more difficult. */
+     GT_WRITE_DONE:
++#if !LCB_CAN_OPTIMIZE_SSL_BIO
++    BIO_get_mem_ptr(es->wbio, &wmb);
++#endif
+     while (wmb->length > (size_t)tmp_len) {
+         char dummy[4096];
+         unsigned to_read = MINIMUM(wmb->length-tmp_len, sizeof dummy);
+         BIO_read(es->wbio, dummy, to_read);
++#if !LCB_CAN_OPTIMIZE_SSL_BIO
++        BIO_get_mem_ptr(es->wbio, &wmb);
++#endif
+     }
+     BIO_clear_retry_flags(es->wbio);
+     return 0;
+-- 
+2.23.0
+
diff --git a/pkgs/development/libraries/libcouchbase/default.nix b/pkgs/development/libraries/libcouchbase/default.nix
index 23b39bca1f3..ccfe241324e 100644
--- a/pkgs/development/libraries/libcouchbase/default.nix
+++ b/pkgs/development/libraries/libcouchbase/default.nix
@@ -19,6 +19,8 @@ stdenv.mkDerivation rec {
   # Running tests in parallel does not work
   enableParallelChecking = false;
 
+  patches = [ ./0001-Fix-timeouts-in-libcouchbase-testsuite.patch ];
+
   doCheck = !stdenv.isDarwin;
 
   meta = with stdenv.lib; {