fix: populate ldns submodule and add autotools to LDNS build stage

- Re-cloned zonemaster-ldns with --recurse-submodules so the bundled
  ldns C library source (including Changelog and configure.ac) is present
- Added autoconf, automake, libtool to Dockerfile.backend ldns-build stage
  so libtoolize + autoreconf can generate ldns/configure during make

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 08:33:38 +02:00
parent 8d4eaa1489
commit eaaa8f6a11
541 changed files with 138189 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
TPKG=/home/jeltejan/repos/tpkg/tpkg
NEED_SPLINT='00-lint.tpkg'
NEED_DOXYGEN='01-doc.tpkg'
cd testdata;
for test in `ls *.tpkg`; do
SKIP=0
if echo $NEED_SPLINT | grep $test >/dev/null; then
if test ! -x "`command -v splint`"; then
SKIP=1;
fi
fi
if echo $NEED_DOXYGEN | grep $test >/dev/null; then
if test ! -x "`command -v doxygen`"; then
SKIP=1;
fi
fi
if test $SKIP -eq 0; then
echo $test
$TPKG -a ../.. exe $test
else
echo "skip $test"
fi
done

View File

@@ -0,0 +1,98 @@
#!/usr/bin/env bash
# Testbed for projects
# By Wouter Wijngaards, NLnet Labs, 2006.
# BSD License.
# this version prefers gmake if available.
# adds variable LDNS for the LDNS path to use.
REPOSITORY=svn+ssh://open.nlnetlabs.nl/svn/libdns/trunk
DIR=ldns_ttt
# global settings
CONFIGURE_FLAGS=""
PWD=`pwd`
REPORT_FILE="$PWD/testdata/testbed.report"
LOG_FILE=testdata/testbed.log
HOST_FILE=testdata/host_file.$USER
if test ! -f $HOST_FILE; then
echo "No such file: $HOST_FILE"
exit 1
fi
function echossh() # like ssh but echos.
{
echo "ssh $*"
ssh $*
}
# Compile and run NSD on platforms
function dotest()
# parameters: <host> <dir>
# host is name of ssh host
# dir is directory of nsd trunk on host
{
echo "$1 begin on "`date` | /usr/bin/tee -a $REPORT_FILE
if test $SVN; then
echossh $1 "cd $2; $SVN up"
else
# tar and copy this dir
echo on
cd ..
tar -cf ldns_test.tar .
scp ldns_test.tar $1:$2
echossh $1 "cd $2; tar xf ldns_test.tar"
rm -f ldns_test.tar
fi
if test $RUN_TEST = yes; then
echossh $1 "cd $2/test; $TPKG clean"
echossh $1 "cd $2/test; bash test_all.sh $TPKG"
echossh $1 "cd $2/test; $TPKG -q report" | /usr/bin/tee -a $REPORT_FILE
fi
echo "$1 end on "`date` | /usr/bin/tee -a $REPORT_FILE
}
echo "on "`date`" by $USER." > $REPORT_FILE
echo "on "`date`" by $USER." > $LOG_FILE
# read host names
declare -a hostname desc dir reconf make libtoolize vars
IFS=' '
i=0
while read a b c d e; do
if echo $a | grep "^#" >/dev/null; then
continue # skip it
fi
# append after arrays
hostname[$i]=$a
desc[$i]=$b
dir[$i]=$c
tpkg[$i]=$d
svn[$i]=$e
i=$(($i+1))
done <$HOST_FILE
echo "testing on $i hosts"
# do the test
for((i=0; i<${#hostname[*]}; i=$i+1)); do
if echo ${hostname[$i]} | grep "^#" >/dev/null; then
continue # skip it
fi
echo "hostname=[${hostname[$i]}]"
echo "desc=[${desc[$i]}]"
echo "dir=[${dir[$i]}]"
echo "tpkg=[${tpkg[$i]}]"
echo "svn=[${svn[$i]}]"
RUN_TEST="yes"
TPKG="${tpkg[$i]}"
SVN="${svn[$i]}"
#eval ${vars[$i]}
echo "*** ${hostname[$i]} ${desc[$i]} ***" | /usr/bin/tee -a $LOG_FILE | /usr/bin/tee -a $REPORT_FILE
dotest ${hostname[$i]} ${dir[$i]} 2>&1 | /usr/bin/tee -a $LOG_FILE
done
echo "done"

View File

@@ -0,0 +1,35 @@
Testbed.sh help page.
Testbed helps in running the test packages (using tpkg(1)) on several systems.
The script is specially written for unbound (edit it to change to different
software). It is licensed BSD.
The hosts to run on are listed in host_file.<username>. You need to have
public-key authorized ssh access to these systems (or type your password lots
and lots of times). The host_file describes the directories and environment
of each host. You need only user-level access to the host.
The host_file is very restrictive in formatting. Comments are lines starting
with the # mark. The entries must be separated by tabs. Please list the
hostname<tab>description<tab>checkoutdir<tab>variables
hostname: network hostname to ssh to.
desc: pretty text to describe the machine architecture.
checkoutdir: directory on the remote host where a svn checkout is present.
variables: zero or more variables separated by spaces. BLA=value BAR=val.
Only important variable for unbound is the LDNS=<dir> variable that if present
forces --with-ldns=<dir> to be passed to ./configure. In case LDNS is not
installed on the system itself, but present somewhere else.
*** Running the testbed
Run by executing the script. It will take all the hosts from the file in
turn and update the svn directory there, possible autoreconf if necessary,
possibly ./configure <args> if necessary, make the executables.
Then it will run the testcode/do-tests script. This script should execute
the tests that this host is capable of running.
in testdata/testbed.log has a line-by-line log. See your make errors here.
in testdata/testbed.report has only the tpkg reports. Summary.

View File

@@ -0,0 +1,31 @@
/*
* testcode/unitmain.c - unit test main program for unbound.
*
* Copyright (c) 2007, NLnet Labs. All rights reserved.
*
* See LICENSE for the license.
*
*/
/**
* \file
* Unit test main program. Calls all the other unit tests.
* Exits with code 1 on a failure. 0 if all unit tests are successful.
*/
#include "config.h"
/**
* Main unit test program. Setup, teardown and report errors.
* @param argc: arg count.
* @param argv: array of command line arguments.
*/
int main(int argc, char* argv[])
{
if(argc != 1) {
printf("usage: %s\n", argv[0]);
printf("\tperforms unit tests.\n");
return 1;
}
printf("Start of %s unit test.\n", PACKAGE_STRING);
return 0;
}