]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Add a test for multiple libcrypto linking 5493/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 4 Jul 2017 14:13:07 +0000 (16:13 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 4 Jul 2017 14:52:37 +0000 (16:52 +0200)
pdns/recursordist/.gitignore
pdns/recursordist/Makefile.am
pdns/recursordist/test_libcrypto [new file with mode: 0755]

index f02a4a189f05fb05cfd25ec9e4861aaed1a37003..11eb6dc4234377fc32e37161cb82d64ef45d66c0 100644 (file)
@@ -44,3 +44,5 @@
 /test-suite.log
 /testrunner.log
 /testrunner.trs
+/test_libcrypto.log
+/test_libcrypto.trs
index 8b9ec4e088b87f3c739c38e488c11839df84d105..80a84b18811998656b69226cb35e6f532c93fec7 100644 (file)
@@ -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 (executable)
index 0000000..91af04f
--- /dev/null
@@ -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