Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/dovecot: fix build with LibreSSL
@ 2026-11-01  8:25 Bernd Kuhls
  2026-11-01 16:30 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2026-11-01  8:25 UTC (permalink / raw)
  To: buildroot

Buildroot commit 894cbeddafddf9322411fcb5257861c1d0df3ea7 bumped the
package from 2.3.21.1 to 2.4.5. This bump includes upstream commit
https://github.com/dovecot/core/commit/0fa4382844bccb599b651aeb36fed6dfe1870568
first released in version 2.4.0 that causes build errors with LibreSSL:

test-crypto.c: In function 'test_sign_verify_ed448':
test-crypto.c:2021:64: error: 'SN_ED448' undeclared (first use in this
 function); did you mean 'SN_Ed448'?

To fix the problem we add patches from an open upstream PR.

Fixes:
https://autobuild.buildroot.net/results/551/55174cea9d743d277d044a8703be5edaf5afa0de/

Fixes: 894cbeddafddf9322411fcb5257861c1d0df3ea7

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
 ...de-test_sign_verify_ed448-from-Libre.patch | 46 +++++++++++++++++++
 ...-for-SN_ED448-instead-of-excluding-L.patch | 30 ++++++++++++
 2 files changed, 76 insertions(+)
 create mode 100644 package/dovecot/0002-lib-dcrypt-exclude-test_sign_verify_ed448-from-Libre.patch
 create mode 100644 package/dovecot/0003-lib-dcrypt-check-for-SN_ED448-instead-of-excluding-L.patch

