add upstream patch, fix FTBFS with 5.6.21RC1, thanks Koschei

This commit is contained in:
Remi Collet 2016-04-20 09:52:20 +02:00
parent 4e1a15fa44
commit 70f79ccb03
2 changed files with 47 additions and 1 deletions

40
apcu-upstream.patch Normal file
View File

@ -0,0 +1,40 @@
From c6812973fbc29d13368b2ad45a016f4839ee141e Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Wed, 20 Apr 2016 09:18:38 +0200
Subject: [PATCH] fix #176 segfault when apc.preload_path contains bad data
---
apc_cache.c | 2 +-
tests/data/abc.data | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/apc_cache.c b/apc_cache.c
index af5b584..5118e77 100644
--- a/apc_cache.c
+++ b/apc_cache.c
@@ -391,7 +391,7 @@ static zval* data_unserialize(const char *filename TSRMLS_DC)
return NULL;
}
- MAKE_STD_ZVAL(retval);
+ ALLOC_INIT_ZVAL(retval);
PHP_VAR_UNSERIALIZE_INIT(var_hash);
From d9cbfab0bbcdf33a2b26a1c2382e882264835230 Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Tue, 19 Apr 2016 17:35:31 +0200
Subject: [PATCH] fix test/data
---
tests/data/abc.data | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/data/abc.data b/tests/data/abc.data
index 0e386ce..ecdc6cf 100644
--- a/tests/data/abc.data
+++ b/tests/data/abc.data
@@ -1 +1 @@
-s:3:"123"
+s:3:"123";

View File

@ -22,12 +22,14 @@
Name: php-pecl-apcu
Summary: APC User Cache
Version: 4.0.10
Release: 3%{?dist}
Release: 4%{?dist}
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
Source1: %{pecl_name}.ini
Source2: %{pecl_name}-panel.conf
Source3: %{pecl_name}.conf.php
Patch0: %{pecl_name}-upstream.patch
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/APCu
@ -127,6 +129,7 @@ configuration, available on http://localhost/apcu-panel/
mv %{pecl_name}-%{version} NTS
cd NTS
%patch0 -p1
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_APCU_VERSION/{s/.* "//;s/".*$//;p}' php_apc.h)
@ -255,6 +258,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
* Wed Apr 20 2016 Remi Collet <remi@fedoraproject.org> - 4.0.10-4
- add upstream patch, fix FTBFS with 5.6.21RC1, thanks Koschei
* Wed Feb 10 2016 Remi Collet <remi@fedoraproject.org> - 4.0.10-3
- drop scriptlets (replaced file triggers in php-pear)