]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
debian: update packaging files
authorTomas Krizek <tomas.krizek@nic.cz>
Mon, 26 Feb 2018 15:46:11 +0000 (16:46 +0100)
committerTomas Krizek <tomas.krizek@nic.cz>
Mon, 19 Mar 2018 15:27:46 +0000 (16:27 +0100)
15 files changed:
distro/deb/debian/clean [new file with mode: 0644]
distro/deb/debian/control
distro/deb/debian/copyright
distro/deb/debian/get_kaspdb
distro/deb/debian/get_user
distro/deb/debian/knot-dnsutils.NEWS
distro/deb/debian/knot-doc.links [new file with mode: 0644]
distro/deb/debian/knot-host.NEWS
distro/deb/debian/knot.dirs
distro/deb/debian/patches/0001-use-python3-in-pykeymgr.patch [new file with mode: 0644]
distro/deb/debian/patches/series [new file with mode: 0644]
distro/deb/debian/rules
distro/deb/debian/tests/control [new file with mode: 0644]
distro/deb/debian/tests/kdig [new file with mode: 0755]
distro/deb/knot.dsc

diff --git a/distro/deb/debian/clean b/distro/deb/debian/clean
new file mode 100644 (file)
index 0000000..7e5c111
--- /dev/null
@@ -0,0 +1 @@
+doc/modules
index 563de6a0f0ea4c41801fd231614d1ae056baf0fd..db2eb34f5b9ddf5efb0822e8c3746799f4b2c2cd 100644 (file)
@@ -4,44 +4,46 @@ Priority: optional
 Maintainer: Knot DNS <knot-dns@labs.nic.cz>
 Uploaders:
  Tomas Krizek <tomas.krizek@nic.cz>
-Build-Depends-Indep: ghostscript,
-                     python-sphinx,
-                     texinfo,
-                     texlive,
-                     texlive-font-utils,
-                     texlive-generic-extra,
-                     texlive-latex-extra
-Build-Depends: autotools-dev,
-               debhelper (>= 9),
-               dh-autoreconf,
-               dh-systemd,
-               latexmk,
-               libedit-dev,
-               libfstrm-dev,
-               libgnutls28-dev,
-               libidn11-dev,
-               liblmdb-dev,
-               libprotobuf-c-dev,
-               libsystemd-dev [linux-any] | libsystemd-daemon-dev [linux-any],
-               libsystemd-dev [linux-any] | libsystemd-journal-dev [linux-any],
-               liburcu-dev (>= 0.4),
-               pkg-config,
-               protobuf-c-compiler
+Build-Depends-Indep:
+ ghostscript,
+ python3-sphinx,
+ texinfo,
+ texlive,
+ texlive-font-utils,
+ texlive-generic-extra,
+ texlive-latex-extra,
+Build-Depends:
+ debhelper (>= 9),
+ latexmk,
+ libedit-dev,
+ libfstrm-dev,
+ libgnutls28-dev,
+ libidn11-dev,
+ liblmdb-dev,
+ libprotobuf-c-dev,
+ libsystemd-dev [linux-any] | libsystemd-daemon-dev [linux-any],
+ libsystemd-dev [linux-any] | libsystemd-journal-dev [linux-any],
+ liburcu-dev (>= 0.4),
+ pkg-config,
+ protobuf-c-compiler,
 Homepage: https://www.knot-dns.cz/
 
 Package: knot
 Architecture: any
-Depends: adduser,
-         libdnssec5 (= ${binary:Version}),
-         libknot7 (= ${binary:Version}),
-         libzscanner1 (= ${binary:Version}),
-         lsb-base (>= 3.0-6),
-         python,
-         python-lmdb,
-         python-yaml,
-         ${misc:Depends},
-         ${shlibs:Depends}
-Suggests: systemd
+Depends:
+ adduser,
+ libdnssec5 (= ${binary:Version}),
+ libknot7 (= ${binary:Version}),
+ libzscanner1 (= ${binary:Version}),
+ lsb-base (>= 3.0-6),
+ python3,
+ python3-yaml,
+ ${misc:Depends},
+ ${shlibs:Depends},
+Recommends:
+ python3-lmdb,
+Suggests:
+ systemd,
 Description: Authoritative domain name server
  Knot DNS is a fast, authoritative only, high performance, feature
  full and open source name server.
