]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: drop EL6 pkg support
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 10 Dec 2019 10:40:31 +0000 (11:40 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 8 Jan 2021 07:47:21 +0000 (08:47 +0100)
builder-support/dockerfiles/Dockerfile.rpmbuild
builder-support/specs/pdns-recursor.init [deleted file]
builder-support/specs/pdns-recursor.spec

index 2dfa18ef9bb7f5749f0e3f925d0a8935c64a4207..6cec7a645b17402cccb7699fbbc7b14cbea3baba 100644 (file)
@@ -29,11 +29,7 @@ RUN touch /var/lib/rpm/* && if $(grep -q 'release 6' /etc/redhat-release); then
 @ENDIF
 
 @IF [ -n "$M_recursor$M_all" ]
-RUN touch /var/lib/rpm/* &&  if $(grep -q 'release 6' /etc/redhat-release); then \
-      scl enable devtoolset-7 -- builder/helpers/build-specs.sh builder-support/specs/pdns-recursor.spec; \
-    else \
-      builder/helpers/build-specs.sh builder-support/specs/pdns-recursor.spec; \
-    fi
+RUN builder/helpers/build-specs.sh builder-support/specs/pdns-recursor.spec
 @ENDIF
 
 @IF [ -n "$M_dnsdist$M_all" ]
diff --git a/builder-support/specs/pdns-recursor.init b/builder-support/specs/pdns-recursor.init
deleted file mode 100644 (file)
index b64d47b..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/bin/bash
-#
-# pdns-recursor  This shell script controls the PowerDNS Recursor
-#
-# Author:       Ruben Kerkhof <ruben@rubenkerkhof.com>
-#
-# chkconfig:    - 49 51
-#
-# description:  PowerDNS Recursor is a non authoritative/recursing DNS server
-# processname:  pdns-recursor
-# config: /etc/pdns-recursor/recursor.conf
-# pidfile: /var/run/pdns-recursor/pdns_recursor.pid
-#
-
-# . function library
-. /etc/rc.d/init.d/functions
-
-RETVAL=0
-
-PIDDIR=$(awk -F= '/^socket-dir=/ {print $2}' /etc/pdns-recursor/recursor.conf)
-if [ -z "$PIDDIR" ]; then PIDDIR=/var/run/pdns-recursor; mkdir -p $PIDDIR; fi
-
-start() {
-       echo -n $"Starting pdns-recursor: "
-       daemon /usr/sbin/pdns_recursor --daemon 2>/dev/null
-       RETVAL=$?
-       echo
-       [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pdns-recursor
-}
-
-stop() {
-       echo -n $"Stopping pdns-recursor: "
-       killproc pdns_recursor
-       echo
-       [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/pdns-recursor && rm -f $PIDDIR/pdns_recursor.controlsocket
-}
-
-restart() {
-       stop
-       start
-}
-
-case "$1" in
-  start)
-       start
-       ;;
-  stop)
-       stop
-       ;;
-  restart|force-reload|reload)
-       restart
-       ;;
-  condrestart)
-       [ -f /var/lock/subsys/pdns-recursor ] && restart
-       ;;
-  status)
-       status pdns_recursor
-       RETVAL=$?
-       ;;
-  *)
-       echo "Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
-       exit 1
-esac
-
-exit $RETVAL
index 069ce9d245ebfb0649e5cbc7f0e670521362e307..8f5013cb3df38d9170ad42488195cf51300fcf63 100644 (file)
@@ -6,17 +6,19 @@ Group: System Environment/Daemons
 License: GPLv2
 URL: https://powerdns.com
 Source0: %{name}-%{getenv:BUILDER_VERSION}.tar.bz2
-%if 0%{?rhel} == 6
-Source1: pdns-recursor.init
-%endif
 
 Provides: powerdns-recursor = %{version}-%{release}
-%if 0%{?rhel} == 6
-BuildRequires: boost148-devel
-BuildRequires: lua-devel
-%else
+
 BuildRequires: boost-devel
 BuildRequires: libcap-devel
+BuildRequires: systemd
+BuildRequires: systemd-devel
+BuildRequires: protobuf-compiler
+BuildRequires: protobuf-devel
+BuildRequires: openssl-devel
+BuildRequires: net-snmp-devel
+BuildRequires: libsodium-devel
+
 %ifarch aarch64
 BuildRequires: lua-devel
 %define lua_implementation lua
@@ -24,9 +26,6 @@ BuildRequires: lua-devel
 BuildRequires: luajit-devel
 %define lua_implementation luajit
 %endif
-BuildRequires: systemd
-BuildRequires: systemd-devel
-%endif
 
 %ifarch ppc64 ppc64le
 BuildRequires: libatomic
@@ -36,18 +35,8 @@ BuildRequires: libatomic
 BuildRequires: fstrm-devel
 %endif
 
-BuildRequires: openssl-devel
-BuildRequires: net-snmp-devel
-BuildRequires: libsodium-devel
-
 Requires(pre): shadow-utils
-%if 0%{?rhel} == 6
-Requires(post): /sbin/chkconfig
-Requires(preun): /sbin/service, /sbin/chkconfig
-Requires(postun): /sbin/service
-%else
 %systemd_requires
-%endif
 
 %description
 PowerDNS Recursor is a non authoritative/recursing DNS server. Use this
@@ -55,11 +44,7 @@ package if you need a dns cache for your network.
 
 
 %prep
-%if 0%{?rhel} == 6
-%setup -n %{name}-%{getenv:BUILDER_VERSION}
-%else
 %autosetup -p1 -n %{name}-%{getenv:BUILDER_VERSION} 
-%endif
 
 %build
 %configure \
@@ -70,19 +55,12 @@ package if you need a dns cache for your network.
     --disable-silent-rules \
     --disable-static \
     --enable-unit-tests \
-%if 0%{?rhel} == 6
-    --with-boost=/usr/include/boost148 LIBRARY_PATH=/usr/lib64/boost148 \
-    CPPFLAGS=-D__STDC_FORMAT_MACROS
-
-make %{?_smp_mflags} LIBRARY_PATH=/usr/lib64/boost148
-%else
     --enable-dnstap \
     --with-libcap \
     --with-lua=%{lua_implementation} \
     --enable-systemd --with-systemd=%{_unitdir}
 
 make %{?_smp_mflags}
-%endif
 
 %check
 make %{?_smp_mflags} check || (cat test-suite.log && false)
@@ -92,10 +70,6 @@ make install DESTDIR=%{buildroot}
 
 %{__mv} %{buildroot}%{_sysconfdir}/%{name}/recursor.conf{-dist,}
 
-%if 0%{?rhel} == 6
-%{__install} -D -p %{SOURCE1} %{buildroot}%{_initrddir}/pdns-recursor
-%endif
-
 # change user and group to pdns-recursor
 sed -i \
     -e 's/# setuid=/setuid=pdns-recursor/' \
@@ -110,44 +84,22 @@ getent passwd pdns-recursor > /dev/null || \
 exit 0
 
 %post
-%if 0%{?rhel} == 6
-chkconfig --add %{name}
-%else
 systemctl daemon-reload ||:
 %systemd_post %{name}.service
-%endif
 
 %preun
-%if 0%{?rhel} == 6
-if [ $1 -eq 0 ]; then
-    service %{name} stop >/dev/null 2>&1 || :
-    chkconfig --del %{name}
-fi
-%else
 %systemd_preun %{name}.service
-%endif
 
-%if 0%{?rhel} == 6
-%postun
-if [ $1 -ge 1 ]; then
-    service %{name} condrestart >/dev/null 2>&1 || :
-fi
-%else
 %postun
 %systemd_postun_with_restart pdns-recursor.service
-%endif
 
 %files
 %{_bindir}/rec_control
 %{_sbindir}/pdns_recursor
 %{_mandir}/man1/pdns_recursor.1.gz
 %{_mandir}/man1/rec_control.1.gz
-%if 0%{?rhel} == 6
-%{_initrddir}/pdns-recursor
-%else
 %{_unitdir}/pdns-recursor.service
 %{_unitdir}/pdns-recursor@.service
-%endif
 %dir %{_sysconfdir}/%{name}
 %config(noreplace) %{_sysconfdir}/%{name}/recursor.conf
 %doc README