diff options
| author | Remi Collet <remi@remirepo.net> | 2026-07-22 12:34:24 +0200 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2026-07-22 12:34:24 +0200 |
| commit | 9d27883bd0bcb5f2d939de672618923c5116266b (patch) | |
| tree | da463f08d776d5e9468f38254892b02440a10c4f | |
| parent | 3644a75359129eb29f42291c09ba0745d3759c76 (diff) | |
update to 2.0.2
drop patch merged upstream
open https://github.com/DomBlack/php-scrypt/pull/81 fix version
| -rw-r--r-- | 79.patch | 72 | ||||
| -rw-r--r-- | buildtime | 4 | ||||
| -rw-r--r-- | composer.json | 12 | ||||
| -rw-r--r-- | php-pecl-scrypt.spec | 14 |
4 files changed, 25 insertions, 77 deletions
diff --git a/79.patch b/79.patch deleted file mode 100644 index 4f5bb8f..0000000 --- a/79.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 31cd3a52fd658b857364f4afd0ca0f6ea2bfffcd Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 21 Jul 2026 11:21:04 +0200 -Subject: [PATCH] Fix build with PHP 8.6.0alpha2 - - . The zend_parse_parameters_none_throw(), zend_parse_parameters_throw(), - and ZEND_PARSE_PARAMS_THROW have been removed due to being misleading, - since ZPP always throws, unless ZEND_PARSE_PARAMS_QUIET is given. Use - the non-throw versions. - - . Added zend_bin2hex() and zend_bin2hex_str() as helper functions to remove - dependencies on /ext/hash in various extensions. - -And remove dependency on hash extension ---- - php_scrypt.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/php_scrypt.c b/php_scrypt.c -index 86c804d..f058f85 100644 ---- a/php_scrypt.c -+++ b/php_scrypt.c -@@ -36,7 +36,9 @@ - #include "zend_config.w32.h" - #endif - -+#if PHP_VERSION_ID < 80600 - #include "ext/hash/php_hash.h" -+#endif - #include "php_scrypt_utils.h" - #include "php_scrypt.h" - #include "crypto/crypto_scrypt.h" -@@ -56,7 +58,9 @@ - typedef size_t strsize_t; - - static const zend_module_dep scrypt_deps[] = { -+#if PHP_VERSION_ID < 80600 - ZEND_MOD_REQUIRED("hash") -+#endif - ZEND_MOD_END - }; - -@@ -134,7 +138,7 @@ PHP_FUNCTION(scrypt) - - /* Get the parameters for this call */ - raw_output = 0; -- if (zend_parse_parameters_throw( -+ if (zend_parse_parameters( - ZEND_NUM_ARGS(), "ssllll|b", - &password, &password_len, &salt, &salt_len, - &phpN, &phpR, &phpP, &keyLength, &raw_output -@@ -204,7 +208,11 @@ PHP_FUNCTION(scrypt) - if (!raw_output) { - /* Encode the output in hex */ - hex = (char*) safe_emalloc(2, keyLength, 1); -+#if PHP_VERSION_ID < 80600 - php_hash_bin2hex(hex, buf, keyLength); -+#else -+ zend_bin2hex(hex, buf, keyLength); -+#endif - efree(buf); - hex[keyLength*2] = '\0'; - RETVAL_STRINGL(hex, keyLength * 2); -@@ -238,7 +246,7 @@ PHP_FUNCTION(scrypt_pickparams) - int rc; - - /* Get the parameters for this call */ -- if (zend_parse_parameters_throw( -+ if (zend_parse_parameters( - ZEND_NUM_ARGS(), "ldd", - &maxmem, &memfrac, &maxtime - ) == FAILURE) diff --git a/buildtime b/buildtime new file mode 100644 index 0000000..45fd4b2 --- /dev/null +++ b/buildtime @@ -0,0 +1,4 @@ +Version Date x86_64 aarch64 Builds PHP +-------------------------------------------------------------------------------------- +2.0.2 26-07-22 7'41" 16'27" 178 7.0-8.5 + diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..86c10b0 --- /dev/null +++ b/composer.json @@ -0,0 +1,12 @@ +{ + "name": "woohoolabs/php-scrypt", + "type": "php-ext", + "license": "BSD-2-Clause", + "description": "Extension exposing Colin Percival's scrypt hashing algorithm", + "require": { + "php": ">= 7.0.0" + }, + "php-ext": { + "extension-name": "scrypt" + } +} diff --git a/php-pecl-scrypt.spec b/php-pecl-scrypt.spec index bd02580..b315d37 100644 --- a/php-pecl-scrypt.spec +++ b/php-pecl-scrypt.spec @@ -24,14 +24,12 @@ Name: %{?scl_prefix}php-pecl-%{pecl_name} Summary: Scrypt hashing function License: BSD-2-Clause -Version: 2.0.1 -Release: 3%{?dist} +Version: 2.0.2 +Release: 1%{?dist} %forgemeta URL: %{forgeurl} Source0: %{forgesource} -Patch0: 79.patch - BuildRequires: make BuildRequires: %{?dtsprefix}gcc BuildRequires: %{?scl_prefix}php-devel >= 7.0 @@ -61,7 +59,8 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %forgesetup -%patch -P0 -p1 + +sed -e 's/2.0.1/%{version}/' -i php_scrypt.h # Sanity check, really often broken extver=$(sed -n '/#define PHP_SCRYPT_VERSION/{s/.* "//;s/".*$//;p}' php_scrypt.h) @@ -162,6 +161,11 @@ REPORT_EXIT_STATUS=1 \ %changelog +* Wed Jul 22 2026 Remi Collet <remi@remirepo.net> - 2.0.2-1 +- update to 2.0.2 +- drop patch merged upstream +- open https://github.com/DomBlack/php-scrypt/pull/81 fix version + * Tue Jul 21 2026 Remi Collet <remi@remirepo.net> - 2.0.1-3 - re-license spec file to CECILL-2.1 - add pie virtual provides |
