The following patch resolves the FTBFS:

```
Description: Resolve FTBFS with OpenSSL v3
 This package uses some deprecated OCSP constants. There is a history
 of defining them manually once they are removed from openssl. This
 patch continues that behavior with two additional constants that
 are not defined in openssl v3
Author: William 'jawn-smith' Wilson <jawn-sm...@ubuntu.com>
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006389
Last-Update: 2022-06-28
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: libdigidoc-3.10.5/libdigidoc/DigiDocOCSP.c
===================================================================
--- libdigidoc-3.10.5.orig/libdigidoc/DigiDocOCSP.c
+++ libdigidoc-3.10.5/libdigidoc/DigiDocOCSP.c
@@ -109,6 +109,8 @@
 # define OCSP_R_NO_CONTENT                                106
 # define OCSP_F_OCSP_SENDREQ_BIO                          112
 # define OCSP_R_SERVER_READ_ERROR                         113
+# define OCSP_R_SERVER_RESPONSE_ERROR                     114
+# define OCSP_R_SERVER_RESPONSE_PARSE_ERROR               115
 # define OCSP_R_SERVER_WRITE_ERROR                        116
 #endif
```

On Thu, 24 Feb 2022 21:20:52 +0100 Sebastian Andrzej Siewior <
sebast...@breakpoint.cc> wrote:
> Source: libdigidoc
> Version: 3.10.5-2
> Severity: important
> Tags: bookworm sid
> User: pkg-openssl-de...@lists.alioth.debian.org
> Usertags: ftbfs-3.0
>
> Your package is failing to build using OpenSSL 3.0 with the
> following error:
>
> | [ 76%] Building C object
libdigidoc/CMakeFiles/digidoc.dir/DigiDocOCSP.c.o
> | cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/libdigidoc && /usr/bin/cc
-DBUILD_DATE=\"31.12.2020\" -DBUILD_VER=0 -DMAJOR_VER=3 -DMINOR_VER=10
-DRELEASE_VER=5 -DVER_SUFFIX=\"\" -Ddigidoc_EXPORTS -I/<<PKGBUILDDIR>>
-I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu -I/usr/include/libxml2 -g -O2
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
-fvisibility=hidden -MD -MT
libdigidoc/CMakeFiles/digidoc.dir/DigiDocOCSP.c.o -MF
CMakeFiles/digidoc.dir/DigiDocOCSP.c.o.d -o
CMakeFiles/digidoc.dir/DigiDocOCSP.c.o -c
/<<PKGBUILDDIR>>/libdigidoc/DigiDocOCSP.c
> …
> | In file included from /<<PKGBUILDDIR>>/libdigidoc/DigiDocOCSP.c:38:
> | /<<PKGBUILDDIR>>/libdigidoc/DigiDocOCSP.c:983:37: error:
‘OCSP_R_SERVER_RESPONSE_PARSE_ERROR’ undeclared (first use in this
function); did you mean ‘OCSP_R_SERVER_READ_ERROR’?
> |   983 |
OCSPerr(OCSP_F_OCSP_SENDREQ_BIO,OCSP_R_SERVER_RESPONSE_PARSE_ERROR);
> |       |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | /<<PKGBUILDDIR>>/libdigidoc/DigiDocOCSP.c:983:37: note: each undeclared
identifier is reported only once for each function it appears in
> | /<<PKGBUILDDIR>>/libdigidoc/DigiDocOCSP.c:1022:37: error:
‘OCSP_R_SERVER_RESPONSE_ERROR’ undeclared (first use in this function);
did you mean ‘OCSP_R_SERVER_READ_ERROR’?
> |  1022 |
OCSPerr(OCSP_F_OCSP_SENDREQ_BIO,OCSP_R_SERVER_RESPONSE_ERROR);
> |       |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | In file included from /<<PKGBUILDDIR>>/libdigidoc/DigiDocLib.h:36,
> |                  from /<<PKGBUILDDIR>>/libdigidoc/DigiDocConfig.h:29,
> |                  from /<<PKGBUILDDIR>>/libdigidoc/DigiDocOCSP.c:23:
> | /<<PKGBUILDDIR>>/libdigidoc/DigiDocOCSP.c: In function
‘verifyOCSPResponse’:
> | /<<PKGBUILDDIR>>/libdigidoc/DigiDocOCSP.c:1603:31: warning: passing
argument 1 of ‘ossl_check_X509_type’ discards ‘const’ qualifier
from pointer target type [-Wdiscarded-qualifiers]
> …
> | make[3]: *** [libdigidoc/CMakeFiles/digidoc.dir/build.make:317:
libdigidoc/CMakeFiles/digidoc.dir/DigiDocOCSP.c.o] Error 1
> | make[3]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
> | make[2]: *** [CMakeFiles/Makefile2:131:
libdigidoc/CMakeFiles/digidoc.dir/all] Error 2
> | make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
> | make[1]: *** [Makefile:139: all] Error 2
> | make[1]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
> | dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j1
"INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2
>
> For more information see:
> https://www.openssl.org/docs/man3.0/man7/migration_guide.html
>
> Sebastian
>
>

Reply via email to