1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = System/Daemons
11 url = http://www.nlnetlabs.nl/unbound/
13 summary = A validating, recursive, and caching DNS(SEC) resolver.
16 Unbound is a validating, recursive, and caching DNS(SEC) resolver.
17 The C implementation of Unbound is developed and maintained by NLnet
18 Labs and is based on ideas and algorithms taken from a java prototype
19 developed by Verisign labs, Nominet, Kirei and ep.net. Unbound is
20 designed as a set of modular components, so that also
21 DNSSEC (secure DNS) validation and stub-resolvers are easily possible.
24 source_dl = http://www.unbound.net/downloads/
30 openssl-devel >= 1.0.1h-2
35 configure_options += \
36 --with-conf-file=%{sysconfdir}/%{name}/unbound.conf \
37 --with-pidfile=%{localstatedir}/run/%{name}/%{name}.pid \
38 --with-rootkey-file=%{sharedstatedir}/unbound/root.key \
46 --with-pyunbound PYTHON=%{python3}
58 mkdir -pv %{BUILDROOT}%{localstatedir}/run/%{name}
59 mkdir -pv %{BUILDROOT}%{sharedstatedir}/%{name}
61 # Directory for user specified and additional config files.
62 mkdir -pv %{BUILDROOT}%{sysconfdir}/%{name}/conf.d/
64 # Directory for stub and forward zones.
65 mkdir -pv %{BUILDROOT}%{sysconfdir}/%{name}/local.d/
67 # Directory for trusted-keys-file.
68 mkdir -pv %{BUILDROOT}%{sysconfdir}/%{name}/keys.d/
70 # Install unbound config file.
71 install -p -m 0664 %{DIR_SOURCE}/%{name}.conf \
72 %{BUILDROOT}%{sysconfdir}/%{name}/
74 # Install pem file for icannbundle.
75 install -p -m 0664 %{DIR_SOURCE}/icannbundle.pem \
76 %{BUILDROOT}%{sysconfdir}/%{name}/
78 # Install root and DLV keys.
79 install -p -m 0644 %{DIR_SOURCE}/root.key \
80 %{BUILDROOT}%{sysconfdir}/%{name}/
81 install -p -m 0664 %{DIR_SOURCE}/dlv.isc.org.key \
82 %{BUILDROOT}%{sysconfdir}/%{name}/
83 install -p -m 0664 %{DIR_SOURCE}/root.anchor \
84 %{BUILDROOT}%{sharedstatedir}/%{name}/root.key
87 chown -R unbound:unbound %{BUILDROOT}%{sharedstatedir}/%{name}/
92 getent group unound >/dev/null || /usr/sbin/groupadd -r unbound
93 getent passwd unbound >/dev/null || /usr/sbin/useradd -r -g unbound \
94 -d %{sysconfdir}/%{name} -s /sbin/nologin unbound
108 %{sysconfdir}/%{name}.conf
112 %{sysconfdir}/%{name}/conf.d/
113 %{sysconfdir}/%{name}/local.d/
114 %{sysconfdir}/%{name}/keys.d/
122 /bin/systemctl daemon-reload >/dev/null 2>&1 || :
124 # Enable root anchor for DNSSEC validation.
125 systemctl enable unbound-anchor.timer >/dev/null 2>&1 || :
129 systemctl --no-reload disable unbound-anchor.timer >/dev/null 2>&1 || :
130 systemctl --no-reload disable unbound-keygen.service >/dev/null 2>&1 || :
131 systemctl --no-reload disable unbound.service >/dev/null 2>&1 || :
132 systemctl stop unbound.service >/dev/null 2>&1 || :
133 systemctl stop unbound-keygen.service >/dev/null 2>&1 || :
137 systemctl daemon-reload >/dev/null 2>&1 || :
141 systemctl daemon-reload >/dev/null 2>&1 || :
142 systemctl try-restart unbound-keygen.service >/dev/null 2>&1 || :
143 systemctl try-restart unbound.service >/dev/null 2>&1 || :
151 package python3-%{name}
155 package %{name}-devel
159 package %{name}-debuginfo