From 750d53d82d3162ef75d2b4002dd65caa99e66bcf Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 4 Jun 2018 01:29:44 +0200 Subject: [PATCH] Generate trust anchor file for unbound Signed-off-by: David Oberhollenzer --- pkg/unbound/build | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkg/unbound/build b/pkg/unbound/build index 206a512..396ee9a 100644 --- a/pkg/unbound/build +++ b/pkg/unbound/build @@ -22,6 +22,7 @@ deploy() { local SOURCE="$1" local DEPLOY="$2" local DEVDEPLOY="$3" + local tag alg type digest make DESTDIR="$DEPLOY" install @@ -33,6 +34,20 @@ deploy() { split_dev_deploy "$DEPLOY" "$DEVDEPLOY" strip_files ${DEPLOY}/{bin,lib}/* + + echo "generating trust anchor root.key" + + curl --silent -L https://data.iana.org/root-anchors/root-anchors.xml |\ + sed ':a;N;$!ba;s/\n//g' |\ + grep -o -P -e "" |\ + while read line; do + tag=$(echo $line | grep -o -e "[0-9]*[0-9]*[0-9]*[A-F0-9]*> "$DEPLOY/var/lib/unbound/root.key" + done } check_update() {