Compare commits

...

21 Commits

Author SHA1 Message Date
Remi Collet 9252e77da5 Ignore 1 failed test with PHP 5.4.16 2016-03-09 14:34:37 +01:00
Remi Collet e20389e567 v2.5.6
(cherry picked from commit edfc85ebcb)
(cherry picked from commit 69f2cc3b21)
2016-03-09 14:20:58 +01:00
Remi Collet 493da4661f v2.5.5
(cherry picked from commit ce37eb7ab4)
2015-12-07 16:43:49 +01:00
Remi Collet 3cb3024560 v2.5.3
(cherry picked from commit f4b964733b)
2015-09-28 07:31:46 +02:00
Remi Collet 1ef651f64b v2.5.2
(cherry picked from commit 5a4b06431c)
2015-09-10 10:18:14 +02:00
Remi Collet 40175d2b66 Update to 2.5.1 (stable) - raise dependency on raphf 1.1.0
(cherry picked from commit d57e0625c3)
2015-07-28 16:23:44 +02:00
Remi Collet 09c6f5be1e v2.5.0 2015-07-15 15:38:32 +02:00
Remi Collet c7bd9731c5 update to 2.2.1
(cherry picked from commit 8b782d74ee)
2015-02-09 09:51:05 +01:00
Remi Collet 29a7cbf3a3 update to 2.2.0
(cherry picked from commit 94e1809f75)
2015-01-29 11:05:50 +01:00
Remi Collet 5282953721 update to 2.1.4
(cherry picked from commit 8f1ebdc78d)
2014-11-07 07:16:35 +01:00
Remi Collet 3256f55646 update to 2.1.1
(cherry picked from commit 90fbabb5a5)
2014-09-09 12:14:32 +02:00
Remi Collet 72101164e4 update to 2.0.7
(cherry picked from commit f169b80a7b)
2014-07-11 16:12:14 +02:00
Remi Collet 3f12a8c48f update to 2.0.6
(cherry picked from commit 46e2b84d58)
2014-04-24 16:47:06 +02:00
Remi Collet 24eb87bbbd update to 2.0.5
(cherry picked from commit ff33672a8e)
2014-04-04 16:56:56 +02:00
Remi Collet 906277d5f8 with the patch ...
(cherry picked from commit 2a5654e9ea)
2014-01-02 17:45:13 +01:00
Remi Collet b430341f66 add upstream patch for -Werror=format-security
(cherry picked from commit 25c65035b6)
2014-01-02 17:45:05 +01:00
Remi Collet 74c61ae185 - Update to 2.0.4
- fix link to documentation
- update provided configuration

(cherry picked from commit 289cf7157c)
2014-01-02 17:44:56 +01:00
Remi Collet 0b2e0a2e55 update to 2.0.3 (bugfix)
(cherry picked from commit 6d7bdd21e4)
2013-12-11 16:32:31 +01:00
Remi Collet 14f499fe97 Update to 2.0.1 (stable)
(cherry picked from commit 065d7c3db3)
2013-11-26 14:11:32 +01:00
Remi Collet 0d71d9ec83 - update to 2.0.0 (stable)
- install doc in pecl doc_dir
- install tests in pecl test_dir (in devel)
- spec cleanups, and EPEL-6 compatibility

(cherry picked from commit 07557792d0)
2013-11-22 12:54:09 +01:00
Remi Collet ad3d0888b0 - update to 2.0.0 beta5
- requires propro and raphf extensions
2013-08-20 18:45:29 +02:00
6 changed files with 245 additions and 125 deletions

22
.gitignore vendored
View File

