summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pecl_http-build.patch25
-rw-r--r--php-pecl-http.spec12
2 files changed, 36 insertions, 1 deletions
diff --git a/pecl_http-build.patch b/pecl_http-build.patch
new file mode 100644
index 0000000..aacbafa
--- /dev/null
+++ b/pecl_http-build.patch
@@ -0,0 +1,25 @@
+From d6975fac1d5c88362e9ce625e9b5248e23b3cfb1 Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@php.net>
+Date: Thu, 2 Jan 2014 17:19:18 +0100
+Subject: [PATCH] Fix build with -Werror=format-security
+
+---
+ php_http_client_curl.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/php_http_client_curl.c b/php_http_client_curl.c
+index cc5e810..4033b9f 100644
+--- a/php_http_client_curl.c
++++ b/php_http_client_curl.c
+@@ -1807,7 +1807,7 @@ static STATUS php_http_client_curl_exec(php_http_client_t *h)
+ /* see http://msdn.microsoft.com/library/en-us/winsock/winsock/windows_sockets_error_codes_2.asp */
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "WinSock error: %d", WSAGetLastError());
+ #else
+- php_error_docref(NULL TSRMLS_CC, E_WARNING, strerror(errno));
++ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
+ #endif
+ return FAILURE;
+ }
+--
+1.8.4.3
+
diff --git a/php-pecl-http.spec b/php-pecl-http.spec
index 13e4b67..ed4d6b8 100644
--- a/php-pecl-http.spec
+++ b/php-pecl-http.spec
@@ -19,7 +19,7 @@
Name: %{?scl_prefix}php-pecl-http
Version: 2.0.4
-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;')}
Summary: Extended HTTP support
License: BSD
@@ -27,6 +27,8 @@ Group: Development/Languages
URL: http://pecl.php.net/package/pecl_http
Source0: http://pecl.php.net/get/%{proj_name}-%{version}%{?prever}.tgz
+Patch0: %{proj_name}-build.patch
+
# From http://www.php.net/manual/en/http.configuration.php
Source1: %{proj_name}.ini
@@ -80,6 +82,9 @@ Obsoletes: php54-pecl-http
%if "%{php_version}" > "5.5"
Obsoletes: php55u-pecl-http
%endif
+%if "%{php_version}" > "5.6"
+Obsoletes: php56u-pecl-http
+%endif
%endif
%if 0%{?fedora} < 20
@@ -126,6 +131,8 @@ These are the files needed to compile programs using HTTP extension.
mv %{proj_name}-%{version}%{?prever} NTS
cd NTS
+%patch0 -p1
+
extver=$(sed -n '/#define PHP_PECL_HTTP_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
if test "x${extver}" != "x%{version}%{?prever}"; then
: Error: Upstream HTTP version is now ${extver}, expecting %{version}%{?prever}.
@@ -243,6 +250,9 @@ rm -rf %{buildroot}
%changelog
+* Sun Mar 09 2014 Remi Collet <remi@fedoraproject.org> - 2.0.4-2
+- add upstream patch for -Werror=format-security
+
* Thu Jan 02 2014 Remi Collet <remi@fedoraproject.org> - 2.0.4-1
- Update to 2.0.4
- fix link to documentation