package/libldns: allow to build drill
cover package/libldns: allow to build drill
Hello,
this small series aims to allow building the drill commandline tool, supported by libldns package. This is a small CLI tool allowing to perform and debug DNS requests. While at it, the series brings in a small runtime test validating that the binary (and so, the library it depends on) is correctly built, installed, and that it is able to run on the target architecture.
---
Alexis Lothoré (2):
package/libldns: add an option to build and install drill support/testing: add basic runtime test for libldns/drill
package/libldns/Config.in | 14 ++++++++++++++ package/libldns/libldns.mk | 7 +++++++ support/testing/tests/package/test_libldns.py | 21 +++++++++++++++++++++ 3 files changed, 42 insertions(+)
---
base-commit: 1375aabf74c2f96a6621e35fff171e5a47a7425e
change-id: 20250806-libldns_drill-081f15f46e5b
Best regards,
Signature · 8 lines
Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH RESEND 1/2 package/libldns: add an option to build and install drill
The libldns library also comes with a CLI tool named drill, allowing to perform DNS requests. Drill build is currently disabled by default.
Add a KConfig option to allow building and installing drill tool. Set the default value to n to preserve the current behavior. Similarly to linktest (see the comment in the .mk), drill fails to build correctly as a static binary, so make the new option depend on non-static build.
--- package/libldns/Config.in | 14 ++++++++++++++ package/libldns/libldns.mk | 7 +++++++ 2 files changed, 21 insertions(+)
package/libldns/Config.in +14 -0
@@ -8,3 +8,17 @@ config BR2_PACKAGE_LIBLDNS experimental software for current Internet Drafts. http://www.nlnetlabs.nl/projects/ldns + +if BR2_PACKAGE_LIBLDNS + +config BR2_PACKAGE_LIBLDNS_DRILL + bool "drill binary" + default n + depends on !BR2_STATIC_LIBS + help + Install the drill binary + +comment "drill needs dynamic library" + depends on BR2_STATIC_LIBS + +endif # BR2_PACKAGE_LIBLDNS
package/libldns/libldns.mk +7 -0
@@ -45,4 +45,11 @@ endif # interested in the lib target anyway LIBLDNS_MAKE_OPTS = lib +ifeq ($(BR2_PACKAGE_LIBLDNS_DRILL),y) +LIBLDNS_CONF_OPTS += --with-drill +LIBLDNS_MAKE_OPTS += drill +else +LIBLDNS_CONF_OPTS += --without-drill +endif + $(eval $(autotools-package))
Signature · 6 lines
2.51.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH RESEND 1/2] package/libldns: add an option to build and install drill
Hello Alexis,
Thanks for the patch!
Quoted 7 lines · On Thu, 16 Oct 2025 17:27:02 +0200 Alexis Lothoré <[email protected]>…
The libldns library also comes with a CLI tool named drill, allowing to perform DNS requests. Drill build is currently disabled by default.
Add a KConfig option to allow building and installing drill tool. Set the default value to n to preserve the current behavior. Similarly to linktest (see the comment in the .mk), drill fails to build correctly as a static binary, so make the new option depend on non-static build.
Missing SoB.
Quoted 5 lines
package/libldns/Config.in +0
-0
package/libldns/Config.in config BR2_PACKAGE_LIBLDNS · line 16
Quoted 9 lines
package/libldns/Config.in +6
-0@@ -8,3 +8,17 @@ config BR2_PACKAGE_LIBLDNS experimental software for current Internet Drafts. http://www.nlnetlabs.nl/projects/ldns + +if BR2_PACKAGE_LIBLDNS + +config BR2_PACKAGE_LIBLDNS_DRILL + bool "drill binary" + default n
default n is the default, so it's not needed.
package/libldns/Config.in config BR2_PACKAGE_LIBLDNS · line 21
Quoted 5 lines
package/libldns/Config.in +5
-0+ depends on !BR2_STATIC_LIBS + help + Install the drill binary + +comment "drill needs dynamic library"
comment "drill needs a toolchain w/ dynamic library"
Otherwise, looks good!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH RESEND 1/2] package/libldns: add an option to build and install drill
Hi Thomas,
Quoted 10 lines · Thomas Petazzoni
Hello Alexis,
Thanks for the patch!
Quoted 3 lines · On Thu, 16 Oct 2025 17:27:02 +0200 Alexis Lothoré <[email protected]>…
The libldns library also comes with a CLI tool named drill, allowing to perform DNS requests. Drill build is currently disabled by default.
Quoted 6 lines
Quoted 4 lines
Add a KConfig option to allow building and installing drill tool. Set the default value to n to preserve the current behavior. Similarly to linktest (see the comment in the .mk), drill fails to build correctly as a static binary, so make the new option depend on non-static build.
Missing SoB.
I'm note sure how I could have messed up this one... I'll fix that and the points raised below, thanks.
Alexis
Quoted 28 lines
Quoted 5 lines
package/libldns/Config.in +0
-0package/libldns/Config.in config BR2_PACKAGE_LIBLDNS · line 16
Quoted 9 lines
package/libldns/Config.in +6
-0@@ -8,3 +8,17 @@ config BR2_PACKAGE_LIBLDNS experimental software for current Internet Drafts. http://www.nlnetlabs.nl/projects/ldns + +if BR2_PACKAGE_LIBLDNS + +config BR2_PACKAGE_LIBLDNS_DRILL + bool "drill binary" + default ndefault n is the default, so it's not needed.
package/libldns/Config.in config BR2_PACKAGE_LIBLDNS · line 21
Quoted 5 lines
package/libldns/Config.in +5
-0+ depends on !BR2_STATIC_LIBS + help + Install the drill binary + +comment "drill needs dynamic library"comment "drill needs a toolchain w/ dynamic library"
Otherwise, looks good!
Thomas
Signature · 8 lines
Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH RESEND 2/2 support/testing: add basic runtime test for libldns/drill
In reply to Alexis Lothoré via buildrootAdd a simple test ensuring that
- libldns is correctly built and installed
- drill is correctly built and installed
- drill is able to execute on the target
--- support/testing/tests/package/test_libldns.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
support/testing/tests/package/test_libldns.py new file +21 -0
@@ -0,0 +1,21 @@ +import infra.basetest +import os + + +class TestLibLdns(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + """ + BR2_PACKAGE_LIBLDNS=y + BR2_PACKAGE_LIBLDNS_DRILL=y + BR2_TARGET_ROOTFS_CPIO=y + # BR2_TARGET_ROOTFS_TAR is not set + """ + + def test_run(self): + cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio") + self.emulator.boot(arch="armv5", + kernel="builtin", + options=["-initrd", cpio_file]) + self.emulator.login() + + self.assertRunOk("drill -v")
Signature · 6 lines
2.51.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH RESEND 2/2] support/testing: add basic runtime test for libldns/drill
Hello,
Quoted 6 lines · On Thu, 16 Oct 2025 17:27:03 +0200 Alexis Lothoré <[email protected]>…
Add a simple test ensuring that
- libldns is correctly built and installed
- drill is correctly built and installed
- drill is able to execute on the targetSigned-off-by Alexis Lothoré <[email protected]>
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot