From f7c5e45f1097d67b0dbb5de9bcf7958fe167ca6f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 19 Aug 2019 15:01:02 +0200 Subject: [PATCH 1/4] v1.2.3 --- .gitignore | 13 +++++ php-composer-ca-bundle-rpm.patch | 26 ++++++--- php-composer-ca-bundle.spec | 90 ++++++++++++++++++++++---------- sources | 2 +- 4 files changed, 96 insertions(+), 35 deletions(-) diff --git a/.gitignore b/.gitignore index d96bd5b..177416f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,14 @@ /php-composer-ca-bundle-1.0.2-a2995e5.tgz +/php-composer-ca-bundle-1.0.3-5df9ed0.tgz +/php-composer-ca-bundle-1.0.4-ec21a59.tgz +/php-composer-ca-bundle-1.0.5-b698f6e.tgz +/php-composer-ca-bundle-1.0.6-a795611.tgz +/php-composer-ca-bundle-1.0.7-b17e615.tgz +/php-composer-ca-bundle-1.0.8-9dd73a0.tgz +/php-composer-ca-bundle-1.0.9-36344ae.tgz +/php-composer-ca-bundle-1.1.0-943b2c4.tgz +/php-composer-ca-bundle-1.1.1-d2c0a83.tgz +/php-composer-ca-bundle-1.1.2-46afded.tgz +/php-composer-ca-bundle-1.1.3-8afa52c.tgz +/php-composer-ca-bundle-1.1.4-558f321.tgz +/php-composer-ca-bundle-1.2.3-f26a67e.tgz diff --git a/php-composer-ca-bundle-rpm.patch b/php-composer-ca-bundle-rpm.patch index c2546e4..7ae8760 100644 --- a/php-composer-ca-bundle-rpm.patch +++ b/php-composer-ca-bundle-rpm.patch @@ -1,12 +1,24 @@ 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 -up tests/CaBundleTest.php.rpm tests/CaBundleTest.php +--- tests/CaBundleTest.php.rpm 2019-08-01 11:14:21.577672699 +0200 ++++ tests/CaBundleTest.php 2019-08-01 11:14:31.322744408 +0200 +@@ -104,7 +104,7 @@ class CaBundleTest extends TestCase + public function testOpenBaseDir() + { + $oldValue = ini_get('open_basedir'); +- ini_set('open_basedir', realpath(__DIR__ . '/../')); ++ ini_set('open_basedir', '/usr/share/php:' . realpath(__DIR__ . '/../')); + $certFilePath = CaBundle::getSystemCaRootBundlePath(); + $validResult = CaBundle::validateCaFile($certFilePath, null); + $this->assertTrue($validResult); diff --git a/php-composer-ca-bundle.spec b/php-composer-ca-bundle.spec index d2e3b3e..1384e22 100644 --- a/php-composer-ca-bundle.spec +++ b/php-composer-ca-bundle.spec @@ -1,12 +1,12 @@ # remirepo/fedora spec file for php-composer-ca-bundle # -# Copyright (c) 2016 Remi Collet +# Copyright (c) 2016-2019 Remi Collet # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit a2995e5fe351055f2c7630166af12ce8fd03edfc +%global gh_commit f26a67e397be0e5c00d7c52ec7b5010098e15ce5 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner composer %global gh_project ca-bundle @@ -14,42 +14,57 @@ %global with_tests 0%{!?_without_tests:1} Name: php-composer-ca-bundle -Version: 1.0.2 +Version: 1.2.3 Release: 1%{?dist} Summary: Lets you find a path to the system CA -Group: Development/Libraries License: MIT 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 BuildArch: noarch %if %{with_tests} -# For tests BuildRequires: php(language) >= 5.3.2 BuildRequires: php-openssl BuildRequires: php-pcre BuildRequires: php-cli +# From composer.json, "require": { +# "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8", +# "psr/log": "^1.0", +# "symfony/process": "^2.5 || ^3.0 || ^4.0" +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: phpunit6 +%global phpunit %{_bindir}/phpunit8 +BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) +BuildRequires: (php-composer(symfony/process) >= 2.5 with php-composer(symfony/process) < 5) +%else +BuildRequires: phpunit +%global phpunit %{_bindir}/phpunit +BuildRequires: php-PsrLog +BuildRequires: php-symfony-process +%endif # Autoloader -BuildRequires: php-composer(symfony/class-loader) +BuildRequires: php-composer(fedora/autoloader) # ca-certificates BuildRequires: %{_sysconfdir}/pki/tls/certs/ca-bundle.crt %endif # From composer.json, "require": { -# "php": "^5.3.2 || ^7.0" +# "ext-openssl": "*", +# "ext-pcre": "*", +# "php": "^5.3.2 || ^7.0 || ^8.0" Requires: php(language) >= 5.3.2 -# From phpcompatinfo report for version 1.0.2 Requires: php-openssl Requires: php-pcre +# From phpcompatinfo report for version 1.0.3 +#nothing # Autoloader -Requires: php-composer(symfony/class-loader) +Requires: php-composer(fedora/autoloader) # ca-certificates Requires: %{_sysconfdir}/pki/tls/certs/ca-bundle.crt @@ -59,22 +74,30 @@ Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} %description Small utility library that lets you find a path to the system CA bundle. +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 + - 1.2.3-1 +- update to 1.2.3 +- run upstream test suite +- switch from symfony/class-loader to fedora/autoloader + * Sat Apr 30 2016 Remi Collet - 1.0.2-1 - initial package, version 1.0.2 - diff --git a/sources b/sources index 69e9aa7..ea1c002 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ea6b9651560975dd2f3018f9fd5a1013 php-composer-ca-bundle-1.0.2-a2995e5.tgz +SHA512 (php-composer-ca-bundle-1.2.3-f26a67e.tgz) = 39da8b9fa1605b64a14c553b6310147954f46b38985ab9ff908cd7171c2d6b633253083fefeb0d5fe50dcc7f13176c47004b21d2c44bf1ede6fa63b541248cb7 From e504657e99be567f763ab1396daf886a720636c9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 14 Jan 2020 09:45:31 +0100 Subject: [PATCH 2/4] v1.2.6 (cherry picked from commit 64fdb9f5da2e878ec93b5ddb5d42a0594af12e1a) (cherry picked from commit 3cf9e41caf9219db3903fdcf53c4a26cc95e0ab6) (cherry picked from commit 9711b9a24ed0634e6e145462c508789ede1d73f3) --- .gitignore | 3 +++ php-composer-ca-bundle.spec | 12 ++++++++---- sources | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 177416f..72fbd38 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,6 @@ /php-composer-ca-bundle-1.1.3-8afa52c.tgz /php-composer-ca-bundle-1.1.4-558f321.tgz /php-composer-ca-bundle-1.2.3-f26a67e.tgz +/php-composer-ca-bundle-1.2.4-10bb965.tgz +/php-composer-ca-bundle-1.2.5-62e8fc2.tgz +/php-composer-ca-bundle-1.2.6-47fe531.tgz diff --git a/php-composer-ca-bundle.spec b/php-composer-ca-bundle.spec index 1384e22..0528dbf 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 f26a67e397be0e5c00d7c52ec7b5010098e15ce5 +%global gh_commit 47fe531de31fca4a1b997f87308e7d7804348f7e %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.2.3 +Version: 1.2.6 Release: 1%{?dist} Summary: Lets you find a path to the system CA @@ -36,12 +36,12 @@ BuildRequires: php-cli # From composer.json, "require": { # "phpunit/phpunit": "^4.8.35 || ^5.7 || 6.5 - 8", # "psr/log": "^1.0", -# "symfony/process": "^2.5 || ^3.0 || ^4.0" +# "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: phpunit6 %global phpunit %{_bindir}/phpunit8 BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) -BuildRequires: (php-composer(symfony/process) >= 2.5 with php-composer(symfony/process) < 5) +BuildRequires: (php-composer(symfony/process) >= 2.5 with php-composer(symfony/process) < 6) %else BuildRequires: phpunit %global phpunit %{_bindir}/phpunit @@ -111,6 +111,7 @@ cat << 'EOF' | tee vendor/autoload.php require_once '%{buildroot}%{php_home}/Composer/CaBundle/autoload.php'; \Fedora\Autoloader\Dependencies::required(array( array( + '%{php_home}/Symfony5/Component/Process/autoload.php', '%{php_home}/Symfony4/Component/Process/autoload.php', '%{php_home}/Symfony3/Component/Process/autoload.php', '%{php_home}/Symfony/Component/Process/autoload.php', @@ -142,6 +143,9 @@ exit $ret %changelog +* Tue Jan 14 2020 Remi Collet - 1.2.6-1 +- update to 1.2.6 + * Sat Aug 3 2019 Remi Collet - 1.2.3-1 - update to 1.2.3 - run upstream test suite diff --git a/sources b/sources index ea1c002..be50ef4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-composer-ca-bundle-1.2.3-f26a67e.tgz) = 39da8b9fa1605b64a14c553b6310147954f46b38985ab9ff908cd7171c2d6b633253083fefeb0d5fe50dcc7f13176c47004b21d2c44bf1ede6fa63b541248cb7 +SHA512 (php-composer-ca-bundle-1.2.6-47fe531.tgz) = 3e371796558a812ad38c26dea59ac881bd539495143d342f8a6a7139443d5d43d171b11cc364c0c2fd694617ad293056526421afc19d7277de91f7ff30a4d520 From 22b7fc261eed54291e45fb6867f752cea1b03783 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 8 Apr 2020 10:52:56 +0200 Subject: [PATCH 3/4] v1.2.7 (cherry picked from commit 89778a7db15a055f255131e6dc1a066af17e28e5) (cherry picked from commit 8cb2feca9a36fc093db728f64ab5dd0c172a4741) --- .gitignore | 1 + php-composer-ca-bundle.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 72fbd38..6418f8b 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /php-composer-ca-bundle-1.2.4-10bb965.tgz /php-composer-ca-bundle-1.2.5-62e8fc2.tgz /php-composer-ca-bundle-1.2.6-47fe531.tgz +/php-composer-ca-bundle-1.2.7-95c63ab.tgz diff --git a/php-composer-ca-bundle.spec b/php-composer-ca-bundle.spec index 0528dbf..b04a7c2 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 47fe531de31fca4a1b997f87308e7d7804348f7e +%global gh_commit 95c63ab2117a72f48f5a55da9740a3273d45b7fd %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.2.6 +Version: 1.2.7 Release: 1%{?dist} Summary: Lets you find a path to the system CA @@ -143,6 +143,9 @@ exit $ret %changelog +* Wed Apr 8 2020 Remi Collet - 1.2.7-1 +- update to 1.2.7 + * Tue Jan 14 2020 Remi Collet - 1.2.6-1 - update to 1.2.6 diff --git a/sources b/sources index be50ef4..1524e67 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-composer-ca-bundle-1.2.6-47fe531.tgz) = 3e371796558a812ad38c26dea59ac881bd539495143d342f8a6a7139443d5d43d171b11cc364c0c2fd694617ad293056526421afc19d7277de91f7ff30a4d520 +SHA512 (php-composer-ca-bundle-1.2.7-95c63ab.tgz) = 13d6de73d3a9370e8b5b478b1ab7dbfafc29ef2f2d1a0e705d74cdf6af3f979288805b0a98136db84c8131c993bf3baca91d875cb0d0c5a6181d548ee48ac3a9 From 0d3299d2849e91a1988eb7686571dfdd2745c19c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 2 Nov 2021 08:21:07 +0100 Subject: [PATCH 4/4] v1.3.1 (cherry picked from commit 1b544ef7cc9bdbdfd02565df80087a6ec615ecea) --- .gitignore | 25 +++++++------------------ php-composer-ca-bundle-rpm.patch | 22 +++++++++++----------- php-composer-ca-bundle.spec | 12 +++++++++--- sources | 2 +- 4 files changed, 28 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index 6418f8b..250dc93 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,7 @@ -/php-composer-ca-bundle-1.0.2-a2995e5.tgz -/php-composer-ca-bundle-1.0.3-5df9ed0.tgz -/php-composer-ca-bundle-1.0.4-ec21a59.tgz -/php-composer-ca-bundle-1.0.5-b698f6e.tgz -/php-composer-ca-bundle-1.0.6-a795611.tgz -/php-composer-ca-bundle-1.0.7-b17e615.tgz -/php-composer-ca-bundle-1.0.8-9dd73a0.tgz -/php-composer-ca-bundle-1.0.9-36344ae.tgz -/php-composer-ca-bundle-1.1.0-943b2c4.tgz -/php-composer-ca-bundle-1.1.1-d2c0a83.tgz -/php-composer-ca-bundle-1.1.2-46afded.tgz -/php-composer-ca-bundle-1.1.3-8afa52c.tgz -/php-composer-ca-bundle-1.1.4-558f321.tgz -/php-composer-ca-bundle-1.2.3-f26a67e.tgz -/php-composer-ca-bundle-1.2.4-10bb965.tgz -/php-composer-ca-bundle-1.2.5-62e8fc2.tgz -/php-composer-ca-bundle-1.2.6-47fe531.tgz -/php-composer-ca-bundle-1.2.7-95c63ab.tgz +clog +/php-composer-ca-bundle-1.2.8-8a7ecad.tgz +/php-composer-ca-bundle-1.2.9-78a0e28.tgz +/php-composer-ca-bundle-1.2.10-9fdb22c.tgz +/php-composer-ca-bundle-1.2.11-0b072d5.tgz +/php-composer-ca-bundle-1.3.0-6793336.tgz +/php-composer-ca-bundle-1.3.1-4c67918.tgz diff --git a/php-composer-ca-bundle-rpm.patch b/php-composer-ca-bundle-rpm.patch index 7ae8760..9ff37d0 100644 --- a/php-composer-ca-bundle-rpm.patch +++ b/php-composer-ca-bundle-rpm.patch @@ -1,7 +1,7 @@ -diff -up src/CaBundle.php.rpm src/CaBundle.php ---- 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 +diff -up ./src/CaBundle.php.rpm ./src/CaBundle.php +--- ./src/CaBundle.php.rpm 2021-01-12 13:54:38.000000000 +0100 ++++ ./src/CaBundle.php 2021-01-12 13:55:35.957422992 +0100 +@@ -125,7 +125,7 @@ class CaBundle */ public static function getBundledCaBundlePath() { @@ -10,15 +10,15 @@ diff -up src/CaBundle.php.rpm src/CaBundle.php // cURL does not understand 'phar://' paths // see https://github.com/composer/ca-bundle/issues/10 -diff -up tests/CaBundleTest.php.rpm tests/CaBundleTest.php ---- tests/CaBundleTest.php.rpm 2019-08-01 11:14:21.577672699 +0200 -+++ tests/CaBundleTest.php 2019-08-01 11:14:31.322744408 +0200 -@@ -104,7 +104,7 @@ class CaBundleTest extends TestCase +diff -up ./tests/CaBundleTest.php.rpm ./tests/CaBundleTest.php +--- ./tests/CaBundleTest.php.rpm 2021-01-12 13:55:35.957422992 +0100 ++++ ./tests/CaBundleTest.php 2021-01-12 13:56:54.872069486 +0100 +@@ -124,7 +124,7 @@ class CaBundleTest extends TestCase public function testOpenBaseDir() { - $oldValue = ini_get('open_basedir'); -- ini_set('open_basedir', realpath(__DIR__ . '/../')); -+ ini_set('open_basedir', '/usr/share/php:' . realpath(__DIR__ . '/../')); + $oldValue = ini_get('open_basedir') ?: ''; +- ini_set('open_basedir', dirname(__DIR__)); ++ ini_set('open_basedir', '/usr/share/php:' . dirname(__DIR__)); $certFilePath = CaBundle::getSystemCaRootBundlePath(); $validResult = CaBundle::validateCaFile($certFilePath, null); $this->assertTrue($validResult); diff --git a/php-composer-ca-bundle.spec b/php-composer-ca-bundle.spec index b04a7c2..3e64434 100644 --- a/php-composer-ca-bundle.spec +++ b/php-composer-ca-bundle.spec @@ -6,7 +6,10 @@ # # Please, preserve the changelog entries # -%global gh_commit 95c63ab2117a72f48f5a55da9740a3273d45b7fd + +%bcond_without tests + +%global gh_commit 4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner composer %global gh_project ca-bundle @@ -14,7 +17,7 @@ %global with_tests 0%{!?_without_tests:1} Name: php-composer-ca-bundle -Version: 1.2.7 +Version: 1.3.1 Release: 1%{?dist} Summary: Lets you find a path to the system CA @@ -38,7 +41,7 @@ BuildRequires: php-cli # "psr/log": "^1.0", # "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: phpunit6 +BuildRequires: phpunit8 %global phpunit %{_bindir}/phpunit8 BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) BuildRequires: (php-composer(symfony/process) >= 2.5 with php-composer(symfony/process) < 6) @@ -143,6 +146,9 @@ exit $ret %changelog +* Sat Oct 30 2021 Remi Collet - 1.3.1-1 +- update to 1.3.1 + * Wed Apr 8 2020 Remi Collet - 1.2.7-1 - update to 1.2.7 diff --git a/sources b/sources index 1524e67..b08ea62 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-composer-ca-bundle-1.2.7-95c63ab.tgz) = 13d6de73d3a9370e8b5b478b1ab7dbfafc29ef2f2d1a0e705d74cdf6af3f979288805b0a98136db84c8131c993bf3baca91d875cb0d0c5a6181d548ee48ac3a9 +SHA512 (php-composer-ca-bundle-1.3.1-4c67918.tgz) = d4e66c86d08b2f02d43e4b7a268852be5dd69de8c42558d63159dedc5b038825941db0f50ad804017ea631166cd8f6d6a963fdd1344a47396594ad6747587062