From 491bb10868e86bb9aca1ac0621d4dc7117203eea Mon Sep 17 00:00:00 2001 From: Johannes Pfau Date: Thu, 30 Mar 2017 09:02:42 +0200 Subject: [PATCH] Workaround linker bug in libnoise-c --- .travis.yml | 2 +- noise-c.patch | 23 +++++++++++++++++++++++ travis-ci.sh | 5 +++-- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 noise-c.patch diff --git a/.travis.yml b/.travis.yml index 9914a8d..269d50f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ d: before_install: - sudo apt-get -qq update - - sudo apt-get install make build-essential pkg-config libtool autoconf automake gettext libevent-dev -y + - sudo apt-get install make build-essential pkg-config libtool autoconf automake gettext libevent-dev libssl-dev -y install: - wget -O doveralls "https://github.com/ColdenCullen/doveralls/releases/download/v1.3.1/doveralls_linux_travis" diff --git a/noise-c.patch b/noise-c.patch new file mode 100644 index 0000000..bed180d --- /dev/null +++ b/noise-c.patch @@ -0,0 +1,23 @@ +diff --git a/src/protocol/internal.c b/src/protocol/internal.c +index 28e97e6..58e33d6 100644 +--- a/src/protocol/internal.c ++++ b/src/protocol/internal.c +@@ -28,8 +28,6 @@ NoiseCipherState *noise_aesgcm_new_sodium(void); + #endif + #if USE_OPENSSL + NoiseCipherState *noise_aesgcm_new_openssl(void); +-#else +-NoiseCipherState *noise_aesgcm_new_ref(void); + #endif + + /** +@@ -47,9 +45,6 @@ NoiseCipherState *noise_aesgcm_new(void) + #if USE_OPENSSL + if (!state) + state = noise_aesgcm_new_openssl(); +-#else +- if (!state) +- state = noise_aesgcm_new_ref(); + #endif + + return state; diff --git a/travis-ci.sh b/travis-ci.sh index 9e2c1bf..ff437b0 100755 --- a/travis-ci.sh +++ b/travis-ci.sh @@ -1,5 +1,7 @@ #!/bin/bash +BASEDIR=${PWD} + git clone git://github.com/jedisct1/libsodium.git pushd libsodium git checkout 1.0.12 @@ -11,12 +13,11 @@ popd git clone https://github.com/rweather/noise-c.git pushd noise-c + patch -p1 -i ${BASEDIR}/noise-c.patch ./autogen.sh ./configure --with-libsodium --prefix=/usr - pushd src make sudo make install - popd popd dub test -b unittest-cov --combined