Skip to contentSkip to conversation

unbound: new package

PATCH Superseded Stefan Fröberg 3 participants 8 messages Jan 11, 2018 – Jan 12, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 unbound: new package

---
 DEVELOPERS                   |  1 +
 package/Config.in            |  1 +
 package/unbound/Config.in    | 37 ++++++++++++++++++++++++++++++++
 package/unbound/unbound.hash |  3 +++
 package/unbound/unbound.mk   | 50 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 92 insertions(+)
 create mode 100644 package/unbound/Config.in
 create mode 100644 package/unbound/unbound.hash
 create mode 100644 package/unbound/unbound.mk
DEVELOPERS +1 -0
index 2f7d051e8a..184ce82cec 100644
@@ -1642,6 +1642,7 @@ N:	Stefan Fr?berg <[email protected]>
 F:	package/elfutils/
 F:	package/libtasn1/
 F:	package/proxychains-ng/
+F:	package/unbound/
 F:	package/yasm/
 F:	package/zlib-ng/
 
package/Config.in +1 -0
index 01f4095be5..f810445e27 100644
@@ -1827,6 +1827,7 @@ endif
 	source "package/udpcast/Config.in"
 	source "package/uhttpd/Config.in"
 	source "package/ulogd/Config.in"
+	source "package/unbound/Config.in"
 	source "package/ushare/Config.in"
 	source "package/ussp-push/Config.in"
 	source "package/vde2/Config.in"
package/unbound/Config.in new file +37 -0
new file mode 100644
index 0000000000..07e4fa39f2
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_UNBOUND
+	bool "unbound"
+	select BR2_PACKAGE_EXPAT
+	select BR2_PACKAGE_LIBEVENT
+	select BR2_PACKAGE_LIBSODIUM if BR2_PACKAGE_UNBOUND_DNSCRYPT
+	depends on BR2_PACKAGE_OPENSSL
+	help
+	  Unbound is a validating, recursive, and caching DNS resolver.
+	  It supports DNSSEC, QNAME minimisation, DNS-over-TLS and
+	  DNSCrypt.
+
+	  https://www.unbound.net
+
+if BR2_PACKAGE_UNBOUND
+
+config BR2_PACKAGE_UNBOUND_DNSCRYPT
+	bool "Enable DNSCrypt"
+	help
+	  DNSCrypt wraps unmodified DNS queries between a client and
+	  a DNS resolver. Default port used is 443 and like with
+	  normal unencrypted DNS, it uses UDP first and falling back
+	  to TCP if response too large.
+
+	  There is also DNS-over-TLS, a TCP only version
+	  of proposed standard for DNS encryption (RFC 7858).
+	  Default port for DNS-over-TLS is 853 and Unbound has
+	  built-in support for it.
+
+	  https://tools.ietf.org/html/rfc7858
+
+	  Note: Neither DNSCrypt or DNS-over-TLS encrypt the SNI.
+	  Here is some suggestions how to handle SNI encryption:
+
+	  https://tools.ietf.org/html/draft-ietf-tls-sni-encryption-00
+
+endif
+
package/unbound/unbound.hash new file +3 -0
new file mode 100644
index 0000000000..5f2183897e
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256	4e7bd43d827004c6d51bef73adf941798e4588bdb40de5e79d89034d69751c9f  unbound-1.6.7.tar.gz
+sha256	8eb9a16cbfb8703090bbfa3a2028fd46bb351509a2f90dc1001e51fbe6fd45db  LICENSE
package/unbound/unbound.mk new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.13.6
#1 lore raw

PATCH 1/1 unbound: new package

Hi Stefan,

Am Fri, 12 Jan 2018 01:20:39 +0200 schrieb Stefan Fr?berg:

package/unbound/Config.in line 5

Quoted 11 lines
package/unbound/Config.in new file +5 -0
new file mode 100644
index 0000000000..07e4fa39f2
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_UNBOUND
+	bool "unbound"
+	select BR2_PACKAGE_EXPAT
+	select BR2_PACKAGE_LIBEVENT
+	select BR2_PACKAGE_LIBSODIUM if BR2_PACKAGE_UNBOUND_DNSCRYPT

parts of this line should be moved inside
"config BR2_PACKAGE_UNBOUND_DNSCRYPT".

package/unbound/Config.in line 6

Quoted 1 line
package/unbound/Config.in new file +1 -0
+	depends on BR2_PACKAGE_OPENSSL

Why not "select BR2_PACKAGE_OPENSSL"?
Did you test with libressl as well?

package/unbound/Config.in line 17

Quoted 11 lines
package/unbound/Config.in new file +11 -0
+	help
+	  Unbound is a validating, recursive, and caching DNS resolver.
+	  It supports DNSSEC, QNAME minimisation, DNS-over-TLS and
+	  DNSCrypt.
+
+	  https://www.unbound.net
+
+if BR2_PACKAGE_UNBOUND
+
+config BR2_PACKAGE_UNBOUND_DNSCRYPT
+	bool "Enable DNSCrypt"

Add

package/unbound/Config.in line 18

Quoted 1 line
package/unbound/Config.in new file +1 -0
+	select BR2_PACKAGE_LIBSODIUM

here.

[...]

Quoted 6 lines
package/unbound/unbound.mk new file +0 -0
new file mode 100644
index 0000000000..3c6f4ac895

package/unbound/unbound.mk line 8

Quoted 8 lines
package/unbound/unbound.mk new file +8 -0
@@ -0,0 +1,50 @@
+################################################################################
+#
+# unbound
+#
+################################################################################
+
+UNBOUND_VERSION = 1.6.7
+UNBOUND_SOURCE = unbound-$(UNBOUND_VERSION).tar.gz

the variable value contains the default, this line can therefore be removed completely.

package/unbound/unbound.mk line 11

Quoted 3 lines
package/unbound/unbound.mk new file +3 -0
+UNBOUND_SITE = https://www.unbound.net/downloads
+UNBOUND_DEPENDENCIES = host-pkgconf expat libevent openssl
+UNBOUND_LICENSE = BSD

According to https://spdx.org/licenses/ the value "BSD" does not exist, afaics the license is "BSD-3-Clause".

package/unbound/unbound.mk line 21

Quoted 10 lines
package/unbound/unbound.mk new file +10 -0
+UNBOUND_LICENSE_FILES = LICENSE
+UNBOUND_CONF_OPTS += --disable-rpath \
+		     --disable-debug \
+		     --with-conf-file=/etc/unbound/unbound.conf \
+		     --with-pidfile=/var/run/unbound.pid \
+		     --with-rootkey-file=/etc/unbound/root.key \
+		     --enable-tfo-server \
+		     --enable-relro-now \
+		     --with-pic \
+		     --enable-pie

Please add

		--with-ssl=$(STAGING_DIR)/usr \

to avoid

checking for SSL... configure: error: Cannot find the SSL libraries in
/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr

Small nit: I do not like the idention used, how about something like this?
https://git.buildroot.net/buildroot/tree/package/kodi/kodi.mk#n59

package/unbound/unbound.mk line 29

Quoted 7 lines
package/unbound/unbound.mk new file +7 -0
+# uClibc-ng does not have MSG_FASTOPEN
+# so TCP Fast Open client mode disabled for it
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC),y)
+UNBOUND_CONF_OPTS += --disable-tfo-client
+else
+UNBOUND_CONF_OPTS += --enable-tfo-client
+endif

An external uClibc toolchain does not define
BR2_TOOLCHAIN_BUILDROOT_UCLIBC:

$ grep UCLIBC .config
BR2_TOOLCHAIN_USES_UCLIBC=y
BR2_TOOLCHAIN_EXTERNAL_UCLIBC=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC=y

Better check for BR2_TOOLCHAIN_USES_UCLIBC.

Regards, Bernd

#2 lore raw

PATCH 1/1 unbound: new package

Hi Bernd

Okay, I will send a new one soon.

Best Regards
Stefan

Bernd Kuhls kirjoitti 12.01.2018 klo 08:41:

Quoted 107 lines

Hi Stefan,

Am Fri, 12 Jan 2018 01:20:39 +0200 schrieb Stefan Fr?berg:

package/unbound/Config.in line 5

Quoted 11 lines
package/unbound/Config.in new file +5 -0
new file mode 100644
index 0000000000..07e4fa39f2
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_UNBOUND
+	bool "unbound"
+	select BR2_PACKAGE_EXPAT
+	select BR2_PACKAGE_LIBEVENT
+	select BR2_PACKAGE_LIBSODIUM if BR2_PACKAGE_UNBOUND_DNSCRYPT

parts of this line should be moved inside
"config BR2_PACKAGE_UNBOUND_DNSCRYPT".

package/unbound/Config.in line 6

Quoted 1 line
package/unbound/Config.in new file +1 -0
+	depends on BR2_PACKAGE_OPENSSL

Why not "select BR2_PACKAGE_OPENSSL"?
Did you test with libressl as well?

package/unbound/Config.in line 17

Quoted 11 lines
package/unbound/Config.in new file +11 -0
+	help
+	  Unbound is a validating, recursive, and caching DNS resolver.
+	  It supports DNSSEC, QNAME minimisation, DNS-over-TLS and
+	  DNSCrypt.
+
+	  https://www.unbound.net
+
+if BR2_PACKAGE_UNBOUND
+
+config BR2_PACKAGE_UNBOUND_DNSCRYPT
+	bool "Enable DNSCrypt"

