summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-01-27 06:41:21 +0100
committerRemi Collet <remi@remirepo.net>2020-01-27 06:41:21 +0100
commit35adcaeec52f38bf11683a0767723fcab9b998eb (patch)
treea5253fc9d801c6092549b4497f97ae898f1e3bc5
parent8d37fa0cf092a539ede96f8f486aa36cfd63d4c6 (diff)
v1.1.2
-rw-r--r--LICENSE68
-rw-r--r--PHPINFO10
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-uploadprogress.spec35
-rw-r--r--uploadprogress-php7.patch188
5 files changed, 24 insertions, 279 deletions
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 8d3fa07..0000000
--- a/LICENSE
+++ /dev/null
@@ -1,68 +0,0 @@
---------------------------------------------------------------------
- The PHP License, version 3.01
-Copyright (c) 1999 - 2006 The PHP Group. All rights reserved.
---------------------------------------------------------------------
-
-Redistribution and use in source and binary forms, with or without
-modification, is permitted provided that the following conditions
-are met:
-
- 1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- 3. The name "PHP" must not be used to endorse or promote products
- derived from this software without prior written permission. For
- written permission, please contact group@php.net.
-
- 4. Products derived from this software may not be called "PHP", nor
- may "PHP" appear in their name, without prior written permission
- from group@php.net. You may indicate that your software works in
- conjunction with PHP by saying "Foo for PHP" instead of calling
- it "PHP Foo" or "phpfoo"
-
- 5. The PHP Group may publish revised and/or new versions of the
- license from time to time. Each version will be given a
- distinguishing version number.
- Once covered code has been published under a particular version
- of the license, you may always continue to use it under the terms
- of that version. You may also choose to use such covered code
- under the terms of any subsequent version of the license
- published by the PHP Group. No one other than the PHP Group has
- the right to modify the terms applicable to covered code created
- under this License.
-
- 6. Redistributions of any form whatsoever must retain the following
- acknowledgment:
- "This product includes PHP software, freely available from
- <http://www.php.net/software/>".
-
-THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND
-ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP
-DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
-STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
-OF THE POSSIBILITY OF SUCH DAMAGE.
-
---------------------------------------------------------------------
-
-This software consists of voluntary contributions made by many
-individuals on behalf of the PHP Group.
-
-The PHP Group can be contacted via Email at group@php.net.
-
-For more information on the PHP Group and the PHP project,
-please see <http://www.php.net>.
-
-PHP includes the Zend Engine, freely available at
-<http://www.zend.com>.
diff --git a/PHPINFO b/PHPINFO
new file mode 100644
index 0000000..ed97d09
--- /dev/null
+++ b/PHPINFO
@@ -0,0 +1,10 @@
+
+uploadprogress
+
+uploadprogress support => enabled
+Version => 1.1.2
+
+Directive => Local Value => Master Value
+uploadprogress.file.filename_template => /tmp/upt_%s.txt => /tmp/upt_%s.txt
+uploadprogress.file.contents_template => /tmp/upload_contents_%s => /tmp/upload_contents_%s
+uploadprogress.get_contents => 0 => 0
diff --git a/REFLECTION b/REFLECTION
index dc5b696..758e1e2 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #137 uploadprogress version 1.0.3.1 ] {
+Extension [ <persistent> extension #108 uploadprogress version 1.1.2 ] {
- INI {
Entry [ uploadprogress.file.filename_template <ALL> ]
diff --git a/php-pecl-uploadprogress.spec b/php-pecl-uploadprogress.spec
index 543ae9c..664a038 100644
--- a/php-pecl-uploadprogress.spec
+++ b/php-pecl-uploadprogress.spec
@@ -1,6 +1,6 @@
# remirepo spec file for php-pecl-uploadprogress
#
-# Copyright (c) 2013-2019 Remi Collet
+# Copyright (c) 2013-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -21,18 +21,12 @@
Summary: An extension to track progress of a file upload
Name: %{?sub_prefix}php-pecl-%{pecl_name}
-Version: 1.0.3.1
-Release: 20%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 1.1.2
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
License: PHP
Group: Development/Languages
-URL: http://pecl.php.net/package/%{pecl_name}
-Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
-
-# http://svn.php.net/viewvc/pecl/uploadprogress/trunk/LICENSE?view=co
-Source1: LICENSE
-
-# See https://github.com/Jan-E/uploadprogress
-Patch0: %{pecl_name}-php7.patch
+URL: https://pecl.php.net/package/%{pecl_name}
+Source0: https://pecl.php.net/get/%{pecl_name}-%{version}.tgz
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel
@@ -89,13 +83,10 @@ Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
%description
-An extension to track progress of a file upload
-
-It is only known to work on Apache with mod_php, other SAPI implementations
-unfortunately still have issues.
-
-See %{pecl_docdir}/%{pecl_name}/examples
-for a little example.
+A PHP extension to track progress of a file upload,
+including details on the speed of the upload, estimated
+time remaining, and access to the contents of the file
+as it is being uploaded
Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}.
@@ -107,9 +98,6 @@ mv %{pecl_name}-%{version} NTS
%{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml}
cd NTS
-%patch0 -p1 -b .php7
-
-cp %{SOURCE1} LICENSE
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_UPLOADPROGRESS_VERSION/{s/.* "//;s/".*$//;p}' php_uploadprogress.h)
@@ -167,7 +155,7 @@ make -C NTS install INSTALL_ROOT=%{buildroot}
install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
# Install XML package description
-install -D -m 644 package2.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
+install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
make -C ZTS install INSTALL_ROOT=%{buildroot}
@@ -231,6 +219,9 @@ cd ../ZTS
%changelog
+* Mon Jan 27 2020 Remi Collet <remi@remirepo.net> - 1.1.2-1
+- update to 1.1.2
+
* Tue Sep 03 2019 Remi Collet <remi@remirepo.net> - 1.0.3.1-20
- rebuild for 7.4.0RC1
diff --git a/uploadprogress-php7.patch b/uploadprogress-php7.patch
deleted file mode 100644
index aebc544..0000000
--- a/uploadprogress-php7.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-From 50d4a16be3fcf4ef8909f4a4785d1416c4de81fe Mon Sep 17 00:00:00 2001
-From: Jan-E <github@ehrhardt.nl>
-Date: Sun, 15 Mar 2015 21:50:48 +0100
-Subject: [PATCH] PHP 7 support
-
----
- uploadprogress.c | 28 +++++++++++++++++++++++++---
- 1 file changed, 25 insertions(+), 3 deletions(-)
-
-diff --git a/uploadprogress.c b/uploadprogress.c
-index e66b724..864ebd7 100644
---- a/uploadprogress.c
-+++ b/uploadprogress.c
-@@ -71,7 +71,7 @@ PHPAPI extern int (*php_rfc1867_callback)(unsigned int , void *, void ** TSRMLS_
- */
- static int uploadprogress_php_rfc1867_file(unsigned int event, void *event_data, void **data TSRMLS_DC)
- {
-- zval handler;
-+ //zval handler;
- char *callable = NULL;
- uploadprogress_data * progress;
- int read_bytes;
-@@ -301,7 +301,7 @@ PHP_FUNCTION(uploadprogress_get_info)
- {
- char * id;
- int id_lg;
-- char method;
-+ //char method;
-
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &id, &id_lg) == FAILURE) {
- return;
-@@ -417,7 +417,11 @@ static void uploadprogress_file_php_get_info(char * id, zval * return_value)
- v[index] = 0;
- }
- }
-+#if defined(ZEND_ENGINE_3)
-+ add_assoc_string( return_value, k, v );
-+#else
- add_assoc_string( return_value, k, v, 1 );
-+#endif
- }
- fclose(F);
- }
-@@ -432,10 +436,18 @@ static void uploadprogress_file_php_get_info(char * id, zval * return_value)
- */
- static void uploadprogress_file_php_get_contents(char *id, char *fieldname, long maxlen, zval *return_value)
- {
-+#if defined(ZEND_ENGINE_3) /* borrowed from phar/func_interceptors.c */
-+ char *filename, *template, *data_identifier;
-+ zend_string *contents;
-+#else
- char *filename, *template, *contents, *data_identifier;
-+#endif
- php_stream *stream;
- int options = ENFORCE_SAFE_MODE;
-- int len, newlen;
-+ int len;
-+#if PHP_API_VERSION < 20100412
-+ int newlen;
-+#endif
- TSRMLS_FETCH();
-
- template = INI_STR("uploadprogress.file.contents_template");
-@@ -455,7 +467,13 @@ static void uploadprogress_file_php_get_contents(char *id, char *fieldname, long
- }
-
- /* uses mmap if possible */
-+#if defined(ZEND_ENGINE_3)
-+ contents = php_stream_copy_to_mem(stream, maxlen, 0);
-+ len = contents->len;
-+ if (contents && len > 0) {
-+#else
- if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
-+#endif
-
- #if PHP_API_VERSION < 20100412
- if (PG(magic_quotes_runtime)) {
-@@ -463,7 +481,11 @@ static void uploadprogress_file_php_get_contents(char *id, char *fieldname, long
- len = newlen;
- }
- #endif
-+#if defined(ZEND_ENGINE_3)
-+ RETVAL_STRINGL((char *)contents, len);
-+#else
- RETVAL_STRINGL(contents, len, 0);
-+#endif
- } else if (len == 0) {
- RETVAL_EMPTY_STRING();
- } else {
-From b8462d6631dc6ba4bfb6d0d23fa903efc9591e6f Mon Sep 17 00:00:00 2001
-From: Jan-E <github@ehrhardt.nl>
-Date: Sun, 15 Mar 2015 21:54:11 +0100
-Subject: [PATCH] Tabs 2 spaces
-
----
- uploadprogress.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/uploadprogress.c b/uploadprogress.c
-index 864ebd7..7b11ea9 100644
---- a/uploadprogress.c
-+++ b/uploadprogress.c
-@@ -436,9 +436,9 @@ static void uploadprogress_file_php_get_info(char * id, zval * return_value)
- */
- static void uploadprogress_file_php_get_contents(char *id, char *fieldname, long maxlen, zval *return_value)
- {
--#if defined(ZEND_ENGINE_3) /* borrowed from phar/func_interceptors.c */
-+#if defined(ZEND_ENGINE_3)
- char *filename, *template, *data_identifier;
-- zend_string *contents;
-+ zend_string *contents;
- #else
- char *filename, *template, *contents, *data_identifier;
- #endif
-@@ -468,9 +468,9 @@ static void uploadprogress_file_php_get_contents(char *id, char *fieldname, long
-
- /* uses mmap if possible */
- #if defined(ZEND_ENGINE_3)
-- contents = php_stream_copy_to_mem(stream, maxlen, 0);
-- len = contents->len;
-- if (contents && len > 0) {
-+ contents = php_stream_copy_to_mem(stream, maxlen, 0);
-+ len = contents->len;
-+ if (contents && len > 0) {
- #else
- if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
- #endif
-From ac54045b98863f647bdc0e5b1af2e841a68d3dcb Mon Sep 17 00:00:00 2001
-From: Jan-E <github@ehrhardt.nl>
-Date: Fri, 3 Apr 2015 02:10:58 +0200
-Subject: [PATCH] ENFORCE_SAFE_MODE is dropped
-
----
- uploadprogress.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/uploadprogress.c b/uploadprogress.c
-index 7b11ea9..f164434 100644
---- a/uploadprogress.c
-+++ b/uploadprogress.c
-@@ -157,8 +157,12 @@ static int uploadprogress_php_rfc1867_file(unsigned int event, void *event_data
-
- if (get_contents) {
- php_stream *stream;
-+#if defined(ZEND_ENGINE_3)
-+ int options = 0;
-+#else
- int options = ENFORCE_SAFE_MODE;
--
-+#endif
-+
- stream = php_stream_open_wrapper(progress->data_filename, "ab", options, NULL);
- if (stream) {
- php_stream_write(stream, e_data->data, e_data->length);
-@@ -443,7 +447,11 @@ static void uploadprogress_file_php_get_contents(char *id, char *fieldname, long
- char *filename, *template, *contents, *data_identifier;
- #endif
- php_stream *stream;
-+#if defined(ZEND_ENGINE_3)
-+ int options = 0;
-+#else
- int options = ENFORCE_SAFE_MODE;
-+#endif
- int len;
- #if PHP_API_VERSION < 20100412
- int newlen;
-From 5f1e1fa97c8d32dacbed1fccd2e2f3bc2decd615 Mon Sep 17 00:00:00 2001
-From: Jan-E <github@ehrhardt.nl>
-Date: Thu, 9 Apr 2015 14:22:39 +0200
-Subject: [PATCH] avoid duplication and memory leak
-
----
- uploadprogress.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/uploadprogress.c b/uploadprogress.c
-index f164434..849257e 100644
---- a/uploadprogress.c
-+++ b/uploadprogress.c
-@@ -490,7 +490,7 @@ static void uploadprogress_file_php_get_contents(char *id, char *fieldname, long
- }
- #endif
- #if defined(ZEND_ENGINE_3)
-- RETVAL_STRINGL((char *)contents, len);
-+ RETVAL_STR(contents);
- #else
- RETVAL_STRINGL(contents, len, 0);
- #endif