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() {