From 399412ff0b9c883ee61e46c8ad2261c801149a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ru=C5=BEi=C4=8Dka?= Date: Mon, 7 Oct 2024 14:50:47 +0200 Subject: [PATCH 1/8] distro/pkg/deb: use meson through debhelper Use standard debhelper as opposed to calling meson and ninja manually. --- distro/pkg/deb/rules | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/distro/pkg/deb/rules b/distro/pkg/deb/rules index 66c71c3ee..0fbd35709 100755 --- a/distro/pkg/deb/rules +++ b/distro/pkg/deb/rules @@ -19,10 +19,10 @@ include /usr/share/dpkg/default.mk %: - dh $@ --with python3 --buildsystem pybuild + dh $@ --with python3 --buildsystem=meson -override_dh_auto_build: - meson build_deb \ +override_dh_auto_configure: + dh_auto_configure -- \ --buildtype=plain \ --prefix=/usr \ --libdir=lib \ @@ -31,16 +31,15 @@ override_dh_auto_build: -Dkeyfile_default=/usr/share/dns/root.key \ -Droot_hints=/usr/share/dns/root.hints \ -Dunit_tests=enabled \ - -Dmalloc=jemalloc \ - -Dc_args="$${CFLAGS}" \ - -Dc_link_args="$${LDFLAGS}" - ninja -v -C build_deb - PYBUILD_NAME=knot_resolver PYBUILD_DESTDIR="$${PYKRES_DESTDIR}" dh_auto_build + -Dmalloc=jemalloc + +override_dh_auto_build: + dh_auto_build + PYBUILD_NAME=knot_resolver PYBUILD_DESTDIR="$${PYKRES_DESTDIR}" \ + dh_auto_build --buildsystem=pybuild override_dh_auto_install: - DESTDIR="$(shell pwd)/debian/tmp" ninja -v -C build_deb install - PYBUILD_NAME=knot_resolver PYBUILD_DESTDIR="$${PYKRES_DESTDIR}" dh_auto_install + dh_auto_install + PYBUILD_NAME=knot_resolver PYBUILD_DESTDIR="$${PYKRES_DESTDIR}" \ + dh_auto_install --buildsystem=pybuild install -m 644 -D etc/config/config.yaml debian/tmp/etc/knot-resolver/config.yaml - -override_dh_auto_test: - meson test -C build_deb From 6549c83491dab33ec74f1ac4a752ca9c435b45c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ru=C5=BEi=C4=8Dka?= Date: Mon, 7 Oct 2024 15:49:40 +0200 Subject: [PATCH 2/8] distro/pkg/deb: update knot-resolver6.links --- distro/pkg/deb/knot-resolver6.links | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distro/pkg/deb/knot-resolver6.links b/distro/pkg/deb/knot-resolver6.links index c5467e848..03092f551 100644 --- a/distro/pkg/deb/knot-resolver6.links +++ b/distro/pkg/deb/knot-resolver6.links @@ -1 +1 @@ -lib/systemd/system/knot-resolver.service lib/systemd/system/multi-user.target.wants/knot-resolver.service +usr/lib/systemd/system/knot-resolver.service usr/lib/systemd/system/multi-user.target.wants/knot-resolver.service From 8d67d7ec5ddca3ba4bafc2c391af73822f2f6913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ru=C5=BEi=C4=8Dka?= Date: Mon, 7 Oct 2024 16:14:56 +0200 Subject: [PATCH 3/8] distro/pkg/deb: improve knot-resolver6.postinst Switching to deb-systemd-invoke saves one lintian warning about directly invoking systemd. --- distro/pkg/deb/knot-resolver6.postinst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distro/pkg/deb/knot-resolver6.postinst b/distro/pkg/deb/knot-resolver6.postinst index e98529876..5d21e3862 100644 --- a/distro/pkg/deb/knot-resolver6.postinst +++ b/distro/pkg/deb/knot-resolver6.postinst @@ -8,8 +8,8 @@ fi 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 knot-resolver.service || true + systemd-tmpfiles --create /usr/lib/tmpfiles.d/knot-resolver.conf || true + deb-systemd-invoke try-restart knot-resolver.service || true fi #DEBHELPER# From 3af01fb82311856e768e31aa32e6b5f30246df5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ru=C5=BEi=C4=8Dka?= Date: Mon, 7 Oct 2024 15:58:11 +0200 Subject: [PATCH 4/8] distro/pkg/deb: remove Multi-Arch: same from dnstap The module isn't really Multi-Arch, remove the false declaration. --- distro/pkg/deb/control | 1 - 1 file changed, 1 deletion(-) diff --git a/distro/pkg/deb/control b/distro/pkg/deb/control index e376bd46a..37865deaf 100644 --- a/distro/pkg/deb/control +++ b/distro/pkg/deb/control @@ -90,7 +90,6 @@ Description: Knot Resolver development files Package: knot-resolver6-module-dnstap Architecture: any -Multi-Arch: same Depends: knot-resolver6 (= ${binary:Version}), libfstrm0, From 39dbbfd4f1c963ceac56b7a8181d63d492fb8750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ru=C5=BEi=C4=8Dka?= Date: Mon, 7 Oct 2024 17:13:27 +0200 Subject: [PATCH 5/8] distro/pkg/deb: extend -dev package description --- distro/pkg/deb/control | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/distro/pkg/deb/control b/distro/pkg/deb/control index 37865deaf..5661e9739 100644 --- a/distro/pkg/deb/control +++ b/distro/pkg/deb/control @@ -86,6 +86,12 @@ Depends: ${misc:Depends}, Section: libdevel Description: Knot Resolver development files + Knot Resolver is a caching full resolver implementation + written in C and LuaJIT, including both a resolver library and a + daemon. Modular architecture of the library keeps the core tiny and + efficient, and provides a state-machine like API for + extensions. + . This package provides the development headers for Knot Resolver. Package: knot-resolver6-module-dnstap From 7c22fe868d5b4c0feb69f0d80f37d668dfadcf6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ru=C5=BEi=C4=8Dka?= Date: Mon, 7 Oct 2024 17:19:10 +0200 Subject: [PATCH 6/8] distro/pkg/deb: exclude redundant COPYING file Silences lintian cry: I: knot-resolver6: extra-license-file [usr/share/doc/knot-resolver6/COPYING.gz] --- distro/pkg/deb/knot-resolver6.docs | 1 - distro/pkg/deb/not-installed | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/distro/pkg/deb/knot-resolver6.docs b/distro/pkg/deb/knot-resolver6.docs index 9bd0e8027..a01ec3f7e 100644 --- a/distro/pkg/deb/knot-resolver6.docs +++ b/distro/pkg/deb/knot-resolver6.docs @@ -1,5 +1,4 @@ README.md usr/share/doc/knot-resolver/AUTHORS -usr/share/doc/knot-resolver/COPYING usr/share/doc/knot-resolver/NEWS usr/share/doc/knot-resolver/examples diff --git a/distro/pkg/deb/not-installed b/distro/pkg/deb/not-installed index e653609ec..540285b48 100644 --- a/distro/pkg/deb/not-installed +++ b/distro/pkg/deb/not-installed @@ -1,3 +1,4 @@ -usr/lib/knot-resolver/kres_modules/http/LICENSE usr/lib/knot-resolver/kres_modules/etcd.lua +usr/lib/knot-resolver/kres_modules/http/LICENSE usr/lib/sysusers.d/knot-resolver.conf +usr/share/doc/knot-resolver/COPYING From 8459e1df05c50d892284f5546a77fddd74db6bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ru=C5=BEi=C4=8Dka?= Date: Mon, 7 Oct 2024 17:09:36 +0200 Subject: [PATCH 7/8] distro/pkg/deb: make pkgconfig available for cross-compilation This addresses lintian warning W: knot-resolver6-dev: pkg-config-unavailable-for-cross-compilation [usr/lib/pkgconfig/libkres.pc] --- distro/pkg/deb/knot-resolver6-dev.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distro/pkg/deb/knot-resolver6-dev.install b/distro/pkg/deb/knot-resolver6-dev.install index d565b3868..bd37a6771 100644 --- a/distro/pkg/deb/knot-resolver6-dev.install +++ b/distro/pkg/deb/knot-resolver6-dev.install @@ -1,3 +1,3 @@ usr/include/libkres/*.h usr/lib/*.so -usr/lib/pkgconfig/libkres.pc +usr/lib/pkgconfig/libkres.pc usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig From 3132a92aa57cbb91344bc0c4160126b735f8155b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ru=C5=BEi=C4=8Dka?= Date: Mon, 7 Oct 2024 16:31:53 +0200 Subject: [PATCH 8/8] distro/pkg/deb: silence more irrelevant lintian cries --- .../knot-resolver6-module-http.lintian-overrides | 4 ++++ distro/pkg/deb/knot-resolver6.lintian-overrides | 10 ++++++++++ distro/pkg/deb/source/lintian-overrides | 16 ++++++++++++---- 3 files changed, 26 insertions(+), 4 deletions(-) create mode 100644 distro/pkg/deb/knot-resolver6-module-http.lintian-overrides create mode 100644 distro/pkg/deb/knot-resolver6.lintian-overrides diff --git a/distro/pkg/deb/knot-resolver6-module-http.lintian-overrides b/distro/pkg/deb/knot-resolver6-module-http.lintian-overrides new file mode 100644 index 000000000..d5ed3fd36 --- /dev/null +++ b/distro/pkg/deb/knot-resolver6-module-http.lintian-overrides @@ -0,0 +1,4 @@ +# UPSTREAM: intended +knot-resolver6-module-http: font-in-non-font-package +# UPSTREAM: intended +knot-resolver6-module-http: font-outside-font-dir diff --git a/distro/pkg/deb/knot-resolver6.lintian-overrides b/distro/pkg/deb/knot-resolver6.lintian-overrides new file mode 100644 index 000000000..fc5a386e1 --- /dev/null +++ b/distro/pkg/deb/knot-resolver6.lintian-overrides @@ -0,0 +1,10 @@ +# this library is only shared within kresd +knot-resolver6: package-name-doesnt-match-sonames libkres9 +# this library is only shared within kresd, no need for symbols +knot-resolver6: no-symbols-control-file usr/lib/libkres.so.9 +# it's a module +knot-resolver6: shared-library-lacks-prerequisites [usr/lib/knot-resolver/kres_modules/refuse_nord.so] +# no init.d support +knot-resolver6: package-supports-alternative-init-but-no-init.d-script +# UPSTREAM: no docs build yet due to missing deps +knot-resolver6: no-manual-page diff --git a/distro/pkg/deb/source/lintian-overrides b/distro/pkg/deb/source/lintian-overrides index ff8e36a39..7c9627c81 100644 --- a/distro/pkg/deb/source/lintian-overrides +++ b/distro/pkg/deb/source/lintian-overrides @@ -1,4 +1,4 @@ -# upstream package doesn't include missing-sources for HTTP module static files, +# UPSTREAM: package doesn't include missing-sources for HTTP module static files, # they can be found in individual upstream repos or in Debian package debian/missing-sources source: source-is-missing [modules/http/static/bootstrap.min.js] source: source-is-missing [modules/http/static/d3.js] @@ -8,9 +8,17 @@ source: source-is-missing [modules/http/static/epoch.js] source: source-is-missing [modules/http/static/jquery.js] source: source-is-missing [modules/http/static/selectize.min.js] source: source-is-missing [modules/http/static/topojson.js] -# that's how HTTP module is built upstream +# UPSTREAM: that's how HTTP module is built upstream source: source-contains-prebuilt-javascript-object -# not relevant in upstream package +# UPSTREAM: not relevant in upstream package source: no-nmu-in-changelog -# upstream package uses apkg, watch file is redundant +# UPSTREAM: package uses apkg, watch file is redundant source: debian-watch-file-is-missing +# UPSTREAM: we build cross-distro, Standards-Version rarely matches +source: newer-standards-version +# UPSTREAM: old distro compat +source: package-uses-old-debhelper-compat-version +# UPSTREAM: old distro compat +source: uses-debhelper-compat-file +# UPSTREAM: we use setuptools for now for old distro compat +source: missing-prerequisite-for-pyproject-backend