From 08a61be3a53300ada6cb2dfe119b2498e8776e99 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 24 Jul 2014 19:26:07 +0200 Subject: php-bartlett-PHP-CompatInfo: add upstream patch for SNMP extension --- PHP_CompatInfo-conf.patch | 18 ------- php-bartlett-PHP-CompatInfo-upstream.patch | 84 ++++++++++++++++++++++++++++++ php-bartlett-PHP-CompatInfo.spec | 8 ++- 3 files changed, 91 insertions(+), 19 deletions(-) delete mode 100644 PHP_CompatInfo-conf.patch create mode 100644 php-bartlett-PHP-CompatInfo-upstream.patch diff --git a/PHP_CompatInfo-conf.patch b/PHP_CompatInfo-conf.patch deleted file mode 100644 index 2aa82ae..0000000 --- a/PHP_CompatInfo-conf.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- PHP_CompatInfo-2.19.0/phpcompatinfo.xml.dist 2013-07-11 22:21:27.000000000 +0200 -+++ PHP_CompatInfo-2.19.0/phpcompatinfo.xml 2013-07-12 08:22:34.529605184 +0200 -@@ -5,13 +5,14 @@ - reportFileAppend="false" - cacheDriver="file" - recursive="false" -- fileExtensions="php, inc, phtml" -+ fileExtensions="php, inc, phtml, module, install" - consoleProgress="true" - verbose="false" - > - - - -+ /tmp/phpci-%{USER} - 1 - 86400 - diff --git a/php-bartlett-PHP-CompatInfo-upstream.patch b/php-bartlett-PHP-CompatInfo-upstream.patch new file mode 100644 index 0000000..a42c72d --- /dev/null +++ b/php-bartlett-PHP-CompatInfo-upstream.patch @@ -0,0 +1,84 @@ +From c45d362462779cf67a06f2e991e88f4c6ca4908d Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 24 Jul 2014 16:58:37 +0200 +Subject: [PATCH] fix ref version for haru, ssh2 and stomp extension + +Signed-off-by: Laurent Laville +--- + src/Bartlett/CompatInfo/Reference/Extension/HaruExtension.php | 2 +- + src/Bartlett/CompatInfo/Reference/Extension/Ssh2Extension.php | 2 +- + src/Bartlett/CompatInfo/Reference/Extension/StompExtension.php | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/Bartlett/CompatInfo/Reference/Extension/HaruExtension.php b/src/Bartlett/CompatInfo/Reference/Extension/HaruExtension.php +index 0445211..d6783f6 100644 +--- a/src/Bartlett/CompatInfo/Reference/Extension/HaruExtension.php ++++ b/src/Bartlett/CompatInfo/Reference/Extension/HaruExtension.php +@@ -7,7 +7,7 @@ + class HaruExtension extends AbstractReference + { + const REF_NAME = 'haru'; +- const REF_VERSION = ''; ++ const REF_VERSION = '1.0.4'; // 2012-12-23 + + public function __construct() + { +diff --git a/src/Bartlett/CompatInfo/Reference/Extension/Ssh2Extension.php b/src/Bartlett/CompatInfo/Reference/Extension/Ssh2Extension.php +index 102ac4c..e958f4a 100644 +--- a/src/Bartlett/CompatInfo/Reference/Extension/Ssh2Extension.php ++++ b/src/Bartlett/CompatInfo/Reference/Extension/Ssh2Extension.php +@@ -7,7 +7,7 @@ + class Ssh2Extension extends AbstractReference + { + const REF_NAME = 'ssh2'; +- const REF_VERSION = ''; ++ const REF_VERSION = '0.12'; // 2012-10-15 + + public function __construct() + { +diff --git a/src/Bartlett/CompatInfo/Reference/Extension/StompExtension.php b/src/Bartlett/CompatInfo/Reference/Extension/StompExtension.php +index b2c5ce7..20f77a5 100644 +--- a/src/Bartlett/CompatInfo/Reference/Extension/StompExtension.php ++++ b/src/Bartlett/CompatInfo/Reference/Extension/StompExtension.php +@@ -7,7 +7,7 @@ + class StompExtension extends AbstractReference + { + const REF_NAME = 'stomp'; +- const REF_VERSION = ''; ++ const REF_VERSION = '1.0.5'; // 2012-11-18 + + public function __construct() + { +-- +1.9.3 + +From b3bcf488623080ad0de6965d478692dbc6c3e921 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 24 Jul 2014 16:59:05 +0200 +Subject: [PATCH] don't use extension version if not registered in reference, + fix snmp issue + +Signed-off-by: Laurent Laville +--- + src/Bartlett/CompatInfo/Reference/AbstractReference.php | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/Bartlett/CompatInfo/Reference/AbstractReference.php b/src/Bartlett/CompatInfo/Reference/AbstractReference.php +index 3bef201..2926813 100644 +--- a/src/Bartlett/CompatInfo/Reference/AbstractReference.php ++++ b/src/Bartlett/CompatInfo/Reference/AbstractReference.php +@@ -186,9 +186,10 @@ public function getCurrentVersion() + { + $version = phpversion($this->name); + $pattern = '/^[0-9]+\.[0-9]+/'; +- if (!preg_match($pattern, $version)) { ++ if (empty($this->version) || !preg_match($pattern, $version)) { + /** + * When version is not provided by the extension, or not standard format ++ * or we don't have it in our reference (ex snmp) because have no sense + * be sure at least to return latest PHP version supported. + */ + $version = $this->getLatestPhpVersion(); +-- +1.9.3 + diff --git a/php-bartlett-PHP-CompatInfo.spec b/php-bartlett-PHP-CompatInfo.spec index d52a24c..78af702 100644 --- a/php-bartlett-PHP-CompatInfo.spec +++ b/php-bartlett-PHP-CompatInfo.spec @@ -13,7 +13,8 @@ Name: php-bartlett-PHP-CompatInfo Version: 3.2.0 -Release: %{?gh_short:0.1.git%{gh_short}}%{!?gh_short:1}%{?dist} +%global specrel 2 +Release: %{?gh_short:0.%{specrel}.git%{gh_short}}%{!?gh_short:%{specrel}}%{?dist} Summary: Find out version and the extensions required for a piece of code to run Group: Development/Libraries @@ -23,6 +24,7 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Autoloader for RPM - die composer ! Patch0: %{name}-rpm.patch +Patch1: %{name}-upstream.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch @@ -77,6 +79,7 @@ Documentation: http://php5.laurent-laville.org/compatinfo/manual/3.2/en/ %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p1 -b .rpm +%patch1 -p1 -b .git sed -e 's/@package_version@/%{version}/' \ -i $(find src -name \*.php) @@ -133,6 +136,9 @@ fi %changelog +* Thu Jul 24 2014 Remi Collet - 3.2.0-2 +- add upstream patch for SNMP extension + * Thu Jul 24 2014 Remi Collet - 3.2.0-1 - Update to 3.2.0 -- cgit