]> granicus.if.org Git - pdns/commitdiff
Don't build with SNMP on Debian Stretch
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 4 Jul 2017 12:55:53 +0000 (14:55 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 4 Jul 2017 14:52:37 +0000 (16:52 +0200)
As net snmp is linked to OpenSSL 1.0 and we link against 1.1, users get
'interesting' crashes.

build-scripts/debian-recursor/control.in
build-scripts/debian-recursor/rules

index f432d6a7e29741edc4daea5d800d508ff560fc30..84d430d02d4cf5dd8315ca1ad95e83e11d5c7e0f 100644 (file)
@@ -4,7 +4,7 @@ Priority: extra
 Standards-Version: 3.9.6
 Maintainer: PowerDNS Autobuilder <powerdns.support@powerdns.com>
 Origin: PowerDNS
-Build-Depends: debhelper (>= 9~), dh-systemd, quilt, dpkg-dev (>= 1.17.0~), libboost-dev, libboost-serialization-dev, libluajit5.1-dev, libsnmp-dev, libprotobuf-dev, protobuf-compiler, pkg-config @LIBSYSTEMDDEV@ @LIBSODIUMDEV@
+Build-Depends: debhelper (>= 9~), dh-systemd, quilt, dpkg-dev (>= 1.17.0~), libboost-dev, libboost-serialization-dev, libluajit5.1-dev, libprotobuf-dev, protobuf-compiler, pkg-config @LIBSYSTEMDDEV@ @LIBSODIUMDEV@ @LIBSNMPDEV@
 Homepage: http://www.powerdns.com/
 
 Package: pdns-recursor
index 42537fb79b1a27fdc9aac52fcdd0f19c7867d5e3..f08ec04358b69794cf10d83e391d78f30d0af262 100755 (executable)
@@ -14,6 +14,9 @@ DEBHELPER_WITH_SYSTEMD := --with systemd
 ENABLE_LIBSODIUM := --enable-libsodium
 LIBSODIUM_DEV := , libsodium-dev
 
+ENABLE_NETSNMP := --with-net-snmp
+NETSNMP_DEV := , libsnmp-dev
+
 # $(ID) and $(VERSION_ID) come from the environment, source this from /etc/os-release
 ifeq ($(ID), ubuntu)
   ifeq ($(VERSION_ID), 14.04)
@@ -28,9 +31,19 @@ ifeq ($(ID), ubuntu)
   endif
 endif
 
+ifeq ($(ID), debian)
+  ifeq ($(VERSION_ID), 9)
+    # SNMP is linked to OpenSSL 1.0 while we link against OpenSSL 1.1
+    ENABLE_NETSNMP = --without-net-snmp
+    NETSNMP_DEV =
+  endif
+endif
+
 debian/control: debian/control.in
        sed -e "s!@LIBSYSTEMDDEV@!$(LIBSYSTEMD_DEV)!" \
-           -e "s!@LIBSODIUMDEV@!$(LIBSODIUM_DEV)!" $< > $@
+           -e "s!@LIBSODIUMDEV@!$(LIBSODIUM_DEV)!" \
+           -e "s!@LIBSNMPDEV@!$(LIBSNMP_DEV)!" \
+           $< > $@
 
 # Use new build system
 %:
@@ -51,7 +64,7 @@ override_dh_auto_configure:
                --libexecdir='$${prefix}/lib' \
                --with-luajit \
                --with-protobuf=yes \
-               --with-net-snmp \
+               $(ENABLE_NETSNMP) \
                $(ENABLE_SYSTEMD) \
                $(ENABLE_LIBSODIUM)