diff -Nru p11-kit-0.24.1/debian/changelog p11-kit-0.24.1/debian/changelog --- p11-kit-0.24.1/debian/changelog 2022-08-05 13:25:36.000000000 +0000 +++ p11-kit-0.24.1/debian/changelog 2022-09-29 10:55:32.000000000 +0000 @@ -1,3 +1,10 @@ +p11-kit (0.24.1-1ubuntu2) kinetic; urgency=medium + + * debian/patches/lp-1991067-pkcs11-gnu-Enable-testing-with-p11-kit- + pkcs11x.h.patch: Fix gnutls FTBFS. Closes LP: #1991067. + + -- Adrien Nader Thu, 29 Sep 2022 10:55:32 +0000 + p11-kit (0.24.1-1ubuntu1) kinetic; urgency=medium * Add support for IBM specific attributes and mechanis by adding the diff -Nru p11-kit-0.24.1/debian/patches/lp-1991067-pkcs11-gnu-Enable-testing-with-p11-kit-pkcs11x.h.patch p11-kit-0.24.1/debian/patches/lp-1991067-pkcs11-gnu-Enable-testing-with-p11-kit-pkcs11x.h.patch --- p11-kit-0.24.1/debian/patches/lp-1991067-pkcs11-gnu-Enable-testing-with-p11-kit-pkcs11x.h.patch 1970-01-01 00:00:00.000000000 +0000 +++ p11-kit-0.24.1/debian/patches/lp-1991067-pkcs11-gnu-Enable-testing-with-p11-kit-pkcs11x.h.patch 2022-09-29 09:18:27.000000000 +0000 @@ -0,0 +1,76 @@ +Description: Fix gnutls FTBFS + A patch we have been backporting as part of #1982841 prevents compilation of + gnutls and this restores it. Patch is from upstream. +Author: Adrien Nader +Origin: backport, https://github.com/p11-glue/p11-kit/pull/424 +Bug: https://github.com/p11-glue/p11-kit/issues/419#issuecomment-1259353294 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/p11-kit/+bug/1991067 +Last-Update: 2022-09-29 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3 + +From 4276a4a6d2a480606ece19cedaddfeec731ebb1e Mon Sep 17 00:00:00 2001 +From: Daiki Ueno +Date: Wed, 27 Jul 2022 15:18:05 +0900 +Subject: [PATCH] pkcs11-gnu: Enable testing with + +This ensures that programs using can be compiled +with CRYPTOKI_GNU. The previous coverage was partial as pkcs11-gnu.c +didn't include "pkcs11x.h" and Meson didn't supply -DCRYPTOKI_GNU=1. + +Signed-off-by: Daiki Ueno +--- + p11-kit/meson.build | 3 +++ + p11-kit/p11-kit.h | 5 +++++ + p11-kit/pkcs11-gnu.c | 5 +++++ + 3 files changed, 13 insertions(+) + +diff --git a/p11-kit/meson.build b/p11-kit/meson.build +index 386f612b..7912684b 100644 +--- a/p11-kit/meson.build ++++ b/p11-kit/meson.build +@@ -217,6 +217,9 @@ gnu_h = gnu_h_gen.process(pkcs11_gnu_headers) + static_library('p11-kit-pkcs11-gnu', + gnu_h, + 'pkcs11-gnu.c', ++ c_args: [ ++ '-DCRYPTOKI_GNU=1', '-DP11_KIT_FUTURE_UNSTABLE_API=1', ++ ], + include_directories: [configinc, commoninc]) + + # Tests ---------------------------------------------------------------- +diff --git a/p11-kit/p11-kit.h b/p11-kit/p11-kit.h +index cc89595e..aa8323ee 100644 +--- a/p11-kit/p11-kit.h ++++ b/p11-kit/p11-kit.h +@@ -43,12 +43,17 @@ + */ + #ifdef CRYPTOKI_GNU + typedef ck_rv_t CK_RV; ++typedef ck_object_handle_t CK_OBJECT_HANDLE; ++typedef unsigned long int CK_ULONG; + typedef struct ck_function_list* CK_FUNCTION_LIST_PTR; + typedef struct ck_function_list CK_FUNCTION_LIST; + #endif + + #include "p11-kit/deprecated.h" + ++/* For size_t. */ ++#include ++ + #ifdef __cplusplus + extern "C" { + #endif +diff --git a/p11-kit/pkcs11-gnu.c b/p11-kit/pkcs11-gnu.c +index 86d93745..c75f4b03 100644 +--- a/p11-kit/pkcs11-gnu.c ++++ b/p11-kit/pkcs11-gnu.c +@@ -1,3 +1,8 @@ ++#include "config.h" ++ ++#include "p11-kit.h" ++#include "pkcs11x.h" ++ + #include "pkcs11-gnu-iter.h" + #include "pkcs11-gnu-pin.h" + #include "pkcs11-gnu-uri.h" diff -Nru p11-kit-0.24.1/debian/patches/series p11-kit-0.24.1/debian/patches/series --- p11-kit-0.24.1/debian/patches/series 2022-08-05 13:15:40.000000000 +0000 +++ p11-kit-0.24.1/debian/patches/series 2022-09-29 08:59:26.000000000 +0000 @@ -14,3 +14,4 @@ lp-1982841-Add-support-for-CKM_AES_CTR.patch lp-1982841-Add-support-for-CKM_AES_GCM.patch lp-1982841-common-pkcs11x.h-Support-CRYPTOKI_GNU-for-IBM-vendor.patch +lp-1991067-pkcs11-gnu-Enable-testing-with-p11-kit-pkcs11x.h.patch