Bug#1006391: NMU: libengine-gost-openssl1.1: FTBFS with OpenSSL 3.0

2022-05-21 Thread Wartan Hachaturow
Thanks for the NMU!

The package isn't abandoned, I just discovered I have some technical
problems with my DD key :(

Once that is resolved, I will upload latest engine version which is
intended to work in 3.0 environment.

On Sat, May 21, 2022, 02:00 Bastian Germann  wrote:

> The right thing to do to solve this would be importing the new release.
> I NMU this with the already existing Ubuntu patches so it does not block
> the openssl migration.
>
> As the package seems to be abandoned, add already handed-in cross-compile
> patch as well.
> The debidff is enclosed.


Bug#1006391: NMU: libengine-gost-openssl1.1: FTBFS with OpenSSL 3.0

2022-05-20 Thread Bastian Germann

The right thing to do to solve this would be importing the new release.
I NMU this with the already existing Ubuntu patches so it does not block the 
openssl migration.

As the package seems to be abandoned, add already handed-in cross-compile patch 
as well.
The debidff is enclosed.diff -Nru libengine-gost-openssl1.1-1.1.0.3/debian/changelog 
libengine-gost-openssl1.1-1.1.0.3/debian/changelog
--- libengine-gost-openssl1.1-1.1.0.3/debian/changelog  2018-09-16 
17:58:16.0 +0200
+++ libengine-gost-openssl1.1-1.1.0.3/debian/changelog  2022-05-21 
00:33:51.0 +0200
@@ -1,7 +1,23 @@
+libengine-gost-openssl1.1 (1.1.0.3-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * d/watch: Scan GitHub tags.
+
+  [ Helmut Grohne ]
+  * Fix openssl engine path for cross compilation (Closes: #966642).
+
+  [ Simon Chopin ]
+  * Stopgap patches for OpenSSL3 before migrating to provider API:
+- d/rules: downgrade deprecation errors to warnings to fix the build
+  against OpenSSL 3 (Closes: #1006391)
+- d/p/OpenSSL3.patch: Fix several const-correctness issues introduced
+  by OpenSSL 3 API changes.
+
+ -- Bastian Germann   Sat, 21 May 2022 00:33:51 +0200
+
 libengine-gost-openssl1.1 (1.1.0.3-1) unstable; urgency=medium
 
   * New upstream version
-
   * Closes: #898823, #906734
 
  -- Wartan Hachaturow   Sun, 16 Sep 2018 18:58:16 +0300
diff -Nru libengine-gost-openssl1.1-1.1.0.3/debian/patches/OpenSSL3.patch 
libengine-gost-openssl1.1-1.1.0.3/debian/patches/OpenSSL3.patch
--- libengine-gost-openssl1.1-1.1.0.3/debian/patches/OpenSSL3.patch 
1970-01-01 01:00:00.0 +0100
+++ libengine-gost-openssl1.1-1.1.0.3/debian/patches/OpenSSL3.patch 
2022-05-21 00:28:56.0 +0200
@@ -0,0 +1,31 @@
+--- a/gost_ameth.c
 b/gost_ameth.c
+@@ -635,7 +635,7 @@
+ }
+ 
+ /* -- Public key functions * --*/
+-static int pub_decode_gost_ec(EVP_PKEY *pk, X509_PUBKEY *pub)
++static int pub_decode_gost_ec(EVP_PKEY *pk, const X509_PUBKEY *pub)
+ {
+ X509_ALGOR *palg = NULL;
+ const unsigned char *pubkey_buf = NULL;
+--- a/gost_pmeth.c
 b/gost_pmeth.c
+@@ -53,7 +53,7 @@
+ }
+ 
+ /* Copies contents of gost_pmeth_data structure */
+-static int pkey_gost_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
++static int pkey_gost_copy(EVP_PKEY_CTX *dst, const EVP_PKEY_CTX *src)
+ {
+ struct gost_pmeth_data *dst_data, *src_data;
+ if (!pkey_gost_init(dst)) {
+@@ -499,7 +499,7 @@
+ OPENSSL_free(data);
+ }
+ 
+-static int pkey_gost_mac_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
++static int pkey_gost_mac_copy(EVP_PKEY_CTX *dst, const EVP_PKEY_CTX *src)
+ {
+ struct gost_mac_pmeth_data *dst_data, *src_data;
+ if (!pkey_gost_mac_init(dst)) {
diff -Nru libengine-gost-openssl1.1-1.1.0.3/debian/patches/series 
libengine-gost-openssl1.1-1.1.0.3/debian/patches/series
--- libengine-gost-openssl1.1-1.1.0.3/debian/patches/series 1970-01-01 
01:00:00.0 +0100
+++ libengine-gost-openssl1.1-1.1.0.3/debian/patches/series 2022-05-21 
00:28:56.0 +0200
@@ -0,0 +1 @@
+OpenSSL3.patch
diff -Nru libengine-gost-openssl1.1-1.1.0.3/debian/rules 
libengine-gost-openssl1.1-1.1.0.3/debian/rules
--- libengine-gost-openssl1.1-1.1.0.3/debian/rules  2018-09-16 
17:58:16.0 +0200
+++ libengine-gost-openssl1.1-1.1.0.3/debian/rules  2022-05-21 
00:33:51.0 +0200
@@ -5,6 +5,9 @@
 
 # see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
 DPKG_EXPORT_BUILDFLAGS = 1
+
+export DEB_CFLAGS_MAINT_APPEND = -Wno-error=deprecated-declarations
+
 include /usr/share/dpkg/default.mk
 
 # see FEATURE AREAS in dpkg-buildflags(1)
@@ -16,7 +19,7 @@
 # package maintainers to append LDFLAGS
 #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
 
-OPENSSL_ENGINE_DIR=$(shell openssl version -e |sed -e 's/^[^.]*"//' -e 
's/".*$$//')
+OPENSSL_ENGINE_DIR=$(shell openssl version -e |sed -e 's/^[^.]*"//' -e 
's/".*$$//' -e 's/$(DEB_BUILD_MULTIARCH)/$(DEB_HOST_MULTIARCH)/')
 # main packaging script based on dh7 syntax
 %:
dh $@ 
diff -Nru libengine-gost-openssl1.1-1.1.0.3/debian/watch 
libengine-gost-openssl1.1-1.1.0.3/debian/watch
--- libengine-gost-openssl1.1-1.1.0.3/debian/watch  1970-01-01 
01:00:00.0 +0100
+++ libengine-gost-openssl1.1-1.1.0.3/debian/watch  2022-05-21 
00:33:51.0 +0200
@@ -0,0 +1,2 @@
+version=4
+https://github.com/gost-engine/engine/tags .*/v?(\d\S+)\.tar\.gz