Add

package/unbound/Config.in line 18

Quoted 1 line
package/unbound/Config.in new file +1 -0
+	select BR2_PACKAGE_LIBSODIUM

here.

[...]

Quoted 6 lines
package/unbound/unbound.mk new file +0 -0
new file mode 100644
index 0000000000..3c6f4ac895

package/unbound/unbound.mk line 8

Quoted 8 lines
package/unbound/unbound.mk new file +8 -0
@@ -0,0 +1,50 @@
+################################################################################
+#
+# unbound
+#
+################################################################################
+
+UNBOUND_VERSION = 1.6.7
+UNBOUND_SOURCE = unbound-$(UNBOUND_VERSION).tar.gz

the variable value contains the default, this line can therefore be removed completely.

package/unbound/unbound.mk line 11

Quoted 3 lines
package/unbound/unbound.mk new file +3 -0
+UNBOUND_SITE = https://www.unbound.net/downloads
+UNBOUND_DEPENDENCIES = host-pkgconf expat libevent openssl
+UNBOUND_LICENSE = BSD

According to https://spdx.org/licenses/ the value "BSD" does not exist, afaics the license is "BSD-3-Clause".

package/unbound/unbound.mk line 21

Quoted 10 lines
package/unbound/unbound.mk new file +10 -0
+UNBOUND_LICENSE_FILES = LICENSE
+UNBOUND_CONF_OPTS += --disable-rpath \
+		     --disable-debug \
+		     --with-conf-file=/etc/unbound/unbound.conf \
+		     --with-pidfile=/var/run/unbound.pid \
+		     --with-rootkey-file=/etc/unbound/root.key \
+		     --enable-tfo-server \
+		     --enable-relro-now \
+		     --with-pic \
+		     --enable-pie

Please add

		--with-ssl=$(STAGING_DIR)/usr \

to avoid

checking for SSL... configure: error: Cannot find the SSL libraries in
/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr

Small nit: I do not like the idention used, how about something like this?
https://git.buildroot.net/buildroot/tree/package/kodi/kodi.mk#n59

package/unbound/unbound.mk line 29

Quoted 7 lines
package/unbound/unbound.mk new file +7 -0
+# uClibc-ng does not have MSG_FASTOPEN
+# so TCP Fast Open client mode disabled for it
+ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC),y)
+UNBOUND_CONF_OPTS += --disable-tfo-client
+else
+UNBOUND_CONF_OPTS += --enable-tfo-client
+endif

An external uClibc toolchain does not define
BR2_TOOLCHAIN_BUILDROOT_UCLIBC:

$ grep UCLIBC .config
BR2_TOOLCHAIN_USES_UCLIBC=y
BR2_TOOLCHAIN_EXTERNAL_UCLIBC=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC=y

Better check for BR2_TOOLCHAIN_USES_UCLIBC.

Regards, Bernd

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#3 lore raw

PATCH 1/1 unbound: new package

In reply to Bernd Kuhls

Oh, forgot ...

Quoted 4 lines

package/unbound/Config.in line 6

Quoted 1 line
package/unbound/Config.in new file +1 -0
+	depends on BR2_PACKAGE_OPENSSL

Why not "select BR2_PACKAGE_OPENSSL"?
Did you test with libressl as well?

That cannot be select because it's a choise and if I remember buildroot manual and
what Thomas said, you can't (or actually shouldn't) select from choice unless
absolutely necessary (like, for example, in my turbovnc patch...have to remember update that too...)

But I test with libressl too

Regards
Stefan

#4 lore raw

PATCH 1/1 unbound: new package

Hello,

Quoted 10 lines · Stefan Fr?berg
Quoted 3 lines

Why not "select BR2_PACKAGE_OPENSSL"?
Did you test with libressl as well?

That cannot be select because it's a choise and if I remember buildroot manual and
what Thomas said, you can't (or actually shouldn't) select from choice unless
absolutely necessary (like, for example, in my turbovnc patch...have to remember update that too...)

It is correct that regular virtual packages cannot be selected.

But openssl (like jpeg) is special, and you can select BR2_PACKAGE_OPENSSL. BR2_PACKAGE_OPENSSL is not part of a choice.

The case of turbovnc is different: you wanted to select jpeg-turbo specifically, which is one jpeg implementation. And this is not possible.

See the difference ? BR2_PACKAGE_OPENSSL is the virtual package itself, which has two implementations: libopenssl and libressl, selectable through a choice.