@@ -52,13 +54,17 @@ Description: Authoritative domain name server
 
 Package: libknot7
 Architecture: any
-Depends: ${misc:Depends},
-         ${shlibs:Depends}
+Multi-Arch: same
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
 Section: libs
-Replaces: knot-libs (<< 2.0.1-4),
-          libknot6 (<< 2.6.1-1~)
-Breaks: knot-libs (<< 2.0.1-4),
-        libknot6 (<< 2.6.1-1~)
+Replaces:
+ knot-libs (<< 2.0.1-4),
+ libknot6 (<< 2.6.1-1~)
+Breaks:
+ knot-libs (<< 2.0.1-4),
+ libknot6 (<< 2.6.1-1~)
 Description: Authoritative domain name server (shared library)
  Knot DNS is a fast, authoritative only, high performance, feature
  full and open source name server.
@@ -72,13 +78,17 @@ Description: Authoritative domain name server (shared library)
 
 Package: libzscanner1
 Architecture: any
-Depends: ${misc:Depends},
-         ${shlibs:Depends}
+Multi-Arch: same
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
 Section: libs
-Replaces: knot-libs (<< 2.0.1-4),
-          libzscanner0 (<< 2.3.0~)
-Breaks: knot-libs (<< 2.0.1-4),
-        libzscanner0 (<< 2.3.0~)
+Replaces:
+ knot-libs (<< 2.0.1-4),
+ libzscanner0 (<< 2.3.0~),
+Breaks:
+ knot-libs (<< 2.0.1-4),
+ libzscanner0 (<< 2.3.0~),
 Description: DNS zone-parsing library from Knot
  Knot DNS is a fast, authoritative only, high performance, feature
  full and open source name server.
@@ -92,13 +102,17 @@ Description: DNS zone-parsing library from Knot
 
 Package: libdnssec5
 Architecture: any
-Depends: ${misc:Depends},
-         ${shlibs:Depends}
+Multi-Arch: same
+Depends:
+ ${misc:Depends},
+ ${shlibs:Depends},
 Section: libs
-Replaces: knot-libs (<< 2.0.1-4),
-          libdnssec4 (<< 2.6.1-1~)
-Breaks: knot-libs (<< 2.0.1-4),
-        libdnssec4 (<< 2.6.1-1~)
+Replaces:
+ knot-libs (<< 2.0.1-4),
+ libdnssec4 (<< 2.6.1-1~),
+Breaks:
+ knot-libs (<< 2.0.1-4),
+ libdnssec4 (<< 2.6.1-1~),
 Description: DNSSEC shared library from Knot
  Knot DNS is a fast, authoritative only, high performance, feature
  full and open source name server.
@@ -112,16 +126,20 @@ Description: DNSSEC shared library from Knot
 
 Package: libknot-dev
 Architecture: any