diff --git a/package/dovecot/0002-lib-dcrypt-exclude-test_sign_verify_ed448-from-Libre.patch b/package/dovecot/0002-lib-dcrypt-exclude-test_sign_verify_ed448-from-Libre.patch
new file mode 100644
index 0000000000..3ae624d56a
--- /dev/null
+++ b/package/dovecot/0002-lib-dcrypt-exclude-test_sign_verify_ed448-from-Libre.patch
@@ -0,0 +1,46 @@
+From 2615be988c3958104e2c86323564acc05f13e616 Mon Sep 17 00:00:00 2001
+From: Charlie Li <git@vishwin.info>
+Date: Fri, 23 Oct 2026 22:34:34 -0400
+Subject: [PATCH] lib-dcrypt: exclude test_sign_verify_ed448 from LibreSSL
+
+Upstream: https://github.com/dovecot/core/pull/340
+
+[Bernd: rebased for 2.4.5]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ src/lib-dcrypt/test-crypto.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/lib-dcrypt/test-crypto.c b/src/lib-dcrypt/test-crypto.c
+index 558c9c9724..6ed164c0f0 100644
+--- a/src/lib-dcrypt/test-crypto.c
++++ b/src/lib-dcrypt/test-crypto.c
+@@ -2007,6 +2007,7 @@ static void test_static_verify_ed448(void)
+ 	test_end();
+ }
+ 
++#ifndef LIBRESSL_VERSION_NUMBER
+ static void test_sign_verify_ed448(void)
+ {
+ 	const char *error = NULL;
+@@ -2033,6 +2034,7 @@ static void test_sign_verify_ed448(void)
+ 
+ 	test_end();
+ }
++#endif
+ 
+ static void test_xd_keypair(struct dcrypt_keypair *pair)
+ {
+@@ -2339,7 +2340,9 @@ int main(void)
+ 		test_static_verify_ecdsa_x962,
+ #ifdef HAVE_X25519
+ 		test_sign_verify_ed25519,
++#ifndef LIBRESSL_VERSION_NUMBER
+ 		test_sign_verify_ed448,
++#endif
+ 		test_static_verify_ed25519,
+ 		test_static_verify_ed448,
+ 		test_xd25519_keypair,
+-- 
+2.47.3
+
diff --git a/package/dovecot/0003-lib-dcrypt-check-for-SN_ED448-instead-of-excluding-L.patch b/package/dovecot/0003-lib-dcrypt-check-for-SN_ED448-instead-of-excluding-L.patch
new file mode 100644
index 0000000000..4a5bd76972
--- /dev/null
+++ b/package/dovecot/0003-lib-dcrypt-check-for-SN_ED448-instead-of-excluding-L.patch
@@ -0,0 +1,30 @@
+From 734edcdee13f1ba4cd007cc25059bd49f022ec4b Mon Sep 17 00:00:00 2001
+From: Charlie Li <git@vishwin.info>
+Date: Sun, 25 Oct 2026 10:25:10 -0400
+Subject: [PATCH] lib-dcrypt: check for SN_ED448 instead of excluding LibreSSL
+ entirely
+
+Upstream: https://github.com/dovecot/core/pull/340
+
+[Bernd: rebased for 2.4.5]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ src/lib-dcrypt/test-crypto.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/lib-dcrypt/test-crypto.c b/src/lib-dcrypt/test-crypto.c
+index 6ed164c0f0..20371cefc5 100644
+--- a/src/lib-dcrypt/test-crypto.c
++++ b/src/lib-dcrypt/test-crypto.c
+@@ -2007,7 +2007,7 @@ static void test_static_verify_ed448(void)
+ 	test_end();
+ }
+ 
+-#ifndef LIBRESSL_VERSION_NUMBER
++#ifdef SN_ED448
+ static void test_sign_verify_ed448(void)
+ {
+ 	const char *error = NULL;
+-- 
+2.47.3
+
-- 
2.47.3

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

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

* Re: [Buildroot] [PATCH 1/1] package/dovecot: fix build with LibreSSL
  2026-11-01  8:25 [Buildroot] [PATCH 1/1] package/dovecot: fix build with LibreSSL Bernd Kuhls
@ 2026-11-01 16:30 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-11-01 16:30 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: buildroot

Hello Bernd,

On Sun, Nov 01, 2026 at 09:25:13AM +0100, Bernd Kuhls wrote:

Thanks for the patches, but I don't understand them together.

> diff --git a/package/dovecot/0002-lib-dcrypt-exclude-test_sign_verify_ed448-from-Libre.patch b/package/dovecot/0002-lib-dcrypt-exclude-test_sign_verify_ed448-from-Libre.patch
> new file mode 100644
> index 0000000000..3ae624d56a
> --- /dev/null
> +++ b/package/dovecot/0002-lib-dcrypt-exclude-test_sign_verify_ed448-from-Libre.patch
> @@ -0,0 +1,46 @@
> +From 2615be988c3958104e2c86323564acc05f13e616 Mon Sep 17 00:00:00 2001
> +From: Charlie Li <git@vishwin.info>
> +Date: Fri, 23 Oct 2026 22:34:34 -0400
> +Subject: [PATCH] lib-dcrypt: exclude test_sign_verify_ed448 from LibreSSL
> +
> +Upstream: https://github.com/dovecot/core/pull/340
> +
> +[Bernd: rebased for 2.4.5]
> +Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> +---
> + src/lib-dcrypt/test-crypto.c | 4 ++++
> + 1 file changed, 4 insertions(+)
> +
> +diff --git a/src/lib-dcrypt/test-crypto.c b/src/lib-dcrypt/test-crypto.c
> +index 558c9c9724..6ed164c0f0 100644
> +--- a/src/lib-dcrypt/test-crypto.c
> ++++ b/src/lib-dcrypt/test-crypto.c
> +@@ -2007,6 +2007,7 @@ static void test_static_verify_ed448(void)
> + 	test_end();
> + }
> + 
> ++#ifndef LIBRESSL_VERSION_NUMBER
> + static void test_sign_verify_ed448(void)
> + {
> + 	const char *error = NULL;
> +@@ -2033,6 +2034,7 @@ static void test_sign_verify_ed448(void)
> + 
> + 	test_end();
> + }
> ++#endif
> + 
> + static void test_xd_keypair(struct dcrypt_keypair *pair)
> + {
> +@@ -2339,7 +2340,9 @@ int main(void)
> + 		test_static_verify_ecdsa_x962,
> + #ifdef HAVE_X25519
> + 		test_sign_verify_ed25519,
> ++#ifndef LIBRESSL_VERSION_NUMBER
> + 		test_sign_verify_ed448,
> ++#endif

So this patch changes test_sign_verify_ed448() so that the function is
not implemented nor used when LIBRESSL_VERSION_NUMBER is defined.

> +diff --git a/src/lib-dcrypt/test-crypto.c b/src/lib-dcrypt/test-crypto.c
> +index 6ed164c0f0..20371cefc5 100644
> +--- a/src/lib-dcrypt/test-crypto.c
> ++++ b/src/lib-dcrypt/test-crypto.c
> +@@ -2007,7 +2007,7 @@ static void test_static_verify_ed448(void)
> + 	test_end();
> + }
> + 
> +-#ifndef LIBRESSL_VERSION_NUMBER
> ++#ifdef SN_ED448

But then here this gets changed so that the function is now defined
when SN_ED448 is available... but why isn't this also changed in
test_xd_keypair() ?

Best regards,

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] 2+ messages in thread

end of thread, other threads:[~2026-11-01 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-01  8:25 [Buildroot] [PATCH 1/1] package/dovecot: fix build with LibreSSL Bernd Kuhls
2026-11-01 16:30 ` 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