Package: unbound
Version: 1.13.1-1
Severity: serious
Tags: patch experimental
Justification: ftbfs
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch

Hi Robert,

In Ubuntu, unbound is failing to build from source because it uses the
ERR_GET_FUNC() macro, which has been obsoleted in OpenSSL 3.

The attached patch addresses this by removing the call to the macro,
allowing unbound to build.

Please consider applying this patch in Debian.

OpenSSL 3 is currently in experimental, and expected to be the version of
OpenSSL shipped in the next release of Debian.

Thanks for considering,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru unbound-1.13.1/debian/patches/openssl3.patch 
unbound-1.13.1/debian/patches/openssl3.patch
--- unbound-1.13.1/debian/patches/openssl3.patch        1969-12-31 
16:00:00.000000000 -0800
+++ unbound-1.13.1/debian/patches/openssl3.patch        2021-12-09 
12:51:25.000000000 -0800
@@ -0,0 +1,20 @@
+Description: compatibility with OpenSSL 3
+Author: Steve Langasek <steve.langa...@ubuntu.com>
+Last-Update: 2021-12-09
+Forwarded: no
+
+Index: unbound-1.13.1/smallapp/unbound-control.c
+===================================================================
+--- unbound-1.13.1.orig/smallapp/unbound-control.c
++++ unbound-1.13.1/smallapp/unbound-control.c
+@@ -492,9 +492,7 @@
+ {
+       unsigned long err;
+       err = ERR_peek_error();
+-      if (ERR_GET_LIB(err) == ERR_LIB_SYS &&
+-              (ERR_GET_FUNC(err) == SYS_F_FOPEN ||
+-               ERR_GET_FUNC(err) == SYS_F_FREAD) ) {
++      if (ERR_GET_LIB(err) == ERR_LIB_SYS) {
+               fprintf(stderr, "error: %s\n%s: %s\n",
+                       s, path, ERR_reason_error_string(err));
+               exit(1);
diff -Nru unbound-1.13.1/debian/patches/series 
unbound-1.13.1/debian/patches/series
--- unbound-1.13.1/debian/patches/series        2021-07-01 07:16:26.000000000 
-0700
+++ unbound-1.13.1/debian/patches/series        2021-12-09 12:50:04.000000000 
-0800
@@ -1 +1,2 @@
 0001-Enable-remote-control-by-default.patch
+openssl3.patch

Reply via email to