2 Version: %{getenv:BUILDER_RPM_VERSION}
3 Release: %{getenv:BUILDER_RPM_RELEASE}%{?dist}
4 Summary: Modern
, advanced and high performance recursing
/non authoritative name server
5 Group: System Environment
/Daemons
7 URL: https
://powerdns.com
8 Source0: %{name}-%{getenv:BUILDER_VERSION}.tar.bz2
10 Provides: powerdns
-recursor
= %{version}-%{release}
12 BuildRequires
: boost
-devel
13 BuildRequires
: libcap
-devel
14 BuildRequires
: systemd
15 BuildRequires
: systemd
-devel
16 BuildRequires
: openssl
-devel
17 BuildRequires
: net
-snmp
-devel
18 BuildRequires
: libsodium
-devel
19 BuildRequires
: fstrm
-devel
20 BuildRequires
: libcurl
-devel
23 BuildRequires
: lua
-devel
24 %define lua_implementation lua
26 BuildRequires
: luajit
-devel
27 %define lua_implementation luajit
31 BuildRequires
: libatomic
34 Requires(pre
): shadow
-utils
38 PowerDNS Recursor is a non authoritative
/recursing DNS server. Use this
39 package
if you need a dns cache
for your network.
43 %autosetup -p1
-n
%{name}-%{getenv:BUILDER_VERSION}
47 --enable-option
-checking
=fatal \
48 --sysconfdir
=%{_sysconfdir}/%{name} \
51 --disable
-silent
-rules \
54 --enable-dns
-over
-tls \
57 --with
-lua
=%{lua_implementation} \
58 --enable-systemd
--with
-systemd
=%{_unitdir}
63 make %{?_smp_mflags} check ||
(cat
test-suite.log
&& false
)
66 make install DESTDIR
=%{buildroot}
68 %{__mv} %{buildroot}%{_sysconfdir}/%{name}/recursor.conf{-dist,}
70 # change user and group to pdns-recursor
72 -e 's
/# setuid=/setuid=pdns-recursor/' \
73 -e 's
/# setgid=/setgid=pdns-recursor/' \
74 %{buildroot}%{_sysconfdir}/%{name}/recursor.conf
76 # The EL7 and 8 systemd actually supports %t, but its version number is older than that, so we do use seperate runtime dirs, but don't rely on RUNTIME_DIRECTORY
78 sed
-e 's
!/pdns_recursor
!& --socket
-dir
=%t/pdns
-recursor
!'
-i
%{buildroot}/%{_unitdir}/pdns
-recursor.service
80 sed
-e 's
!/pdns_recursor
!& --socket
-dir
=%t/pdns
-recursor
-%i!'
-e 's
!RuntimeDirectory
=pdns
-recursor
!&-%i!'
-i
%{buildroot}/%{_unitdir}/pdns
-recursor@.service
85 getent group pdns
-recursor
> /dev
/null || groupadd
-r pdns
-recursor
86 getent passwd pdns
-recursor
> /dev
/null || \
87 useradd
-r
-g pdns
-recursor
-d
/ -s
/sbin
/nologin \
88 -c "PowerDNS Recursor user" pdns
-recursor
92 systemctl daemon
-reload ||
:
93 %systemd_post %{name}.service
96 %systemd_preun %{name}.service
99 %systemd_postun_with_restart pdns
-recursor.service
102 %{_bindir}/rec_control
103 %{_sbindir}/pdns_recursor
104 %{_mandir}/man1
/pdns_recursor
.1.gz
105 %{_mandir}/man1
/rec_control
.1.gz
106 %{_unitdir}/pdns
-recursor.service
107 %{_unitdir}/pdns
-recursor@.service
108 %dir %{_sysconfdir}/%{name}
109 %config(noreplace
) %{_sysconfdir}/%{name}/recursor.conf