BR2_PACKAGE_JPEG_TURBO is one implementation of the BR2_PACKAGE_JPEG virtual package. Selecting BR2_PACKAGE_JPEG is OK (just like selecting BR2_PACKAGE_OPENSSL is OK), but selecting BR2_PACKAGE_JPEG_TURBO doesn't work.

So Bernd is totally correct: you should select BR2_PACKAGE_OPENSSL. See how many packages are already doing this today :-)

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#5 lore raw

PATCH 1/1 unbound: new package

Hi

Thomas Petazzoni kirjoitti 12.01.2018 klo 13:08:

Quoted 22 lines

Hello,

Quoted 9 lines · Stefan Fr?berg
Quoted 3 lines

Why not "select BR2_PACKAGE_OPENSSL"?
Did you test with libressl as well?

That cannot be select because it's a choise and if I remember buildroot manual and
what Thomas said, you can't (or actually shouldn't) select from choice unless
absolutely necessary (like, for example, in my turbovnc patch...have to remember update that too...)

It is correct that regular virtual packages cannot be selected.

But openssl (like jpeg) is special, and you can select BR2_PACKAGE_OPENSSL. BR2_PACKAGE_OPENSSL is not part of a choice.

The case of turbovnc is different: you wanted to select jpeg-turbo specifically, which is one jpeg implementation. And this is not possible.

Quoted 10 lines

See the difference ? BR2_PACKAGE_OPENSSL is the virtual package itself, which has two implementations: libopenssl and libressl, selectable through a choice.

BR2_PACKAGE_JPEG_TURBO is one implementation of the BR2_PACKAGE_JPEG virtual package. Selecting BR2_PACKAGE_JPEG is OK (just like selecting BR2_PACKAGE_OPENSSL is OK), but selecting BR2_PACKAGE_JPEG_TURBO doesn't work.

Ah, okay.

But Thomas, I can't use BR2_PACKAGE_JPEG for turbovnc because it uses specific ABI (the so called TurboJPEG ABI)
from libjpeg-turbo package and vanilla jpeg does not provide it.

https://libjpeg-turbo.org/About/TurboJPEG

At least, *if* I remember correctly, turbovnc nagged something about missing function when I tried to compile against vanilla jpeg.

Regards
Stefan

#6 lore raw

PATCH 1/1 unbound: new package

Hello,

Quoted 8 lines · Stefan Fr?berg

But Thomas, I can't use BR2_PACKAGE_JPEG for turbovnc because it uses specific ABI (the so called TurboJPEG ABI)
from libjpeg-turbo package and vanilla jpeg does not provide it.

https://libjpeg-turbo.org/About/TurboJPEG

At least, *if* I remember correctly, turbovnc nagged something about missing function when I tried to compile against vanilla jpeg.

Yes, sure, I do remember this perfectly well. turbo-jpeg is kind of an exception, because it is API compatible with jpeg (so it is logical for it to be supported in Buildroot as a provider of the jpeg API), but it also provides its own custom API.

With the current state of things, I believe there is indeed no other choice for TurboVNC but to use a "depends on BR2_PACKAGE_TURBO_JPEG". Didn't we already reached this conclusion during the TurboVNC discussion ?

I know I originally complained against this "depends on", but once justified with the fact that TurboVNC really only works with jpeg-turbo's specific API, I'd be OK with using this "depends on".

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#7 lore raw

PATCH 1/1 unbound: new package

Hi

Thomas Petazzoni kirjoitti 12.01.2018 klo 17:23:

Quoted 17 lines

Hello,

Quoted 8 lines · Stefan Fr?berg

But Thomas, I can't use BR2_PACKAGE_JPEG for turbovnc because it uses specific ABI (the so called TurboJPEG ABI)
from libjpeg-turbo package and vanilla jpeg does not provide it.

https://libjpeg-turbo.org/About/TurboJPEG

At least, *if* I remember correctly, turbovnc nagged something about missing function when I tried to compile against vanilla jpeg.

Yes, sure, I do remember this perfectly well. turbo-jpeg is kind of an exception, because it is API compatible with jpeg (so it is logical for it to be supported in Buildroot as a provider of the jpeg API), but it also provides its own custom API.

Quoted 4 lines

With the current state of things, I believe there is indeed no other choice for TurboVNC but to use a "depends on BR2_PACKAGE_TURBO_JPEG". Didn't we already reached this conclusion during the TurboVNC discussion ?

Could be, I have so lousy memory nowadays ...

Quoted 6 lines

I know I originally complained against this "depends on", but once justified with the fact that TurboVNC really only works with jpeg-turbo's specific API, I'd be OK with using this "depends on".

Thanks T :-)

Regards

-S-