Improvements
------------
+- systemd: multiple enabled kresd instances can now be started using kresd.target
- ta_sentinel: switch to version 14 of the RFC draft (!596)
- support for glibc systems with a non-Linux kernel (!588)
- support per-request variables for Lua modules (!533)
install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/distro/common/systemd/kresd-control@.socket" "${pkgdir}/usr/lib/systemd/system/kresd-control@.socket"
install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/distro/common/systemd/kresd-tls.socket" "${pkgdir}/usr/lib/systemd/system/kresd-tls.socket"
install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/distro/common/systemd/kresd@.service" "${pkgdir}/usr/lib/systemd/system/kresd@.service"
+ install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/distro/common/systemd/kresd.target" "${pkgdir}/usr/lib/systemd/system/kresd.target"
+ install -dm 0755 "${pkgdir}/usr/lib/systemd/system/multi-user.target.wants"
+ ln -s ../kresd.target "${pkgdir}/usr/lib/systemd/system/multi-user.target.wants/kresd.target"
install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/distro/common/systemd/kresd.systemd.7" "${pkgdir}/usr/share/man/man7/kresd.systemd.7"
install -Dm 0644 "${srcdir}/${pkgname}-${pkgver}/distro/common/tmpfiles/knot-resolver.conf" "${pkgdir}/usr/lib/tmpfiles.d/knot-resolver.conf"
install -dm 0775 "${pkgdir}/etc/knot-resolver"
* Distributions using systemd-sysv-generator should mask kresd.service to
be consistent with other distributions. Any use of kresd.service instead of
kresd@N.service is discouraged to avoid confusing the users.
+* kresd.target should be enabled by default by linking it to systemd lib/
+ directory. Instances of kresd@.service are then added manually to
+ kresd.target when the user enables them.
-.TH "kresd.systemd" "7" "2018-01-30" "CZ.NIC" "Knot DNS Resolver Systemd Units"
+.TH "kresd.systemd" "7" "2018-06-04" "CZ.NIC" "Knot DNS Resolver Systemd Units"
.\"
.\" kresd.systemd.7 -- man page for systemd units for kresd
.\"
kresd.socket
kresd-tls.socket
kresd-control@.socket
+kresd.target
system-kresd.slice
.fi
.RE
.fi
-.B Using system-kresd.slice
+.B Using system-kresd.slice and kresd.target
The following commands may not work with older systemd (e.g. on CentOS 7).
See notes for more info.
.RE
.fi
-Note that \fBsystemctl start system-kresd.slice\fR does not
-automatically start the sockets or the daemons, though. To ensure
-that all enabled daemons are started and running, do:
+To start all enabled kresd daemons, use the provided \fIkresd.target\fR:
.nf
.RS 4n
-.B systemctl start --all 'kresd@*.service'
+.B systemctl start kresd.target
.RE
.fi
To start all enabled daemons:
.nf
.RS
-.B systemctl start --all 'kresd@*.service'
+.B systemctl start kresd.target
.RE
.fi
--- /dev/null
+[Unit]
+Description=Knot DNS Resolver daemons
+Documentation=man:kresd.systemd(7)
+Documentation=man:kresd(8)
+After=syslog.target network-online.target
+
+[Install]
+WantedBy=multi-user.target
Sockets=kresd-control@%i.socket
[Install]
-WantedBy=multi-user.target
+WantedBy=kresd.target
distro/common/systemd/kresd-tls.socket lib/systemd/system/
distro/common/systemd/kresd.socket lib/systemd/system/
distro/common/systemd/kresd@.service lib/systemd/system/
+distro/common/systemd/kresd.target lib/systemd/system/
distro/common/tmpfiles/knot-resolver.conf usr/lib/tmpfiles.d/
usr/lib/knot-resolver/*.so
usr/lib/knot-resolver/daf.lua
dev/null lib/systemd/system/kresd.service
+lib/systemd/system/kresd.target lib/systemd/system/multi-user.target.wants/kresd.target
# install systemd units and doc
mkdir -p %{buildroot}%{_unitdir}
install -m 0644 -p %{repodir}/distro/common/systemd/kresd@.service %{buildroot}%{_unitdir}/kresd@.service
+install -m 0644 -p %{repodir}/distro/common/systemd/kresd.target %{buildroot}%{_unitdir}/kresd.target
+install -m 0755 -d %{buildroot}%{_unitdir}/multi-user.target.wants
+ln -s ../kresd.target %{buildroot}%{_unitdir}/multi-user.target.wants/kresd.target
mkdir -p %{buildroot}%{_mandir}/man7
install -m 0644 -p %{repodir}/distro/common/systemd/kresd.systemd.7 %{buildroot}%{_mandir}/man7/kresd.systemd.7
%attr(644,root,knot-resolver) %config(noreplace) %{_sysconfdir}/knot-resolver/icann-ca.pem
%attr(750,knot-resolver,knot-resolver) %dir %{_localstatedir}/cache/knot-resolver
%{_unitdir}/kresd*.service
+%{_unitdir}/kresd.target
+%{_unitdir}/multi-user.target.wants/kresd.target
%if 0%{?rhel}
%{_unitdir}/kresd@.service.d/override.conf
%endif