Skip to content
Snippets Groups Projects
Commit 06400683 authored by Edward Hicks's avatar Edward Hicks :8ball:
Browse files

update composer & add 7zip

parent dc8aa1cb
No related branches found
No related tags found
No related merge requests found
......@@ -104,14 +104,16 @@ RUN ln -sv /usr/local/bin/composer2.phar /usr/local/bin/composer2
RUN php composer-setup.php --1
RUN mv -v composer.phar /usr/local/bin/composer1.phar
RUN ln -sv /usr/local/bin/composer1.phar /usr/local/bin/composer1
RUN ln -sv /usr/local/bin/composer22.phar /usr/local/bin/composer
RUN php composer-setup.php
RUN mv -v composer.phar /usr/local/bin/composer.phar
RUN ln -sv /usr/local/bin/composer.phar /usr/local/bin/composer
#RUN php /usr/local/bin/composer completion bash > /etc/profile.d/composer.sh
# Clean up the build environment
RUN yum -y group remove "Development Tools" \
--setopt=groupremove_leaf_only=1 \
--setopt=clean_requirements_on_remove=1
RUN yum -y install git patch unzip
RUN yum -y install git patch unzip p7zip
RUN yum -y clean all
RUN rm -rf /var/cache/yum/ /tmp/* /usr/local/src/*
......
......@@ -1194,7 +1194,7 @@ class Installer
}
}
if (file_exists($this->tmpFile)) {
if ($this->tmpFile !== null && file_exists($this->tmpFile)) {
@unlink($this->tmpFile);
}
}
......@@ -1337,6 +1337,9 @@ class NoProxyPattern
class HttpClient {
/** @var null|string */
private static $caPath;
private $options = array('http' => array());
private $disableTls = false;
......@@ -1615,34 +1618,32 @@ class HttpClient {
*/
public static function getSystemCaRootBundlePath()
{
static $caPath = null;
if ($caPath !== null) {
return $caPath;
if (self::$caPath !== null) {
return self::$caPath;
}
// If SSL_CERT_FILE env variable points to a valid certificate/bundle, use that.
// This mimics how OpenSSL uses the SSL_CERT_FILE env variable.
$envCertFile = getenv('SSL_CERT_FILE');
if ($envCertFile && is_readable($envCertFile) && validateCaFile(file_get_contents($envCertFile))) {
return $caPath = $envCertFile;
return self::$caPath = $envCertFile;
}
// If SSL_CERT_DIR env variable points to a valid certificate/bundle, use that.
// This mimics how OpenSSL uses the SSL_CERT_FILE env variable.
$envCertDir = getenv('SSL_CERT_DIR');
if ($envCertDir && is_dir($envCertDir) && is_readable($envCertDir)) {
return $caPath = $envCertDir;
return self::$caPath = $envCertDir;
}
$configured = ini_get('openssl.cafile');
if ($configured && strlen($configured) > 0 && is_readable($configured) && validateCaFile(file_get_contents($configured))) {
return $caPath = $configured;
return self::$caPath = $configured;
}
$configured = ini_get('openssl.capath');
if ($configured && is_dir($configured) && is_readable($configured)) {
return $caPath = $configured;
return self::$caPath = $configured;
}
$caBundlePaths = array(
......@@ -1658,22 +1659,24 @@ class HttpClient {
'/usr/local/etc/ssl/cert.pem', // FreeBSD 10.x
'/usr/local/etc/openssl/cert.pem', // OS X homebrew, openssl package
'/usr/local/etc/openssl@1.1/cert.pem', // OS X homebrew, openssl@1.1 package
'/opt/homebrew/etc/openssl@3/cert.pem', // macOS silicon homebrew, openssl@3 package
'/opt/homebrew/etc/openssl@1.1/cert.pem', // macOS silicon homebrew, openssl@1.1 package
);
foreach ($caBundlePaths as $caBundle) {
if (@is_readable($caBundle) && validateCaFile(file_get_contents($caBundle))) {
return $caPath = $caBundle;
return self::$caPath = $caBundle;
}
}
foreach ($caBundlePaths as $caBundle) {
$caBundle = dirname($caBundle);
if (is_dir($caBundle) && glob($caBundle.'/*')) {
return $caPath = $caBundle;
return self::$caPath = $caBundle;
}
}
return $caPath = false;
return self::$caPath = false;
}
public static function getPackagedCaFile()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment