summaryrefslogtreecommitdiffstats
path: root/composer-rpm.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-04-19 07:19:27 +0200
committerRemi Collet <fedora@famillecollet.com>2016-04-19 07:19:27 +0200
commit8bfea1eb5d664f1724cd95d3ebc5cdb7e18458e1 (patch)
tree6e833ad445932487c2f295f69a5bae7358894151 /composer-rpm.patch
parent8eb711bcfc3e33b5b21a5d8e9d85caa7e00dc347 (diff)
composer: fix path
Diffstat (limited to 'composer-rpm.patch')
-rw-r--r--composer-rpm.patch59
1 files changed, 52 insertions, 7 deletions
diff --git a/composer-rpm.patch b/composer-rpm.patch
index 108900f..7021034 100644
--- a/composer-rpm.patch
+++ b/composer-rpm.patch
@@ -1,6 +1,6 @@
diff -up ./bin/composer.rpm ./bin/composer
---- ./bin/composer.rpm 2016-01-27 14:04:22.000000000 +0100
-+++ ./bin/composer 2016-01-27 16:32:11.313455545 +0100
+--- ./bin/composer.rpm 2016-04-18 22:14:28.000000000 +0200
++++ ./bin/composer 2016-04-19 07:15:05.420424086 +0200
@@ -5,7 +5,7 @@ if (PHP_SAPI !== 'cli') {
echo 'Warning: Composer should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
}
@@ -11,8 +11,8 @@ diff -up ./bin/composer.rpm ./bin/composer
use Composer\Console\Application;
diff -up ./src/Composer/Autoload/AutoloadGenerator.php.rpm ./src/Composer/Autoload/AutoloadGenerator.php
---- ./src/Composer/Autoload/AutoloadGenerator.php.rpm 2016-01-27 14:04:22.000000000 +0100
-+++ ./src/Composer/Autoload/AutoloadGenerator.php 2016-01-27 16:32:11.313455545 +0100
+--- ./src/Composer/Autoload/AutoloadGenerator.php.rpm 2016-04-18 22:14:28.000000000 +0200
++++ ./src/Composer/Autoload/AutoloadGenerator.php 2016-04-19 07:15:05.421424090 +0200
@@ -287,7 +287,7 @@ EOF;
file_put_contents($targetDir.'/autoload_real.php', $this->getAutoloadRealFile(true, (bool) $includePathFileContents, $targetDirLoader, (bool) $includeFilesFileContents, $vendorPathCode, $appBaseDirCode, $suffix, $useGlobalIncludePath, $prependAutoloader));
@@ -22,10 +22,31 @@ 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 2016-04-18 22:14:28.000000000 +0200
++++ ./src/Composer/Compiler.php 2016-04-19 07:15:05.421424090 +0200
+@@ -96,7 +96,7 @@ class Compiler
+ $finder = new Finder();
+ $finder->files()
+ ->name('*.json')
+- ->in(__DIR__.'/../../res')
++ ->in((getenv('BUILDROOT')?:'') . '/usr/share/composer/res')
+ ->in(SpdxLicenses::getResourcesDir())
+ ->sort($finderSort)
+ ;
+@@ -138,7 +138,7 @@ class Compiler
+ }
+ $this->addFile($phar, new \SplFileInfo(__DIR__.'/../../vendor/composer/ClassLoader.php'));
+
+- $this->addFile($phar, new \SplFileInfo(__DIR__ . '/../../res/cacert.pem'), false);
++ $this->addFile($phar, new \SplFileInfo((getenv('BUILDROOT')?:'') . '/usr/share/composer/res/cacert.pem'), false);
+
+ $this->addComposerBin($phar);
+
diff -up ./src/Composer/Json/JsonFile.php.rpm ./src/Composer/Json/JsonFile.php
---- ./src/Composer/Json/JsonFile.php.rpm 2016-01-27 14:04:22.000000000 +0100
-+++ ./src/Composer/Json/JsonFile.php 2016-01-27 16:32:11.313455545 +0100
-@@ -155,7 +155,7 @@ class JsonFile
+--- ./src/Composer/Json/JsonFile.php.rpm 2016-04-18 22:14:28.000000000 +0200
++++ ./src/Composer/Json/JsonFile.php 2016-04-19 07:15:05.421424090 +0200
+@@ -156,7 +156,7 @@ class JsonFile
self::validateSyntax($content, $this->path);
}
@@ -34,3 +55,27 @@ diff -up ./src/Composer/Json/JsonFile.php.rpm ./src/Composer/Json/JsonFile.php
$schemaData = json_decode(file_get_contents($schemaFile));
if ($schema === self::LAX_SCHEMA) {
+diff -up ./src/Composer/Util/RemoteFilesystem.php.rpm ./src/Composer/Util/RemoteFilesystem.php
+--- ./src/Composer/Util/RemoteFilesystem.php.rpm 2016-04-18 22:14:28.000000000 +0200
++++ ./src/Composer/Util/RemoteFilesystem.php 2016-04-19 07:15:05.421424090 +0200
+@@ -925,7 +925,7 @@ class RemoteFilesystem
+ }
+ }
+
+- return $caPath = __DIR__.'/../../../res/cacert.pem'; // Bundled with Composer, last resort
++ return $caPath = (getenv('BUILDROOT')?:'') . '/usr/share/composer/res/cacert.pem'; // Bundled with Composer, last resort
+ }
+
+ /**
+diff -up ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm ./tests/Composer/Test/Json/ComposerSchemaTest.php
+--- ./tests/Composer/Test/Json/ComposerSchemaTest.php.rpm 2016-04-19 07:15:19.122479957 +0200
++++ ./tests/Composer/Test/Json/ComposerSchemaTest.php 2016-04-19 07:15:45.229586410 +0200
+@@ -87,7 +87,7 @@ class ComposerSchemaTest extends \PHPUni
+
+ private function check($json)
+ {
+- $schema = json_decode(file_get_contents(__DIR__ . '/../../../../res/composer-schema.json'));
++ $schema = json_decode(file_get_contents((getenv('BUILDROOT')?:'') . '/usr/share/composer/res/composer-schema.json'));
+ $validator = new Validator();
+ $validator->check(json_decode($json), $schema);
+