]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
distro/debian: use meson
authorTomas Krizek <tomas.krizek@nic.cz>
Mon, 18 Feb 2019 17:32:18 +0000 (18:32 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Tue, 12 Mar 2019 09:43:32 +0000 (10:43 +0100)
25 files changed:
distro/deb/NEWS [deleted file]
distro/deb/README.source [deleted file]
distro/deb/clean
distro/deb/control
distro/deb/docs [deleted file]
distro/deb/init-d-script [deleted file]
distro/deb/knot-resolver-doc.doc-base
distro/deb/knot-resolver-doc.docs
distro/deb/knot-resolver-doc.links
distro/deb/knot-resolver-module-http.install
distro/deb/knot-resolver-module-http.links
distro/deb/knot-resolver-module-tinyweb.install [deleted file]
distro/deb/knot-resolver.dirs
distro/deb/knot-resolver.docs [new file with mode: 0644]
distro/deb/knot-resolver.install
distro/deb/knot-resolver.kresd.default [deleted file]
distro/deb/knot-resolver.kresd.init [deleted file]
distro/deb/knot-resolver.manpages
distro/deb/knot-resolver.postinst
distro/deb/knot-resolver.postrm
distro/deb/not-installed
distro/deb/patches/0001-Update-documentation-of-keyfile-ro.patch [deleted file]
distro/deb/patches/series [deleted file]
distro/deb/rules
distro/deb/tests/control [deleted file]

diff --git a/distro/deb/NEWS b/distro/deb/NEWS
deleted file mode 100644 (file)
index e81403c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-knot-resolver (2.0.0-1) unstable; urgency=medium
-
-  Knot Resolver systemd service units are now templated, so that multiple
-  processes can run concurrently on multi-core systems.  For a full
-  overview of the status of all the running daemons, use:
-
-      systemctl status system-kresd.slice
-
-  For more information about this setup, please see kresd.systemd(7).
-
- -- Daniel Kahn Gillmor <dkg@fifthhorseman.net>  Sat, 03 Feb 2018 22:51:02 -0500
-
-knot-resolver (1.1.0~git2016072900-1) unstable; urgency=medium
-
-  Knot Resolver now starts and runs under unprivileged user and uses a
-  socket activations to bind on the privileged ports.  That means that if
-  you use anything more complicated than that you need to either override
-  the default service file with `systemd edit kresd.service` and
-  `systemd edit kresd.socket` to add more IP addresses, or just disable
-  it with `systemd mask kresd*.socket kresd.service` and provide your
-  own custom system service file tailored to your needs.
-
- -- Ondřej Surý <ondrej@debian.org>  Thu, 04 Aug 2016 09:04:53 +0200
diff --git a/distro/deb/README.source b/distro/deb/README.source
deleted file mode 100644 (file)
index 657fc28..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-Tracking upstream sources in git
---------------------------------
-
-This debian package is tracked in the git "debian/master" branch at
-https://salsa.debian.org/dns-team/knot-resolver, which
-includes the commits from the upstream git repository at
-https://gitlab.labs.nic.cz/knot/knot-resolver.git.  When importing
-upstream tarballs, make sure you've fetched from the upstream repo
-before using "gbp import-orig" the tarball.  We rely on
-upstream-vcs-tag from debian/gbp.conf to link upstream git history
-with new package history.
-
-See Joey Hess's thoughts about why tracking upstream git history is
-useful: https://joeyh.name/blog/entry/upstream_git_repositories/, as
-well as DEP-14 for the branch-naming scheme:
-http://dep.debian.net/deps/dep14/
-
-Rebuilding epoch.js and epoch.css
----------------------------------
-
- If you need to rebuild epoch.js and epoch.css using only tools
- available in Debian, read gulpfile.js in d/missing-sources/epoch/ and
- adjust following script if any files has been changed.  You also need
- to install ruby-sass, coffeescript and node-uglify
-
-cat > build.sh << EOF
-#!/bin/sh
-
-coffee -b -c \
- src/epoch.coffee \
- src/core/context.coffee \
- src/core/util.coffee \
- src/core/d3.coffee \
- src/core/format.coffee \
- src/core/chart.coffee \
- src/core/css.coffee \
- src/data.coffee \
- src/model.coffee \
- src/basic.coffee \
- src/basic/*.coffee \
- src/time.coffee \
- src/time/*.coffee \
- src/adapters.coffee \
- src/adapters/*.coffee
-
-cat \
- src/epoch.js \
- src/core/context.js \
- src/core/util.js \
- src/core/d3.js \
- src/core/format.js \
- src/core/chart.js \
- src/core/css.js \
- src/data.js \
- src/model.js \
- src/basic.js \
- src/basic/*.js \
- src/time.js \
- src/time/*.js \
- src/adapters.js \
- src/adapters/*.js \
- > dist/js/epoch.js
-
-uglifyjs dist/js/epoch.js > dist/js/epoch.min.js
-
-sass -t compact sass/epoch.scss > dist/css/epoch.css
-sass -t compressed sass/epoch.scss > dist/css/epoch.min.css
-EOF
-
- -- Daniel Kahn Gillmor <dkg@fifthhorseman.net>, Thu, 22 Feb 2018 13:25:27 -0800
index 2ef7cbc0b6834f1c344e7f02bd9eeaee86bd34a5..3c2f3ba30e17f355ec23edfa4e5ecb3d016c66af 100644 (file)
@@ -1,4 +1,3 @@
-doc/kresd.8
-libkres.pc
-lib/libkres.a
-lib/libkres.so.9
+build_deb/
+doc/doxyxml/
+doc/html/
index c61cfc3d951503c6fa335070be2255852aabb56a..3437ab35de6e88b9b9b0276893d07b47c3b4d9db 100644 (file)
@@ -4,17 +4,10 @@ Priority: optional
 Maintainer: Knot Resolver <knot-resolver@labs.nic.cz>
 Uploaders:
  Tomas Krizek <tomas.krizek@nic.cz>
-Build-Depends-Indep:
- doxygen,
- python3-breathe,
- python3-sphinx,
- python3-sphinx-rtd-theme,
 Build-Depends:
  debhelper (>= 9~),
- dns-root-data,
  libcmocka-dev (>= 1.0.0),
  libedit-dev,
- libgeoip-dev,
  libgnutls28-dev,
  libknot-dev (>= 2.7.6),
  liblmdb-dev,
@@ -23,8 +16,12 @@ Build-Depends:
  libuv1-dev,
  luajit,
  pkg-config,
+ meson,
+ doxygen,
+ python3-breathe,
+ python3-sphinx,
+ python3-sphinx-rtd-theme,
 Homepage: https://www.knot-resolver.cz/
-Rules-Requires-Root: no
 
 Package: knot-resolver
 Architecture: any
@@ -35,6 +32,7 @@ Depends:
  lua-sec,
  lua-socket,
  lua-cqueues,
+ systemd,
  ${misc:Depends},
  ${shlibs:Depends},
 Recommends:
diff --git a/distro/deb/docs b/distro/deb/docs
deleted file mode 100644 (file)
index b43bf86..0000000
+++ /dev/null
@@ -1 +0,0 @@
-README.md
diff --git a/distro/deb/init-d-script b/distro/deb/init-d-script
deleted file mode 100755 (executable)
index 334dc32..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-#!/bin/sh
-# See init-d-script(5) for instructions on how to use this library.
-#=============================================================================
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
-# and status_of_proc is working.
-. /lib/lsb/init-functions
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh
-# script.  Scripts running before mountnfs.sh should remove the /usr/*
-# entries.
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-export PATH
-
-is_call_implemented() {
-       command -V $1 > /dev/null 2>&1
-}
-
-do_usage() {
-       if is_call_implemented do_reload ; then
-               echo "Usage: $SCRIPTNAME {start|stop|status|reload|restart|try-restart|force-reload}" >&2
-       else
-               echo "Usage: $SCRIPTNAME {start|stop|status|restart|try-restart|force-reload}" >&2
-       fi
-}
-
-call() {
-       cmd="$1"
-       shift
-       if is_call_implemented ${cmd}_override ; then
-           ${cmd}_override "$@"
-       else
-            ${cmd} "$@"
-        fi
-}
-
-#
-# Function that starts the daemon/service
-#
-
-# Return
-#   0 if daemon has been started
-#   1 if daemon was already running
-#   2 if daemon could not be started
-do_start_cmd() {
-       start-stop-daemon --start --quiet ${PIDFILE:+--pidfile ${PIDFILE}} \
-           $START_ARGS \
-           --startas $DAEMON --name $NAME --exec $DAEMON --test > /dev/null \
-           || return 1
-       start-stop-daemon --start --quiet ${PIDFILE:+--pidfile ${PIDFILE}} \
-           $START_ARGS \
-           --startas $DAEMON --name $NAME --exec $DAEMON -- $DAEMON_ARGS \
-           || return 2
-       # Add code here, if necessary, that waits for the process to be ready
-       # to handle requests from services started subsequently which depend
-       # on this one.  As a last resort, sleep for some time.
-}
-
-do_start()
-{
-       if is_call_implemented do_start_prepare ; then
-               call do_start_prepare
-       fi
-       [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
-       call do_start_cmd
-       case "$?" in
-               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
-       esac
-       if is_call_implemented do_start_cleanup ; then
-               call do_start_cleanup
-       fi
-}
-
-#
-# Function that stops the daemon/service
-#
-
-# Return
-#   0 if daemon has been stopped
-#   1 if daemon was already stopped
-#   2 if daemon could not be stopped
-#   other if a failure occurred
-do_stop_cmd() {
-       start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \
-           $STOP_ARGS \
-           ${PIDFILE:+--pidfile ${PIDFILE}} --name $NAME --exec $DAEMON
-       RETVAL="$?"
-       [ "$RETVAL" = 2 ] && return 2
-       # Wait for children to finish too if this is a daemon that forks
-       # and if the daemon is only ever run from this initscript.
-       # If the above conditions are not satisfied then add some other code
-       # that waits for the process to drop all resources that could be
-       # needed by services started subsequently.  A last resort is to
-       # sleep for some time.
-       start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 \
-           $STOP_ARGS \
-           --exec $DAEMON
-       [ "$?" = 2 ] && return 2
-       # Many daemons don't delete their pidfiles when they exit.
-       rm -f $PIDFILE
-       return $RETVAL
-}
-
-do_stop()
-{
-       if is_call_implemented do_stop_prepare ; then
-               call do_stop_prepare
-       fi
-       [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
-       call do_stop_cmd
-       case "$?" in
-               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
-       esac
-       if is_call_implemented do_stop_cleanup ; then
-               call do_stop_cleanup
-       fi
-}
-
-do_restart() {
-       [ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME"
-       call do_stop_cmd
-       call do_start_cmd
-       case "$?" in
-               0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-               2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
-       esac
-}
-
-do_force_reload() {
-       if is_call_implemented do_reload ; then
-               call do_reload
-       else
-               call do_restart
-       fi
-}
-
-# Enable this using
-# alias do_reload=do_reload_sigusr1
-do_reload_sigusr1() {
-        log_daemon_msg "Reloading $DESC configuration files" "$NAME"
-        start-stop-daemon --oknodo --stop --signal 1 --quiet \
-          --pidfile "$PIDFILE" --exec "$DAEMON"
-        log_end_msg $?
-}
-
-do_status() {
-       status_of_proc "$DAEMON" "$NAME" && return 0 || return $?
-}
-
-if [ "$DEBUG" = "true" ] ; then
-    set -x
-fi
-
-SCRIPTNAME=$1
-scriptbasename="$(basename $1)"
-if [ "$scriptbasename" != "init-d-script" ] ; then
-    script="$1"
-    shift
-    . $script
-else
-    exit 0
-fi
-
-NAME=${NAME:=$(basename $DAEMON)}
-DESC=${DESC:=$NAME}
-
-# Do not use pid file if $PIDFILE is 'none'.  Otherwise, generate from
-# $NAME or use the value provided by the init.d script.
-if [ none = "$PIDFILE" ] ; then
-    PIDFILE=
-elif [ -z "$PIDFILE" ] ; then
-    PIDFILE=/var/run/$NAME.pid
-fi
-
-# Exit if the package is not installed
-if [ none != "$DAEMON" ] && [ ! -x "$DAEMON" ] ; then
-       exit 0
-fi
-
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-# Load the VERBOSE setting and other rcS variables
-. /lib/init/vars.sh
-if [ -t 0 ] ; then # Be verbose when called from a terminal
-    VERBOSE=yes
-fi
-
-case "$1" in
-  start)
-       call do_start
-       ;;
-  stop)
-       call do_stop
-       ;;
-  status)
-       call do_status
-       ;;
-  reload)
-       if is_call_implemented do_reload ; then
-               do_reload
-       else
-               call do_usage
-               exit 3
-       fi
-       ;;
-  force-reload)
-       call do_force_reload
-       ;;
-  restart)
-       call do_restart
-       ;;
-  try-restart)
-        log_daemon_msg "Trying to restart $DESC" "$NAME"
-       if call do_status > /dev/null 2>&1 ; then
-           call do_restart
-            log_end_msg $?
-       else
-           log_progress_msg "is not running."
-            log_end_msg 1
-       fi
-       ;;
-  '')
-       call do_usage
-       exit 3
-       ;;
-  *)
-       if is_call_implemented do_unknown ; then
-           call do_unknown "$1"
-           exit 3
-       else
-           call do_usage
-           exit 3
-       fi
-       ;;
-esac
-exit 0
index f82b8ba8d14281b7b6b7a772929a4df519d0a586..9cd0fdf0fd528096b834db08cf702b0233e3e220 100644 (file)
@@ -7,5 +7,5 @@ Abstract: Documentation for the Knot Resolver,
 Section: Network/Communication
 
 Format: HTML
-Index: /usr/share/doc/knot-resolver/index.html
-Files: /usr/share/doc/knot-resolver/*.html
+Index: /usr/share/doc/knot-resolver/html/index.html
+Files: /usr/share/doc/knot-resolver/html/*.html
index 3ff735674c7b5cac7f91dd2a967dac593d804959..ac44141da260d7130f8b188907401877a8b0103b 100644 (file)
@@ -1 +1 @@
-doc/html/*
+usr/share/doc/knot-resolver/html/*
index 4c7c74f43882a55715e7ca87b081d01c454e0fe6..25e958484e5e667dcc28f5742603603b1c095dbf 100644 (file)
@@ -1,2 +1,2 @@
-usr/share/javascript/jquery/jquery.min.js usr/share/doc/knot-resolver/_static/jquery.js
-usr/share/javascript/underscore/underscore.min.js usr/share/doc/knot-resolver/_static/underscore.js
+usr/share/javascript/jquery/jquery.min.js usr/share/doc/knot-resolver/html/_static/jquery.js
+usr/share/javascript/underscore/underscore.min.js usr/share/doc/knot-resolver/html/_static/underscore.js
index 3c2d56be98e830c5388beaa747503df66fcf1faf..ffa04d01a9ad5bdb273b3d9d2154e15644975382 100644 (file)
@@ -1,6 +1,7 @@
-usr/lib/knot-resolver/http.lua
-usr/lib/knot-resolver/http/*.css
-usr/lib/knot-resolver/http/*.ico
-usr/lib/knot-resolver/http/*.js
-usr/lib/knot-resolver/http/*.tpl
-usr/lib/knot-resolver/http/*.woff2
+usr/lib/knot-resolver/kres_modules/http*.lua
+usr/lib/knot-resolver/kres_modules/prometheus.lua
+usr/lib/knot-resolver/kres_modules/http/*.css
+usr/lib/knot-resolver/kres_modules/http/*.ico
+usr/lib/knot-resolver/kres_modules/http/*.js
+usr/lib/knot-resolver/kres_modules/http/*.tpl
+usr/lib/knot-resolver/kres_modules/http/*.woff2
index 322529c8f8eaf0f63d337061a93a3e462d204657..4963c5cb946ecde4732e18a4c63bd59067958c1a 100644 (file)
@@ -1,5 +1,5 @@
-/usr/share/javascript/bootstrap/css/bootstrap-theme.min.css /usr/lib/knot-resolver/http/bootstrap-theme.min.css
-/usr/share/javascript/bootstrap/css/bootstrap.min.css /usr/lib/knot-resolver/http/bootstrap.min.css
-/usr/share/javascript/bootstrap/js/bootstrap.min.js /usr/lib/knot-resolver/http/bootstrap.min.js
-/usr/share/javascript/d3/d3.min.js /usr/lib/knot-resolver/http/d3.js
-/usr/share/javascript/jquery/jquery.min.js /usr/lib/knot-resolver/http/jquery.js
+usr/share/javascript/bootstrap/css/bootstrap-theme.min.css usr/lib/knot-resolver/kres_modules/http/bootstrap-theme.min.css
+usr/share/javascript/bootstrap/css/bootstrap.min.css usr/lib/knot-resolver/kres_modules/http/bootstrap.min.css
+usr/share/javascript/bootstrap/js/bootstrap.min.js usr/lib/knot-resolver/kres_modules/http/bootstrap.min.js
+usr/share/javascript/d3/d3.min.js usr/lib/knot-resolver/kres_modules/http/d3.js
+usr/share/javascript/jquery/jquery.min.js usr/lib/knot-resolver/kres_modules/http/jquery.js
diff --git a/distro/deb/knot-resolver-module-tinyweb.install b/distro/deb/knot-resolver-module-tinyweb.install
deleted file mode 100644 (file)
index 905241c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/knot-resolver/tinyweb/*
index 472b32a6e072c3967db2c0b65f36f05fb1472f35..bb5a4f1f6903a621bef855ca90373e5cd74124a1 100644 (file)
@@ -1,3 +1 @@
-/etc/knot-resolver
-/usr/share/doc/knot-resolver/examples/
 /var/lib/knot-resolver
diff --git a/distro/deb/knot-resolver.docs b/distro/deb/knot-resolver.docs
new file mode 100644 (file)
index 0000000..b6d7d68
--- /dev/null
@@ -0,0 +1 @@
+usr/share/doc/knot-resolver/*
index d6c9b10974b7e40f22c789be095e42e505279338..f583efbb9f3985da6a1e5739c9bfcd94f241def6 100644 (file)
@@ -1,38 +1,28 @@
-debian/init-d-script usr/lib/knot-resolver/
-debian/kresd.conf etc/knot-resolver/
-etc/knot-resolver/config.* /usr/share/doc/knot-resolver/examples/
-distro/common/systemd/kresd-control@.socket lib/systemd/system/
-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/
+etc/knot-resolver/kresd.conf
+usr/lib/systemd/system/* lib/systemd/system/
+usr/lib/tmpfiles.d/knot-resolver.conf
 usr/lib/knot-resolver/*.so
-usr/lib/knot-resolver/basexx.lua
-usr/lib/knot-resolver/daf.lua
-usr/lib/knot-resolver/daf/
-usr/lib/knot-resolver/detect_time_jump.lua
-usr/lib/knot-resolver/detect_time_skew.lua
-usr/lib/knot-resolver/dns64.lua
-usr/lib/knot-resolver/etcd.lua
-usr/lib/knot-resolver/experimental_dot_auth.lua
-usr/lib/knot-resolver/graphite.lua
-usr/lib/knot-resolver/http_trace.lua
-usr/lib/knot-resolver/kres-gen.lua
-usr/lib/knot-resolver/kres.lua
-usr/lib/knot-resolver/policy.lua
-usr/lib/knot-resolver/predict.lua
-usr/lib/knot-resolver/prefill.lua
-usr/lib/knot-resolver/priming.lua
-usr/lib/knot-resolver/prometheus.lua
-usr/lib/knot-resolver/rebinding.lua
-usr/lib/knot-resolver/renumber.lua
-usr/lib/knot-resolver/serve_stale.lua
-usr/lib/knot-resolver/ta_sentinel.lua
-usr/lib/knot-resolver/ta_signal_query.lua
-usr/lib/knot-resolver/trust_anchors.lua
-usr/lib/knot-resolver/view.lua
-usr/lib/knot-resolver/workarounds.lua
-usr/lib/knot-resolver/zonefile.lua
+usr/lib/knot-resolver/*.lua
+usr/lib/knot-resolver/kres_modules/*.so
+usr/lib/knot-resolver/kres_modules/basexx.lua
+usr/lib/knot-resolver/kres_modules/daf.lua
+usr/lib/knot-resolver/kres_modules/daf/*
+usr/lib/knot-resolver/kres_modules/detect_time_jump.lua
+usr/lib/knot-resolver/kres_modules/detect_time_skew.lua
+usr/lib/knot-resolver/kres_modules/dns64.lua
+usr/lib/knot-resolver/kres_modules/etcd.lua
+usr/lib/knot-resolver/kres_modules/experimental_dot_auth.lua
+usr/lib/knot-resolver/kres_modules/graphite.lua
+usr/lib/knot-resolver/kres_modules/policy.lua
+usr/lib/knot-resolver/kres_modules/predict.lua
+usr/lib/knot-resolver/kres_modules/prefill.lua
+usr/lib/knot-resolver/kres_modules/priming.lua
+usr/lib/knot-resolver/kres_modules/rebinding.lua
+usr/lib/knot-resolver/kres_modules/renumber.lua
+usr/lib/knot-resolver/kres_modules/serve_stale.lua
+usr/lib/knot-resolver/kres_modules/ta_sentinel.lua
+usr/lib/knot-resolver/kres_modules/ta_signal_query.lua
+usr/lib/knot-resolver/kres_modules/view.lua
+usr/lib/knot-resolver/kres_modules/workarounds.lua
 usr/sbin/kresc
 usr/sbin/kresd
diff --git a/distro/deb/knot-resolver.kresd.default b/distro/deb/knot-resolver.kresd.default
deleted file mode 100644 (file)
index f7c46e5..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-# /etc/default/kresd
-
-# This file is used only under sysvinit.  If you use systemd and you
-# want to modify the arguments with which kresd is invoked, you should
-# instead use "systemctl edit kresd@.service" to override ExecStart=
-# in the [Service] section (see kresd.systemd(7) for more details).
-
-# For sysvinit users: KRESD_ARGS used to exist for historical reasons,
-# but that variable is deprecated and may stop working at some point
-# in the future.  You are encouraged to merge any local changes into
-# DAEMON_ARGS directly.
-
-DAEMON_ARGS="--config=/etc/knot-resolver/kresd.conf --addr=127.0.0.1#53 --addr=::1#53 $KRESD_ARGS"
diff --git a/distro/deb/knot-resolver.kresd.init b/distro/deb/knot-resolver.kresd.init
deleted file mode 100644 (file)
index b1361fd..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
-if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
-    if [ -x /lib/init/init-d-script ]; then
-       set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
-    else
-       set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /usr/lib/knot-resolver/init-d-script
-    fi
-fi
-### BEGIN INIT INFO
-# Provides:          kresd
-# Required-Start:    $remote_fs $syslog
-# Required-Stop:     $remote_fs $syslog
-# Default-Start:     2 3 4 5
-# Default-Stop:      0 1 6
-# Short-Description: Knot Resolver
-# Description:       Knot Resolver
-### END INIT INFO
-
-# Author: Ondřej Surý <ondrej@debian.org>
-
-NAME=kresd
-DESC="Knot Resolver"
-DAEMON=/usr/sbin/kresd
-START_ARGS="--background --make-pidfile"
-
-do_tmpfiles() {
-    local tmpfile type path mode user group age argument
-    tmpfile=/usr/lib/tmpfiles.d/$1.conf
-    if [ -r "$tmpfile" ]; then
-       if [ -x /bin/systemd-tmpfiles ]; then
-           /bin/systemd-tmpfiles --create "$tmpfile"
-       else
-           while read type path mode user group age argument; do
-               case "$type" in
-                   d)
-                       mkdir -p "$path";
-                       chmod "$mode" "$path";
-                       chown "$user:$group" "$path";
-                       ;;
-                   L)
-                       if [ ! -e "$path" ]; then ln -s "$argument" "$path"; fi
-                       ;;
-                   \#*)
-                       ;;
-                   *)
-                       log_warning_msg "tmpfile.d type '$type' is not supported yet"
-                       ;;
-               esac
-           done < "$tmpfile"
-       fi
-    else
-       log_warning_msg "tmpfiles.d file '$1' doesn't exist or is not readable"
-    fi
-}
-
-do_start_prepare() {
-    do_tmpfiles knot-resolver
-}
index 9f97677b962de1a8a481cf8fd052f7dedc5265ca..58ed33d0de1ae840eb7f4cfce685f4b746197c61 100644 (file)
@@ -1,2 +1,2 @@
 debian/tmp/usr/share/man/man8/kresd.8
-distro/common/systemd/kresd.systemd.7
+debian/tmp/usr/share/man/man7/kresd.systemd.7
index 7c4bc5b64a561e59fe711d365875f81b6edde8cc..8f89ac2693e84b2707de4d4701cd770a696c891f 100644 (file)
@@ -12,19 +12,12 @@ if [ "$1" = "triggered" ]; then
     if [ "$2" = "/usr/share/dns/root.key" ]; then
         # systemctl of the sub-services is the preferred method to restart
         systemctl try-restart 'kresd@*.service' || true
-        # but if we are running sysvinit, we can try to restart that process anyway
-        # (kresd.service is masked on systems that use systemd)
-        invoke-rc.d kresd try-restart || true
     fi
     exit 0
 fi
 
 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
-    if [ -d /run/systemd/system ]; then
-        systemctl try-restart 'kresd@*.service' || true
-    else
-        invoke-rc.d kresd try-restart || true
-    fi
+    systemctl try-restart 'kresd@*.service' || true
 fi
 
 #DEBHELPER#
index d67739eaead0857eb92e34759613d56f0a97bbbe..68ae9e0d792977d4c50e52ad16104cb84729a6fa 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh
 set -e
 
-if [ "$1" = "remove" ] && [ -x "/bin/systemctl" ]; then
+if [ "$1" = "remove" ]; then
     systemctl stop system-kresd.slice || true
 fi
 
index 590e3b2d8c449edba350efd9c77ff463a32d9a28..9e66fbb6687a87dbdbe3178cee05563356e18496 100644 (file)
@@ -1 +1 @@
-usr/lib/knot-resolver/http/LICENSE
+usr/lib/knot-resolver/kres_modules/http/LICENSE
diff --git a/distro/deb/patches/0001-Update-documentation-of-keyfile-ro.patch b/distro/deb/patches/0001-Update-documentation-of-keyfile-ro.patch
deleted file mode 100644 (file)
index 53e6bb3..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
-Date: Sat, 17 Feb 2018 15:52:20 -0500
-Subject: Update documentation of --keyfile-ro
-
-On Debian systems, we depend on the OS package management to update
-the dns root data.  Make the documentation for running with this
-option less scary-sounding, as it is the default.
----
- doc/kresd.8.in | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/doc/kresd.8.in b/doc/kresd.8.in
-index 266e9f0..6c5195b 100644
---- a/doc/kresd.8.in
-+++ b/doc/kresd.8.in
-@@ -123,7 +123,7 @@ file at the default location (\fIconfig\fR). The syntax is
- described in \fIdaemon/README.md\fR.
- .TP
- .B \-k\fI keyfile\fR, \fB\-\-keyfile=\fI<keyfile>
--(Recommended!) Automatically managed root trust anchors file.
-+Automatically managed root trust anchors file.
- Root trust anchors in this file are managed using standard RFC 5011 (Automated Updates of DNS Security Trust Anchors).
- Kresd needs write access to the directory containing the keyfile.
-@@ -134,9 +134,14 @@ The file contains DNSKEY/DS records in presentation format,
- and is compatible with Unbound and BIND 9 root key files.
- .TP
- .B \-K\fI keyfile\fR, \fB\-\-keyfile\-ro=\fI<keyfile>
--(Discouraged) Static root trust anchors file. The file is not updated by kresd. Use of this option is discouraged because it will break your installation when the trust anchor key changes!
-+Static root trust anchors file. The file is not updated by
-+kresd. Please ensure that any running kresd instances are restarted if
-+the trust anchors change. (On Debian, kresd will be restarted
-+automatically when the dns-root-data package updates
-+/usr/share/dns/root.key, so nothing extra needs to be done unless you
-+diverge from the default here.)
--Default: "@KEYFILE_DEFAULT@" (can be empty if your distribution did not provide one)
-+Default: "@KEYFILE_DEFAULT@"
- .TP
- .B \-m\fI path\fR, \fB\-\-moduledir=\fI<path>
- Override the directory that is searched for modules.  Default: @MODULEDIR@
diff --git a/distro/deb/patches/series b/distro/deb/patches/series
deleted file mode 100644 (file)
index 5f6f9b5..0000000
+++ /dev/null
@@ -1 +0,0 @@
-0001-Update-documentation-of-keyfile-ro.patch
index 758f30c765c225a1538ecd828fe5cbff8f4ff3ff..43d36da38411692172913ed8c033acae943c4d49 100755 (executable)
@@ -14,55 +14,31 @@ DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/default.mk
 
 export ARCH=$(DEB_HOST_GNU_CPU)
-export PREFIX=/usr
-export MODULEDIR=/usr/lib/knot-resolver
-export ETCDIR=/etc/knot-resolver
-
-RUN_TESTS := yes
-ifeq ($(DEB_HOST_ARCH),$(filter $(DEB_HOST_ARCH),hurd-i386 mips mipsel ppc64 ppc64el armel armhf arm64 kfreebsd-amd64 kfreebsd-i386))
-  $(warning Disabling checks on $(DEB_HOST_ARCH))
-  RUN_TESTS := no
-endif
 
 %:
        dh $@
 
-override_dh_auto_clean-indep:
-       dh_auto_clean -- doc-clean http-clean
-
-override_dh_auto_build-arch:
-       CFLAGS="$${CFLAGS} -DNDEBUG" dh_auto_build -- V=1 BUILDMODE=static lib
-       CFLAGS="$${CFLAGS} -DNDEBUG" dh_auto_build -- V=1 \
-        ROOTHINTS=/usr/share/dns/root.hints \
-        KEYFILE_DEFAULT=/usr/share/dns/root.key
-
-override_dh_auto_build-indep:
-       dh_auto_build -- V=1 http
-       dh_auto_build -- V=1 doc-doxygen
-       cd doc && sphinx-build -b html -D html_theme=nature . html
-
-override_dh_auto_install-arch:
-       dh_auto_install --destdir=debian/tmp -- V=1 KEYFILE_DEFAULT=/usr/share/dns/root.key
-       rm -f debian/tmp/etc/knot-resolver/root.hints debian/tmp/etc/knot-resolver/icann-ca.pem
-
-override_dh_auto_install-indep:
-# install just the http/2 module
-       make http-install DESTDIR=debian/tmp V=1
-
-override_dh_installinit:
-       dh_installinit -pknot-resolver --name=kresd --no-start
-
-override_dh_installsystemd:
-       dh_installsystemd -pknot-resolver --name=kresd kresd-tls.socket kresd.socket
-
-override_dh_auto_test-indep:
-override_dh_auto_test-arch:
-ifeq ($(RUN_TESTS),yes)
-       dh_auto_test -- V=1
-endif
+override_dh_auto_build:
+       meson build_deb \
+               --buildtype=plain \
+               --prefix=/usr \
+               --libdir=lib \
+               -Ddoc=enabled \
+               -Dsystemd_unit_files=enabled \
+               -Dclient=enabled \
+               -Dkeyfile_default=/usr/share/dns/root.key \
+               -Droot_hints=/usr/share/dns/root.hints \
+               -Dinstall_kresd_conf=enabled \
+               -Dunit_tests=enabled \
+               -Dc_args="$${CFLAGS}" \
+               -Dc_link_args="$${LDFLAGS}"
+       ninja -v -C build_deb
+
+override_dh_auto_install:
+       DESTDIR="${PWD}/debian/tmp" ninja -v -C build_deb install
+
+override_dh_auto_test:
+       meson test -C build_deb
 
 override_dh_missing:
        dh_missing --fail-missing
-
-override_dh_installchangelogs:
-       dh_installchangelogs NEWS
diff --git a/distro/deb/tests/control b/distro/deb/tests/control
deleted file mode 100644 (file)
index be666d7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Test-Command: make installcheck
-Depends: @, @builddeps@