Compare commits
21 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7be73d2f7f | ||
|
|
b62dca78b2 | ||
|
|
61ddcc665e | ||
|
|
a8cb795377 | ||
|
|
d1051c1206 | ||
|
|
dd41225ec3 | ||
|
|
7ae952fb2a | ||
|
|
b31192398b | ||
|
|
03277a65f0 | ||
|
|
7d1afc4a09 | ||
|
|
4a9303858b | ||
|
|
da42f90804 | ||
|
|
ecbf182b91 | ||
|
|
6a2468967c | ||
|
|
19c7566a67 | ||
|
|
193b764925 | ||
|
|
f9a9e576f4 | ||
|
|
7d19fc1982 | ||
|
|
cfc50f3a57 | ||
|
|
ca72636bec | ||
|
|
7532a50ee6 |
5 changed files with 260 additions and 120 deletions
|
|
@ -1,7 +1,7 @@
|
|||
diff -up ./src/Composer/Factory.php.noxdg ./src/Composer/Factory.php
|
||||
--- ./src/Composer/Factory.php.noxdg 2021-05-31 15:37:50.548115679 +0200
|
||||
+++ ./src/Composer/Factory.php 2021-05-31 15:39:05.192882880 +0200
|
||||
@@ -653,6 +653,10 @@ class Factory
|
||||
--- ./src/Composer/Factory.php.noxdg 2022-01-25 09:39:15.000000000 +0100
|
||||
+++ ./src/Composer/Factory.php 2022-01-25 09:50:21.374957261 +0100
|
||||
@@ -701,6 +701,10 @@ class Factory
|
||||
*/
|
||||
private static function useXdg()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
diff -up ./bin/composer.rpm ./bin/composer
|
||||
--- ./bin/composer.rpm 2021-06-04 09:21:49.000000000 +0200
|
||||
+++ ./bin/composer 2021-06-04 09:21:53.808648766 +0200
|
||||
--- ./bin/composer.rpm 2022-01-25 09:39:15.000000000 +0100
|
||||
+++ ./bin/composer 2022-01-25 09:50:21.372957269 +0100
|
||||
@@ -6,7 +6,7 @@ if (PHP_SAPI !== 'cli' && PHP_SAPI !== '
|
||||
}
|
||||
|
||||
|
|
@ -11,9 +11,9 @@ diff -up ./bin/composer.rpm ./bin/composer
|
|||
use Composer\Console\Application;
|
||||
use Composer\XdebugHandler\XdebugHandler;
|
||||
diff -up ./src/Composer/Autoload/AutoloadGenerator.php.rpm ./src/Composer/Autoload/AutoloadGenerator.php
|
||||
--- ./src/Composer/Autoload/AutoloadGenerator.php.rpm 2021-06-04 09:21:49.000000000 +0200
|
||||
+++ ./src/Composer/Autoload/AutoloadGenerator.php 2021-06-04 09:21:53.808648766 +0200
|
||||
@@ -395,7 +395,7 @@ EOF;
|
||||
--- ./src/Composer/Autoload/AutoloadGenerator.php.rpm 2022-01-25 09:39:15.000000000 +0100
|
||||
+++ ./src/Composer/Autoload/AutoloadGenerator.php 2022-01-25 09:50:21.373957265 +0100
|
||||
@@ -419,7 +419,7 @@ EOF;
|
||||
$filesystem->filePutContentsIfModified($targetDir.'/autoload_real.php', $this->getAutoloadRealFile(true, (bool) $includePathFileContents, $targetDirLoader, (bool) $includeFilesFileContents, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader, $staticPhpVersion, $checkPlatform));
|
||||
|
||||
$filesystem->safeCopy(__DIR__.'/ClassLoader.php', $targetDir.'/ClassLoader.php');
|
||||
|
|
@ -23,9 +23,9 @@ diff -up ./src/Composer/Autoload/AutoloadGenerator.php.rpm ./src/Composer/Autolo
|
|||
if ($this->runScripts) {
|
||||
$this->eventDispatcher->dispatchScript(ScriptEvents::POST_AUTOLOAD_DUMP, $this->devMode, array(), array(
|
||||
diff -up ./src/Composer/Compiler.php.rpm ./src/Composer/Compiler.php
|
||||
--- ./src/Composer/Compiler.php.rpm 2021-06-04 09:21:49.000000000 +0200
|
||||
+++ ./src/Composer/Compiler.php 2021-06-04 09:21:53.808648766 +0200
|
||||
@@ -100,7 +100,7 @@ class Compiler
|
||||
--- ./src/Composer/Compiler.php.rpm 2022-01-25 09:39:15.000000000 +0100
|
||||
+++ ./src/Composer/Compiler.php 2022-01-25 09:50:21.373957265 +0100
|
||||
@@ -125,7 +125,7 @@ class Compiler
|
||||
// Add Composer resources
|
||||
$finder = new Finder();
|
||||
$finder->files()
|
||||
|
|
@ -34,19 +34,40 @@ diff -up ./src/Composer/Compiler.php.rpm ./src/Composer/Compiler.php
|
|||
->sort($finderSort)
|
||||
;
|
||||
foreach ($finder as $file) {
|
||||
diff -up ./src/Composer/InstalledVersions.php.rpm ./src/Composer/InstalledVersions.php
|
||||
--- ./src/Composer/InstalledVersions.php.rpm 2022-01-25 09:39:15.000000000 +0100
|
||||
+++ ./src/Composer/InstalledVersions.php 2022-01-25 09:50:21.373957265 +0100
|
||||
@@ -264,7 +264,7 @@ class InstalledVersions
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
- if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
+ if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
|
||||
self::$installed = include __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
@@ -337,7 +337,7 @@ class InstalledVersions
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
- if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
+ if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
|
||||
self::$installed = require __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
diff -up ./src/Composer/Json/JsonFile.php.rpm ./src/Composer/Json/JsonFile.php
|
||||
--- ./src/Composer/Json/JsonFile.php.rpm 2021-06-04 09:21:49.000000000 +0200
|
||||
+++ ./src/Composer/Json/JsonFile.php 2021-06-04 09:23:51.867361526 +0200
|
||||
@@ -34,7 +34,7 @@ class JsonFile
|
||||
--- ./src/Composer/Json/JsonFile.php.rpm 2022-01-25 09:39:15.000000000 +0100
|
||||
+++ ./src/Composer/Json/JsonFile.php 2022-01-25 09:50:21.373957265 +0100
|
||||
@@ -35,7 +35,7 @@ class JsonFile
|
||||
const JSON_PRETTY_PRINT = 128;
|
||||
const JSON_UNESCAPED_UNICODE = 256;
|
||||
|
||||
- const COMPOSER_SCHEMA_PATH = '/../../../res/composer-schema.json';
|
||||
+ const COMPOSER_SCHEMA_PATH = '/usr/share/composer/res/composer-schema.json';
|
||||
|
||||
/** @var string */
|
||||
private $path;
|
||||
private $httpDownloader;
|
||||
@@ -188,7 +188,7 @@ class JsonFile
|
||||
@@ -197,7 +197,7 @@ class JsonFile
|
||||
$isComposerSchemaFile = false;
|
||||
if (null === $schemaFile) {
|
||||
$isComposerSchemaFile = true;
|
||||
|
|
@ -56,9 +77,9 @@ diff -up ./src/Composer/Json/JsonFile.php.rpm ./src/Composer/Json/JsonFile.php
|
|||
|
||||
// Prepend with file:// only when not using a special schema already (e.g. in the phar)
|
||||
diff -up ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm ./tests/Composer/Test/Json/ComposerSchemaTest.php
|
||||
--- ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm 2021-06-04 09:21:49.000000000 +0200
|
||||
+++ ./tests/Composer/Test/Json/ComposerSchemaTest.php 2021-06-04 09:21:53.808648766 +0200
|
||||
@@ -93,7 +93,8 @@ class ComposerSchemaTest extends TestCas
|
||||
--- ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm 2022-01-25 09:39:15.000000000 +0100
|
||||
+++ ./tests/Composer/Test/Json/ComposerSchemaTest.php 2022-01-25 09:50:21.373957265 +0100
|
||||
@@ -97,7 +97,8 @@ class ComposerSchemaTest extends TestCas
|
||||
private function check($json)
|
||||
{
|
||||
$validator = new Validator();
|
||||
|
|
@ -69,8 +90,8 @@ diff -up ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm ./tests/Composer/
|
|||
if (!$validator->isValid()) {
|
||||
$errors = $validator->getErrors();
|
||||
diff -up ./tests/Composer/Test/PolyfillTestCase.php.rpm ./tests/Composer/Test/PolyfillTestCase.php
|
||||
--- ./tests/Composer/Test/PolyfillTestCase.php.rpm 2021-06-04 09:21:49.000000000 +0200
|
||||
+++ ./tests/Composer/Test/PolyfillTestCase.php 2021-06-04 09:21:53.808648766 +0200
|
||||
--- ./tests/Composer/Test/PolyfillTestCase.php.rpm 2022-01-25 09:39:15.000000000 +0100
|
||||
+++ ./tests/Composer/Test/PolyfillTestCase.php 2022-01-25 09:50:21.373957265 +0100
|
||||
@@ -15,10 +15,35 @@ namespace Composer\Test {
|
||||
use PHPUnit\Framework\Constraint\LogicalNot;
|
||||
use PHPUnit\Framework\Constraint\StringContains;
|
||||
|
|
@ -108,24 +129,15 @@ diff -up ./tests/Composer/Test/PolyfillTestCase.php.rpm ./tests/Composer/Test/Po
|
|||
} else {
|
||||
abstract class PolyfillTestCase extends TestCase
|
||||
{
|
||||
--- ./src/Composer/InstalledVersions.php.rpm 2021-06-07 08:18:59.326450774 +0200
|
||||
+++ ./src/Composer/InstalledVersions.php 2021-06-07 08:19:11.525413189 +0200
|
||||
@@ -251,7 +251,7 @@ class InstalledVersions
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
- if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
+ if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
|
||||
self::$installed = include __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
@@ -324,7 +324,7 @@ class InstalledVersions
|
||||
if (null === self::$installed) {
|
||||
// only require the installed.php file if this file is loaded from its dumped location,
|
||||
// and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
|
||||
- if (substr(__DIR__, -8, 1) !== 'C') {
|
||||
+ if (substr(__DIR__, -8, 1) !== 'C' && is_file(__DIR__ . '/installed.php')) {
|
||||
self::$installed = require __DIR__ . '/installed.php';
|
||||
} else {
|
||||
self::$installed = array();
|
||||
|
||||
diff -up ./src/Composer/vendor/composer/ca-bundle/src/CaBundle.php.rpm ./src/Composer/vendor/composer/ca-bundle/src/CaBundle.php
|
||||
--- ./src/Composer/vendor/composer/ca-bundle/src/CaBundle.php.rpm 2022-01-25 09:50:57.595802751 +0100
|
||||
+++ ./src/Composer/vendor/composer/ca-bundle/src/CaBundle.php 2022-01-25 09:51:36.038638770 +0100
|
||||
@@ -125,7 +125,7 @@ class CaBundle
|
||||
*/
|
||||
public static function getBundledCaBundlePath()
|
||||
{
|
||||
- $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
|
||||
|
|
|
|||
248
composer.spec
248
composer.spec
|
|
@ -1,6 +1,6 @@
|
|||
# remirepo/fedora spec file for composer
|
||||
#
|
||||
# Copyright (c) 2015-2021 Remi Collet
|
||||
# Copyright (c) 2015-2022 Remi Collet
|
||||
# License: CC-BY-SA
|
||||
# http://creativecommons.org/licenses/by-sa/4.0/
|
||||
#
|
||||
|
|
@ -10,16 +10,23 @@
|
|||
# For compatibility with SCL
|
||||
%undefine __brp_mangle_shebangs
|
||||
|
||||
%global gh_commit fc5c4573aafce3a018eb7f1f8f91cea423970f2e
|
||||
%if 0%{?fedora}
|
||||
%bcond_without tests
|
||||
%bcond_without syslib
|
||||
%else
|
||||
%bcond_with tests
|
||||
%bcond_with syslib
|
||||
%endif
|
||||
|
||||
%global gh_commit ba61e768b410736efe61df01b61f1ec44f51474f
|
||||
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
|
||||
%global gh_branch 2.0-dev
|
||||
%global gh_owner composer
|
||||
%global gh_project composer
|
||||
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
|
||||
%global api_version 2.1.0
|
||||
%global run_version 2.1.0
|
||||
%global api_version 2.2.0
|
||||
%global run_version 2.2.2
|
||||
|
||||
%global upstream_version 2.1.3
|
||||
%global upstream_version 2.2.12
|
||||
#global upstream_prever RC1
|
||||
#global upstream_lower rc1
|
||||
|
||||
|
|
@ -34,6 +41,7 @@ Version: %{upstream_version}%{?upstream_prever:~%{upstream_lower}}
|
|||
Release: 1%{?dist}
|
||||
Summary: Dependency Manager for PHP
|
||||
|
||||
# composer and all dependencies are MIT
|
||||
License: MIT
|
||||
URL: https://getcomposer.org/
|
||||
Source0: %{gh_project}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tgz
|
||||
|
|
@ -49,31 +57,22 @@ Patch0: %{name}-rpm.patch
|
|||
Patch1: %{name}-noxdg.patch
|
||||
|
||||
BuildArch: noarch
|
||||
# platform set in makesrc.sh
|
||||
BuildRequires: php(language) >= 7.2.5
|
||||
BuildRequires: php-cli
|
||||
%if %{with_tests}
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
|
||||
BuildRequires: php-json
|
||||
%if %{with tests}
|
||||
BuildRequires: (php-composer(composer/ca-bundle) >= 1.0 with php-composer(composer/ca-bundle) < 2)
|
||||
BuildRequires: (php-composer(composer/metadata-minifier) >= 1.0 with php-composer(composer/metadata-minifier) < 2)
|
||||
BuildRequires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4)
|
||||
BuildRequires: (php-composer(composer/spdx-licenses) >= 1.2 with php-composer(composer/spdx-licenses) < 2)
|
||||
BuildRequires: (php-composer(composer/xdebug-handler) >= 2.0 with php-composer(composer/xdebug-handler) < 3)
|
||||
BuildRequires: (php-composer(composer/xdebug-handler) >= 2.0 with php-composer(composer/xdebug-handler) < 4)
|
||||
BuildRequires: (php-composer(seld/jsonlint) >= 1.4 with php-composer(seld/jsonlint) < 2)
|
||||
BuildRequires: (php-composer(seld/phar-utils) >= 1.0 with php-composer(seld/phar-utils) < 2)
|
||||
BuildRequires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2)
|
||||
BuildRequires: (php-composer(justinrainbow/json-schema) >= 5.2.10 with php-composer(justinrainbow/json-schema) < 6)
|
||||
BuildRequires: (php-composer(seld/phar-utils) >= 1.1 with php-composer(seld/phar-utils) < 2)
|
||||
BuildRequires: (php-composer(psr/log) >= 1.1 with php-composer(psr/log) < 3)
|
||||
BuildRequires: (php-composer(justinrainbow/json-schema) >= 5.2.11 with php-composer(justinrainbow/json-schema) < 6)
|
||||
BuildRequires: (php-composer(react/promise) >= 2.7 with php-composer(react/promise) < 3)
|
||||
%else
|
||||
BuildRequires: php-composer-ca-bundle
|
||||
BuildRequires: php-composer-metadata-minifier
|
||||
BuildRequires: php-composer-semver3
|
||||
BuildRequires: php-composer-spdx-licenses >= 1.2
|
||||
BuildRequires: php-composer-xdebug-handler2
|
||||
BuildRequires: php-jsonlint >= 1.4
|
||||
BuildRequires: php-seld-phar-utils
|
||||
BuildRequires: php-PsrLog
|
||||
BuildRequires: php-justinrainbow-json-schema5 >= 5.2.10
|
||||
BuildRequires: php-react-promise >= 2.7
|
||||
%endif
|
||||
BuildRequires: (php-composer(composer/pcre) >= 1.0 with php-composer(composer/pcre) < 2)
|
||||
BuildRequires: %{symfony_prefix}-console >= %{symfony_min}
|
||||
BuildRequires: %{symfony_prefix}-finder >= %{symfony_min}
|
||||
BuildRequires: %{symfony_prefix}-filesystem >= %{symfony_min}
|
||||
|
|
@ -85,8 +84,6 @@ BuildRequires: php-zip
|
|||
BuildRequires: %{_phpunit}
|
||||
# For autoloader
|
||||
BuildRequires: php-fedora-autoloader-devel
|
||||
BuildRequires: php-seld-phar-utils >= 1.1
|
||||
BuildRequires: php-PsrLog >= 1.1
|
||||
%endif
|
||||
|
||||
# From composer.json, "require": {
|
||||
|
|
@ -95,45 +92,67 @@ BuildRequires: php-PsrLog >= 1.1
|
|||
# "composer/metadata-minifier": "^1.0",
|
||||
# "composer/semver": "^3.0",
|
||||
# "composer/spdx-licenses": "^1.2",
|
||||
# "composer/xdebug-handler": "^2.0",
|
||||
# "justinrainbow/json-schema": "^5.2.10",
|
||||
# "psr/log": "^1.0"
|
||||
# "composer/xdebug-handler": "^2.0 || ^3.0",
|
||||
# "justinrainbow/json-schema": "^5.2.11",
|
||||
# "psr/log": "^1.0 || ^2.0"
|
||||
# "seld/jsonlint": "~1.4",
|
||||
# "seld/phar-utils": "^1.0",
|
||||
# "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
|
||||
# "symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0",
|
||||
# "symfony/filesystem": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
|
||||
# "symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
|
||||
# "symfony/process": "^^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
|
||||
# "react/promise": "^1.2 || ^2.7"
|
||||
Requires: php(language) >= 5.3.2
|
||||
# "react/promise": "^1.2 || ^2.7",
|
||||
# "composer/pcre": "^1.0"
|
||||
Requires: php(language) >= 7.2.5
|
||||
Requires: php-cli
|
||||
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
|
||||
%if %{with syslib}
|
||||
Requires: (php-composer(composer/ca-bundle) >= 1.0 with php-composer(composer/ca-bundle) < 2)
|
||||
Requires: (php-composer(composer/metadata-minifier) >= 1.0 with php-composer(composer/metadata-minifier) < 2)
|
||||
Requires: (php-composer(composer/semver) >= 3.0 with php-composer(composer/semver) < 4)
|
||||
Requires: (php-composer(composer/spdx-licenses) >= 1.2 with php-composer(composer/spdx-licenses) < 2)
|
||||
Requires: (php-composer(composer/xdebug-handler) >= 2.0 with php-composer(composer/xdebug-handler) < 3)
|
||||
Requires: (php-composer(composer/xdebug-handler) >= 2.0 with php-composer(composer/xdebug-handler) < 4)
|
||||
Requires: (php-composer(seld/jsonlint) >= 1.4 with php-composer(seld/jsonlint) < 2)
|
||||
Requires: (php-composer(seld/phar-utils) >= 1.0 with php-composer(seld/phar-utils) < 2)
|
||||
Requires: (php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2)
|
||||
Requires: (php-composer(justinrainbow/json-schema) >= 5.2.10 with php-composer(justinrainbow/json-schema) < 6)
|
||||
Requires: (php-composer(seld/phar-utils) >= 1.1 with php-composer(seld/phar-utils) < 2)
|
||||
Requires: (php-composer(psr/log) >= 1.1 with php-composer(psr/log) < 3)
|
||||
Requires: (php-composer(justinrainbow/json-schema) >= 5.2.11 with php-composer(justinrainbow/json-schema) < 6)
|
||||
Requires: (php-composer(react/promise) >= 2.7 with php-composer(react/promise) < 3)
|
||||
%else
|
||||
Requires: php-composer-ca-bundle
|
||||
Requires: php-composer-metadata-minifier
|
||||
Requires: php-composer-semver3
|
||||
Requires: php-composer-spdx-licenses >= 1.2
|
||||
Requires: php-composer-xdebug-handler2
|
||||
Requires: php-jsonlint >= 1.4
|
||||
Requires: php-seld-phar-utils
|
||||
Requires: php-PsrLog
|
||||
Requires: php-justinrainbow-json-schema5 >= 5.2.10
|
||||
Requires: php-react-promise >= 2.7
|
||||
%endif
|
||||
Requires: (php-composer(composer/pcre) >= 1.0 with php-composer(composer/pcre) < 2)
|
||||
Requires: %{symfony_prefix}-console >= %{symfony_min}
|
||||
Requires: %{symfony_prefix}-finder >= %{symfony_min}
|
||||
Requires: %{symfony_prefix}-process >= %{symfony_min}
|
||||
Requires: %{symfony_prefix}-filesystem >= %{symfony_min}
|
||||
# For our autoloader
|
||||
Requires: php-composer(fedora/autoloader)
|
||||
%else
|
||||
# System certificates
|
||||
Requires: ca-certificates
|
||||
# Bundled libraries
|
||||
Provides: bundled(php-composer-ca-bundle) = 1.3.1
|
||||
Provides: bundled(php-composer-metadata-minifier) = 1.0.0
|
||||
Provides: bundled(php-composer-pcre) = 1.0.1
|
||||
Provides: bundled(php-composer-semver) = 3.3.1
|
||||
Provides: bundled(php-composer-spdx-licenses) = 1.5.6
|
||||
Provides: bundled(php-composer-xdebug-handler) = 3.0.3
|
||||
Provides: bundled(php-justinrainbow-json-schema) = 5.2.11
|
||||
Provides: bundled(php-psr-container) = 1.1.1
|
||||
Provides: bundled(php-psr-log) = 1.1.4
|
||||
Provides: bundled(php-react-promise) = v2.9.0
|
||||
Provides: bundled(php-seld-jsonlint) = 1.8.3
|
||||
Provides: bundled(php-seld-phar-utils) = 1.2.0
|
||||
Provides: bundled(php-symfony-console) = v5.4.5
|
||||
Provides: bundled(php-symfony-deprecation-contracts) = v2.5.0
|
||||
Provides: bundled(php-symfony-filesystem) = v5.4.6
|
||||
Provides: bundled(php-symfony-finder) = v5.4.3
|
||||
Provides: bundled(php-symfony-polyfill-ctype) = v1.25.0
|
||||
Provides: bundled(php-symfony-polyfill-intl-grapheme) = v1.25.0
|
||||
Provides: bundled(php-symfony-polyfill-intl-normalizer) = v1.25.0
|
||||
Provides: bundled(php-symfony-polyfill-mbstring) = v1.25.0
|
||||
Provides: bundled(php-symfony-polyfill-php73) = v1.25.0
|
||||
Provides: bundled(php-symfony-polyfill-php80) = v1.25.0
|
||||
Provides: bundled(php-symfony-process) = v5.4.5
|
||||
Provides: bundled(php-symfony-service-contracts) = v2.5.0
|
||||
Provides: bundled(php-symfony-string) = v5.4.3
|
||||
%endif
|
||||
# From composer.json, suggest
|
||||
# "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages",
|
||||
# "ext-zip": "Enabling the zip extension allows you to unzip archives",
|
||||
|
|
@ -141,14 +160,11 @@ Requires: %{symfony_prefix}-filesystem >= %{symfony_min}
|
|||
Requires: php-openssl
|
||||
Requires: php-zip
|
||||
Requires: php-zlib
|
||||
# For our autoloader
|
||||
Requires: php-composer(fedora/autoloader)
|
||||
Requires: php-seld-phar-utils >= 1.1
|
||||
Requires: php-PsrLog >= 1.1
|
||||
# From phpcompatinfo for version 2.0.0
|
||||
# From phpcompatinfo for version 2.2.5
|
||||
Requires: php-ctype
|
||||
Requires: php-curl
|
||||
Requires: php-date
|
||||
Requires: php-dom
|
||||
Requires: php-filter
|
||||
Requires: php-hash
|
||||
Requires: php-iconv
|
||||
|
|
@ -187,16 +203,20 @@ Documentation: https://getcomposer.org/doc/
|
|||
%patch1 -p1 -b .noxdg
|
||||
find . \( -name \*.rpm -o -name \*noxdg \) -delete -print
|
||||
|
||||
if grep -r '\.\./res'; then
|
||||
: Patch need to fixed
|
||||
exit 1
|
||||
fi
|
||||
rm src/bootstrap.php
|
||||
rm src/Composer/vendor/composer/ca-bundle/res/cacert.pem
|
||||
|
||||
%if %{with syslib}
|
||||
rm -rf src/Composer/vendor
|
||||
|
||||
phpab --template fedora --output src/Composer/autoload.php src/Composer
|
||||
cat << 'EOF' | tee -a src/Composer/autoload.php
|
||||
|
||||
\Fedora\Autoloader\Dependencies::required([
|
||||
'%{_datadir}/php/Composer/XdebugHandler2/autoload.php', /* before symfony which load composer */
|
||||
[ /* before symfony which load composer */
|
||||
'%{_datadir}/php/Composer/XdebugHandler3/autoload.php',
|
||||
'%{_datadir}/php/Composer/XdebugHandler2/autoload.php',
|
||||
],
|
||||
'%{symfony_path}/Component/Console/autoload.php',
|
||||
'%{symfony_path}/Component/Finder/autoload.php',
|
||||
'%{symfony_path}/Component/Process/autoload.php',
|
||||
|
|
@ -207,7 +227,11 @@ cat << 'EOF' | tee -a src/Composer/autoload.php
|
|||
'%{_datadir}/php/Composer/Spdx/autoload.php',
|
||||
'%{_datadir}/php/Composer/MetadataMinifier/autoload.php',
|
||||
'%{_datadir}/php/Composer/Semver3/autoload.php',
|
||||
'%{_datadir}/php/Psr/Log/autoload.php',
|
||||
'%{_datadir}/php/Composer/Pcre/autoload.php',
|
||||
[
|
||||
'%{_datadir}/php/Psr/Log2/autoload.php',
|
||||
'%{_datadir}/php/Psr/Log/autoload.php',
|
||||
],
|
||||
'%{_datadir}/php/JsonSchema5/autoload.php',
|
||||
'%{_datadir}/php/React/Promise/autoload.php',
|
||||
]);
|
||||
|
|
@ -219,8 +243,35 @@ require 'Composer/autoload.php';
|
|||
\Fedora\Autoloader\Autoload::addPsr0('Composer\\Test\\', __DIR__ . '/');
|
||||
EOF
|
||||
|
||||
rm src/bootstrap.php
|
||||
%else
|
||||
: symlink autoloader for library
|
||||
ln -s vendor/autoload.php src/Composer/autoload.php
|
||||
|
||||
: fix layout
|
||||
sed -e "s:/../..' . '/src/Composer::" -i src/Composer/vendor/composer/autoload_static.php
|
||||
|
||||
: List bundled libraries and Licenses
|
||||
php -r '
|
||||
$pkgs = file_get_contents("src/Composer/vendor/composer/installed.json");
|
||||
$pkgs = json_decode($pkgs, true);
|
||||
if (!is_array($pkgs) || !isset($pkgs["packages"])) {
|
||||
echo "cant decode json file\n";
|
||||
exit(3);
|
||||
}
|
||||
$lic = [];
|
||||
foreach($pkgs["packages"] as $pkg) {
|
||||
printf("Provides: bundled(php-%s) = %s\n", str_replace(["/", "_"], ["-", "-"], $pkg["name"]), $pkg["version"]);
|
||||
$lic = array_merge($lic, $pkg["license"]);
|
||||
}
|
||||
sort($lic);
|
||||
printf("\nLicense: %s\n\n", implode(" and ", array_unique($lic)));
|
||||
'
|
||||
%endif
|
||||
|
||||
if grep -r '\.\./res'; then
|
||||
: Patch need to fixed
|
||||
exit 1
|
||||
fi
|
||||
|
||||
: fix reported version
|
||||
%if 0%{?gh_date}
|
||||
|
|
@ -274,7 +325,7 @@ install -Dpm 755 bin/%{name} %{buildroot}%{_bindir}/%{name}
|
|||
|
||||
|
||||
%check
|
||||
%if %{with_tests}
|
||||
%if %{with tests} && %{with syslib}
|
||||
: Online tests
|
||||
rm tests/Composer/Test/Util/RemoteFilesystemTest.php
|
||||
|
||||
|
|
@ -284,7 +335,10 @@ rm -rf res
|
|||
: Run test suite
|
||||
export BUILDROOT=%{buildroot}
|
||||
|
||||
FILTER="--filter '^((?!(testIntegration)).)*$'"
|
||||
# testSearchWithSpecialChars is online
|
||||
# testCreateMap fails on 8.1
|
||||
# testOutputIgnoresFormatting use InstalledVersions
|
||||
FILTER="--filter '^((?!(testIntegration|testSearchWithSpecialChars|testCreateMap|testOutputIgnoresFormatting)).)*$'"
|
||||
|
||||
# Adapt for phunit9
|
||||
find tests \
|
||||
|
|
@ -297,7 +351,7 @@ find tests \
|
|||
|
||||
# testIntegration may hang on local build
|
||||
ret=0
|
||||
for cmd in php php73 php74 php80; do
|
||||
for cmd in php php74 php80 php81; do
|
||||
if which $cmd; then
|
||||
$cmd -d memory_limit=1G %{_phpunit} \
|
||||
$FILTER \
|
||||
|
|
@ -322,6 +376,72 @@ exit $ret
|
|||
|
||||
|
||||
%changelog
|
||||
* Thu Apr 14 2022 Remi Collet <remi@remirepo.net> - 2.2.12-1
|
||||
- update to 2.2.12
|
||||
|
||||
* Wed Mar 30 2022 Remi Collet <remi@remirepo.net> - 2.2.10-1
|
||||
- update to 2.2.10
|
||||
|
||||
* Wed Mar 16 2022 Remi Collet <remi@remirepo.net> - 2.2.9-1
|
||||
- update to 2.2.9
|
||||
|
||||
* Tue Mar 15 2022 Remi Collet <remi@remirepo.net> - 2.2.8-1
|
||||
- update to 2.2.8
|
||||
|
||||
* Fri Feb 25 2022 Remi Collet <remi@remirepo.net> - 2.2.7-1
|
||||
- update to 2.2.7
|
||||
|
||||
* Sat Feb 5 2022 Remi Collet <remi@remirepo.net> - 2.2.6-1
|
||||
- update to 2.2.6
|
||||
|
||||
* Sat Jan 22 2022 Remi Collet <remi@remirepo.net> - 2.2.5-1
|
||||
- update to 2.2.5
|
||||
|
||||
* Sun Jan 9 2022 Remi Collet <remi@remirepo.net> - 2.2.4-1
|
||||
- update to 2.2.4
|
||||
|
||||
* Sat Jan 1 2022 Remi Collet <remi@remirepo.net> - 2.2.3-1
|
||||
- update to 2.2.3
|
||||
|
||||
* Thu Dec 23 2021 Remi Collet <remi@remirepo.net> - 2.2.1-1
|
||||
- update to 2.2.1
|
||||
|
||||
* Wed Dec 22 2021 Remi Collet <remi@remirepo.net> - 2.2.0-1
|
||||
- update to 2.2.0
|
||||
- add dependency on composer/pcre
|
||||
|
||||
* Tue Nov 30 2021 Remi Collet <remi@remirepo.net> - 2.1.14-1
|
||||
- update to 2.1.14
|
||||
|
||||
* Tue Nov 9 2021 Remi Collet <remi@remirepo.net> - 2.1.12-1
|
||||
- update to 2.1.12
|
||||
|
||||
* Tue Nov 2 2021 Remi Collet <remi@remirepo.net> - 2.1.11-1
|
||||
- update to 2.1.11
|
||||
|
||||
* Sat Oct 30 2021 Remi Collet <remi@remirepo.net> - 2.1.10-1
|
||||
- update to 2.1.10
|
||||
- allow psr/log v2
|
||||
|
||||
* Tue Oct 5 2021 Remi Collet <remi@remirepo.net> - 2.1.9-1
|
||||
- update to 2.1.9
|
||||
|
||||
* Sat Sep 18 2021 Remi Collet <remi@remirepo.net> - 2.1.8-1
|
||||
- update to 2.1.8
|
||||
|
||||
* Tue Sep 14 2021 Remi Collet <remi@remirepo.net> - 2.1.7-1
|
||||
- update to 2.1.7
|
||||
|
||||
* Mon Aug 23 2021 Remi Collet <remi@remirepo.net> - 2.1.6-1
|
||||
- update to 2.1.6
|
||||
|
||||
* Fri Jul 23 2021 Remi Collet <remi@remirepo.net> - 2.1.5-1
|
||||
- update to 2.1.5
|
||||
|
||||
* Thu Jul 22 2021 Remi Collet <remi@remirepo.net> - 2.1.4-1
|
||||
- update to 2.1.4
|
||||
- raise dependency on justinrainbow/json-schema 5.2.11
|
||||
|
||||
* Thu Jun 10 2021 Remi Collet <remi@remirepo.net> - 2.1.3-1
|
||||
- update to 2.1.3
|
||||
|
||||
|
|
|
|||
34
makesrc.sh
34
makesrc.sh
|
|
@ -8,21 +8,29 @@ PREVER=$(sed -n '/^%global upstream_prever/{s/.* //;p}' $NAME.spec)
|
|||
COMMIT=$(sed -n '/^%global gh_commit/{s/.* //;p}' $NAME.spec)
|
||||
SHORT=${COMMIT:0:7}
|
||||
|
||||
echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION$PREVER\n"
|
||||
if [ -f $NAME-$VERSION$PREVER-$SHORT.tgz ]; then
|
||||
echo skip $NAME-$VERSION$PREVER-$SHORT.tgz already here
|
||||
else
|
||||
echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION$PREVER\n"
|
||||
|
||||
echo "Cloning..."
|
||||
git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
|
||||
echo "Cloning..."
|
||||
git clone https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
|
||||
|
||||
echo "Getting commit..."
|
||||
pushd $PROJECT-$COMMIT
|
||||
git checkout $COMMIT
|
||||
cp composer.json ../composer.json
|
||||
popd
|
||||
echo "Getting commit..."
|
||||
pushd $PROJECT-$COMMIT
|
||||
git checkout $COMMIT || exit 1
|
||||
cp composer.json ../composer.json
|
||||
composer config platform.php 7.2.5
|
||||
rm composer.lock
|
||||
export COMPOSER_VENDOR_DIR=src/Composer/vendor
|
||||
composer install --no-interaction --no-progress --no-dev --optimize-autoloader
|
||||
cp src/Composer/vendor/composer/installed.json ../
|
||||
popd
|
||||
|
||||
echo "Archiving..."
|
||||
tar czf $NAME-$VERSION$PREVER-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
|
||||
|
||||
echo "Cleaning..."
|
||||
rm -rf $PROJECT-$COMMIT
|
||||
echo "Archiving..."
|
||||
tar czf $NAME-$VERSION$PREVER-$SHORT.tgz --exclude .git $PROJECT-$COMMIT
|
||||
|
||||
echo "Cleaning..."
|
||||
rm -rf $PROJECT-$COMMIT
|
||||
fi
|
||||
echo "Done."
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (composer-2.1.3-fc5c457.tgz) = e959d4e83a1b47d3f81e4ad9fded7b99bd43deb1ba1fc78d8f9819504813ca897a5a0a65cfe09b4f4f2eff7ba631b6d34a016a7fe5831747fd82b53818ec016b
|
||||
SHA512 (composer-2.2.12-ba61e76.tgz) = eb47b368b43633a6e52684d7c6b7961cd571ad0edf8edc5585acc95891cb6958992d9dec6c88ab947ce95f8597139f76ab58ee8b401d2bf9af7511d2aabfc24a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue