diff options
| author | Remi Collet <remi@remirepo.net> | 2021-09-29 07:25:27 +0200 | 
|---|---|---|
| committer | Remi Collet <remi@remirepo.net> | 2021-09-29 07:25:27 +0200 | 
| commit | 942680bb4886369488b4594173b0e2191df8b1dc (patch) | |
| tree | d5c3a1f8c500c6543d8342582aa8d9544bb598a2 | |
| parent | 34177af949fd90c03b8219f367f1bffc67b643d3 (diff) | |
update to 1.1.4
run upstream test suite during build
drop patches merged upstream
| -rw-r--r-- | .gitignore | 2 | ||||
| -rw-r--r-- | PHPINFO | 2 | ||||
| -rw-r--r-- | REFLECTION | 2 | ||||
| -rw-r--r-- | php-pecl-uploadprogress.spec | 34 | ||||
| -rw-r--r-- | uploadprogress-arginfo.patch | 40 | ||||
| -rw-r--r-- | uploadprogress-segfault.patch | 66 | 
6 files changed, 24 insertions, 122 deletions
| @@ -1,5 +1,7 @@ +clog  package-*.xml  *.tgz +*.tar.bz2  *.tar.gz  *.tar.xz  *.tar.xz.asc @@ -2,7 +2,7 @@  uploadprogress  uploadprogress support => enabled -Version => 1.1.3 +Version => 1.1.4  Directive => Local Value => Master Value  uploadprogress.file.filename_template => /tmp/upt_%s.txt => /tmp/upt_%s.txt @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #108 uploadprogress version 1.1.3 ] { +Extension [ <persistent> extension #125 uploadprogress version 1.1.4 ] {    - INI {      Entry [ uploadprogress.file.filename_template <ALL> ] diff --git a/php-pecl-uploadprogress.spec b/php-pecl-uploadprogress.spec index 60fde78..dea09e5 100644 --- a/php-pecl-uploadprogress.spec +++ b/php-pecl-uploadprogress.spec @@ -8,9 +8,11 @@  #  %if 0%{?scl:1}  %global sub_prefix %{scl_prefix} -%scl_package       php-pecl-uploadprogress +%scl_package      php-pecl-uploadprogress  %endif +%bcond_without    tests +  %global with_zts  0%{!?_without_zts:%{?__ztsphp:1}}  %global pecl_name uploadprogress  %if "%{php_version}" < "5.6" @@ -21,22 +23,15 @@  Summary:        An extension to track progress of a file upload  Name:           %{?sub_prefix}php-pecl-%{pecl_name} -Version:        1.1.3 -Release:        3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Version:        1.1.4 +Release:        1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}  License:        PHP  Group:          Development/Languages  URL:            https://pecl.php.net/package/%{pecl_name}  Source0:        https://pecl.php.net/get/%{pecl_name}-%{version}.tgz -# Fix segmentation fault in uploadprogress -# https://github.com/php/pecl-php-uploadprogress/pull/8 -Patch0:         %{pecl_name}-arginfo.patch -# Add arginfo to functions -# https://github.com/php/pecl-php-uploadprogress/pull/9 -Patch1:         %{pecl_name}-segfault.patch - -BuildRequires:  %{?dtsprefix}gcc  BuildRequires:  make +BuildRequires:  %{?dtsprefix}gcc  BuildRequires:  %{?scl_prefix}php-devel  BuildRequires:  %{?scl_prefix}php-pear @@ -92,9 +87,6 @@ mv %{pecl_name}-%{version} NTS  %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}  cd NTS -%patch1 -p1 -b .pr9 -%patch0 -p1 -b .pr8 -  # Sanity check, really often broken  extver=$(sed -n '/#define PHP_UPLOADPROGRESS_VERSION/{s/.* "//;s/".*$//;p}' php_uploadprogress.h)  if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -199,6 +191,15 @@ cd ../ZTS      --modules | grep %{pecl_name}  %endif +%if %{with tests} +cd ../NTS +: Run upstream test suite +REPORT_EXIT_STATUS=1 \ +TEST_PHP_EXECUTABLE=%{__php} \ +TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ +%{__php} -n run-tests.php -q --show-diff +%endif +  %files  %{?_licensedir:%license NTS/LICENSE} @@ -215,6 +216,11 @@ cd ../ZTS  %changelog +* Wed Sep 29 2021 Remi Collet <remi@remirepo.net> - 1.1.4-1 +- update to 1.1.4 +- run upstream test suite during build +- drop patches merged upstream +  * Wed Sep 01 2021 Remi Collet <remi@remirepo.net> - 1.1.3-3  - rebuild for 8.1.0RC1 diff --git a/uploadprogress-arginfo.patch b/uploadprogress-arginfo.patch deleted file mode 100644 index 81cf86c..0000000 --- a/uploadprogress-arginfo.patch +++ /dev/null @@ -1,40 +0,0 @@ -From f14654d30953e4b699bf25a244923bbadc55f4f9 Mon Sep 17 00:00:00 2001 -From: Andy Postnikov <apostnikov@gmail.com> -Date: Fri, 21 Aug 2020 07:06:27 +0300 -Subject: [PATCH 1/3] Add arginfo to functions - ---- - uploadprogress.c | 16 ++++++++++++++-- - 1 file changed, 14 insertions(+), 2 deletions(-) - -diff --git a/uploadprogress.c b/uploadprogress.c -index 6f72a92..52b313d 100644 ---- a/uploadprogress.c -+++ b/uploadprogress.c -@@ -29,10 +29,22 @@ - #define TMPDIR "/tmp" - #endif -  -+/* {{{ argument information */ -+ZEND_BEGIN_ARG_INFO_EX(arginfo_uploadprogress_get_info, 0, 0, 1) -+    ZEND_ARG_TYPE_INFO(0, identifier, IS_STRING, 0) -+ZEND_END_ARG_INFO() -+ -+ZEND_BEGIN_ARG_INFO_EX(arginfo_uploadprogress_get_contents, 0, 0, 2) -+    ZEND_ARG_TYPE_INFO(0, identifier, IS_STRING, 0) -+    ZEND_ARG_TYPE_INFO(0, fieldname, IS_STRING, 0) -+    ZEND_ARG_TYPE_INFO(0, maxlen, IS_LONG, 1) -+ZEND_END_ARG_INFO() -+/* }}} */ -+ - /* {{{ uploadprogress_functions[] */ - zend_function_entry uploadprogress_functions[] = { --    PHP_FE(uploadprogress_get_info, NULL) --    PHP_FE(uploadprogress_get_contents, NULL) -+    PHP_FE(uploadprogress_get_info, arginfo_uploadprogress_get_info) -+    PHP_FE(uploadprogress_get_contents, arginfo_uploadprogress_get_contents) -     { NULL, NULL, NULL } - }; - /* }}} */ - - diff --git a/uploadprogress-segfault.patch b/uploadprogress-segfault.patch deleted file mode 100644 index 6e15157..0000000 --- a/uploadprogress-segfault.patch +++ /dev/null @@ -1,66 +0,0 @@ -From b0e5f122b45ddbf7d7475b927e148d6dd5bf3c86 Mon Sep 17 00:00:00 2001 -From: "Christoph M. Becker" <cmbecker69@gmx.de> -Date: Fri, 30 Apr 2021 17:46:07 +0200 -Subject: [PATCH] Fix #79584: Segmentation fault in uploadprogress 1.1.0 and up - ---- - uploadprogress.c | 18 ++++++++---------- - 1 file changed, 8 insertions(+), 10 deletions(-) - -diff --git a/uploadprogress.c b/uploadprogress.c -index 6f72a92..ca3f17b 100644 ---- a/uploadprogress.c -+++ b/uploadprogress.c -@@ -105,30 +105,23 @@ static int uploadprogress_php_rfc1867_file(unsigned int event, void  *event_data -         } -  -         if (strcmp(e_data->name, "UPLOAD_IDENTIFIER") == 0)  { --            char **upload_id; -             char *template = INI_STR("uploadprogress.file.filename_template"); -  -             if (strcmp(template, "") == 0)  { -                 return FAILURE; -             } -  --            upload_id = emalloc(strlen(*e_data->value) + 1); --            strcpy(*upload_id, *e_data->value); -- --            progress->upload_id = *upload_id; -+            progress->upload_id = emalloc(strlen(*e_data->value) + 1); -+            strcpy(progress->upload_id, *e_data->value); -             progress->time_last = time(NULL); -             progress->speed_average = 0; -             progress->speed_last = 0; -             progress->bytes_uploaded = read_bytes; -             progress->files_uploaded = 0; -             progress->est_sec = 0; --            progress->identifier = uploadprogress_mk_filename(*upload_id, template); -+            progress->identifier = uploadprogress_mk_filename(progress->upload_id, template); -             progress->identifier_tmp = emalloc(strlen( progress->identifier) + 4); -             sprintf(progress->identifier_tmp, "%s.wr", progress->identifier); -- --            if (upload_id) { --                efree(upload_id); --            } -         } -     } -  -@@ -198,6 +191,7 @@ static int uploadprogress_php_rfc1867_file(unsigned int event, void  *event_data -             } -         } else if (event == MULTIPART_EVENT_END) { -             VCWD_UNLINK(progress->identifier); -+            efree(progress->upload_id); -             efree(progress->identifier); -             efree(progress->identifier_tmp); -             efree(progress); -@@ -264,6 +258,10 @@ static int uploadprogress_php_rfc1867_file(unsigned int event, void  *event_data -             efree(progress->identifier); -         } -  -+        if (progress->upload_id) { -+            efree(progress->upload_id); -+        } -+ -         if (progress->identifier_tmp) { -             efree(progress->identifier_tmp); -         } | 
