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

Hi Mattias,

In Ubuntu, scitokens-cpp is failing to build from source because we have
updated to update to openssl 3, and scitokens-cpp uses some functions which
are now deprecated:

[...]
/usr/bin/c++ -DSciTokens_EXPORTS -I/<<PKGBUILDDIR>> 
-I/<<PKGBUILDDIR>>/vendor/jwt-cpp/include -g -O2 
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects 
-fstack-protector-strong -Wformat -Werror=format-security -Wdate-time 
-D_FORTIFY_SOURCE=2 -Wall -Werror -std=c++11 -fPIC -MD -MT 
CMakeFiles/SciTokens.dir/src/scitokens_cache.cpp.o -MF 
CMakeFiles/SciTokens.dir/src/scitokens_cache.cpp.o.d -o 
CMakeFiles/SciTokens.dir/src/scitokens_cache.cpp.o -c 
/<<PKGBUILDDIR>>/src/scitokens_cache.cpp
In file included from /<<PKGBUILDDIR>>/src/scitokens_internal.h:6,
                 from /<<PKGBUILDDIR>>/src/scitokens_cache.cpp:17:
/<<PKGBUILDDIR>>/vendor/jwt-cpp/include/jwt-cpp/jwt.h: In constructor 
‘jwt::algorithm::ecdsa::ecdsa(const string&, const string&, const string&, 
const string&, const EVP_MD* (*)(), const string&, size_t)’:
/<<PKGBUILDDIR>>/vendor/jwt-cpp/include/jwt-cpp/jwt.h:360:74: error: ‘EC_KEY* 
PEM_read_bio_EC_PUBKEY(BIO*, EC_KEY**, int (*)(char*, int, int, void*), void*)’ 
is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
  360 |                                         
pkey.reset(PEM_read_bio_EC_PUBKEY(pubkey_bio.get(), nullptr, nullptr, 
(void*)public_key_password.c_str()), EC_KEY_free);
      |                                                    
~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /<<PKGBUILDDIR>>/vendor/jwt-cpp/include/jwt-cpp/jwt.h:11,
                 from /<<PKGBUILDDIR>>/src/scitokens_internal.h:6,
                 from /<<PKGBUILDDIR>>/src/scitokens_cache.cpp:17:
/usr/include/openssl/pem.h:463:1: note: declared here
  463 | DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, EC_PUBKEY, EC_KEY)
      | ^~~~~~~~~~~~~~~~~~~
[...]

  
(https://launchpad.net/ubuntu/+source/scitokens-cpp/0.6.2-1build1/+build/22604628)

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

In Ubuntu, I've applied the following patch to let scitokens-cpp build by
ignoring the deprecation warnings.

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 scitokens-cpp-0.6.2/debian/rules scitokens-cpp-0.6.2/debian/rules
--- scitokens-cpp-0.6.2/debian/rules    2021-08-25 01:36:24.000000000 -0700
+++ scitokens-cpp-0.6.2/debian/rules    2021-12-09 13:11:57.000000000 -0800
@@ -1,6 +1,8 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
+export DEB_CFLAGS_MAINT_APPEND = -Wno-error=deprecated-declarations
+
 %:
        dh $@
 

Reply via email to