Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH RESEND 0/2] package/libldns: allow to build drill
@ 2025-10-16 15:27 Alexis Lothoré via buildroot
  2025-10-16 15:27 ` [Buildroot] [PATCH RESEND 1/2] package/libldns: add an option to build and install drill Alexis Lothoré via buildroot
  2025-10-16 15:27 ` [Buildroot] [PATCH RESEND 2/2] support/testing: add basic runtime test for libldns/drill Alexis Lothoré via buildroot
  0 siblings, 2 replies; 6+ messages in thread
From: Alexis Lothoré via buildroot @ 2025-10-16 15:27 UTC (permalink / raw)
  To: buildroot
  Cc: Thomas Petazzoni, Bernd Kuhls, nicolas.carrier,
	Alexis Lothoré

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.

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
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,
-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH RESEND 1/2] package/libldns: add an option to build and install drill
  2025-10-16 15:27 [Buildroot] [PATCH RESEND 0/2] package/libldns: allow to build drill Alexis Lothoré via buildroot
@ 2025-10-16 15:27 ` Alexis Lothoré via buildroot
  2025-10-17  6:46   ` Thomas Petazzoni via buildroot
  2025-10-16 15:27 ` [Buildroot] [PATCH RESEND 2/2] support/testing: add basic runtime test for libldns/drill Alexis Lothoré via buildroot
  1 sibling, 1 reply; 6+ messages in thread
From: Alexis Lothoré via buildroot @ 2025-10-16 15:27 UTC (permalink / raw)
  To: buildroot
  Cc: Thomas Petazzoni, Bernd Kuhls, nicolas.carrier,
	Alexis Lothoré

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

diff --git a/package/libldns/Config.in b/package/libldns/Config.in
index 696fec97b59857fbd99bdcaababa09d49774f3ae..7a169c495281be01b2ee724fd2f9e27b83f5e2ec 100644
--- a/package/libldns/Config.in
+++ b/package/libldns/Config.in
@@ -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
diff --git a/package/libldns/libldns.mk b/package/libldns/libldns.mk
index 0740d09fab2fd15592c3d55cd2c1932664ca3344..6ced75a44fcf5bf9c95e443181362f99c9375eeb 100644
--- a/package/libldns/libldns.mk
+++ b/package/libldns/libldns.mk
@@ -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))

-- 
2.51.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH RESEND 2/2] support/testing: add basic runtime test for libldns/drill
  2025-10-16 15:27 [Buildroot] [PATCH RESEND 0/2] package/libldns: allow to build drill Alexis Lothoré via buildroot
  2025-10-16 15:27 ` [Buildroot] [PATCH RESEND 1/2] package/libldns: add an option to build and install drill Alexis Lothoré via buildroot
@ 2025-10-16 15:27 ` Alexis Lothoré via buildroot
  2025-10-17  6:46   ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 6+ messages in thread
From: Alexis Lothoré via buildroot @ 2025-10-16 15:27 UTC (permalink / raw)
  To: buildroot
  Cc: Thomas Petazzoni, Bernd Kuhls, nicolas.carrier,
	Alexis Lothoré

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 target

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
---
 support/testing/tests/package/test_libldns.py | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/support/testing/tests/package/test_libldns.py b/support/testing/tests/package/test_libldns.py
new file mode 100644
index 0000000000000000000000000000000000000000..6c1a4da3f249e3ead2110760f8e59398fec1af0f
--- /dev/null
+++ b/support/testing/tests/package/test_libldns.py
@@ -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")

-- 
2.51.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH RESEND 1/2] package/libldns: add an option to build and install drill
  2025-10-16 15:27 ` [Buildroot] [PATCH RESEND 1/2] package/libldns: add an option to build and install drill Alexis Lothoré via buildroot
@ 2025-10-17  6:46   ` Thomas Petazzoni via buildroot
  2025-10-17  7:10     ` Alexis Lothoré via buildroot
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-10-17  6:46 UTC (permalink / raw)
  To: Alexis Lothoré; +Cc: buildroot, Bernd Kuhls, nicolas.carrier

Hello Alexis,

Thanks for the patch!

On Thu, 16 Oct 2025 17:27:02 +0200
Alexis Lothoré <alexis.lothore@bootlin.com> wrote:

> 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.

> diff --git a/package/libldns/Config.in b/package/libldns/Config.in
> index 696fec97b59857fbd99bdcaababa09d49774f3ae..7a169c495281be01b2ee724fd2f9e27b83f5e2ec 100644
> --- a/package/libldns/Config.in
> +++ b/package/libldns/Config.in
> @@ -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.

> +	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
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH RESEND 2/2] support/testing: add basic runtime test for libldns/drill
  2025-10-16 15:27 ` [Buildroot] [PATCH RESEND 2/2] support/testing: add basic runtime test for libldns/drill Alexis Lothoré via buildroot
@ 2025-10-17  6:46   ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-10-17  6:46 UTC (permalink / raw)
  To: Alexis Lothoré; +Cc: buildroot, Bernd Kuhls, nicolas.carrier

Hello,

On Thu, 16 Oct 2025 17:27:03 +0200
Alexis Lothoré <alexis.lothore@bootlin.com> wrote:

> 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 target
> 
> Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>

Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Buildroot] [PATCH RESEND 1/2] package/libldns: add an option to build and install drill
  2025-10-17  6:46   ` Thomas Petazzoni via buildroot
@ 2025-10-17  7:10     ` Alexis Lothoré via buildroot
  0 siblings, 0 replies; 6+ messages in thread
From: Alexis Lothoré via buildroot @ 2025-10-17  7:10 UTC (permalink / raw)
  To: Thomas Petazzoni, Alexis Lothoré
  Cc: buildroot, Bernd Kuhls, nicolas.carrier

Hi Thomas,

On Fri Oct 17, 2025 at 8:46 AM CEST, Thomas Petazzoni wrote:
> Hello Alexis,
>
> Thanks for the patch!
>
> On Thu, 16 Oct 2025 17:27:02 +0200
> Alexis Lothoré <alexis.lothore@bootlin.com> wrote:
>
>> 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.

I'm note sure how I could have messed up this one... I'll fix that and the
points raised below, thanks.

Alexis
>> diff --git a/package/libldns/Config.in b/package/libldns/Config.in
>> index 696fec97b59857fbd99bdcaababa09d49774f3ae..7a169c495281be01b2ee724fd2f9e27b83f5e2ec 100644
>> --- a/package/libldns/Config.in
>> +++ b/package/libldns/Config.in
>> @@ -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.
>
>> +	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




-- 
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-10-17  7:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16 15:27 [Buildroot] [PATCH RESEND 0/2] package/libldns: allow to build drill Alexis Lothoré via buildroot
2025-10-16 15:27 ` [Buildroot] [PATCH RESEND 1/2] package/libldns: add an option to build and install drill Alexis Lothoré via buildroot
2025-10-17  6:46   ` Thomas Petazzoni via buildroot
2025-10-17  7:10     ` Alexis Lothoré via buildroot
2025-10-16 15:27 ` [Buildroot] [PATCH RESEND 2/2] support/testing: add basic runtime test for libldns/drill Alexis Lothoré via buildroot
2025-10-17  6:46   ` Thomas Petazzoni via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox