From cda94c4d9eba3092171c9eda3650a3c42736228b Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Tue, 4 Jul 2017 14:55:53 +0200 Subject: [PATCH] Don't build with SNMP on Debian Stretch 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 | 2 +- build-scripts/debian-recursor/rules | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/build-scripts/debian-recursor/control.in b/build-scripts/debian-recursor/control.in index f432d6a7e..84d430d02 100644 --- a/build-scripts/debian-recursor/control.in +++ b/build-scripts/debian-recursor/control.in @@ -4,7 +4,7 @@ Priority: extra Standards-Version: 3.9.6 Maintainer: PowerDNS Autobuilder 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 diff --git a/build-scripts/debian-recursor/rules b/build-scripts/debian-recursor/rules index 42537fb79..f08ec0435 100755 --- a/build-scripts/debian-recursor/rules +++ b/build-scripts/debian-recursor/rules @@ -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) -- 2.40.0