From 56b0124d64d7d0570195ec3b8b2b1dd83a539063 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 25 Jul 2022 21:31:36 +0200 Subject: [PATCH 1/9] Update binary classification after ftl-build container upgrade to Debian Buster Signed-off-by: DL6ER --- test/arch_test.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/arch_test.sh b/test/arch_test.sh index e97bb7d5..f4bb5433 100644 --- a/test/arch_test.sh +++ b/test/arch_test.sh @@ -77,7 +77,7 @@ if [[ "${CI_ARCH}" == "x86_64" ]]; then check_machine "ELF64" "Advanced Micro Devices X86-64" check_libs "[libm.so.6] [librt.so.1] [libpthread.so.0] [libc.so.6]" - check_file "ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped" + check_file "ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, with debug_info, not stripped" elif [[ "${CI_ARCH}" == "x86_64-musl" ]]; then @@ -90,19 +90,19 @@ elif [[ "${CI_ARCH}" == "x86_32" ]]; then check_machine "ELF32" "Intel 80386" check_libs "[libm.so.6] [librt.so.1] [libpthread.so.0] [libc.so.6]" - check_file "ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, not stripped" + check_file "ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 3.2.0, with debug_info, not stripped" elif [[ "${CI_ARCH}" == "aarch64" ]]; then check_machine "ELF64" "AArch64" check_libs "[libm.so.6] [librt.so.1] [libpthread.so.0] [libc.so.6] [ld-linux-aarch64.so.1]" - check_file "ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, not stripped" + check_file "ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, with debug_info, not stripped" elif [[ "${CI_ARCH}" == "armv4t" ]]; then check_machine "ELF32" "ARM" check_libs "[libm.so.6] [librt.so.1] [libgcc_s.so.1] [libpthread.so.0] [libc.so.6] [ld-linux.so.3]" - check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, not stripped" + check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped" check_CPU_arch "v4T" check_FP_arch "" # No specified FP arch @@ -111,7 +111,7 @@ elif [[ "${CI_ARCH}" == "armv5te" ]]; then check_machine "ELF32" "ARM" check_libs "[libm.so.6] [librt.so.1] [libgcc_s.so.1] [libpthread.so.0] [libc.so.6] [ld-linux.so.3]" - check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, not stripped" + check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped" check_CPU_arch "v4T" check_FP_arch "" # No specified FP arch @@ -120,7 +120,7 @@ elif [[ "${CI_ARCH}" == "armv6hf" ]]; then check_machine "ELF32" "ARM" check_libs "[libm.so.6] [librt.so.1] [libgcc_s.so.1] [libpthread.so.0] [libc.so.6] [ld-linux-armhf.so.3]" - check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, not stripped" + check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped" check_CPU_arch "v6" check_FP_arch "VFPv2" @@ -129,7 +129,7 @@ elif [[ "${CI_ARCH}" == "armv7hf" ]]; then check_machine "ELF32" "ARM" check_libs "[libm.so.6] [librt.so.1] [libgcc_s.so.1] [libpthread.so.0] [libc.so.6] [ld-linux-armhf.so.3]" - check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, not stripped" + check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped" check_CPU_arch "v7" check_FP_arch "VFPv3-D16" @@ -138,7 +138,7 @@ elif [[ "${CI_ARCH}" == "armv8a" ]]; then check_machine "ELF32" "ARM" check_libs "[libm.so.6] [librt.so.1] [libgcc_s.so.1] [libpthread.so.0] [libc.so.6] [ld-linux-armhf.so.3]" - check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, not stripped" + check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped" check_CPU_arch "v8" check_FP_arch "VFPv3-D16" From 9545dda5b22289a970bbf4473afafebab22433c6 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 26 Jul 2022 20:39:17 +0200 Subject: [PATCH 2/9] The armv4t builder has to stay on stretch as Buster discontinued armv4t support Signed-off-by: DL6ER --- test/arch_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/arch_test.sh b/test/arch_test.sh index f4bb5433..79ab1575 100644 --- a/test/arch_test.sh +++ b/test/arch_test.sh @@ -102,7 +102,7 @@ elif [[ "${CI_ARCH}" == "armv4t" ]]; then check_machine "ELF32" "ARM" check_libs "[libm.so.6] [librt.so.1] [libgcc_s.so.1] [libpthread.so.0] [libc.so.6] [ld-linux.so.3]" - check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped" + check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, not stripped" check_CPU_arch "v4T" check_FP_arch "" # No specified FP arch From 5d8f44d0941756e2390927cc22a902f4338184ad Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 27 Jul 2022 05:39:02 +0200 Subject: [PATCH 3/9] The official Raspberry Pi toolchain does not support Buster Signed-off-by: DL6ER --- test/arch_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/arch_test.sh b/test/arch_test.sh index 79ab1575..b8a5dd18 100644 --- a/test/arch_test.sh +++ b/test/arch_test.sh @@ -120,7 +120,7 @@ elif [[ "${CI_ARCH}" == "armv6hf" ]]; then check_machine "ELF32" "ARM" check_libs "[libm.so.6] [librt.so.1] [libgcc_s.so.1] [libpthread.so.0] [libc.so.6] [ld-linux-armhf.so.3]" - check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped" + check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, not stripped" check_CPU_arch "v6" check_FP_arch "VFPv2" From bfd9c02e89d056ba467f5ee3e99a57883620d294 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 27 Jul 2022 05:13:09 +0200 Subject: [PATCH 4/9] Buster correctly builds ARMv5T binaries (Stretch still built for ARMv4 instead) Signed-off-by: DL6ER --- test/arch_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/arch_test.sh b/test/arch_test.sh index b8a5dd18..929f7db1 100644 --- a/test/arch_test.sh +++ b/test/arch_test.sh @@ -113,7 +113,7 @@ elif [[ "${CI_ARCH}" == "armv5te" ]]; then check_libs "[libm.so.6] [librt.so.1] [libgcc_s.so.1] [libpthread.so.0] [libc.so.6] [ld-linux.so.3]" check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped" - check_CPU_arch "v4T" + check_CPU_arch "v5TE" check_FP_arch "" # No specified FP arch elif [[ "${CI_ARCH}" == "armv6hf" ]]; then From d79abd3000652dde446a287b0ad8ad57c2ef12ed Mon Sep 17 00:00:00 2001 From: DL6ER Date: Tue, 26 Jul 2022 20:36:01 +0200 Subject: [PATCH 5/9] Adjustments for upgrade to PowerDNS v4.6 Signed-off-by: DL6ER --- test/pdns/pdns.conf | 4 +++- test/pdns/setup.sh | 2 +- test/test_suite.bats | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/pdns/pdns.conf b/test/pdns/pdns.conf index ebe41ead..2449edf5 100644 --- a/test/pdns/pdns.conf +++ b/test/pdns/pdns.conf @@ -9,7 +9,6 @@ # Local DNS address and port local-address=127.0.0.1:5554 -local-ipv6= # Do not enforce TCP for ANY queries any-to-tcp=false @@ -19,3 +18,6 @@ launch=gsqlite3 # Database location gsqlite3-database=/var/lib/powerdns/pdns.sqlite3 + +# Used when creating a new zone +default-soa-content=ns1.@ hostmaster.@ 0 10800 3600 604800 3600 diff --git a/test/pdns/setup.sh b/test/pdns/setup.sh index 5a0bcf75..a5832674 100644 --- a/test/pdns/setup.sh +++ b/test/pdns/setup.sh @@ -101,7 +101,7 @@ fi # HTTPS if ! pdnsutil add-record ftl. https HTTPS '1 . alpn="h3,h2"'; then # comment above applies - pdnsutil add-record ftl. https TYPE65 "\# 15 000100000100080322683303683222" + pdnsutil add-record ftl. https TYPE65 "\# 13 00010000010006026833026832" fi # Create reverse lookup zone diff --git a/test/test_suite.bats b/test/test_suite.bats index 6a5a9d04..dff4f6ec 100644 --- a/test/test_suite.bats +++ b/test/test_suite.bats @@ -317,7 +317,7 @@ @test "Local DNS test: SOA ftl" { run bash -c "dig SOA ftl @127.0.0.1 +short" printf "%s\n" "${lines[@]}" - [[ ${lines[0]} == "ns1.ftl. hostmaster.ftl. 1 10800 3600 604800 3600" ]] + [[ ${lines[0]} == "ns1.ftl. hostmaster.ftl. 0 10800 3600 604800 3600" ]] [[ ${lines[1]} == "" ]] } @@ -366,7 +366,7 @@ @test "Local DNS test: HTTPS https.ftl" { run bash -c "dig +unknown TYPE65 https.ftl @127.0.0.1 +short" printf "%s\n" "${lines[@]}" - [[ ${lines[0]} == '\# 15 000100000100080322683303683222' ]] + [[ ${lines[0]} == '\# 13 00010000010006026833026832' ]] [[ ${lines[1]} == "" ]] } From dbd2cb722c2cb8d5a0b60a8a5c5c26c9e6cb2b8f Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 27 Jul 2022 08:46:23 +0200 Subject: [PATCH 6/9] Tests: Explicityl disable DNSSEC for zone ftl. Signed-off-by: DL6ER --- test/pdns/recursor.conf | 9 +++++++++ test/pdns/setup.sh | 15 +++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/test/pdns/recursor.conf b/test/pdns/recursor.conf index 6919a556..06f40946 100644 --- a/test/pdns/recursor.conf +++ b/test/pdns/recursor.conf @@ -12,3 +12,12 @@ local-address=127.0.0.1:5555 # Use authoritative server for ftl. and arpa. zones forward-zones=ftl=127.0.0.1:5554,168.192.in-addr.arpa=127.0.0.1:5554,ip6.arpa=127.0.0.1:5554 + +# In this mode the Recursor acts as a “security aware, non-validating” +# nameserver, meaning it will set the DO-bit on outgoing queries and will +# provide DNSSEC related RRsets (NSEC, RRSIG) to clients that ask for them (by +# means of a DO-bit in the query), except for zones provided through the +# auth-zones setting. It will not do any validation in this mode, not even when +# requested by the client. +# The default mode until PowerDNS Recursor 4.5.0. +dnssec=process-no-validate diff --git a/test/pdns/setup.sh b/test/pdns/setup.sh index a5832674..a751f85e 100644 --- a/test/pdns/setup.sh +++ b/test/pdns/setup.sh @@ -40,7 +40,7 @@ else fi # Create zone ftl pdnsutil create-zone ftl ns1.ftl -pdnsutil add-record ftl. . SOA "ns1.ftl. hostmaster.ftl. 1 10800 3600 604800 3600" +pdnsutil disable-dnssec ftl # Create A records pdnsutil add-record ftl. a A 192.168.1.1 @@ -92,17 +92,10 @@ pdnsutil add-record ftl. naptr NAPTR '20 10 "s" "http+N2L+N2C+N2R" "" ftl.' pdnsutil add-record ftl. mx MX "50 ns1.ftl." # SVCB + HTTPS -if ! pdnsutil add-record ftl. svcb SVCB '1 port="80"'; then - # see RFC3597: Handling of Unknown DNS Resource Record (RR) Types - # and https://ypcs.fi/howto/2020/09/30/announce-https-via-dns/ - pdnsutil add-record ftl. svcb TYPE64 "\# 13 000109706F72743D2238302200" -fi +pdnsutil add-record ftl. svcb SVCB '1 port="80"' # HTTPS -if ! pdnsutil add-record ftl. https HTTPS '1 . alpn="h3,h2"'; then - # comment above applies - pdnsutil add-record ftl. https TYPE65 "\# 13 00010000010006026833026832" -fi +pdnsutil add-record ftl. https HTTPS '1 . alpn="h3,h2"' # Create reverse lookup zone pdnsutil create-zone arpa ns1.ftl @@ -120,6 +113,8 @@ pdnsutil rectify-all-zones pdnsutil check-zone ftl pdnsutil check-zone arpa +pdnsutil list-all-zones + echo "********* Done installing PowerDNS configuration **********" # Start services From cf97933ca2d1ad1afd94d77e96c398d5a891aa13 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 27 Jul 2022 09:33:06 +0200 Subject: [PATCH 7/9] Tests: dig should now support SVCB and HTTPS directly Signed-off-by: DL6ER --- test/test_suite.bats | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_suite.bats b/test/test_suite.bats index dff4f6ec..1931e6b4 100644 --- a/test/test_suite.bats +++ b/test/test_suite.bats @@ -357,16 +357,16 @@ } @test "Local DNS test: SVCB svcb.ftl" { - run bash -c "dig +unknown TYPE64 svcb.ftl @127.0.0.1 +short" + run bash -c "dig SVCB svcb.ftl @127.0.0.1 +short" printf "%s\n" "${lines[@]}" - [[ ${lines[0]} == '\# 13 000109706F72743D2238302200' ]] + [[ ${lines[0]} == '1 port=\"80\".' ]] [[ ${lines[1]} == "" ]] } @test "Local DNS test: HTTPS https.ftl" { - run bash -c "dig +unknown TYPE65 https.ftl @127.0.0.1 +short" + run bash -c "dig HTTPS https.ftl @127.0.0.1 +short" printf "%s\n" "${lines[@]}" - [[ ${lines[0]} == '\# 13 00010000010006026833026832' ]] + [[ ${lines[0]} == '1 . alpn="h3,h2"' ]] [[ ${lines[1]} == "" ]] } From ea537ddac3c0bf4411c87ec47d2cd6f0a32e2402 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 27 Jul 2022 13:15:33 +0200 Subject: [PATCH 8/9] Update expected binary information for cross-compiled armv6hf binary Signed-off-by: DL6ER --- test/arch_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/arch_test.sh b/test/arch_test.sh index 929f7db1..11b47b37 100644 --- a/test/arch_test.sh +++ b/test/arch_test.sh @@ -120,7 +120,7 @@ elif [[ "${CI_ARCH}" == "armv6hf" ]]; then check_machine "ELF32" "ARM" check_libs "[libm.so.6] [librt.so.1] [libgcc_s.so.1] [libpthread.so.0] [libc.so.6] [ld-linux-armhf.so.3]" - check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, not stripped" + check_file "ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped" check_CPU_arch "v6" check_FP_arch "VFPv2" From 9e8b7818072e6d9c0fe19a45c86848f09f6c0ef5 Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Sat, 30 Jul 2022 18:10:54 +0100 Subject: [PATCH 9/9] Update build.yml to use latest FTL build containers Signed-off-by: Adam Warner --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45e01296..45c6f87f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: runs-on: ubuntu-latest - container: ghcr.io/pi-hole/ftl-build:v1.18-${{ matrix.arch }} + container: ghcr.io/pi-hole/ftl-build:v1.19-${{ matrix.arch }} strategy: fail-fast: false