From: Pieter Lexis Date: Tue, 4 Jul 2017 14:13:07 +0000 (+0200) Subject: rec: Add a test for multiple libcrypto linking X-Git-Tag: rec-4.1.0-alpha1~30^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5493%2Fhead;p=thirdparty%2Fpdns.git rec: Add a test for multiple libcrypto linking --- diff --git a/pdns/recursordist/.gitignore b/pdns/recursordist/.gitignore index f02a4a189f..11eb6dc423 100644 --- a/pdns/recursordist/.gitignore +++ b/pdns/recursordist/.gitignore @@ -44,3 +44,5 @@ /test-suite.log /testrunner.log /testrunner.trs +/test_libcrypto.log +/test_libcrypto.trs diff --git a/pdns/recursordist/Makefile.am b/pdns/recursordist/Makefile.am index 8b9ec4e088..80a84b1881 100644 --- a/pdns/recursordist/Makefile.am +++ b/pdns/recursordist/Makefile.am @@ -59,15 +59,18 @@ EXTRA_DIST = \ rec_control.1.md \ rrd/* \ html incfiles \ + test_libcrypto \ pdns-recursor.service.in sbin_PROGRAMS = pdns_recursor bin_PROGRAMS = rec_control +TESTS=test_libcrypto + if UNIT_TESTS noinst_PROGRAMS = testrunner TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message SRCDIR='$(srcdir)' -TESTS=testrunner +TESTS += testrunner else check-local: @echo "Unit tests are not enabled" diff --git a/pdns/recursordist/test_libcrypto b/pdns/recursordist/test_libcrypto new file mode 100755 index 0000000000..91af04f225 --- /dev/null +++ b/pdns/recursordist/test_libcrypto @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ $(ldd pdns_recursor | grep -c libcrypto) -gt 1 ]; then + echo "Error! pdns_recursor is linked against multiple OpenSSL versions!" + echo "This happens when one dependency is linked to OpenSSL 1.0, while" + echo "pdns_recursor is linked against OpenSSL 1.1. Please set --with-libcrypto" + echo "to the directory of the dependency's OpenSSL or drop the dependency." + echo "" + echo "On Debian Stretch, this error is most likely caused by attempting to" + echo "link in net-snmp." + exit 1; +fi