tag 932087 patch
thanks
Hi,
I've attached patches that we're using in our Debian derrivate for this.
I've also send the required patches to a bugreport against src:bind9
(will add a "block by" to this bug after having recieved the bugnumber).
Regards,
Daniel
>From 89bc67e87478cd3256431a28396fe04d2279c403 Mon Sep 17 00:00:00 2001
From: Daniel Baumann
Date: Tue, 27 Apr 2021 23:44:42 +0200
Subject: [PATCH 05/15] Adding update-alternatives to use kdig for
/usr/bin/dig.
Signed-off-by: Daniel Baumann
---
debian/knot-dnsutils.postinst | 25 +
debian/knot-dnsutils.prerm| 23 +++
2 files changed, 48 insertions(+)
create mode 100644 debian/knot-dnsutils.postinst
create mode 100644 debian/knot-dnsutils.prerm
diff --git a/debian/knot-dnsutils.postinst b/debian/knot-dnsutils.postinst
new file mode 100644
index 000..f31f650
--- /dev/null
+++ b/debian/knot-dnsutils.postinst
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ configure)
+ # update-alternatives: dig
+ update-alternatives --quiet \
+ --install /usr/bin/dig dig /usr/bin/kdig 20 \
+ --slave /usr/share/man/man1/dig.1.gz dig.1.gz /usr/share/man/man1/kdig.1.gz
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/knot-dnsutils.prerm b/debian/knot-dnsutils.prerm
new file mode 100644
index 000..178b8a1
--- /dev/null
+++ b/debian/knot-dnsutils.prerm
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ remove|upgrade|deconfigure)
+ # update-alternatives: dig
+ update-alternatives --quiet --remove dig /usr/bin/kdig
+ ;;
+
+ failed-upgrade)
+
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--
2.30.2
>From 37ed9c5f94bd81dc72a90f6a08f877adfe9f4da9 Mon Sep 17 00:00:00 2001
From: Daniel Baumann
Date: Tue, 27 Apr 2021 23:44:44 +0200
Subject: [PATCH 06/15] Adding update-alternatives to use khost for
/usr/bin/host (Closes: #932087).
Signed-off-by: Daniel Baumann
---
debian/knot-host.postinst | 25 +
debian/knot-host.prerm| 23 +++
2 files changed, 48 insertions(+)
create mode 100644 debian/knot-host.postinst
create mode 100644 debian/knot-host.prerm
diff --git a/debian/knot-host.postinst b/debian/knot-host.postinst
new file mode 100644
index 000..7bc0ee9
--- /dev/null
+++ b/debian/knot-host.postinst
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ configure)
+ # update-alternatives: host
+ update-alternatives --quiet \
+ --install /usr/bin/host host /usr/bin/khost 20 \
+ --slave /usr/share/man/man1/host.1.gz host.1.gz /usr/share/man/man1/khost.1.gz
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/knot-host.prerm b/debian/knot-host.prerm
new file mode 100644
index 000..d2e70f3
--- /dev/null
+++ b/debian/knot-host.prerm
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+set -e
+
+case "${1}" in
+ remove|upgrade|deconfigure)
+ # update-alternatives: host
+ update-alternatives --quiet --remove host /usr/bin/khost
+ ;;
+
+ failed-upgrade)
+
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
--
2.30.2