summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--4.patch91
-rw-r--r--php-pecl-rar.spec27
2 files changed, 101 insertions, 17 deletions
diff --git a/4.patch b/4.patch
new file mode 100644
index 0000000..e8acd50
--- /dev/null
+++ b/4.patch
@@ -0,0 +1,91 @@
+From 1225c9240e0e368dad6ccc5f618e000560b4925d Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Tue, 26 Jun 2018 15:22:42 +0200
+Subject: [PATCH] relax tests for 7.3 (bool/boolean, main/count)
+
+---
+ tests/002.phpt | 2 +-
+ tests/003.phpt | 2 +-
+ tests/008.phpt | 2 +-
+ tests/079.phpt | 4 ++--
+ tests/092.phpt | 4 ++--
+ 5 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/tests/002.phpt b/tests/002.phpt
+index f90617a..358aba8 100644
+--- a/tests/002.phpt
++++ b/tests/002.phpt
+@@ -163,6 +163,6 @@ array(2) {
+
+ Warning: rar_open(): Failed to open %s: ERAR_EOPEN (file open error) in %s on line %d
+
+-Warning: rar_list() expects parameter 1 to be RarArchive, boolean given in %s on line %d
++Warning: rar_list() expects parameter 1 to be RarArchive, boo%s given in %s on line %d
+ NULL
+ Done
+diff --git a/tests/003.phpt b/tests/003.phpt
+index 2f0a6df..9b77d2f 100644
+--- a/tests/003.phpt
++++ b/tests/003.phpt
+@@ -89,6 +89,6 @@ object(RarEntry)#%d (%d) {
+
+ Warning: rar_open(): Failed to open %s: ERAR_EOPEN (file open error) in %s on line %d
+
+-Warning: rar_entry_get() expects parameter 1 to be RarArchive, boolean given in %s on line %d
++Warning: rar_entry_get() expects parameter 1 to be RarArchive, boo%s given in %s on line %d
+ NULL
+ Done
+diff --git a/tests/008.phpt b/tests/008.phpt
+index f79c97a..f864c97 100644
+--- a/tests/008.phpt
++++ b/tests/008.phpt
+@@ -28,7 +28,7 @@ bool(false)
+
+ Warning: rar_open(): Failed to open %s: ERAR_EOPEN (file open error) in %s on line %d
+
+-Warning: rar_entry_get() expects parameter 1 to be RarArchive, boolean given in %s on line %d
++Warning: rar_entry_get() expects parameter 1 to be RarArchive, boo%s given in %s on line %d
+ NULL
+
+ Done
+diff --git a/tests/079.phpt b/tests/079.phpt
+index f243b85..0ee005a 100644
+--- a/tests/079.phpt
++++ b/tests/079.phpt
+@@ -48,12 +48,12 @@ Count: 13
+
+ * Closed file test (1):
+
+-Warning: count(): The archive is already closed in %s on line %d
++Warning: %s(): The archive is already closed in %s on line %d
+ int(0)
+
+ * Closed file test (2):
+
+-Warning: count(): The archive is already closed in %s on line %d
++Warning: %s(): The archive is already closed in %s on line %d
+ int(0)
+
+ * Closed file test (3, exceptions):
+diff --git a/tests/092.phpt b/tests/092.phpt
+index 39b8331..6ddd6f2 100644
+--- a/tests/092.phpt
++++ b/tests/092.phpt
+@@ -54,7 +54,7 @@ Warning: rar_allow_broken_set() expects exactly 2 parameters, 1 given in %s on l
+ Warning: RarArchive::getEntries(): ERAR_EOPEN (file open error) in %s on line %d
+ bool(false)
+
+-Warning: count(): ERAR_EOPEN (file open error) in %s on line %d
++Warning: %s(): ERAR_EOPEN (file open error) in %s on line %d
+ int(0)
+
+ * broken file; do not allow broken (explicit)
+@@ -62,7 +62,7 @@ int(0)
+ Warning: RarArchive::getEntries(): ERAR_EOPEN (file open error) in %s on line %d
+ bool(false)
+
+-Warning: count(): ERAR_EOPEN (file open error) in %s on line %d
++Warning: %s(): ERAR_EOPEN (file open error) in %s on line %d
+ int(0)
+
+ * broken file; allow broken
diff --git a/php-pecl-rar.spec b/php-pecl-rar.spec
index e66426e..a72dfbe 100644
--- a/php-pecl-rar.spec
+++ b/php-pecl-rar.spec
@@ -1,6 +1,6 @@
# spec file for php-pecl-rar
#
-# Copyright (c) 2013-2017 Remi Collet
+# Copyright (c) 2013-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -19,12 +19,14 @@
Summary: PHP extension for reading RAR archives
Name: %{?scl_prefix}php-pecl-%{pecl_name}
Version: 4.0.0
-Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP and Freeware with further limitations
Group: Development/Languages
URL: http://pecl.php.net/package/%{pecl_name}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+Patch0: https://patch-diff.githubusercontent.com/raw/cataphract/php-rar/pull/4.patch
+
BuildRequires: %{?scl_prefix}php-devel
BuildRequires: %{?scl_prefix}php-pear
@@ -43,14 +45,6 @@ Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{rele
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-Obsoletes: php53-pecl-%{pecl_name}
-Obsoletes: php53u-pecl-%{pecl_name}
-Obsoletes: php54-pecl-%{pecl_name}
-Obsoletes: php54w-pecl-%{pecl_name}
-%if "%{php_version}" > "5.5"
-Obsoletes: php55u-pecl-%{pecl_name}
-Obsoletes: php55w-pecl-%{pecl_name}
-%endif
%if "%{php_version}" > "5.6"
Obsoletes: php56u-pecl-%{pecl_name}
Obsoletes: php56w-pecl-%{pecl_name}
@@ -94,6 +88,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
+%patch0 -p1 -b .pr4
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_RAR_VERSION/{s/.* "//;s/".*$//;p}' php_rar.h)
@@ -161,7 +156,7 @@ do
done
-%if 0%{?fedora} < 24
+%if 0%{?fedora} < 24 && 0%{?rhel} < 8
# when pear installed alone, after us
%triggerin -- %{?scl_prefix}php-pear
if [ -x %{__pecl} ] ; then
@@ -182,12 +177,6 @@ fi
%check
-%if "%{php_version}" > "7.2"
-# count issue - under investigation
-rm ?TS/tests/079.phpt
-rm ?TS/tests/092.phpt
-%endif
-
: Minimal load test for NTS extension
cd NTS
%{_bindir}/php --no-php-ini \
@@ -233,6 +222,10 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Tue Jun 26 2018 Remi Collet <remi@remirepo.net> - 4.0.0-2
+- add patch for PHP 7.3 from
+ https://github.com/cataphract/php-rar/pull/4
+
* Tue Aug 1 2017 Remi Collet <remi@remirepo.net> - 4.0.0-1
- Update to 4.0.0