-Depends: libdnssec5 (= ${binary:Version}),
-         libgnutls28-dev,
-         libjansson-dev,
-         libknot7 (= ${binary:Version}),
-         libzscanner1 (= ${binary:Version}),
-         ${misc:Depends},
-         ${shlibs:Depends}
+Multi-Arch: same
+Depends:
+ libdnssec5 (= ${binary:Version}),
+ libgnutls28-dev,
+ libjansson-dev,
+ libknot7 (= ${binary:Version}),
+ libzscanner1 (= ${binary:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
 Section: libdevel
-Replaces: knot-libs (<< 2.0.1-4)
-Breaks: knot-libs (<< 2.0.1-4)
+Replaces:
+ knot-libs (<< 2.0.1-4),
+Breaks:
+ knot-libs (<< 2.0.1-4),
 Description: Knot DNS shared library development files
  Knot DNS is a fast, authoritative only, high performance, feature
  full and open source name server.
@@ -135,11 +153,12 @@ Description: Knot DNS shared library development files
 
 Package: knot-dnsutils
 Architecture: any
-Depends: libdnssec5 (= ${binary:Version}),
-         libknot7 (= ${binary:Version}),
-         libzscanner1 (= ${binary:Version}),
-         ${misc:Depends},
-         ${shlibs:Depends}
+Depends:
+ libdnssec5 (= ${binary:Version}),
+ libknot7 (= ${binary:Version}),
+ libzscanner1 (= ${binary:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
 Description: Clients provided with Knot DNS (kdig, knslookup, knsupdate)
  Knot DNS is a fast, authoritative only, high performance, feature
  full and open source name server.
@@ -162,11 +181,12 @@ Description: Clients provided with Knot DNS (kdig, knslookup, knsupdate)
 
 Package: knot-host
 Architecture: any
-Depends: libdnssec5 (= ${binary:Version}),
-         libknot7 (= ${binary:Version}),
-         libzscanner1 (= ${binary:Version}),
-         ${misc:Depends},
-         ${shlibs:Depends}
+Depends:
+ libdnssec5 (= ${binary:Version}),
+ libknot7 (= ${binary:Version}),
+ libzscanner1 (= ${binary:Version}),
+ ${misc:Depends},
+ ${shlibs:Depends},
 Description: Version of 'host' bundled with Knot DNS
  Knot DNS is a fast, authoritative only, high performance, feature
  full and open source name server.
@@ -181,7 +201,11 @@ Description: Version of 'host' bundled with Knot DNS
 
 Package: knot-doc
 Architecture: all
-Depends: ${misc:Depends}
+Multi-Arch: foreign
+Depends:
+ libjs-jquery,
+ libjs-underscore,
+ ${misc:Depends},
 Section: doc
 Description: Documentation for Knot DNS
  Knot DNS is a fast, authoritative only, high performance, feature
index dc33a797b01401fe055a618bb5538b08fcb04f41..a5e41906be4e0e84a2975ef3938cf8e09bfd2849 100644 (file)
@@ -32,10 +32,6 @@ License: GPL-3+ with OpenSSL exception
  On Debian systems, the full text of the GNU General Public License
  version 3 can be found in the file `/usr/share/common-licenses/GPL-3'.
 
-Files: src/contrib/hat-trie/*
-Copyright: (c) 2011 by Daniel C. Jones <dcjones@cs.washington.edu>
-License: Expat
-
 Files: libtap/*
 Copyright: 2000-2001, 2004, 2006-2011 Russ Allbery <rra@stanford.edu>
 License: Expat
index 512a8add32ba5e794f49c0cf3cf5ceb04e2310d2..7c0056d47433d838ecb34d93b3f7d075159953f0 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import yaml, os.path, sys
 
@@ -53,6 +53,6 @@ if conf.has_key("zone"):
             else:
                 continue
         dirs.add(kasp_db)
-    
+
 for dir in dirs:
-    print dir
+    print(dir)
index e0d1cf2e0bcc76941abae31bc9a69969c35b3204..30f2d3622083e6ee9d983e50c9cb3218c62d50b7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import yaml, sys
 
@@ -25,4 +25,4 @@ if not conf:
 
 if conf.has_key("server"):
     if conf["server"].has_key("user"):
-        print conf["server"]["user"].split(":")[0].split(".")[0]
+        print(conf["server"]["user"].split(":")[0].split(".")[0])
index 7031bbcff8ef6df83f5783aeb08b9dd823086d73..20045dcd86d4bbf5294adfe402177ba1e9264517 100644 (file)
@@ -1,6 +1,6 @@
 knot (2.5.4-2) unstable; urgency=medium
 
-  The compatibility links with dig and nsupdate has been dropped
-    in favour of coinstallability with dnsutils (from BIND9).
+  The compatibility links with dig and nsupdate has been dropped
+  in favour of coinstallability with dnsutils (from BIND9).
 
  -- Ondřej Surý <ondrej@debian.org>  Mon, 18 Sep 2017 07:07:49 +0200
diff --git a/distro/deb/debian/knot-doc.links b/distro/deb/debian/knot-doc.links
new file mode 100644 (file)
index 0000000..3949022
--- /dev/null
@@ -0,0 +1,2 @@
+usr/share/javascript/jquery/jquery.min.js usr/share/doc/knot-doc/_static/jquery.js
+usr/share/javascript/underscore/underscore.min.js usr/share/doc/knot-doc/_static/underscore.js
index 7031bbcff8ef6df83f5783aeb08b9dd823086d73..20045dcd86d4bbf5294adfe402177ba1e9264517 100644 (file)
@@ -1,6 +1,6 @@
 knot (2.5.4-2) unstable; urgency=medium
 
-  The compatibility links with dig and nsupdate has been dropped
-    in favour of coinstallability with dnsutils (from BIND9).
+  The compatibility links with dig and nsupdate has been dropped
+  in favour of coinstallability with dnsutils (from BIND9).
 
  -- Ondřej Surý <ondrej@debian.org>  Mon, 18 Sep 2017 07:07:49 +0200
index d7a3053249a395da0b414030cf4e4117e21ca35c..6e937aab398c1ec1dbd1ddd3bdebb118f12ce4fc 100644 (file)
@@ -1,6 +1 @@
-etc/knot
-etc/ufw/applications.d
-usr/lib/knot
-usr/sbin
-usr/share/man/man8
 var/lib/knot
diff --git a/distro/deb/debian/patches/0001-use-python3-in-pykeymgr.patch b/distro/deb/debian/patches/0001-use-python3-in-pykeymgr.patch
new file mode 100644 (file)
index 0000000..a2a268e
--- /dev/null
@@ -0,0 +1,44 @@
+From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+Date: Tue, 20 Feb 2018 11:08:30 -0800
+Subject: use python3 in pykeymgr
+
+Debian currently explicitly uses the name "python3" to refer to python
+3, so adjust the shebang line to match.
+
+While we're at it, encourage the user to install packages via apt,
+instead of pip.
+
+Also, note that py3 uses / for "normal" division, but // is integer
+division on both py2 and py3.
+---
+ src/utils/pykeymgr/pykeymgr.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+Index: knot-dns/src/utils/pykeymgr/pykeymgr.in
+===================================================================
+--- knot-dns.orig/src/utils/pykeymgr/pykeymgr.in
++++ knot-dns/src/utils/pykeymgr/pykeymgr.in
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ # vim: et ts=4 sw=4 sts=4
+ #
+ # Manipulate LMDB-beckended KASP database (import from obsolete JSON KASP, list, modify...).
+@@ -30,7 +30,7 @@ def lmdb_requirement():
+               lmdb = importlib.import_module('lmdb')
+       except ImportError:
+               print("Error: unable to import module LMDB.")
+-              print("Probably you need to 'pip install lmdb' or so.")
++              print("Probably you need to 'apt install python3-lmdb'.")
+               sys.exit(10)
+ # workarounding that python 2 doesn't have int.to_bytes()
+@@ -84,7 +84,7 @@ def shuffle_unixtime(base_time, shuffle_
+       dt = datetime.datetime.fromtimestamp(base_time)
+       newmonth = (dt.month - 1 + rsm) % 12 + 1 # in python, % always returns [0, 11]
+       sameyear = dt.month + rsm % 12
+-      newyear = dt.year + rsm / 12 + (0 if sameyear in range(1, 13) else 1) # in python, (-1)/12 = -1
++      newyear = dt.year + rsm // 12 + (0 if sameyear in range(1, 13) else 1) # in python, (-1)//12 = -1
+       dt2 = dt.replace(month=newmonth, year=newyear)
+       print(dt2.month, "/", dt2.year)
+       ttuple = dt2.timetuple()
diff --git a/distro/deb/debian/patches/series b/distro/deb/debian/patches/series
new file mode 100644 (file)
index 0000000..b54cabb
--- /dev/null
@@ -0,0 +1 @@
+0001-use-python3-in-pykeymgr.patch
index b769c863b9d6875986a9b704be59b75005f9c8aa..d7d3171c3dea9b1e86b892cac20564302ea29574 100755 (executable)
@@ -32,7 +32,7 @@ else
 endif
 
 %:
-       dh $@ --with autotools-dev,systemd,autoreconf --parallel --dbgsym-migration='knot-dbg (<< 2.2.0-2~)' --exclude=.la --exclude=example.com.zone --fail-missing
+       dh $@ --dbgsym-migration='knot-dbg (<< 2.2.0-2~)' --exclude=.la --exclude=example.com.zone
 
 override_dh_auto_configure:
        dh_auto_configure -- \
@@ -70,3 +70,9 @@ override_dh_auto_test-arch:
 override_dh_installdirs-arch:
        dh_installdirs --arch --package=knot /usr/lib/$(DEB_HOST_MULTIARCH)/knot
        dh_installdirs --arch --remaining-packages
+
+override_dh_missing:
+       dh_missing --fail-missing
+
+override_dh_installchangelogs:
+       dh_installchangelogs NEWS
diff --git a/distro/deb/debian/tests/control b/distro/deb/debian/tests/control
new file mode 100644 (file)
index 0000000..559a8f7
--- /dev/null
@@ -0,0 +1,2 @@
+Tests: kdig
+Depends: knot-dnsutils, ca-certificates
diff --git a/distro/deb/debian/tests/kdig b/distro/deb/debian/tests/kdig
new file mode 100755 (executable)
index 0000000..a2f388e
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+expected=93.184.216.34
+answer=$(kdig +short +tls-ca +tls-hostname=dns.cmrg.net @dns.cmrg.net example.org)
+
+if [ "$answer" != "$expected" ]; then
+    printf "expected: %s\ngot: %s\n" "$expected" "$answer" >&2
+    kdig +tls-ca +tls-hostname=dns.cmrg.net @dns.cmrg.net example.org
+fi
index 141353130d4e8a7a4b804d57ebe1fd3e11d97822..d3ac82d0710823b18d65a09cd71181631c241a52 100644 (file)
@@ -1,13 +1,45 @@
 Format: 3.0 (quilt)
 Source: knot
-Binary: knot, libknot7, libzscanner1, libdnssec5, libknot-dev, knot-dnsutils, knot-host, knot-doc
+Binary:
+ knot,
+ libknot7,
+ libzscanner1,
+ libdnssec5,
+ libknot-dev,
+ knot-dnsutils,
+ knot-host,
+ knot-doc,
 Architecture: any all
 Version: __VERSION__-1
 Maintainer: Knot DNS <knot-dns@lists.nic.cz>
 Uploaders: Tomas Krizek <tomas.krizek@nic.cz>
 Homepage: https://www.knot-dns.cz/
-Build-Depends: autotools-dev, bash-completion, bison, debhelper (>= 9), dh-autoreconf, dh-systemd, flex, latexmk, libedit-dev, libfstrm-dev, libgnutls28-dev, libidn11-dev, libjansson-dev (>= 2.4), liblmdb-dev, libprotobuf-c-dev, libsystemd-dev [linux-any] | libsystemd-daemon-dev [linux-any], libsystemd-dev [linux-any] | libsystemd-journal-dev [linux-any], liburcu-dev (>= 0.4), pkg-config, protobuf-c-compiler
-Build-Depends-Indep: ghostscript, python-sphinx, texinfo, texlive, texlive-font-utils, texlive-generic-extra, texlive-latex-extra
+Build-Depends:
+ bash-completion,
+ bison,
+ debhelper (>= 9),
+ flex,
+ latexmk,
+ libedit-dev,
+ libfstrm-dev,
+ libgnutls28-dev,
+ libidn11-dev,
+ libjansson-dev (>= 2.4),
+ liblmdb-dev,
+ libprotobuf-c-dev,
+ libsystemd-dev [linux-any] | libsystemd-daemon-dev [linux-any],
+ libsystemd-dev [linux-any] | libsystemd-journal-dev [linux-any],
+ liburcu-dev (>= 0.4),
+ pkg-config,
+ protobuf-c-compiler,
+Build-Depends-Indep:
+ ghostscript,
+ python3-sphinx,
+ texinfo,
+ texlive,
+ texlive-font-utils,
+ texlive-generic-extra,
+ texlive-latex-extra,
 Package-List:
  knot deb net optional arch=any
  knot-dnsutils deb net optional arch=any