From 9d7091e7b936957410c349d2f9ea1e6345f647b8 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 3 Sep 2012 20:43:00 +0200 Subject: php-pecl-apc 3.1.13 --- apc-svn.patch | 276 +++++++++++++++++++++++++++++++++++------------------- php-pecl-apc.spec | 43 +++++++-- 2 files changed, 213 insertions(+), 106 deletions(-) diff --git a/apc-svn.patch b/apc-svn.patch index d2e4299..b293ddc 100644 --- a/apc-svn.patch +++ b/apc-svn.patch @@ -1,99 +1,179 @@ ---- pecl/apc/trunk/apc_string.c 2012/08/22 14:36:28 327232 -+++ pecl/apc/trunk/apc_string.c 2012/08/22 14:54:39 327233 -@@ -206,48 +206,52 @@ - int count = APCG(shm_strings_buffer) / (sizeof(Bucket) + sizeof(Bucket*) * 2); +--- pecl/apc/trunk/tests/apc54_004.phpt 2012/09/03 17:19:06 327448 ++++ pecl/apc/trunk/tests/apc54_004.phpt 2012/09/03 17:31:18 327449 +@@ -31,63 +31,63 @@ - apc_interned_strings_data = (apc_interned_strings_data_t*) apc_sma_malloc(APCG(shm_strings_buffer) TSRMLS_CC); -- memset((void *)apc_interned_strings_data, 0, APCG(shm_strings_buffer)); -+ if (apc_interned_strings_data) { -+ memset((void *)apc_interned_strings_data, 0, APCG(shm_strings_buffer)); - -- CREATE_LOCK(APCSG(lock)); -+ CREATE_LOCK(APCSG(lock)); - -- zend_hash_init(&APCSG(interned_strings), count, NULL, NULL, 1); -- APCSG(interned_strings).nTableMask = APCSG(interned_strings).nTableSize - 1; -- APCSG(interned_strings).arBuckets = (Bucket**)((char*)apc_interned_strings_data + sizeof(apc_interned_strings_data_t)); -- -- APCSG(interned_strings_start) = (char*)APCSG(interned_strings).arBuckets + APCSG(interned_strings).nTableSize * sizeof(Bucket *); -- APCSG(interned_strings_end) = (char*)apc_interned_strings_data + APCG(shm_strings_buffer); -- APCSG(interned_strings_top) = APCSG(interned_strings_start); -- -- old_interned_strings_start = CG(interned_strings_start); -- old_interned_strings_end = CG(interned_strings_end); -- old_new_interned_string = zend_new_interned_string; -- old_interned_strings_snapshot = zend_interned_strings_snapshot; -- old_interned_strings_restore = zend_interned_strings_restore; -- -- CG(interned_strings_start) = APCSG(interned_strings_start); -- CG(interned_strings_end) = APCSG(interned_strings_end); -- zend_new_interned_string = apc_dummy_new_interned_string_for_php; -- zend_interned_strings_snapshot = apc_dummy_interned_strings_snapshot_for_php; -- zend_interned_strings_restore = apc_dummy_interned_strings_restore_for_php; -+ zend_hash_init(&APCSG(interned_strings), count, NULL, NULL, 1); -+ APCSG(interned_strings).nTableMask = APCSG(interned_strings).nTableSize - 1; -+ APCSG(interned_strings).arBuckets = (Bucket**)((char*)apc_interned_strings_data + sizeof(apc_interned_strings_data_t)); -+ -+ APCSG(interned_strings_start) = (char*)APCSG(interned_strings).arBuckets + APCSG(interned_strings).nTableSize * sizeof(Bucket *); -+ APCSG(interned_strings_end) = (char*)apc_interned_strings_data + APCG(shm_strings_buffer); -+ APCSG(interned_strings_top) = APCSG(interned_strings_start); -+ -+ old_interned_strings_start = CG(interned_strings_start); -+ old_interned_strings_end = CG(interned_strings_end); -+ old_new_interned_string = zend_new_interned_string; -+ old_interned_strings_snapshot = zend_interned_strings_snapshot; -+ old_interned_strings_restore = zend_interned_strings_restore; -+ -+ CG(interned_strings_start) = APCSG(interned_strings_start); -+ CG(interned_strings_end) = APCSG(interned_strings_end); -+ zend_new_interned_string = apc_dummy_new_interned_string_for_php; -+ zend_interned_strings_snapshot = apc_dummy_interned_strings_snapshot_for_php; -+ zend_interned_strings_restore = apc_dummy_interned_strings_restore_for_php; - -- apc_copy_internal_strings(TSRMLS_C); -+ apc_copy_internal_strings(TSRMLS_C); -+ } - } - - void apc_interned_strings_shutdown(TSRMLS_D) - { -- zend_hash_clean(CG(function_table)); -- zend_hash_clean(CG(class_table)); -- zend_hash_clean(EG(zend_constants)); -- -- CG(interned_strings_start) = old_interned_strings_start; -- CG(interned_strings_end) = old_interned_strings_end; -- zend_new_interned_string = old_new_interned_string; -- zend_interned_strings_snapshot = old_interned_strings_snapshot; -- zend_interned_strings_restore = old_interned_strings_restore; -+ if (apc_interned_strings_data) { -+ zend_hash_clean(CG(function_table)); -+ zend_hash_clean(CG(class_table)); -+ zend_hash_clean(EG(zend_constants)); -+ -+ CG(interned_strings_start) = old_interned_strings_start; -+ CG(interned_strings_end) = old_interned_strings_end; -+ zend_new_interned_string = old_new_interned_string; -+ zend_interned_strings_snapshot = old_interned_strings_snapshot; -+ zend_interned_strings_restore = old_interned_strings_restore; - -- apc_sma_free(apc_interned_strings_data TSRMLS_CC); -+ apc_sma_free(apc_interned_strings_data TSRMLS_CC); - -- DESTROY_LOCK(APCSG(lock)); -+ DESTROY_LOCK(APCSG(lock)); -+ } - } - #endif - ---- pecl/apc/trunk/apc_string.c 2012/08/23 07:39:44 327243 -+++ pecl/apc/trunk/apc_string.c 2012/08/23 09:08:12 327244 -@@ -248,8 +248,6 @@ - zend_interned_strings_snapshot = old_interned_strings_snapshot; - zend_interned_strings_restore = old_interned_strings_restore; - -- apc_sma_free(apc_interned_strings_data TSRMLS_CC); -- - DESTROY_LOCK(APCSG(lock)); - } - } + --EXPECTF-- +
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+
+-Notice: Undefined property: stdClass::$qwerty in /home/weltling/dws/src/apc_trunk/tests/index.php on line 3
++Notice: Undefined property: stdClass::$qwerty in %s/tests/index.php on line 3
+ done +--- pecl/apc/trunk/tests/apc54_018.phpt 2012/09/03 17:31:18 327449 ++++ pecl/apc/trunk/tests/apc54_018.phpt 2012/09/03 17:37:18 327450 +@@ -42,7 +42,7 @@ + ["type"]=> + string(4) "user" + ["key"]=> +- string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf5675" ++ string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf%d" + ["value"]=> + string(%d) "%s" + ["num_hits"]=> +@@ -67,7 +67,7 @@ + ["type"]=> + string(4) "user" + ["key"]=> +- string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf5675" ++ string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf%d" + ["value"]=> + string(%d) "%s" + ["num_hits"]=> +@@ -92,7 +92,7 @@ + ["type"]=> + string(4) "user" + ["key"]=> +- string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf5675" ++ string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf%d" + ["value"]=> + string(%d) "%s" + ["num_hits"]=> +@@ -117,7 +117,7 @@ + ["type"]=> + string(4) "user" + ["key"]=> +- string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf5675" ++ string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf%d" + ["value"]=> + string(%d) "%s" + ["num_hits"]=> +@@ -142,7 +142,7 @@ + ["type"]=> + string(4) "user" + ["key"]=> +- string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf5675" ++ string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf%d" + ["value"]=> + string(%d) "%s" + ["num_hits"]=> +@@ -167,7 +167,7 @@ + ["type"]=> + string(4) "user" + ["key"]=> +- string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf5675" ++ string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf%d" + ["value"]=> + string(%d) "%s" + ["num_hits"]=> +@@ -192,7 +192,7 @@ + ["type"]=> + string(4) "user" + ["key"]=> +- string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf5675" ++ string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf%d" + ["value"]=> + string(%d) "%s" + ["num_hits"]=> +@@ -217,7 +217,7 @@ + ["type"]=> + string(4) "user" + ["key"]=> +- string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf5675" ++ string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf%d" + ["value"]=> + string(%d) "%s" + ["num_hits"]=> +@@ -242,7 +242,7 @@ + ["type"]=> + string(4) "user" + ["key"]=> +- string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf5675" ++ string(42) "test-niko-asdfasdfasdfkjasdflkasjdfasf%d" + ["value"]=> + string(%d) "%s" + ["num_hits"]=> diff --git a/php-pecl-apc.spec b/php-pecl-apc.spec index 0305b29..b28d5e2 100644 --- a/php-pecl-apc.spec +++ b/php-pecl-apc.spec @@ -4,20 +4,22 @@ Summary: APC caches and optimizes PHP intermediate code Name: php-pecl-apc -Version: 3.1.12 -Release: 2%{?dist} +Version: 3.1.13 +Release: 1%{?dist} License: PHP Group: Development/Languages URL: http://pecl.php.net/package/APC Source: http://pecl.php.net/get/APC-%{version}.tgz # Upstream patch from SVN. -# http://svn.php.net/viewvc?view=revision&revision=327233 -# http://svn.php.net/viewvc?view=revision&revision=327244 +# http://svn.php.net/viewvc?view=revision&revision=327449 +# http://svn.php.net/viewvc?view=revision&revision=327450 Patch0: apc-svn.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: php-devel >= 5.1.0, httpd-devel, php-pear, pcre-devel +# For tests +BuildRequires: php-dom Requires(post): %{__pecl} Requires(postun): %{__pecl} @@ -28,11 +30,17 @@ Conflicts: php-mmcache php-eaccelerator Provides: php-pecl(%{pecl_name}) = %{version} Provides: php-pecl(%{pecl_name})%{?_isa} = %{version} -# RPM 4.8 +# Other third party repo stuff +Obsoletes: php53-pecl-apc +Obsoletes: php53u-pecl-apc +%if "%{php_version}" > "5.4" +Obsoletes: php54-pecl-apc +%endif + + +# Filter private shared %{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$} %{?filter_setup} -# RPM 4.9 -%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}%{_libdir}/.*\\.so$ %description @@ -56,10 +64,17 @@ These are the files needed to compile programs using APC serializer. cd APC-%{version} %patch0 -p3 -b .orig -# There are currently some failed tests +# There are currently some failed tests, https://bugs.php.net/63003 # which requires dom extension, so drop them for now. rm -f tests/apc54_00{3,8,9}.phpt +%if 0%{?__isa_bits} +# port number to allow 32/64 build at same time +port=$(expr %{__isa_bits} + 8900) +sed -e "/PHP_CLI_SERVER_PORT/s/8964/$port/" \ + -i tests/server_test.inc +%endif + # Sanity check, really often broken extver=$(sed -n '/#define PHP_APC_VERSION/{s/.* "//;s/".*$//;p}' php_apc.h) if test "x${extver}" != "x%{version}"; then @@ -188,18 +203,24 @@ install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml %check cd %{pecl_name}-%{version} +ln -sf %{php_extdir}/dom.so modules/ + TEST_PHP_EXECUTABLE=%{_bindir}/php \ REPORT_EXIT_STATUS=1 \ %{_bindir}/php run-tests.php \ -n -q -d extension_dir=modules \ + -d extension=dom.so \ -d extension=apc.so %if 0%{?__ztsphp:1} cd ../%{pecl_name}-%{version}-zts +ln -sf %{php_ztsextdir}/dom.so modules/ + TEST_PHP_EXECUTABLE=%{__ztsphp} \ REPORT_EXIT_STATUS=1 \ %{__ztsphp} run-tests.php \ -n -q -d extension_dir=modules \ + -d extension=dom.so \ -d extension=apc.so %endif @@ -242,6 +263,12 @@ rm -rf %{buildroot} %changelog +* Mon Sep 3 2012 Remi Collet - 3.1.13-1 +- Version 3.1.13 (beta) - API 3.1.0 (stable) +- add patches from upstream (fixes some tests) +- change serveur port for tests (32/64 bits) +- obsoletes php53*, php54* + * Sun Aug 26 2012 Remi Collet - 3.1.12-2 - add patches from upstream - delete tests which fail because of missing dom extension -- cgit