From c2fc70789a513ae0f4905f1d1b2691ffd71f8e53 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 17 Aug 2022 15:07:12 +0200 Subject: update to 1.4.3 --- 56.patch | 49 ------------------------------------------------- 59.patch | 21 --------------------- PHPINFO | 4 ++++ REFLECTION | 2 +- php-pecl-scrypt.spec | 43 ++++++++++++++----------------------------- 5 files changed, 19 insertions(+), 100 deletions(-) delete mode 100644 56.patch delete mode 100644 59.patch create mode 100644 PHPINFO diff --git a/56.patch b/56.patch deleted file mode 100644 index a5e1ea6..0000000 --- a/56.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 5010f9fa0743518d149d994728ca930503adde1e Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Tue, 22 Sep 2020 14:55:32 +0200 -Subject: [PATCH] trivial fix for PHP 8 - ---- - crypto/crypto_scrypt-sse.c | 1 + - php_scrypt.h | 5 +++++ - php_scrypt_utils.c | 1 + - 3 files changed, 7 insertions(+) - -diff --git a/crypto/crypto_scrypt-sse.c b/crypto/crypto_scrypt-sse.c -index a52ce81..709a04f 100644 ---- a/crypto/crypto_scrypt-sse.c -+++ b/crypto/crypto_scrypt-sse.c -@@ -44,6 +44,7 @@ - #include "sysendian.h" - - #include "crypto_scrypt.h" -+#include "php_scrypt.h" - - static void blkcpy(void *, void *, size_t); - static void blkxor(void *, void *, size_t); -diff --git a/php_scrypt.h b/php_scrypt.h -index a1117c8..6cc1c4c 100644 ---- a/php_scrypt.h -+++ b/php_scrypt.h -@@ -35,4 +35,9 @@ PHP_FUNCTION(scrypt_pickparams); - extern zend_module_entry scrypt_module_entry; - #define phpext_scrypt_ptr &scrypt_module_entry - -+#ifndef TSRMLS_CC -+#define TSRMLS_CC -+#define TSRMLS_FETCH() -+#endif -+ - #endif -diff --git a/php_scrypt_utils.c b/php_scrypt_utils.c -index 797e2c7..34fe347 100644 ---- a/php_scrypt_utils.c -+++ b/php_scrypt_utils.c -@@ -25,6 +25,7 @@ - */ - - #include "php_scrypt_utils.h" -+#include "php_scrypt.h" - - /* - * Casts a long into a uint64_t. diff --git a/59.patch b/59.patch deleted file mode 100644 index 15aa416..0000000 --- a/59.patch +++ /dev/null @@ -1,21 +0,0 @@ -From 16a810d4ec8ce7538afe1537fc162f44536dd83d Mon Sep 17 00:00:00 2001 -From: Cody Logan -Date: Tue, 24 Aug 2021 13:25:57 -0700 -Subject: [PATCH] nosse version needs to include php_scrypt.h as well - ---- - crypto/crypto_scrypt-nosse.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/crypto/crypto_scrypt-nosse.c b/crypto/crypto_scrypt-nosse.c -index 98968b0..114ce0a 100644 ---- a/crypto/crypto_scrypt-nosse.c -+++ b/crypto/crypto_scrypt-nosse.c -@@ -45,6 +45,7 @@ - #include "sysendian.h" - - #include "crypto_scrypt.h" -+#include "php_scrypt.h" - - static void blkcpy(uint8_t *, uint8_t *, size_t); - static void blkxor(uint8_t *, uint8_t *, size_t); diff --git a/PHPINFO b/PHPINFO new file mode 100644 index 0000000..7baf30e --- /dev/null +++ b/PHPINFO @@ -0,0 +1,4 @@ + +scrypt + +Version => 1.4.3 diff --git a/REFLECTION b/REFLECTION index 4c8aa57..e38c4c3 100644 --- a/REFLECTION +++ b/REFLECTION @@ -1,4 +1,4 @@ -Extension [ extension #154 scrypt version 1.4.2 ] { +Extension [ extension #119 scrypt version 1.4.3 ] { - Dependencies { Dependency [ hash (Required) ] diff --git a/php-pecl-scrypt.spec b/php-pecl-scrypt.spec index fdc861a..9ee8994 100644 --- a/php-pecl-scrypt.spec +++ b/php-pecl-scrypt.spec @@ -7,10 +7,11 @@ # Please, preserve the changelog entries # %if 0%{?scl:1} -%global sub_prefix %{scl_prefix} -%scl_package php-pecl-scrypt +%scl_package php-pecl-scrypt %endif +%bcond_without tests + %global pecl_name scrypt %global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} %if "%{php_version}" < "5.6" @@ -20,20 +21,17 @@ %endif Summary: Scrypt hashing function -Name: %{?sub_prefix}php-pecl-%{pecl_name} -Version: 1.4.2 -Release: 10%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Name: %{?scl_prefix}php-pecl-%{pecl_name} +Version: 1.4.3 +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} License: BSD Group: Development/Languages URL: https://pecl.php.net/package/%{pecl_name} Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -Patch0: https://patch-diff.githubusercontent.com/raw/DomBlack/php-scrypt/pull/56.patch -Patch1: https://patch-diff.githubusercontent.com/raw/DomBlack/php-scrypt/pull/59.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc -BuildRequires: %{?scl_prefix}php-devel > 5.3 +BuildRequires: %{?scl_prefix}php-devel BuildRequires: %{?scl_prefix}php-pear Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} @@ -45,23 +43,6 @@ Provides: %{?scl_prefix}php-%{pecl_name} = %{version} Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} -%if "%{?scl_prefix}" != "%{?sub_prefix}" -Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} -Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} -%endif - -%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} -# Other third party repo stuff -%if "%{php_version}" > "7.3" -Obsoletes: php73-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "7.4" -Obsoletes: php74-pecl-%{pecl_name} <= %{version} -%endif -%if "%{php_version}" > "8.0" -Obsoletes: php80-pecl-%{pecl_name} <= %{version} -%endif -%endif %description @@ -80,9 +61,6 @@ sed -e 's/role="test"/role="src"/' \ -i package.xml cd NTS -%patch0 -p1 -b .pr -%patch1 -p1 -b .pr - # Sanity check, really often broken extver=$(sed -n '/#define PHP_SCRYPT_VERSION/{s/.* "//;s/".*$//;p}' php_scrypt.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -175,12 +153,14 @@ cd NTS --define extension=modules/%{pecl_name}.so \ --modules | grep %{pecl_name} +%if %{with tests} : Upstream test suite for NTS extension TEST_PHP_EXECUTABLE=%{__php} \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php --show-diff +%endif %if %{with_zts} @@ -190,6 +170,7 @@ cd ../ZTS --define extension=modules/%{pecl_name}.so \ --modules | grep %{pecl_name} +%if %{with tests} : Upstream test suite for ZTS extension TEST_PHP_EXECUTABLE=%{__ztsphp} \ TEST_PHP_ARGS="-n -d extension=$PWD/modules/%{pecl_name}.so" \ @@ -197,6 +178,7 @@ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__ztsphp} -n run-tests.php --show-diff %endif +%endif %files @@ -214,6 +196,9 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed Aug 17 2022 Remi Collet - 1.4.3-1 +- update to 1.4.3 + * Thu Aug 4 2022 Remi Collet - 1.4.2-10 - add patch for aarch64 from https://github.com/DomBlack/php-scrypt/pull/59 -- cgit