summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2014-11-13 19:25:58 +0100
committerRemi Collet <fedora@famillecollet.com>2014-11-13 19:25:58 +0100
commit60f478cb1c0c4ede89987d876fba8b37d0b0914c (patch)
tree355bdf2b922ae6995d80f6e38f3871abba665a69
parentb45187edeaa98332266620b7be9c55c41c5627c6 (diff)
php-pecl-event: 0.11.0
-rw-r--r--REFLECTION54
-rw-r--r--event-openssl.patch86
-rw-r--r--php-pecl-event.spec43
3 files changed, 164 insertions, 19 deletions
diff --git a/REFLECTION b/REFLECTION
index 1b6f426..e5ff88e 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #85 event version 1.10.3 ] {
+Extension [ <persistent> extension #180 event version 1.11.0 ] {
- Dependencies {
Dependency [ sockets (Required) ]
@@ -164,7 +164,7 @@ Extension [ <persistent> extension #85 event version 1.10.3 ] {
- Properties [0] {
}
- - Methods [12] {
+ - Methods [13] {
Method [ <internal:event, ctor> public method __construct ] {
- Parameters [1] {
@@ -241,6 +241,12 @@ Extension [ <persistent> extension #85 event version 1.10.3 ] {
- Parameters [0] {
}
}
+
+ Method [ <internal:event> public method free ] {
+
+ - Parameters [0] {
+ }
+ }
}
}
@@ -344,7 +350,7 @@ Extension [ <persistent> extension #85 event version 1.10.3 ] {
Property [ <default> public $output ]
}
- - Methods [20] {
+ - Methods [25] {
Method [ <internal:event, ctor> public method __construct ] {
- Parameters [6] {
@@ -363,6 +369,12 @@ Extension [ <persistent> extension #85 event version 1.10.3 ] {
}
}
+ Method [ <internal:event> public method close ] {
+
+ - Parameters [0] {
+ }
+ }
+
Method [ <internal:event> public method connect ] {
- Parameters [1] {
@@ -491,6 +503,30 @@ Extension [ <persistent> extension #85 event version 1.10.3 ] {
- Parameters [0] {
}
}
+
+ Method [ <internal:event> public method sslGetCipherInfo ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:event> public method sslGetCipherName ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:event> public method sslGetCipherVersion ] {
+
+ - Parameters [0] {
+ }
+ }
+
+ Method [ <internal:event> public method sslGetProtocol ] {
+
+ - Parameters [0] {
+ }
+ }
}
}
@@ -1314,7 +1350,7 @@ Extension [ <persistent> extension #85 event version 1.10.3 ] {
Class [ <internal:event> final class EventSslContext ] {
- - Constants [17] {
+ - Constants [27] {
Constant [ integer SSLv2_CLIENT_METHOD ] { 1 }
Constant [ integer SSLv3_CLIENT_METHOD ] { 2 }
Constant [ integer SSLv23_CLIENT_METHOD ] { 3 }
@@ -1323,6 +1359,10 @@ Extension [ <persistent> extension #85 event version 1.10.3 ] {
Constant [ integer SSLv3_SERVER_METHOD ] { 6 }
Constant [ integer SSLv23_SERVER_METHOD ] { 7 }
Constant [ integer TLS_SERVER_METHOD ] { 8 }
+ Constant [ integer TLSv11_CLIENT_METHOD ] { 9 }
+ Constant [ integer TLSv11_SERVER_METHOD ] { 10 }
+ Constant [ integer TLSv12_CLIENT_METHOD ] { 11 }
+ Constant [ integer TLSv12_SERVER_METHOD ] { 12 }
Constant [ integer OPT_LOCAL_CERT ] { 1 }
Constant [ integer OPT_LOCAL_PK ] { 2 }
Constant [ integer OPT_PASSPHRASE ] { 3 }
@@ -1332,6 +1372,12 @@ Extension [ <persistent> extension #85 event version 1.10.3 ] {
Constant [ integer OPT_VERIFY_PEER ] { 7 }
Constant [ integer OPT_VERIFY_DEPTH ] { 8 }
Constant [ integer OPT_CIPHERS ] { 9 }
+ Constant [ integer OPT_NO_SSLv2 ] { 10 }
+ Constant [ integer OPT_NO_SSLv3 ] { 11 }
+ Constant [ integer OPT_NO_TLSv1 ] { 12 }
+ Constant [ integer OPT_NO_TLSv1_1 ] { 13 }
+ Constant [ integer OPT_NO_TLSv1_2 ] { 14 }
+ Constant [ integer OPT_CIPHER_SERVER_PREFERENCE ] { 15 }
}
- Static properties [0] {
diff --git a/event-openssl.patch b/event-openssl.patch
new file mode 100644
index 0000000..a778155
--- /dev/null
+++ b/event-openssl.patch
@@ -0,0 +1,86 @@
+From e76022e2f4abe48774b667ef4fc1ed83fa6afa51 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Thu, 13 Nov 2014 18:59:10 +0100
+Subject: [PATCH] fix build with old openssl (RHEL-5)
+
+---
+ classes/ssl_context.c | 32 ++++++++++++++++++++++++++++++++
+ 1 file changed, 32 insertions(+)
+
+diff --git a/classes/ssl_context.c b/classes/ssl_context.c
+index 6f71a08..345e68f 100644
+--- a/classes/ssl_context.c
++++ b/classes/ssl_context.c
+@@ -240,6 +240,7 @@ static inline void set_ssl_ctx_options(SSL_CTX *ctx, HashTable *ht TSRMLS_DC)
+ SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1);
+ }
+ break;
++#ifdef SSL_OP_NO_TLSv1_1
+ case PHP_EVENT_OPT_NO_TLSv1_1:
+ if (zval_is_true(*ppzval)) {
+ SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_1);
+@@ -247,6 +248,8 @@ static inline void set_ssl_ctx_options(SSL_CTX *ctx, HashTable *ht TSRMLS_DC)
+ SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1_1);
+ }
+ break;
++#endif
++#ifdef SSL_OP_NO_TLSv1_2
+ case PHP_EVENT_OPT_NO_TLSv1_2:
+ if (zval_is_true(*ppzval)) {
+ SSL_CTX_set_options(ctx, SSL_OP_NO_TLSv1_2);
+@@ -254,6 +257,7 @@ static inline void set_ssl_ctx_options(SSL_CTX *ctx, HashTable *ht TSRMLS_DC)
+ SSL_CTX_clear_options(ctx, SSL_OP_NO_TLSv1_2);
+ }
+ break;
++#endif
+ case PHP_EVENT_OPT_CIPHER_SERVER_PREFERENCE:
+ if (zval_is_true(*ppzval)) {
+ SSL_CTX_set_options(ctx, SSL_OP_CIPHER_SERVER_PREFERENCE);
+@@ -342,16 +346,44 @@ static zend_always_inline SSL_METHOD *get_ssl_method(long in_method TSRMLS_DC)
+ method = (SSL_METHOD *) TLSv1_server_method();
+ break;
+ case PHP_EVENT_TLSv11_CLIENT_METHOD:
++#ifdef SSL_OP_NO_TLSv1_1
+ method = (SSL_METHOD *) TLSv1_1_client_method();
++#else
++ php_error_docref(NULL TSRMLS_CC, E_WARNING,
++ "TLSv1_1 support is not compiled into the "
++ "OpenSSL library PHP is linked against");
++ return NULL;
++#endif
+ break;
+ case PHP_EVENT_TLSv11_SERVER_METHOD:
++#ifdef SSL_OP_NO_TLSv1_1
+ method = (SSL_METHOD *) TLSv1_1_server_method();
++#else
++ php_error_docref(NULL TSRMLS_CC, E_WARNING,
++ "TLSv1_1 support is not compiled into the "
++ "OpenSSL library PHP is linked against");
++ return NULL;
++#endif
+ break;
+ case PHP_EVENT_TLSv12_CLIENT_METHOD:
++#ifdef SSL_OP_NO_TLSv1_2
+ method = (SSL_METHOD *) TLSv1_2_client_method();
++#else
++ php_error_docref(NULL TSRMLS_CC, E_WARNING,
++ "TLSv1_2 support is not compiled into the "
++ "OpenSSL library PHP is linked against");
++ return NULL;
++#endif
+ break;
+ case PHP_EVENT_TLSv12_SERVER_METHOD:
++#ifdef SSL_OP_NO_TLSv1_2
+ method = (SSL_METHOD *) TLSv1_2_server_method();
++#else
++ php_error_docref(NULL TSRMLS_CC, E_WARNING,
++ "TLSv1_2 support is not compiled into the "
++ "OpenSSL library PHP is linked against");
++ return NULL;
++#endif
+ break;
+ default:
+ return NULL;
+--
+2.1.1
+
diff --git a/php-pecl-event.spec b/php-pecl-event.spec
index 690850c..ed7c07c 100644
--- a/php-pecl-event.spec
+++ b/php-pecl-event.spec
@@ -25,13 +25,16 @@
Summary: Provides interface to libevent library
Name: %{?scl_prefix}php-pecl-%{pecl_name}
-Version: 1.10.3
-Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
+Version: 1.11.0
+Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/event
Source0: http://pecl.php.net/get/%{pecl_name}-%{version}.tgz
+# https://bitbucket.org/osmanov/pecl-event/pull-request/10
+Patch0: %{pecl_name}-openssl.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{?scl_prefix}php-devel > 5.4
BuildRequires: %{?scl_prefix}php-pear
@@ -56,6 +59,7 @@ Requires(postun): %{__pecl}
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-sockets%{?_isa}
+%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}}
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -64,17 +68,17 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1}
# 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}
+Obsoletes: php53-pecl-%{pecl_name} <= %{version}
+Obsoletes: php53u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php54-pecl-%{pecl_name} <= %{version}
+Obsoletes: php54w-pecl-%{pecl_name} <= %{version}
%if "%{php_version}" > "5.5"
-Obsoletes: php55u-pecl-%{pecl_name}
-Obsoletes: php55w-pecl-%{pecl_name}
+Obsoletes: php55u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php55w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "5.6"
-Obsoletes: php56u-pecl-%{pecl_name}
-Obsoletes: php56w-pecl-%{pecl_name}
+Obsoletes: php56u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php56w-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -94,13 +98,20 @@ Version 1.0.0 introduces:
* new OO API breaking backwards compatibility
* support of libevent 2+ including HTTP, DNS, OpenSSL and the event listener.
+Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection}.
+
%prep
%setup -q -c
+# Don't install/register tests
+sed -e 's/role="test"/role="src"/' -i package.xml
+
mv %{pecl_name}-%{version} NTS
cd NTS
+%patch0 -p1 -b .openssl
+
# Sanity check, really often broken
extver=$(sed -n '/#define PHP_EVENT_VERSION/{s/.* "//;s/".*$//;p}' php_event.h)
if test "x${extver}" != "x%{version}"; then
@@ -165,10 +176,7 @@ install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name}
: Install the package XML file
install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml
-: Test and Documentation
-for i in $(grep 'role="test"' package.xml | sed -e 's/^.*name="//;s/".*$//')
-do install -Dpm 644 NTS/$i %{buildroot}%{pecl_testdir}/%{pecl_name}/$i
-done
+: Documentation
for i in $(grep 'role="doc"' package.xml | sed -e 's/^.*name="//;s/".*$//')
do install -Dpm 644 NTS/$i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i
done
@@ -231,7 +239,6 @@ rm -rf %{buildroot}
%files
%defattr(-, root, root, 0755)
%doc %{pecl_docdir}/%{pecl_name}
-%doc %{pecl_testdir}/%{pecl_name}
%{pecl_xmldir}/%{name}.xml
%config(noreplace) %{php_inidir}/%{ini_name}
@@ -244,6 +251,12 @@ rm -rf %{buildroot}
%changelog
+* Thu Nov 13 2014 Remi Collet <remi@fedoraproject.org> - 1.11.0-1
+- Update to 1.11.0 (stable)
+- don't provide test suite
+- add patch for old openssl in EL-5
+ https://bitbucket.org/osmanov/pecl-event/pull-request/10
+
* Mon Aug 25 2014 Remi Collet <rcollet@redhat.com> - 1.10.3-2
- improve SCL build