summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-07-26 18:17:35 +0200
committerRemi Collet <fedora@famillecollet.com>2015-07-26 18:17:35 +0200
commit824833cb78637514ce18b988394f68bf018638dc (patch)
tree349569cde2bcb0f799bb071ee1e4cc4cfd547864
parentdb523b0405a01bb960aaec61c2aba7e976c7c964 (diff)
php-pear: refresh patch
-rw-r--r--php-pear-1.10-metadata.patch177
-rw-r--r--php-pear-1.10-restcache.patch18
-rw-r--r--php-pear-dev.spec16
3 files changed, 157 insertions, 54 deletions
diff --git a/php-pear-1.10-metadata.patch b/php-pear-1.10-metadata.patch
index 8c6aba8..9155a74 100644
--- a/php-pear-1.10-metadata.patch
+++ b/php-pear-1.10-metadata.patch
@@ -1,7 +1,21 @@
-diff -up PEAR/Command/Install.php.metadata PEAR/Command/Install.php
---- PEAR/Command/Install.php.metadata 2015-07-25 13:41:42.000000000 +0200
-+++ PEAR/Command/Install.php 2015-07-26 10:11:07.091721550 +0200
-@@ -555,7 +555,13 @@ Run post-installation scripts in package
+From e523edb6f2be7c5e672b3537e295d5007d107af8 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Sun, 26 Jul 2015 08:22:52 +0200
+Subject: [PATCH 1/5] add "metadata_dir" configuration option
+
+---
+ PEAR/Command/Install.php | 8 +++++++-
+ PEAR/Config.php | 34 +++++++++++++++++++++++++++++-----
+ PEAR/DependencyDB.php | 9 ++++++---
+ PEAR/Installer.php | 25 +++++++++++++++----------
+ PEAR/Registry.php | 23 +++++++++++++----------
+ 5 files changed, 70 insertions(+), 29 deletions(-)
+
+diff --git a/PEAR/Command/Install.php b/PEAR/Command/Install.php
+index 88c5284..87f8f17 100644
+--- a/PEAR/Command/Install.php
++++ b/PEAR/Command/Install.php
+@@ -555,7 +555,13 @@ function doInstall($command, $options, $params)
$packrootphp_dir = $this->installer->_prependPath(
$this->config->get('php_dir', null, 'pear.php.net'),
$options['packagingroot']);
@@ -16,10 +30,11 @@ diff -up PEAR/Command/Install.php.metadata PEAR/Command/Install.php
if ($this->config->get('verbose') > 2) {
$this->ui->outputData('using package root: ' . $options['packagingroot']);
-diff -up PEAR/Config.php.metadata PEAR/Config.php
---- PEAR/Config.php.metadata 2015-07-25 13:41:42.000000000 +0200
-+++ PEAR/Config.php 2015-07-26 10:11:07.091721550 +0200
-@@ -86,6 +86,13 @@ if (getenv('PHP_PEAR_INSTALL_DIR')) {
+diff --git a/PEAR/Config.php b/PEAR/Config.php
+index cd2bb91..36ad988 100644
+--- a/PEAR/Config.php
++++ b/PEAR/Config.php
+@@ -86,6 +86,13 @@
}
}
@@ -47,7 +62,7 @@ diff -up PEAR/Config.php.metadata PEAR/Config.php
'ext_dir' => array(
'type' => 'directory',
'default' => PEAR_CONFIG_DEFAULT_EXT_DIR,
-@@ -646,7 +660,9 @@ class PEAR_Config extends PEAR
+@@ -646,7 +660,9 @@ function __construct($user_file = '', $system_file = '', $ftp_file = false,
$this->configuration['default'][$key] = $info['default'];
}
@@ -58,7 +73,7 @@ diff -up PEAR/Config.php.metadata PEAR/Config.php
$this->_registry['default']->setConfig($this, false);
$this->_regInitialized['default'] = false;
//$GLOBALS['_PEAR_Config_instance'] = &$this;
-@@ -750,7 +766,9 @@ class PEAR_Config extends PEAR
+@@ -750,7 +766,9 @@ function readConfigFile($file = null, $layer = 'user', $strict = true)
$this->configuration[$layer] = $data;
$this->_setupChannels();
if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) {
@@ -69,7 +84,7 @@ diff -up PEAR/Config.php.metadata PEAR/Config.php
$this->_registry[$layer]->setConfig($this, false);
$this->_regInitialized[$layer] = false;
} else {
-@@ -907,7 +925,9 @@ class PEAR_Config extends PEAR
+@@ -907,7 +925,9 @@ function mergeConfigFile($file, $override = true, $layer = 'user', $strict = tru
$this->_setupChannels();
if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) {
@@ -80,7 +95,7 @@ diff -up PEAR/Config.php.metadata PEAR/Config.php
$this->_registry[$layer]->setConfig($this, false);
$this->_regInitialized[$layer] = false;
} else {
-@@ -1595,7 +1615,9 @@ class PEAR_Config extends PEAR
+@@ -1595,7 +1615,9 @@ function _lazyChannelSetup($uselayer = false)
if (!is_object($this->_registry[$layer])) {
if ($phpdir = $this->get('php_dir', $layer, 'pear.php.net')) {
@@ -91,7 +106,7 @@ diff -up PEAR/Config.php.metadata PEAR/Config.php
$this->_registry[$layer]->setConfig($this, false);
$this->_regInitialized[$layer] = false;
} else {
-@@ -2079,7 +2101,9 @@ class PEAR_Config extends PEAR
+@@ -2079,7 +2101,9 @@ function setInstallRoot($root)
continue;
}
$this->_registry[$layer] =
@@ -102,10 +117,11 @@ diff -up PEAR/Config.php.metadata PEAR/Config.php
$this->_registry[$layer]->setConfig($this, false);
$this->_regInitialized[$layer] = false;
}
-diff -up PEAR/DependencyDB.php.metadata PEAR/DependencyDB.php
---- PEAR/DependencyDB.php.metadata 2015-07-25 13:41:42.000000000 +0200
-+++ PEAR/DependencyDB.php 2015-07-26 10:11:07.091721550 +0200
-@@ -120,8 +120,11 @@ class PEAR_DependencyDB
+diff --git a/PEAR/DependencyDB.php b/PEAR/DependencyDB.php
+index 90731e3..4f633ff 100644
+--- a/PEAR/DependencyDB.php
++++ b/PEAR/DependencyDB.php
+@@ -120,8 +120,11 @@ function setConfig(&$config, $depdb = false)
$this->_registry = &$this->_config->getRegistry();
if (!$depdb) {
@@ -119,29 +135,18 @@ diff -up PEAR/DependencyDB.php.metadata PEAR/DependencyDB.php
} else {
$this->_depdb = $depdb;
}
-@@ -758,4 +761,4 @@ class PEAR_DependencyDB
+@@ -758,4 +761,4 @@ function _registerDep(&$data, &$pkg, $dep, $type, $group = false)
);
}
}
-}
-\ Pas de fin de ligne à la fin du fichier
+\ No newline at end of file
+}
-diff -up PEAR/Downloader/Package.php.metadata PEAR/Downloader/Package.php
---- PEAR/Downloader/Package.php.metadata 2015-07-26 10:12:03.102981107 +0200
-+++ PEAR/Downloader/Package.php 2015-07-26 10:12:07.048999397 +0200
-@@ -413,7 +413,7 @@ class PEAR_Downloader_Package
- if ($param->_installRegistry->packageExists($package, $channel)) {
- $packageVersion = $param->_installRegistry->packageInfo($package, 'version', $channel);
- if (version_compare($packageVersion, $param->getVersion(), '==')) {
-- if (!isset($options['force'])) {
-+ if (!isset($options['force']) && !isset($options['packagingroot'])) {
- $info = $param->getParsedPackage();
- unset($info['version']);
- unset($info['state']);
-diff -up PEAR/Installer.php.metadata PEAR/Installer.php
---- PEAR/Installer.php.metadata 2015-07-25 13:41:42.000000000 +0200
-+++ PEAR/Installer.php 2015-07-26 10:11:07.092721555 +0200
-@@ -1128,15 +1128,6 @@ class PEAR_Installer extends PEAR_Downlo
+diff --git a/PEAR/Installer.php b/PEAR/Installer.php
+index 5bd7b58..c28167b 100644
+--- a/PEAR/Installer.php
++++ b/PEAR/Installer.php
+@@ -1128,15 +1128,6 @@ function install($pkgfile, $options = array())
$pkgname = $pkg->getName();
$channel = $pkg->getChannel();
@@ -157,7 +162,7 @@ diff -up PEAR/Installer.php.metadata PEAR/Installer.php
if (isset($options['installroot'])) {
$this->config->setInstallRoot($options['installroot']);
-@@ -1148,7 +1139,21 @@ class PEAR_Installer extends PEAR_Downlo
+@@ -1148,7 +1139,21 @@ function install($pkgfile, $options = array())
$this->config->setInstallRoot(false);
$this->_registry = &$this->config->getRegistry();
if (isset($this->_options['packagingroot'])) {
@@ -180,9 +185,10 @@ diff -up PEAR/Installer.php.metadata PEAR/Installer.php
if (!$installregistry->channelExists($channel, true)) {
// we need to fake a channel-discover of this channel
$chanobj = $this->_registry->getChannel($channel, true);
-diff -up PEAR/Registry.php.metadata PEAR/Registry.php
---- PEAR/Registry.php.metadata 2015-07-25 13:41:42.000000000 +0200
-+++ PEAR/Registry.php 2015-07-26 10:11:07.092721555 +0200
+diff --git a/PEAR/Registry.php b/PEAR/Registry.php
+index 8bad666..6103907 100644
+--- a/PEAR/Registry.php
++++ b/PEAR/Registry.php
@@ -131,23 +131,26 @@ class PEAR_Registry extends PEAR
* @access public
*/
@@ -217,7 +223,7 @@ diff -up PEAR/Registry.php.metadata PEAR/Registry.php
}
function hasWriteAccess()
-@@ -180,7 +183,7 @@ class PEAR_Registry extends PEAR
+@@ -180,7 +183,7 @@ function setConfig(&$config, $resetInstallDir = true)
{
$this->_config = &$config;
if ($resetInstallDir) {
@@ -226,7 +232,7 @@ diff -up PEAR/Registry.php.metadata PEAR/Registry.php
}
}
-@@ -327,9 +330,9 @@ class PEAR_Registry extends PEAR
+@@ -327,9 +330,9 @@ function _initializeDepDB()
$this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config);
if (PEAR::isError($this->_dependencyDB)) {
// attempt to recover by removing the dep db
@@ -238,3 +244,92 @@ diff -up PEAR/Registry.php.metadata PEAR/Registry.php
DIRECTORY_SEPARATOR . '.depdb');
}
+
+From 75856858b1a66f4e1c3c3f6cff9c6698d2967601 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Sun, 26 Jul 2015 09:04:20 +0200
+Subject: [PATCH 3/5] move metadata_dir to "File Locations (Advanced)"
+
+---
+ PEAR/Config.php | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/PEAR/Config.php b/PEAR/Config.php
+index 36ad988..edb594f 100644
+--- a/PEAR/Config.php
++++ b/PEAR/Config.php
+@@ -404,13 +404,6 @@ class PEAR_Config extends PEAR
+ 'prompt' => 'PEAR directory',
+ 'group' => 'File Locations',
+ ),
+- 'metadata_dir' => array(
+- 'type' => 'directory',
+- 'default' => PEAR_CONFIG_DEFAULT_METADATA_DIR,
+- 'doc' => 'directory where metadata files are installed (registry, filemap, channels, ...)',
+- 'prompt' => 'PEAR metadata directory',
+- 'group' => 'File Locations',
+- ),
+ 'ext_dir' => array(
+ 'type' => 'directory',
+ 'default' => PEAR_CONFIG_DEFAULT_EXT_DIR,
+@@ -509,6 +502,14 @@ class PEAR_Config extends PEAR
+ 'prompt' => 'php.ini location',
+ 'group' => 'File Locations (Advanced)',
+ ),
++ 'metadata_dir' => array(
++ 'type' => 'directory',
++ 'default' => PEAR_CONFIG_DEFAULT_METADATA_DIR,
++ 'doc' => 'directory where metadata files are installed (registry, filemap, channels, ...)',
++ 'prompt' => 'PEAR metadata directory',
++ 'group' => 'File Locations',
++ 'group' => 'File Locations (Advanced)',
++ ),
+ // Maintainers
+ 'username' => array(
+ 'type' => 'string',
+
+From b81ca684ac60f62173a2958e7db06f26002fff2d Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Sun, 26 Jul 2015 09:05:04 +0200
+Subject: [PATCH 4/5] cleanup
+
+---
+ PEAR/Config.php | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/PEAR/Config.php b/PEAR/Config.php
+index edb594f..0c4c8e4 100644
+--- a/PEAR/Config.php
++++ b/PEAR/Config.php
+@@ -507,7 +507,6 @@ class PEAR_Config extends PEAR
+ 'default' => PEAR_CONFIG_DEFAULT_METADATA_DIR,
+ 'doc' => 'directory where metadata files are installed (registry, filemap, channels, ...)',
+ 'prompt' => 'PEAR metadata directory',
+- 'group' => 'File Locations',
+ 'group' => 'File Locations (Advanced)',
+ ),
+ // Maintainers
+
+From d862eea2fd1f8895f51e00b4eaea0bace0899fc5 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Sun, 26 Jul 2015 10:20:00 +0200
+Subject: [PATCH 5/5] ignore already installed (in base system) when packaging
+ root
+
+---
+ PEAR/Downloader/Package.php | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/PEAR/Downloader/Package.php b/PEAR/Downloader/Package.php
+index 5b2ce14..29592dc 100644
+--- a/PEAR/Downloader/Package.php
++++ b/PEAR/Downloader/Package.php
+@@ -413,7 +413,7 @@ public static function removeInstalled(&$params)
+ if ($param->_installRegistry->packageExists($package, $channel)) {
+ $packageVersion = $param->_installRegistry->packageInfo($package, 'version', $channel);
+ if (version_compare($packageVersion, $param->getVersion(), '==')) {
+- if (!isset($options['force'])) {
++ if (!isset($options['force']) && !isset($options['packagingroot'])) {
+ $info = $param->getParsedPackage();
+ unset($info['version']);
+ unset($info['state']);
diff --git a/php-pear-1.10-restcache.patch b/php-pear-1.10-restcache.patch
index 5979bca..40d129f 100644
--- a/php-pear-1.10-restcache.patch
+++ b/php-pear-1.10-restcache.patch
@@ -1,11 +1,17 @@
+From fccb285ce442c710d9795d2a102b229799de4922 Mon Sep 17 00:00:00 2001
+From: Remi Collet <fedora@famillecollet.com>
+Date: Sun, 26 Jul 2015 08:08:23 +0200
+Subject: [PATCH] allow pear to work when cache_dir is not writable
-Workaround for:
+---
+ PEAR/REST.php | 7 +++++++
+ 1 file changed, 7 insertions(+)
- https://bugzilla.redhat.com/show_bug.cgi?id=747361
-
---- REST.php.restcache
-+++ REST.php
-@@ -235,6 +235,13 @@
+diff --git a/PEAR/REST.php b/PEAR/REST.php
+index c5ed192..1e472b7 100644
+--- a/PEAR/REST.php
++++ b/PEAR/REST.php
+@@ -235,6 +235,13 @@ function saveCache($url, $contents, $lastmodified, $nochange = false, $cacheid =
}
}
diff --git a/php-pear-dev.spec b/php-pear-dev.spec
index 87e6f50..f759645 100644
--- a/php-pear-dev.spec
+++ b/php-pear-dev.spec
@@ -33,7 +33,7 @@
Summary: PHP Extension and Application Repository framework
Name: %{?scl_prefix}php-pear
Version: 1.10.0
-Release: 0.2.%{pearprever}%{?dist}
+Release: 0.3.%{pearprever}%{?dist}
Epoch: 1
# PEAR, Archive_Tar, XML_Util, Console_Getopt are BSD
# Structures_Graph is LGPLv3+
@@ -41,7 +41,7 @@ License: BSD and LGPLv3+
Group: Development/Languages
URL: http://pear.php.net/package/PEAR
Source0: http://download.pear.php.net/package/PEAR-%{version}%{?pearprever}.tgz
-# wget https://raw.github.com/pear/pear-core/master/install-pear.php
+# wget https://raw.githubusercontent.com/pear/pear-core/stable/install-pear.php
Source1: install-pear.php
Source3: strip.php
Source10: pear.sh
@@ -165,7 +165,8 @@ done
cp %{SOURCE1} %{SOURCE30} %{SOURCE31} %{SOURCE32} %{SOURCE33} .
# apply patches on used PEAR during install
-%patch1 -p0 -b .metadata
+%patch0 -p1 -b .rest
+%patch1 -p1 -b .metadata
sed -e 's/@SCL@/%{?scl:%{scl}_}/' \
-e 's:@VARDIR@:%{_localstatedir}:' \
@@ -241,10 +242,8 @@ install -m 644 -D macros.pear \
# apply patches on installed PEAR tree
pushd $RPM_BUILD_ROOT%{peardir}
- pushd PEAR
- %__patch --no-backup --fuzz 0 -p0 < %{PATCH0}
- popd
- %__patch --no-backup --fuzz 0 -p0 < %{PATCH1}
+ %__patch --no-backup --fuzz 0 -p1 < %{PATCH0}
+ %__patch --no-backup --fuzz 0 -p1 < %{PATCH1}
popd
# Why this file here ?
@@ -405,6 +404,9 @@ fi
%changelog
+* Sun Jul 26 2015 Remi Collet <remi@fedoraproject.org> 1:1.10.0-0.3.dev1
+- patch from PR 42 (merged) and 43 (submitted)
+
* Sun Jul 26 2015 Remi Collet <remi@fedoraproject.org> 1:1.10.0-0.2.dev1
- improve metadata patch