-usr/lib/systemd/system/kresd@.service lib/systemd/system/
-usr/lib/systemd/system/kres-cache-gc.service lib/systemd/system/
-usr/lib/systemd/system/kresd.target lib/systemd/system/
usr/lib/*.so.*
usr/lib/tmpfiles.d/knot-resolver.conf
usr/lib/knot-resolver/*.so
+++ /dev/null
-dev/null lib/systemd/system/kresd.service
-lib/systemd/system/kresd.target lib/systemd/system/multi-user.target.wants/kresd.target
debian/tmp/usr/share/man/man8/kresd.8*
-debian/tmp/usr/share/man/man7/kresd.systemd.7*
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
systemctl daemon-reload || true
systemd-tmpfiles --create /usr/lib/tmpfiles.d/knot-resolver.conf
- systemctl try-restart 'kresd@*.service' kres-cache-gc.service || true
+ systemctl try-restart knot-resolver.service || true
fi
#DEBHELPER#
--- /dev/null
+lib/systemd/system/knot-resolver.service lib/systemd/system/multi-user.target.wants/knot-resolver.service
Modular architecture of the library keeps the core tiny and efficient, and
provides a state-machine like API for extensions.
-The package is pre-configured as local caching resolver.
-To start using it, start a single kresd instance:
-$ systemctl start kresd@1.service
-
%package devel
Summary: Development headers for Knot Resolver
Requires: %{name}-core%{?_isa} = %{version}-%{release}
%install
DESTDIR="${RPM_BUILD_ROOT}" %{NINJA} -v -C build_rpm install
-# add kresd.target to multi-user.target.wants to support enabling kresd services
+# add knot-resolver.service to multi-user.target.wants to support enabling kresd services
install -m 0755 -d %{buildroot}%{_unitdir}/multi-user.target.wants
-ln -s ../kresd.target %{buildroot}%{_unitdir}/multi-user.target.wants/kresd.target
+ln -s ../knot-resolver.service %{buildroot}%{_unitdir}/multi-user.target.wants/knot-resolver.service
# remove modules with missing dependencies
rm %{buildroot}%{_libdir}/knot-resolver/kres_modules/etcd.lua
/sbin/ldconfig
%endif
-%preun core
-%systemd_preun kres-cache-gc.service kresd.target
+%preun manager
+%systemd_preun knot-resolver.service
-%postun core
-%systemd_postun_with_restart 'kresd@*.service' kres-cache-gc.service
+%postun manager
+%systemd_postun_with_restart knot-resolver.service
%if "x%{?fedora}" == "x"
/sbin/ldconfig
%endif
%{_sysconfdir}/knot-resolver/icann-ca.pem
%attr(750,knot-resolver,knot-resolver) %dir %{_sharedstatedir}/knot-resolver
%attr(640,knot-resolver,knot-resolver) %{_sharedstatedir}/knot-resolver/root.keys
-%{_unitdir}/kresd@.service
-%{_unitdir}/kres-cache-gc.service
-%{_unitdir}/kresd.target
%dir %{_unitdir}/multi-user.target.wants
-%{_unitdir}/multi-user.target.wants/kresd.target
-%{_mandir}/man7/kresd.systemd.7.gz
+%{_unitdir}/multi-user.target.wants/knot-resolver.service
%{_tmpfilesdir}/knot-resolver.conf
%ghost /run/%{name}
%ghost %{_localstatedir}/cache/%{name}
man_config.set('date', run_command('../scripts/get-date.sh', check: true).stdout())
man_config.set('man_seealso_systemd', '')
-if systemd_files == 'enabled'
+if systemd_legacy_units == 'enabled'
man_config.set('man_seealso_systemd', '\\fIkresd.systemd(7)\\fR, ')
endif
set -e
-man -w kresd
-man -w kresd.systemd
man -w kresctl
### Systemd
systemd_files = get_option('systemd_files')
+systemd_legacy_units = get_option('systemd_legacy_units')
libsystemd = dependency('libsystemd', required: systemd_files == 'enabled')
### Allocator
# Systemd unit files
-if systemd_files != 'disabled'
- subdir('systemd')
-endif
+subdir('systemd')
# Additional files
description: 'installs systemd-related files',
)
+option(
+ 'systemd_legacy_units',
+ type: 'combo',
+ choices: [
+ 'disabled',
+ 'enabled',
+ ],
+ value: 'disabled',
+ description: 'installs legacy systemd units for running without manager, like with versions before 6',
+)
# Component options
option(
systemd_config.set('run_dir', run_dir)
systemd_config.set('lib_dir', lib_dir)
-if systemd_files == 'enabled'
+if systemd_legacy_units == 'enabled'
+
## unit files
kresd_service = configure_file(
input: 'kresd@.service.in',
sources: 'kresd.target',
install_dir: systemd_unit_dir,
)
- manager_service = configure_file(
- input: 'knot-resolver.service.in',
- output: 'knot-resolver.service',
- configuration: systemd_config,
- install_dir: systemd_unit_dir,
- )
-
## man page
kresd_systemd_man = configure_file(
input: 'kresd.systemd.7.in',
)
install_man(kresd_systemd_man)
+endif
+
+
+if systemd_files == 'enabled'
+
+ manager_service = configure_file(
+ input: 'knot-resolver.service.in',
+ output: 'knot-resolver.service',
+ configuration: systemd_config,
+ install_dir: systemd_unit_dir,
+ )
+
## tmpfiles
tmpfiles = configure_file(
input: 'tmpfiles.d/knot-resolver.conf.in',