diff options
author | Remi Collet <remi@remirepo.net> | 2017-11-30 07:22:58 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-11-30 07:22:58 +0100 |
commit | 84827b1ee80b94702e0bb1936d6f52fa481ba6cd (patch) | |
tree | 418820380d5b72f05b0d43db9fc78513cac936da | |
parent | b3708a4a1a01e406e8691f64adb7e05205a100ba (diff) |
Update to 1.1.0
allow Symfony 2, 3 and 4
-rw-r--r-- | composer.json | 7 | ||||
-rw-r--r-- | php-composer-ca-bundle-autoload.php | 7 | ||||
-rw-r--r-- | php-composer-ca-bundle-rpm.patch | 14 | ||||
-rw-r--r-- | php-composer-ca-bundle.spec | 36 |
4 files changed, 35 insertions, 29 deletions
diff --git a/composer.json b/composer.json index 7f41acd..b713cc7 100644 --- a/composer.json +++ b/composer.json @@ -27,12 +27,9 @@ "php": "^5.3.2 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.5", + "phpunit/phpunit": "^4.8.35", "psr/log": "^1.0", - "symfony/process": "^2.5 || ^3.0" - }, - "suggest": { - "symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+" + "symfony/process": "^2.5 || ^3.0 || ^4.0" }, "autoload": { "psr-4": { diff --git a/php-composer-ca-bundle-autoload.php b/php-composer-ca-bundle-autoload.php deleted file mode 100644 index c2a4244..0000000 --- a/php-composer-ca-bundle-autoload.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php -/* Autoloader for composer/ca-bundle and its dependencies */ - -require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; - -\Fedora\Autoloader\Autoload::addPsr4('Composer\\CaBundle\\', __DIR__); - diff --git a/php-composer-ca-bundle-rpm.patch b/php-composer-ca-bundle-rpm.patch index c2546e4..54f656d 100644 --- a/php-composer-ca-bundle-rpm.patch +++ b/php-composer-ca-bundle-rpm.patch @@ -1,12 +1,12 @@ diff -up src/CaBundle.php.rpm src/CaBundle.php ---- src/CaBundle.php.rpm 2016-04-30 09:44:06.624946839 +0200 -+++ src/CaBundle.php 2016-04-30 09:44:37.576088602 +0200 -@@ -129,7 +129,7 @@ class CaBundle +--- src/CaBundle.php.rpm 2017-11-30 07:12:46.773928987 +0100 ++++ src/CaBundle.php 2017-11-30 07:15:28.549820032 +0100 +@@ -130,7 +130,7 @@ class CaBundle */ public static function getBundledCaBundlePath() { -- return __DIR__.'/../res/cacert.pem'; -+ return '/etc/pki/tls/certs/ca-bundle.crt'; // System CA, always - } +- $caBundleFile = __DIR__.'/../res/cacert.pem'; ++ $caBundleFile = '/etc/pki/tls/certs/ca-bundle.crt'; // System CA, always - /** + // cURL does not understand 'phar://' paths + // see https://github.com/composer/ca-bundle/issues/10 diff --git a/php-composer-ca-bundle.spec b/php-composer-ca-bundle.spec index decdea1..c8727b2 100644 --- a/php-composer-ca-bundle.spec +++ b/php-composer-ca-bundle.spec @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit 36344aeffdc37711335563e6108cda86566432a6 +%global gh_commit 943b2c4fcad1ef178d16a713c2468bf7e579c288 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner composer %global gh_project ca-bundle @@ -14,7 +14,7 @@ %global with_tests 0%{!?_without_tests:1} Name: php-composer-ca-bundle -Version: 1.0.9 +Version: 1.1.0 Release: 1%{?dist} Summary: Lets you find a path to the system CA @@ -24,7 +24,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project} # git snapshot to get everything, despite .gitattributes Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -Source2: %{name}-autoload.php # Never bundle a CA file Patch0: %{name}-rpm.patch @@ -36,13 +35,13 @@ BuildRequires: php-openssl BuildRequires: php-pcre BuildRequires: php-cli # From composer.json, "require": { -# "phpunit/phpunit": "^4.5", +# "phpunit/phpunit": "^4.8.35", # "psr/log": "^1.0", -# "symfony/process": "^2.5 || ^3.0" +# "symfony/process": "^2.5 || ^3.0 || ^4.0" BuildRequires: phpunit BuildRequires: php-composer(psr/log) < 2 BuildRequires: php-composer(psr/log) >= 1.0 -BuildRequires: php-composer(symfony/process) < 3 +BuildRequires: php-composer(symfony/process) < 5 BuildRequires: php-composer(symfony/process) >= 2.5 # Autoloader BuildRequires: php-composer(fedora/autoloader) @@ -76,11 +75,18 @@ Autoloader: %{php_home}/Composer/CaBundle/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -cp %{SOURCE2} src/autoload.php %patch0 -p0 -b .rpm - find src -name \*.rpm -exec rm {} \; +cat << 'EOF' | tee src/autoload.php +<?php +/* Autoloader for %{gh_owner}/%{gh_project} and its dependencies */ + +require_once '%{php_home}/Fedora/Autoloader/autoload.php'; + +\Fedora\Autoloader\Autoload::addPsr4('Composer\\CaBundle\\', __DIR__); +EOF + %build # Empty build section, most likely nothing required. @@ -98,8 +104,14 @@ mkdir vendor cat << 'EOF' | tee vendor/autoload.php <?php require_once '%{buildroot}%{php_home}/Composer/CaBundle/autoload.php'; -require_once '%{php_home}/Psr/Log/autoload.php'; -require_once '%{php_home}/Symfony/Component/Process/autoload.php'; +\Fedora\Autoloader\Dependencies::required(array( + array( + '%{php_home}/Symfony4/Component/Process/autoload.php', + '%{php_home}/Symfony3/Component/Process/autoload.php', + '%{php_home}/Symfony/Component/Process/autoload.php', + ), + '%{php_home}/Psr/Log/autoload.php', +)); EOF ret=0 @@ -124,6 +136,10 @@ exit $ret %changelog +* Thu Nov 30 2017 Remi Collet <remi@remirepo.net> - 1.1.0-1 +- Update to 1.1.0 +- allow Symfony 2, 3 and 4 + * Tue Nov 14 2017 Remi Collet <remi@remirepo.net> - 1.0.9-1 - Update to 1.0.9 (no change) |