From: Tomas Krizek Date: Mon, 26 Feb 2018 15:46:11 +0000 (+0100) Subject: debian: update packaging files X-Git-Tag: v2.7.0~128^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac2acdba2c43ea72a68c032c0fe4e477c55b1b27;p=thirdparty%2Fknot-dns.git debian: update packaging files --- diff --git a/distro/deb/debian/clean b/distro/deb/debian/clean new file mode 100644 index 0000000000..7e5c11136c --- /dev/null +++ b/distro/deb/debian/clean @@ -0,0 +1 @@ +doc/modules diff --git a/distro/deb/debian/control b/distro/deb/debian/control index 563de6a0f0..db2eb34f5b 100644 --- a/distro/deb/debian/control +++ b/distro/deb/debian/control @@ -4,44 +4,46 @@ Priority: optional Maintainer: Knot DNS Uploaders: Tomas Krizek -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 diff --git a/distro/deb/debian/copyright b/distro/deb/debian/copyright index dc33a797b0..a5e41906be 100644 --- a/distro/deb/debian/copyright +++ b/distro/deb/debian/copyright @@ -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 -License: Expat - Files: libtap/* Copyright: 2000-2001, 2004, 2006-2011 Russ Allbery License: Expat diff --git a/distro/deb/debian/get_kaspdb b/distro/deb/debian/get_kaspdb index 512a8add32..7c0056d474 100755 --- a/distro/deb/debian/get_kaspdb +++ b/distro/deb/debian/get_kaspdb @@ -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) diff --git a/distro/deb/debian/get_user b/distro/deb/debian/get_user index e0d1cf2e0b..30f2d36220 100755 --- a/distro/deb/debian/get_user +++ b/distro/deb/debian/get_user @@ -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]) diff --git a/distro/deb/debian/knot-dnsutils.NEWS b/distro/deb/debian/knot-dnsutils.NEWS index 7031bbcff8..20045dcd86 100644 --- a/distro/deb/debian/knot-dnsutils.NEWS +++ b/distro/deb/debian/knot-dnsutils.NEWS @@ -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ý 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 index 0000000000..394902205e --- /dev/null +++ b/distro/deb/debian/knot-doc.links @@ -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 diff --git a/distro/deb/debian/knot-host.NEWS b/distro/deb/debian/knot-host.NEWS index 7031bbcff8..20045dcd86 100644 --- a/distro/deb/debian/knot-host.NEWS +++ b/distro/deb/debian/knot-host.NEWS @@ -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ý Mon, 18 Sep 2017 07:07:49 +0200 diff --git a/distro/deb/debian/knot.dirs b/distro/deb/debian/knot.dirs index d7a3053249..6e937aab39 100644 --- a/distro/deb/debian/knot.dirs +++ b/distro/deb/debian/knot.dirs @@ -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 index 0000000000..a2a268ecd0 --- /dev/null +++ b/distro/deb/debian/patches/0001-use-python3-in-pykeymgr.patch @@ -0,0 +1,44 @@ +From: Daniel Kahn Gillmor +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 index 0000000000..b54cabbfa0 --- /dev/null +++ b/distro/deb/debian/patches/series @@ -0,0 +1 @@ +0001-use-python3-in-pykeymgr.patch diff --git a/distro/deb/debian/rules b/distro/deb/debian/rules index b769c863b9..d7d3171c3d 100755 --- a/distro/deb/debian/rules +++ b/distro/deb/debian/rules @@ -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 index 0000000000..559a8f7215 --- /dev/null +++ b/distro/deb/debian/tests/control @@ -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 index 0000000000..a2f388e317 --- /dev/null +++ b/distro/deb/debian/tests/kdig @@ -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 diff --git a/distro/deb/knot.dsc b/distro/deb/knot.dsc index 141353130d..d3ac82d071 100644 --- a/distro/deb/knot.dsc +++ b/distro/deb/knot.dsc @@ -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 Uploaders: Tomas Krizek 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