Control: tags 1117231 + patch
Control: tags 1117231 + pending

Dear maintainer,

I've prepared an NMU for php-gnupg (versioned as 1.5.3-1.1) and
uploaded it to DELAYED/7. Please feel free to tell me if I
should cancel it.

Regards.

-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'
diffstat for php-gnupg-1.5.3 php-gnupg-1.5.3

 changelog                                                               |    8 
 patches/0001-Fix-GH-59-Remove-trustlist-function-for-GPGME-2.0.0-.patch |   86 ++++++++++
 patches/series                                                          |    1 
 3 files changed, 95 insertions(+)

diff -Nru php-gnupg-1.5.3/debian/changelog php-gnupg-1.5.3/debian/changelog
--- php-gnupg-1.5.3/debian/changelog	2025-06-10 16:08:35.000000000 +0200
+++ php-gnupg-1.5.3/debian/changelog	2025-11-06 16:20:39.000000000 +0100
@@ -1,3 +1,11 @@
+php-gnupg (1.5.3-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Pull patch from upstream 1.5.4 to fix FTBFS against gpgme 2.
+    (Closes: #1117231)
+
+ -- Andreas Metzler <[email protected]>  Thu, 06 Nov 2025 16:20:39 +0100
+
 php-gnupg (1.5.3-1) unstable; urgency=medium
 
   * New upstream version 1.5.3
diff -Nru php-gnupg-1.5.3/debian/patches/0001-Fix-GH-59-Remove-trustlist-function-for-GPGME-2.0.0-.patch php-gnupg-1.5.3/debian/patches/0001-Fix-GH-59-Remove-trustlist-function-for-GPGME-2.0.0-.patch
--- php-gnupg-1.5.3/debian/patches/0001-Fix-GH-59-Remove-trustlist-function-for-GPGME-2.0.0-.patch	1970-01-01 01:00:00.000000000 +0100
+++ php-gnupg-1.5.3/debian/patches/0001-Fix-GH-59-Remove-trustlist-function-for-GPGME-2.0.0-.patch	2025-11-06 16:18:37.000000000 +0100
@@ -0,0 +1,86 @@
+From b6fbcbc56a4fb56afa5af23804f06a696ef17702 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dani=C3=ABl=20van=20de=20Giessen?= <[email protected]>
+Date: Fri, 8 Aug 2025 14:04:36 +0200
+Subject: [PATCH] Fix GH-59: Remove trustlist function for GPGME >= 2.0.0 (#60)
+
+---
+ gnupg.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/gnupg-1.5.3/gnupg.c b/gnupg-1.5.3/gnupg.c
+index 475d16e..52748ff 100644
+--- a/gnupg-1.5.3/gnupg.c
++++ b/gnupg-1.5.3/gnupg.c
+@@ -337,15 +337,17 @@ phpc_function_entry gnupg_methods[] = {
+ 	PHP_GNUPG_FALIAS(sign,              arginfo_gnupg_text_method)
+ 	PHP_GNUPG_FALIAS(encryptsign,       arginfo_gnupg_text_method)
+ 	PHP_GNUPG_FALIAS(decryptverify,     arginfo_gnupg_decryptverify_method)
+ 	PHP_GNUPG_FALIAS(addsignkey,        arginfo_gnupg_key_passphrase_method)
+ 	PHP_GNUPG_FALIAS(addencryptkey,     arginfo_gnupg_key_method)
+ 	PHP_GNUPG_FALIAS(adddecryptkey,     arginfo_gnupg_key_passphrase_method)
+ 	PHP_GNUPG_FALIAS(deletekey,         arginfo_gnupg_deletekey_method)
++#if GPGME_VERSION_NUMBER < 0x020000  /* GPGME < 2.0.0 */
+ 	PHP_GNUPG_FALIAS(gettrustlist,      arginfo_gnupg_pattern_method)
++#endif
+ 	PHP_GNUPG_FALIAS(listsignatures,    arginfo_gnupg_keyid_method)
+ 	PHP_GNUPG_FALIAS(seterrormode,      arginfo_gnupg_errmode_method)
+ 	PHPC_FE_END
+ };
+ /* }}} */
+ 
+ /* {{{ arginfo for gnupg function with no parameter */
+@@ -479,15 +481,17 @@ static zend_function_entry gnupg_functions[] = {
+ 	PHP_FE(gnupg_decryptverify,		arginfo_gnupg_decryptverify_function)
+ 	PHP_FE(gnupg_geterror,			arginfo_gnupg_void_function)
+ 	PHP_FE(gnupg_geterrorinfo,		arginfo_gnupg_void_function)
+ 	PHP_FE(gnupg_addsignkey,		arginfo_gnupg_key_passphrase_function)
+ 	PHP_FE(gnupg_addencryptkey,		arginfo_gnupg_key_function)
+ 	PHP_FE(gnupg_adddecryptkey,		arginfo_gnupg_key_passphrase_function)
+ 	PHP_FE(gnupg_deletekey,			arginfo_gnupg_deletekey_function)
++#if GPGME_VERSION_NUMBER < 0x020000  /* GPGME < 2.0.0 */
+ 	PHP_FE(gnupg_gettrustlist,		arginfo_gnupg_pattern_function)
++#endif
+ 	PHP_FE(gnupg_listsignatures,	arginfo_gnupg_keyid_function)
+ 	PHP_FE(gnupg_seterrormode,		arginfo_gnupg_errmode_function)
+ 	PHPC_FE_END
+ };
+ /* }}} */
+ 
+ /* {{{ gnupg_module_entry
+@@ -1932,14 +1936,16 @@ PHP_FUNCTION(gnupg_deletekey)
+ 	} else {
+ 		RETVAL_TRUE;
+ 	}
+ 	gpgme_key_unref(gpgme_key);
+ }
+ /* }}} */
+ 
++#if GPGME_VERSION_NUMBER < 0x020000  /* GPGME < 2.0.0 */
++
+ /* {{{ proto array gnupg_gettrustlist(string pattern)
+ * searching for trust items which match PATTERN
+ */
+ PHP_FUNCTION(gnupg_gettrustlist)
+ {
+ 	char *pattern;
+ 	phpc_str_size_t	pattern_len;
+@@ -1977,14 +1983,16 @@ PHP_FUNCTION(gnupg_gettrustlist)
+ 		PHP_GNUPG_ARRAY_ADD_ASSOC_CSTR(sub_arr, name, item);
+ 		gpgme_trust_item_unref(item);
+ 		PHPC_ARRAY_ADD_NEXT_INDEX_ZVAL(return_value, PHPC_VAL_CAST_TO_PZVAL(sub_arr));
+ 	}
+ }
+ /* }}} */
+ 
++#endif /* GPGME < 2.0.0 */
++
+ /* {{{ proto array gnupg_listsignatures(string keyid) */
+ PHP_FUNCTION(gnupg_listsignatures)
+ {
+ 	char	*keyid;
+ 	phpc_str_size_t	keyid_len;
+ 
+ 	phpc_val sub_arr;
+-- 
+2.51.0
+
diff -Nru php-gnupg-1.5.3/debian/patches/series php-gnupg-1.5.3/debian/patches/series
--- php-gnupg-1.5.3/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ php-gnupg-1.5.3/debian/patches/series	2025-11-06 16:18:45.000000000 +0100
@@ -0,0 +1 @@
+0001-Fix-GH-59-Remove-trustlist-function-for-GPGME-2.0.0-.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to