@ -1,11 +1,11 @@
package-*.xml
*spec~
/pecl_http-2.0.0dev6.tgz
/pecl_http-2.0.0dev7.tgz
/pecl_http-2.0.0dev8.tgz
/pecl_http-2.0.0dev10.tgz
/pecl_http-2.0.0alpha1.tgz
/pecl_http-2.0.0beta1.tgz
/pecl_http-2.0.0beta2.tgz
/pecl_http-2.0.0beta3.tgz
/pecl_http-2.0.0beta4.tgz
clog
/pecl_http-2.3.1.tgz
/pecl_http-2.3.2.tgz
/pecl_http-2.4.3.tgz
/pecl_http-2.5.0RC1.tgz
/pecl_http-2.5.0.tgz
/pecl_http-2.5.1.tgz
/pecl_http-2.5.2.tgz
/pecl_http-2.5.3.tgz
/pecl_http-2.5.5.tgz
/pecl_http-2.5.6.tgz

View File

@ -1,13 +1,9 @@
; Enable HTTP extension module
extension=http.so
; http://www.php.net/manual/en/http.configuration.php
; http://devel-m6w6.rhcloud.com/mdref/http
; The hashing algorithm used to generate the ETag. MD5, SHA1, and CRC32 are always
; available. If the hash extension is enabled, any hashing algorithms this extension
; provides are available, too.
;http.etag.mode = "md5"
; The maximum amount of persistent handles to keep alive.
;http.persistent_handle.limit = -1
;http.etag.mode = "crc32b"

View File

@ -1,13 +0,0 @@
Index: php_http_client_datashare.c
===================================================================
--- php_http_client_datashare.c (révision 328937)
+++ php_http_client_datashare.c (copie de travail)
@@ -22,7 +22,7 @@
if (!h) {
free_h = h = emalloc(sizeof(*h));
}
- memset(h, sizeof(*h), 0);
+ memset(h, 0, sizeof(*h));
zend_llist_init(&h->clients, sizeof(zval *), ZVAL_PTR_DTOR, 0);
h->ops = ops;

View File

@ -1,43 +0,0 @@
diff -ru pecl_http-zts/php_http_client_datashare.c pecl_http-2.0.0beta4/php_http_client_datashare.c
--- pecl_http-zts/php_http_client_datashare.c 2013-03-21 12:54:46.601262693 +0100
+++ pecl_http-2.0.0beta4/php_http_client_datashare.c 2013-03-21 13:17:05.103056205 +0100
@@ -261,7 +261,7 @@
return &php_http_property_proxy_init(NULL, object, member, NULL TSRMLS_CC)->myself;
}
- return zend_get_std_object_handlers()->get_property_ptr_ptr(object, member PHP_HTTP_ZEND_LITERAL_CC TSRMLS_CC);
+ return zend_get_std_object_handlers()->get_property_ptr_ptr(object, member PHP_HTTP_ZEND_LITERAL_TCC TSRMLS_CC);
}
diff -ru pecl_http-zts/php_http_message.c pecl_http-2.0.0beta4/php_http_message.c
--- pecl_http-zts/php_http_message.c 2012-12-31 12:54:50.000000000 +0100
+++ pecl_http-2.0.0beta4/php_http_message.c 2013-03-21 13:16:47.435992961 +0100
@@ -1097,7 +1097,7 @@
}
zval_ptr_dtor(&copy);
- return zend_get_std_object_handlers()->get_property_ptr_ptr(object, member PHP_HTTP_ZEND_LITERAL_CC TSRMLS_CC);
+ return zend_get_std_object_handlers()->get_property_ptr_ptr(object, member PHP_HTTP_ZEND_LITERAL_TCC TSRMLS_CC);
}
static zval *php_http_message_object_read_prop(zval *object, zval *member, int type PHP_HTTP_ZEND_LITERAL_DC TSRMLS_DC)
diff -ru pecl_http-zts/php_http_misc.h pecl_http-2.0.0beta4/php_http_misc.h
--- pecl_http-zts/php_http_misc.h 2012-12-31 12:54:50.000000000 +0100
+++ pecl_http-2.0.0beta4/php_http_misc.h 2013-03-21 13:16:07.416849571 +0100
@@ -128,6 +128,7 @@
# define PHP_HTTP_ZEND_LITERAL_DC
# define PHP_HTTP_ZEND_LITERAL_CC
# define PHP_HTTP_ZEND_LITERAL_CCN
+# define PHP_HTTP_ZEND_LITERAL_TCC
# define ZVAL_COPY_VALUE(zv, arr) do { \
(zv)->value = (arr)->value; \
Z_TYPE_P(zv) = Z_TYPE_P(arr); \
@@ -136,6 +137,7 @@
# define PHP_HTTP_ZEND_LITERAL_DC , const zend_literal *literal_key
# define PHP_HTTP_ZEND_LITERAL_CC , (literal_key)
# define PHP_HTTP_ZEND_LITERAL_CCN , NULL
+# define PHP_HTTP_ZEND_LITERAL_TCC , BP_VAR_RW , (literal_key)
#endif
#define INIT_PZVAL_ARRAY(zv, ht) \

