summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-ssh2.spec19
-rw-r--r--ssh2-php7013.patch77
3 files changed, 14 insertions, 84 deletions
diff --git a/REFLECTION b/REFLECTION
index 46c5f04..1df1f1c 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #76 ssh2 version 1.0 ] {
+Extension [ <persistent> extension #132 ssh2 version 1.0 ] {
- Constants [21] {
Constant [ integer SSH2_FINGERPRINT_MD5 ] { 0 }
diff --git a/php-pecl-ssh2.spec b/php-pecl-ssh2.spec
index a519b6e..016da50 100644
--- a/php-pecl-ssh2.spec
+++ b/php-pecl-ssh2.spec
@@ -25,7 +25,7 @@
%global ini_name 40-%{pecl_name}.ini
Name: %{?sub_prefix}php-pecl-ssh2
-Version: 1.0
+Version: 1.1
%if 0%{?gh_date}
Release: 0.2.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}%{?prever}-%{gh_short}.tar.gz
@@ -37,8 +37,6 @@ Summary: Bindings for the libssh2 library
%global buildver %(pkg-config --silence-errors --modversion libssh2 2>/dev/null || echo 65536)
-Patch0: %{pecl_name}-php7013.patch
-
License: PHP
Group: Development/Languages
URL: http://pecl.php.net/package/ssh2
@@ -77,6 +75,10 @@ Obsoletes: php70w-pecl-%{pecl_name} <= %{version}
Obsoletes: php71u-pecl-%{pecl_name} <= %{version}
Obsoletes: php71w-pecl-%{pecl_name} <= %{version}
%endif
+%if "%{php_version}" > "7.2"
+Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
+Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
+%endif
%endif
%if 0%{?fedora} < 20 && 0%{?rhel} < 7
@@ -117,9 +119,7 @@ sed -e 's/role="test"/role="src"/' \
-i package.xml
cd NTS
-%patch0 -p1 -b .php7013
-
-extver=$(sed -n '/#define PHP_SSH2_VERSION/{s/.* "//;s/".*$//;p}' php_ssh2.h)
+extver=$(sed -n '/#define PHP_SSH2_VERSION/{s/.*\t"//;s/".*$//;p}' php_ssh2.h)
if test "x${extver}" != "x%{version}%{?gh_date:-dev}"; then
: Error: Upstream version is now ${extver}, expecting %{version}%{?gh_date:-dev}.
: Update the pdover macro and rebuild.
@@ -139,6 +139,8 @@ cp -pr NTS ZTS
%build
+%{?dtsenable}
+
cd NTS
%{_bindir}/phpize
%configure --with-php-config=%{_bindir}/php-config
@@ -153,6 +155,8 @@ make %{?_smp_mflags}
%install
+%{?dtsenable}
+
make -C NTS install INSTALL_ROOT=%{buildroot}
# Install XML package description
@@ -227,6 +231,9 @@ fi
%changelog
+* Wed Jun 14 2017 Remi Collet <remi@remirepo.net> - 1.1-1
+- Update to 1.1 (alpha)
+
* Thu Dec 1 2016 Remi Collet <remi@fedoraproject.org> - 1.0-5
- rebuild with PHP 7.1.0 GA
diff --git a/ssh2-php7013.patch b/ssh2-php7013.patch
deleted file mode 100644
index 099d442..0000000
--- a/ssh2-php7013.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-Adapted for 1.0 from:
-
-
-From 17680cf039f0cfac53b5a2531fdb715b95e9cc42 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@php.net>
-Date: Thu, 10 Nov 2016 09:16:02 +0100
-Subject: [PATCH] fix for PHP 7.0.13 where php_url_parse fails
-
----
- ssh2_fopen_wrappers.c | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
-diff --git a/ssh2_fopen_wrappers.c b/ssh2_fopen_wrappers.c
-index c8d1d07..17444dc 100644
---- a/ssh2_fopen_wrappers.c
-+++ b/ssh2_fopen_wrappers.c
-@@ -213,10 +213,19 @@
- php_url *resource;
- zval *methods = NULL, *callbacks = NULL, zsession, *tmpzval;
- long resource_id;
-- char *s, *username = NULL, *password = NULL, *pubkey_file = NULL, *privkey_file = NULL;
-+ char *h, *s, *username = NULL, *password = NULL, *pubkey_file = NULL, *privkey_file = NULL;
- int username_len = 0, password_len = 0;
-
-- resource = php_url_parse(path);
-+ h = strstr(path, "Resource id #");
-+ if (h) {
-+ /* Starting with 5.6.28, 7.0.13 need to be clean, else php_url_parse will fail */
-+ char *tmp = estrdup(path);
-+ strncpy(tmp + (h-path), h + sizeof("Resource id #")-1, strlen(tmp));
-+ resource = php_url_parse(tmp);
-+ efree(tmp);
-+ } else {
-+ resource = php_url_parse(path);
-+ }
- if (!resource || !resource->path) {
- return NULL;
- }
-@@ -247,9 +256,6 @@
-
- /* Look for a resource ID to reuse a session */
- s = resource->host;
-- if (strncmp(resource->host, "Resource id #", sizeof("Resource id #") - 1) == 0) {
-- s = resource->host + sizeof("Resource id #") - 1;
-- }
- if (is_numeric_string(s, strlen(s), &resource_id, NULL, 0) == IS_LONG) {
- php_ssh2_sftp_data *sftp_data;
-
---
-2.1.4
-
-From 756e2f1369f2d5ff006222d978806f4fd91659e1 Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@php.net>
-Date: Thu, 10 Nov 2016 09:33:25 +0100
-Subject: [PATCH] fix Invalid write of size 1
-
----
- ssh2_fopen_wrappers.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/ssh2_fopen_wrappers.c b/ssh2_fopen_wrappers.c
-index 17444dc..ffbd6e3 100644
---- a/ssh2_fopen_wrappers.c
-+++ b/ssh2_fopen_wrappers.c
-@@ -220,7 +220,8 @@ php_url *php_ssh2_fopen_wraper_parse_path(const char *path, char *type, php_stre
- if (h) {
- /* Starting with 5.6.28, 7.0.13 need to be clean, else php_url_parse will fail */
- char *tmp = estrdup(path);
-- strncpy(tmp + (h-path), h + sizeof("Resource id #")-1, strlen(tmp));
-+
-+ strncpy(tmp + (h-path), h + sizeof("Resource id #")-1, strlen(tmp)-sizeof("Resource id #"));
- resource = php_url_parse(tmp);
- efree(tmp);
- } else {
---
-2.1.4
-