diff options
-rw-r--r-- | PHPINFO | 4 | ||||
-rw-r--r-- | REFLECTION | 8 | ||||
-rw-r--r-- | gnupg-tests.patch | 22 | ||||
-rw-r--r-- | no_uid_hint_msg.gpg | bin | 0 -> 921 bytes | |||
-rw-r--r-- | php-pecl-gnupg.spec | 31 |
5 files changed, 51 insertions, 14 deletions
@@ -2,5 +2,5 @@ gnupg gnupg support => enabled -GPGme Version => 1.17.0 -Extension Version => 1.5.1 +GPGme Version => 1.23.2 +Extension Version => 1.5.2 @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #124 gnupg version 1.5.1 ] { +Extension [ <persistent> extension #82 gnupg version 1.5.2 ] { - Constants [36] { Constant [ int GNUPG_SIG_MODE_NORMAL ] { 0 } @@ -36,7 +36,7 @@ Extension [ <persistent> extension #124 gnupg version 1.5.1 ] { Constant [ int GNUPG_PK_ECDSA ] { 301 } Constant [ int GNUPG_PK_ECDH ] { 302 } Constant [ int GNUPG_PK_EDDSA ] { 303 } - Constant [ string GNUPG_GPGME_VERSION ] { 1.17.0 } + Constant [ string GNUPG_GPGME_VERSION ] { 1.23.2 } } - Functions { @@ -197,7 +197,7 @@ Extension [ <persistent> extension #124 gnupg version 1.5.1 ] { - Parameters [3] { Parameter #0 [ <required> $res ] Parameter #1 [ <required> $kye ] - Parameter #2 [ <required> $allow_secret ] + Parameter #2 [ <optional> $allow_secret = <default> ] } } Function [ <internal:gnupg> function gnupg_gettrustlist ] { @@ -431,7 +431,7 @@ Extension [ <persistent> extension #124 gnupg version 1.5.1 ] { - Parameters [2] { Parameter #0 [ <required> $kye ] - Parameter #1 [ <required> $allow_secret ] + Parameter #1 [ <optional> $allow_secret = <default> ] } } diff --git a/gnupg-tests.patch b/gnupg-tests.patch new file mode 100644 index 0000000..17a858c --- /dev/null +++ b/gnupg-tests.patch @@ -0,0 +1,22 @@ +From 2a5bc513c6ae065ef43bda71b321bce1b318f03e Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Tue, 8 Apr 2025 14:12:09 +0200 +Subject: [PATCH] fix tests with 5.6 + +--- + tests/gnupgt.inc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/gnupgt.inc b/tests/gnupgt.inc +index 2b8aa08..7b06a0a 100644 +--- a/tests/gnupgt.inc ++++ b/tests/gnupgt.inc +@@ -75,7 +75,7 @@ class gnupgt { + self::reset_key(); + + $gpg = self::create_instance(); +- $gpg->import($privkey ?? $testkey); ++ $gpg->import(is_null($privkey) ? $testkey : $privkey); + } + + /** diff --git a/no_uid_hint_msg.gpg b/no_uid_hint_msg.gpg Binary files differnew file mode 100644 index 0000000..67eccf8 --- /dev/null +++ b/no_uid_hint_msg.gpg diff --git a/php-pecl-gnupg.spec b/php-pecl-gnupg.spec index b78c13d..8397c34 100644 --- a/php-pecl-gnupg.spec +++ b/php-pecl-gnupg.spec @@ -1,19 +1,25 @@ # spec file for php-pecl-gnupg # -# Copyright (c) 2012-2024 Remi Collet -# License: CC-BY-SA-4.0 -# http://creativecommons.org/licenses/by-sa/4.0/ +# SPDX-FileCopyrightText: Copyright 2012-2025 Remi Collet +# SPDX-License-Identifier: CECILL-2.1 +# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt # # Please, preserve the changelog entries # %{?scl:%scl_package php-pecl-gnupg} +%if 0%{?fedora} >= 41 +# TODO needs investigation +# fails in mock, succeeds in local build +%bcond_with tests +%else %bcond_without tests +%endif %global pecl_name gnupg %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %global ini_name 40-%{pecl_name}.ini -%global upstream_version 1.5.1 +%global upstream_version 1.5.2 #global upstream_prever RC2 %global sources %{pecl_name}-%{upstream_version}%{?upstream_prever} %global _configure ../%{sources}/configure @@ -21,11 +27,14 @@ Summary: Wrapper around the gpgme library Name: %{?scl_prefix}php-pecl-gnupg Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} -Release: 4%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} License: BSD-2-Clause URL: https://pecl.php.net/package/gnupg Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz +Source1: https://raw.githubusercontent.com/php-gnupg/php-gnupg/refs/tags/gnupg-%{upstream_version}/tests/no_uid_hint_msg.gpg + +Patch0: %{pecl_name}-tests.patch BuildRequires: make BuildRequires: %{?dtsprefix}gcc @@ -68,6 +77,9 @@ extension=%{pecl_name}.so EOF cd %{sources} +cp %{SOURCE1} tests/ +%patch -P0 -p1 + # Check extension version extver=$(sed -n '/#define PHP_GNUPG_VERSION/{s/.* "//;s/".*$//;p}' php_gnupg.h) if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then @@ -136,9 +148,6 @@ done %check cd %{sources} -sed -e '/GnuPG v1/d' \ - -i tests/gnupg_*_export.phpt - unset GPG_AGENT_INFO : Check if build NTS extension can be loaded @@ -183,6 +192,12 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Tue Apr 8 2025 Remi Collet <remi@remirepo.net> - 1.5.2-1 +- update to 1.5.2 +- re-license spec file to CECILL-2.1 +- open https://github.com/php-gnupg/php-gnupg/pull/52 file missing in archive +- open https://github.com/php-gnupg/php-gnupg/pull/53 fix tests with PHP 5 + * Tue Oct 1 2024 Remi Collet <remi@remirepo.net> - 1.5.1-4 - ignore test suite on F41 |