View File

@ -1,13 +1,38 @@
%{!?__pecl: %{expand: %%global __pecl %{_bindir}/pecl}}
# Fedora spec file for php-pecl-http
#
# Copyright (c) 2012-2015 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
%{!?php_inidir: %global php_inidir %{_sysconfdir}/php.d}
%{!?php_incldir: %global php_incldir %{_includedir}/php}
%{!?__pecl: %global __pecl %{_bindir}/pecl}
%{!?__php: %global __php %{_bindir}/php}
# The project is pecl_http but the extension is only http
%global proj_name pecl_http
%global pecl_name http
%global prever beta4
%global with_zts 0%{?__ztsphp:1}
%if "%{php_version}" < "5.6"
# after hash iconv propro raphf
%global ini_name z-%{pecl_name}.ini
%else
# after 20-iconv 40-propro 40-raphf
%global ini_name 50-%{pecl_name}.ini
%endif
%ifarch %{arm}
# Test suite disabled because of erratic results on slow ARM (timeout)
%global with_tests 0%{?_with_tests:1}
%else
%global with_tests 0%{!?_without_tests:1}
%endif
#global prever RC1
Name: php-pecl-http
Version: 2.0.0
Release: 0.16.%{prever}%{?dist}
Version: 2.5.6
Release: 1%{?dist}
Summary: Extended HTTP support
License: BSD
@ -18,31 +43,47 @@ Source0: http://pecl.php.net/get/%{proj_name}-%{version}%{?prever}.tgz
# From http://www.php.net/manual/en/http.configuration.php
Source1: %{proj_name}.ini
# fix memset arg order
Patch1: %{name}-build.patch
Patch2: %{name}-php55.patch
BuildRequires: php-devel >= 5.3.0
BuildRequires: php-hash
BuildRequires: php-iconv
BuildRequires: php-json
BuildRequires: php-spl
BuildRequires: php-pear
BuildRequires: pcre-devel
BuildRequires: zlib-devel >= 1.2.0.4
BuildRequires: libevent-devel >= 1.4
BuildRequires: curl-devel >= 7.18.2
# No yet available on fedora: BuildRequires: libserf-devel
BuildRequires: libidn-devel
BuildRequires: php-pecl-propro-devel >= 1.0.0
BuildRequires: php-pecl-raphf-devel >= 1.1.0
BuildRequires: libevent-devel >= 1.4
BuildRequires: pkgconfig
Requires(post): %{__pecl}
Requires(postun): %{__pecl}
Requires: php(zend-abi) = %{php_zend_api}
Requires: php(api) = %{php_core_api}
Requires: php-hash
Requires: php-iconv
Requires: php-json
Requires: php-spl
Conflicts: php-event
%if "%{php_version}" < "5.4"
# php 5.3.3 in EL-6 don't use arched virtual provides
# so only requires real packages instead
Requires: php-common%{?_isa}
%else
Requires: php-hash%{?_isa}
Requires: php-iconv%{?_isa}
Requires: php-spl%{?_isa}
%endif
Requires: php-pecl(propro)%{?_isa} >= 1.0.0
Requires: php-pecl(raphf)%{?_isa} >= 1.1.0
%if 0%{?fedora} < 22
# new extensions split off this one.
Requires: php-pecl(json_post)%{?_isa}
Requires: php-pecl(apfd)%{?_isa}
%endif
%if "%{php_version}" > "5.6"
# V1 don't support PHP 5.6 https://bugs.php.net/66879
Obsoletes: php-pecl-http1 < 2
%else
# Can't install both versions of the same extension
Conflicts: php-pecl-http1
%endif
Provides: php-pecl(%{proj_name}) = %{version}%{?prever}
Provides: php-pecl(%{proj_name})%{?_isa} = %{version}%{?prever}
@ -51,8 +92,10 @@ Provides: php-pecl(%{pecl_name})%{?_isa} = %{version}%{?prever}
Provides: php-%{pecl_name} = %{version}%{?prever}
Provides: php-%{pecl_name}%{?_isa} = %{version}%{?prever}
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
# Filter shared private
%{?filter_provides_in: %filter_provides_in %{_libdir}/.*\.so$}
%endif
%{?filter_setup}
@ -70,7 +113,11 @@ Also provided is a powerful request and parallel interface.
Version 2 is completely incompatible to previous version.
Documentation : http://php.net/http
Note:
. php-pecl-http1 provides API version 1
. php-pecl-http provides API version 2
Documentation : http://devel-m6w6.rhcloud.com/mdref/http
%package devel
@ -78,6 +125,11 @@ Summary: Extended HTTP support developer files (header)
Group: Development/Libraries
Requires: php-pecl-http%{?_isa} = %{version}-%{release}
Requires: php-devel%{?_isa} >= 5.3.0
%if "%{php_version}" > "5.6"
Obsoletes: php-pecl-http1-devel < 2
%else
Conflicts: php-pecl-http1-devel
%endif
%description devel
These are the files needed to compile programs using HTTP extension.
@ -86,11 +138,10 @@ These are the files needed to compile programs using HTTP extension.
%prep
%setup -c -q
cd %{proj_name}-%{version}%{?prever}
%patch1 -p0 -b .build
%patch2 -p1 -b .php55
mv %{proj_name}-%{version}%{?prever} NTS
cd NTS
extver=$(sed -n '/#define PHP_HTTP_EXT_VERSION/{s/.* "//;s/".*$//;p}' php_http.h)
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}.
: Update the pdover macro and rebuild.
@ -98,63 +149,115 @@ if test "x${extver}" != "x%{version}%{?prever}"; then
fi
cd ..
cp %{SOURCE1} %{pecl_name}.ini
cp %{SOURCE1} %{ini_name}
cp -pr %{proj_name}-%{version}%{?prever} %{proj_name}-zts
%if %{with_zts}
# Duplicate source tree for NTS / ZTS build
cp -pr NTS ZTS
%endif
%build
cd %{proj_name}-%{version}%{?prever}
peclconf() {
%configure \
--with-http \
--with-http-zlib-dir=%{_prefix} \
--with-http-libcurl-dir=%{_prefix} \
--with-http-libidn-dir=%{_prefix} \
--with-http-libevent-dir=%{_prefix} \
--with-libdir=%{_lib} \
--with-php-config=$1
}
cd NTS
%{_bindir}/phpize
%configure --with-php-config=%{_bindir}/php-config
peclconf %{_bindir}/php-config
make %{?_smp_mflags}
cd ../%{proj_name}-zts
%if %{with_zts}
cd ../ZTS
%{_bindir}/zts-phpize
%configure --with-php-config=%{_bindir}/zts-php-config
peclconf %{_bindir}/zts-php-config
make %{?_smp_mflags}
%endif
%install
make -C %{proj_name}-%{version}%{?prever} \
install INSTALL_ROOT=%{buildroot}
make -C %{proj_name}-zts \
install INSTALL_ROOT=%{buildroot}
make -C NTS install INSTALL_ROOT=%{buildroot}
# Install XML package description
install -Dpm 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
# install config file (z-http.ini to be loaded after json)
install -Dpm644 %{pecl_name}.ini %{buildroot}%{php_inidir}/z-%{pecl_name}.ini
install -Dpm644 %{pecl_name}.ini %{buildroot}%{php_ztsinidir}/z-%{pecl_name}.ini
# install config file
install -Dpm644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name}
%if %{with_zts}
make -C ZTS install INSTALL_ROOT=%{buildroot}
install -Dpm644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
%endif
# Test & Documentation
cd NTS
for i in $(grep 'role="test"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_testdir}/%{proj_name}/$i
done
for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{proj_name}/$i
done
%check
# Install needed extensions
%if "%{php_version}" < "5.4"
# Known failed test with 5.3.3 (need investigations)
export REPORT_EXIT_STATUS=0
%else
export REPORT_EXIT_STATUS=1
%endif
# Ignore 1 failed test with PHP 5.4.16
rm ?TS/tests/bug71719.phpt
# Shared needed extensions
modules=""
for mod in json hash iconv; do
for mod in hash iconv propro raphf; do
if [ -f %{php_extdir}/${mod}.so ]; then
ln -sf %{php_extdir}/${mod}.so %{proj_name}-%{version}%{?prever}/modules
ln -sf %{php_ztsextdir}/${mod}.so %{proj_name}-zts/modules
modules="$modules --define extension=${mod}.so"
modules="$modules -d extension=${mod}.so"
fi
done
# Minimal load test for NTS extension
: Minimal load test for NTS extension
%{__php} --no-php-ini \
--define extension_dir=%{proj_name}-%{version}%{?prever}/modules \
$modules \
--define extension=%{pecl_name}.so \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
# Minimal load test for ZTS extension
%if %{with_tests}
: Upstream test suite NTS extension
cd NTS
SKIP_ONLINE_TESTS=1 \
TEST_PHP_EXECUTABLE=%{__php} \
TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
%{__php} -n run-tests.php --show-diff
%endif
%if %{with_zts}
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini \
--define extension_dir=%{proj_name}-zts/modules \
$modules \
--define extension=%{pecl_name}.so \
--define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
%if %{with_tests}
: Upstream test suite ZTS extension
cd ../ZTS
SKIP_ONLINE_TESTS=1 \
TEST_PHP_EXECUTABLE=%{__ztsphp} \
TEST_PHP_ARGS="-n $modules -d extension=$PWD/modules/%{pecl_name}.so" \
NO_INTERACTION=1 \
%{__ztsphp} -n run-tests.php --show-diff
%endif
%endif
%post
%{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
@ -167,26 +270,103 @@ fi
%files
%doc %{proj_name}-%{version}%{?prever}/{CREDITS,LICENSE,ThanksTo.txt}
%config(noreplace) %{php_inidir}/z-%{pecl_name}.ini
%config(noreplace) %{php_ztsinidir}/z-%{pecl_name}.ini
%{?_licensedir:%license NTS/LICENSE}
%doc %{pecl_docdir}/%{proj_name}
%config(noreplace) %{php_inidir}/%{ini_name}
%{php_extdir}/%{pecl_name}.so
%{php_ztsextdir}/%{pecl_name}.so
%{pecl_xmldir}/%{name}.xml
%if %{with_zts}
%config(noreplace) %{php_ztsinidir}/%{ini_name}
%{php_ztsextdir}/%{pecl_name}.so
%endif
%files devel
%doc %{pecl_testdir}/%{proj_name}
%{php_incldir}/ext/%{pecl_name}
%if %{with_zts}
%{php_ztsincldir}/ext/%{pecl_name}
%endif
%changelog
* Wed Mar 9 2016 Remi Collet <remi@fedoraproject.org> - 2.5.6-1
- Update to 2.5.6 (stable)
- Ignore 1 failed test with PHP 5.4.16
* Mon Dec 7 2015 Remi Collet <remi@fedoraproject.org> - 2.5.5-1
- Update to 2.5.5 (stable)
* Fri Sep 25 2015 Remi Collet <remi@fedoraproject.org> - 2.5.3-1
- Update to 2.5.3 (stable)
* Thu Sep 10 2015 Remi Collet <remi@fedoraproject.org> - 2.5.2-1
- Update to 2.5.2 (stable)
* Tue Jul 28 2015 Remi Collet <remi@fedoraproject.org> - 2.5.1-1
- Update to 2.5.1 (stable)
- raise dependency on raphf 1.1.0
* Wed Jul 15 2015 Remi Collet <remi@fedoraproject.org> - 2.5.0-1
- update to 2.5.0
- add dependencies on pecl/json_post and pecl/apfd
- drop dependency on json
* Mon Feb 9 2015 Remi Collet <remi@fedoraproject.org> - 2.2.1-1
- Update to 2.2.1 (stable)
* Tue Jan 27 2015 Remi Collet <remi@fedoraproject.org> - 2.2.0-1
- Update to 2.2.0 (stable)
- add dependency on libidn
* Thu Nov 06 2014 Remi Collet <remi@fedoraproject.org> - 2.1.4-1
- Update to 2.1.4
* Tue Sep 9 2014 Remi Collet <remi@fedoraproject.org> - 2.1.1-1
- Update to 2.1.1
- run test suite during build
- ignore known failed tests with PHP 5.3.3
* Fri Jul 11 2014 Remi Collet <remi@fedoraproject.org> - 2.0.7-1
- Update to 2.0.7
* Thu Apr 24 2014 Remi Collet <remi@fedoraproject.org> - 2.0.6-1
- Update to 2.0.6
* Fri Apr 04 2014 Remi Collet <remi@fedoraproject.org> - 2.0.5-1
- Update to 2.0.5
* Thu Jan 02 2014 Remi Collet <remi@fedoraproject.org> - 2.0.4-1
- Update to 2.0.4
- fix link to documentation
- update provided configuration
- add upstream patch for -Werror=format-security
* Tue Dec 10 2013 Remi Collet <remi@fedoraproject.org> - 2.0.3-1
- Update to 2.0.3 (stable)
- drop Conflicts with pecl/event
* Tue Nov 26 2013 Remi Collet <remi@fedoraproject.org> - 2.0.1-1
- Update to 2.0.1 (stable)
* Fri Nov 22 2013 Remi Collet <remi@fedoraproject.org> - 2.0.0-1
- update to 2.0.0 (stable)
- install doc in pecl doc_dir
- install tests in pecl test_dir (in devel)
- spec cleanups, and EPEL-6 compatibility
* Tue Aug 20 2013 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.18.beta5
- update to 2.0.0 beta5
- requires propro and raphf extensions
* Fri Mar 22 2013 Remi Collet <rcollet@redhat.com> - 2.0.0-0.16.beta4
- rebuild for http://fedoraproject.org/wiki/Features/Php55
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-0.15.beta4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sun Dec 31 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.14.beta4
* Sun Dec 30 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.14.beta4
- update to 2.0.0beta4
* Thu Dec 13 2012 Remi Collet <remi@fedoraproject.org> - 2.0.0-0.13.beta3

View File

@ -1 +1 @@
f35ae6ef4d382aaf19f39b1ccf59735e pecl_http-2.0.0beta4.tgz
40fff0e5536c5e80b44e68dd475f8c0a pecl_http-2.5.6.tgz