From ee18e3c185edb01c98517f5188fd802411170397 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 31 Jul 2015 11:21:47 +0200 Subject: [PATCH] - update PEAR to 1.10.0dev2 - drop all patches, merged upstream - drop man pages from sources - add PEAR_Manpages upstream package --- .gitignore | 2 + install-pear.php | 20 ++- pear.1 | 271 --------------------------------- pear.conf.5 | 50 ------ peardev.1 | 2 - pecl.1 | 2 - php-pear-1.9.4-restcache.patch | 21 --- php-pear-metadata.patch | 244 ----------------------------- php-pear.spec | 68 ++++----- sources | 3 +- 10 files changed, 45 insertions(+), 638 deletions(-) delete mode 100644 pear.1 delete mode 100644 pear.conf.5 delete mode 100644 peardev.1 delete mode 100644 pecl.1 delete mode 100644 php-pear-1.9.4-restcache.patch delete mode 100644 php-pear-metadata.patch diff --git a/.gitignore b/.gitignore index a7eac88..4a62f8e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ clog /Archive_Tar-1.4.0.tgz /Console_Getopt-1.4.1.tgz /Structures_Graph-1.1.1.tgz +/PEAR-1.10.0dev2.tgz +/PEAR_Manpages-1.10.0dev2.tgz diff --git a/install-pear.php b/install-pear.php index facb6ee..3d2bb37 100644 --- a/install-pear.php +++ b/install-pear.php @@ -1,10 +1,8 @@ set('www_dir', $www_dir, 'default'); } +// Manual pages +if (!empty($man_dir)) { + $config->set('man_dir', $man_dir, 'default'); +} + // Downloaded files if (!empty($download_dir)) { $config->set('download_dir', $download_dir, 'default'); @@ -162,6 +168,7 @@ if (!empty($test_dir)) { if (!empty($with_dir)) { $ds = DIRECTORY_SEPARATOR; $config->set('php_dir', $with_dir, 'default'); + // Metadata if (!empty($metadata_dir)) { $config->set('metadata_dir', $metadata_dir, 'default'); @@ -181,6 +188,9 @@ if (!empty($with_dir)) { if (empty($cfg_dir)) { $config->set('cfg_dir', $with_dir . $ds . 'cfg', 'default'); } + if (empty($man_dir)) { + $config->set('man_dir', $with_dir . $ds . 'local' . $ds . 'man', 'default'); + } if (!is_writable($config->get('cache_dir'))) { include_once 'System.php'; $cdir = System::mktemp(array('-d', 'pear')); @@ -218,7 +228,7 @@ if (isset($suffix)) { } } -/* Print PEAR Conf (useful for debuging do NOT REMOVE) */ +/* Print PEAR Conf (useful for debugging do NOT REMOVE) */ if ($debug) { sort($keys); foreach ($keys as $key) { @@ -237,7 +247,7 @@ $options['upgrade'] = true; $install_root = getenv('INSTALL_ROOT'); if (!empty($install_root)) { $options['packagingroot'] = $install_root; - $reg = &new PEAR_Registry($options['packagingroot'], false, false, $metadata_dir); + $reg = new PEAR_Registry($options['packagingroot'], false, false, $metadata_dir); } else { $reg = $config->getRegistry('default'); } diff --git a/pear.1 b/pear.1 deleted file mode 100644 index ed91290..0000000 --- a/pear.1 +++ /dev/null @@ -1,271 +0,0 @@ -.TH PEAR 1 "2013" "The PEAR Group" "User commands" -.SH NAME -pear, pecl, peardev \- PEAR installer - -.SH SYNOPSIS -.B pear -[ options ] command [command-options] -.LP -.B pecl -[ options ] command [command-options] -.LP -.B peardev -[ options ] command [command-options] -.LP - -.SH DESCRIPTION -\fBPEAR\fP is the PHP Extension and Application Repository, found at -.B http://pear.php.net. -.P -.P -The \fBpear\fP command is used to install PEAR extensions. -.P -The \fBpecl\fP command is used to install PECL extensions. -.P -The \fBpeardev\fP command is a wrapper for the \fBpear\fP command which -removes the normal configured memory limit. - -.SH OPTIONS -.TP 15 -.B \-v -increase verbosity level (default 1) -.TP -.B \-q -be quiet, decrease verbosity level -.TP -.B \-c \fIfile\fP -find user configuration in \fBfile\fP -.TP -.B \-C \fIfile\fP -find system configuration in \fBfile\fP -.TP -.B \-d \fIfoo=bar\fP -set user config variable \fBfoo\fP to \fBbar\fP -.TP -.B \-D \fIfoo=bar\fP -set system config variable \fBfoo\fP to \fBbar\fP -.TP -.B \-G -start in graphical (Gtk) mode -.TP -.B \-S -store system configuration -.TP -.B \-s -store user configuration -.TP -.B \-y \fIfoo\fP -unset -.B foo -in the user configuration -.TP -.B \-V -version information -.TP -.PD 0 -.B \-h -.TP -.PD 1 -.B \-? -display help/usage - -.SH COMMANDS -.TP 15 -.B build -Build an Extension From C Source -.TP -.B bundle -Unpacks a Pecl Package -.TP -.B channel-add -Add a Channel -.TP -.B channel-alias -Specify an alias to a channel name -.TP -.B channel-delete -Remove a Channel From the List -.TP -.B channel-discover -Initialize a Channel from its server -.TP -.B channel-info -Retrieve Information on a Channel -.TP -.TP -.B channel-login -Connects and authenticates to remote channel server -.TP -.B channel-logout -Logs out from the remote channel server -.TP -.B channel-update -Update an Existing Channel -.TP -.B clear-cache -Clear Web Services Cache -.TP -.B config-create -Create a Default configuration file -.TP -.B config-get -Show One Setting -.TP -.B config-help -Show Information About Setting -.TP -.B config-set -Change Setting -.TP -.B config-show -Show All Settings -.TP -.B convert -Convert a package.xml 1.0 to package.xml 2.0 format -.TP -.B cvsdiff -Run a "cvs diff" for all files in a package -.TP -.B cvstag -Set CVS Release Tag -.TP -.B download -Download Package -.TP -.B download-all -Downloads each available package from the default channel -.TP -.B info -Display information about a package -.TP -.B install -Install Package -.TP -.B list -List Installed Packages In The Default Channel -.TP -.B list-all -List All Packages -.TP -.B list-channels -List Available Channels -.TP -.B list-files -List Files In Installed Package -.TP -.B list-upgrades -List Available Upgrades -.TP -.B login -Connects and authenticates to remote server [Deprecated in favor of channel-login] -.TP -.B logout -Logs out from the remote server [Deprecated in favor of channel-logout] -.TP -.B make-rpm-spec -Builds an RPM spec file from a PEAR package -.TP -.B makerpm -Builds an RPM spec file from a PEAR package -.TP -.B package -Build Package -.TP -.B package-dependencies -Show package dependencies -.TP -.B package-validate -Validate Package Consistency -.TP -.B pickle -Build PECL Package -.TP -.B remote-info -Information About Remote Packages -.TP -.B remote-list -List Remote Packages -.TP -.B run-scripts -Run Post-Install Scripts bundled with a package -.TP -.B run-tests -Run Regression Tests -.TP -.B search -Search remote package database -.TP -.B shell-test -Shell Script Test -.TP -.B sign -Sign a package distribution file -.TP -.B svntag -Set SVN Release Tag -.TP -.B uninstall -Un-install Package -.TP -.B update-channels -Update the Channel List -.TP -.B upgrade -Upgrade Package -.TP -.B upgrade-all -Upgrade All Packages [Deprecated in favor of calling upgrade with no parameters] - -.SH FILES -.TP 15 -.B /etc/pear.conf -The system configuration file. -.TP -.B $HOME/.pearrc -The user configuration. - -.SH SEE ALSO -.TP -To list all options, use -.PS -pear help options -.TP -To list all command shortcuts, use -.PS -pear help shortcuts -.TP -to get the help for the specified command, use -.PS -pear help \fIcommand\fP -.TP -Documentation for PEAR can be found at -.PD 0 -.P -.B http://pear.php.net/manual/ - -.SH COPYRIGHT -Copyright \(co 1997\-2009 -Stig Bakken, -Gregory Beaver, -Helgi Þormar Þorbjörnsson, -Tomas V.V.Cox, -Martin Jansen. -.P -All rights reserved. -.P -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -.P -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -.P -* Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -.SH BUGS -You can view the list of known bugs or report any new bug you found at: -.PD 0 -.P -.B http://pear.php.net/bugs/ - diff --git a/pear.conf.5 b/pear.conf.5 deleted file mode 100644 index 00216e7..0000000 --- a/pear.conf.5 +++ /dev/null @@ -1,50 +0,0 @@ -.TH PEAR.CONF 5 "2013" "File Formats" -.SH NAME -.B pear.conf -\- configuration file for \fBPEAR\fR applications. - -.SH DESCRIPTION -The \fBpear.conf\fP is used by \fBPEAR\fR applications -to store their configuration. This file should not be edited. -.P -The \fBpear\fR command provides the \fBconfig-show\fR, \fBconfig-get\fR -and \fBconfig-set\fR sub-commands needed to change the configuration. - -.SH FILES -.TP 15 -.B /etc/pear.conf -The system configuration file. -.TP -.B $HOME/.pearrc -The user configuration file. - -.SH SEE ALSO -.B pear(1) - -.SH COPYRIGHT -.PD 0 -Copyright \(co 1997\-2009 -Stig Bakken, -Gregory Beaver, -Helgi Þormar Þorbjörnsson, -Tomas V.V.Cox, -Martin Jansen. -.P -All rights reserved. -.P -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -.P -* Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -.P -* Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -.SH BUGS -You can view the list of known bugs or report any new bug you found at: -.PD 0 -.P -.B http://pear.php.net/bugs/ - diff --git a/peardev.1 b/peardev.1 deleted file mode 100644 index 62180fe..0000000 --- a/peardev.1 +++ /dev/null @@ -1,2 +0,0 @@ -.so man1/pear.1 - diff --git a/pecl.1 b/pecl.1 deleted file mode 100644 index 62180fe..0000000 --- a/pecl.1 +++ /dev/null @@ -1,2 +0,0 @@ -.so man1/pear.1 - diff --git a/php-pear-1.9.4-restcache.patch b/php-pear-1.9.4-restcache.patch deleted file mode 100644 index 361309b..0000000 --- a/php-pear-1.9.4-restcache.patch +++ /dev/null @@ -1,21 +0,0 @@ - -Workaround for: - - https://bugzilla.redhat.com/show_bug.cgi?id=747361 - ---- REST.php.restcache -+++ REST.php -@@ -234,6 +234,13 @@ - } - } - -+ if (!is_writeable($cache_dir)) { -+ // If writing to the cache dir is not going to work, silently do nothing. -+ // An ugly hack, but retains compat with PEAR 1.9.1 where many commands -+ // work fine as non-root user (w/out write access to default cache dir). -+ return true; -+ } -+ - if ($cacheid === null && $nochange) { - $cacheid = unserialize(implode('', file($cacheidfile))); - } diff --git a/php-pear-metadata.patch b/php-pear-metadata.patch deleted file mode 100644 index 137edcc..0000000 --- a/php-pear-metadata.patch +++ /dev/null @@ -1,244 +0,0 @@ -diff -up PEAR/Command/Install.php.metadata PEAR/Command/Install.php ---- PEAR/Command/Install.php.metadata 2011-07-07 00:11:24.000000000 +0200 -+++ PEAR/Command/Install.php 2012-09-26 16:02:29.829393773 +0200 -@@ -556,7 +556,13 @@ Run post-installation scripts in package - $packrootphp_dir = $this->installer->_prependPath( - $this->config->get('php_dir', null, 'pear.php.net'), - $options['packagingroot']); -- $instreg = new PEAR_Registry($packrootphp_dir); // other instreg! -+ $metadata_dir = $this->config->get('metadata_dir', null, 'pear.php.net'); -+ if ($metadata_dir) { -+ $metadata_dir = $this->installer->_prependPath( -+ $metadata_dir, -+ $options['packagingroot']); -+ } -+ $instreg = new PEAR_Registry($packrootphp_dir, false, false, $metadata_dir); // other instreg! - - 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 2011-07-07 00:11:24.000000000 +0200 -+++ PEAR/Config.php 2012-09-26 16:02:29.831393779 +0200 -@@ -87,6 +87,13 @@ if (getenv('PHP_PEAR_INSTALL_DIR')) { - } - } - -+// Default for metadata_dir -+if (getenv('PHP_PEAR_METADATA_DIR')) { -+ define('PEAR_CONFIG_DEFAULT_METADATA_DIR', getenv('PHP_PEAR_METADATA_DIR')); -+} else { -+ define('PEAR_CONFIG_DEFAULT_METADATA_DIR', ''); -+} -+ - // Default for ext_dir - if (getenv('PHP_PEAR_EXTENSION_DIR')) { - define('PEAR_CONFIG_DEFAULT_EXT_DIR', getenv('PHP_PEAR_EXTENSION_DIR')); -@@ -398,6 +405,13 @@ 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, -@@ -647,7 +661,9 @@ class PEAR_Config extends PEAR - $this->configuration['default'][$key] = $info['default']; - } - -- $this->_registry['default'] = &new PEAR_Registry($this->configuration['default']['php_dir']); -+ $this->_registry['default'] = &new PEAR_Registry( -+ $this->configuration['default']['php_dir'], false, false, -+ $this->configuration['default']['metadata_dir']); - $this->_registry['default']->setConfig($this, false); - $this->_regInitialized['default'] = false; - //$GLOBALS['_PEAR_Config_instance'] = &$this; -@@ -754,7 +770,9 @@ class PEAR_Config extends PEAR - $this->configuration[$layer] = $data; - $this->_setupChannels(); - if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) { -- $this->_registry[$layer] = &new PEAR_Registry($phpdir); -+ $this->_registry[$layer] = &new PEAR_Registry( -+ $phpdir, false, false, -+ $this->get('metadata_dir', $layer, 'pear.php.net')); - $this->_registry[$layer]->setConfig($this, false); - $this->_regInitialized[$layer] = false; - } else { -@@ -911,7 +929,9 @@ class PEAR_Config extends PEAR - - $this->_setupChannels(); - if (!$this->_noRegistry && ($phpdir = $this->get('php_dir', $layer, 'pear.php.net'))) { -- $this->_registry[$layer] = &new PEAR_Registry($phpdir); -+ $this->_registry[$layer] = &new PEAR_Registry( -+ $phpdir, false, false, -+ $this->get('metadata_dir', $layer, 'pear.php.net')); - $this->_registry[$layer]->setConfig($this, false); - $this->_regInitialized[$layer] = false; - } else { -@@ -1604,7 +1624,9 @@ class PEAR_Config extends PEAR - - if (!is_object($this->_registry[$layer])) { - if ($phpdir = $this->get('php_dir', $layer, 'pear.php.net')) { -- $this->_registry[$layer] = &new PEAR_Registry($phpdir); -+ $this->_registry[$layer] = &new PEAR_Registry( -+ $phpdir, false, false, -+ $this->get('metadata_dir', $layer, 'pear.php.net')); - $this->_registry[$layer]->setConfig($this, false); - $this->_regInitialized[$layer] = false; - } else { -@@ -2087,8 +2109,9 @@ class PEAR_Config extends PEAR - if ($layer == 'ftp' || !isset($this->_registry[$layer])) { - continue; - } -- $this->_registry[$layer] = -- &new PEAR_Registry($this->get('php_dir', $layer, 'pear.php.net')); -+ $this->_registry[$layer] = &new PEAR_Registry( -+ $this->get('php_dir', $layer, 'pear.php.net'), false, false, -+ $this->get('metadata_dir', $layer, 'pear.php.net')); - $this->_registry[$layer]->setConfig($this, false); - $this->_regInitialized[$layer] = false; - } -diff -up PEAR/DependencyDB.php.metadata PEAR/DependencyDB.php ---- PEAR/DependencyDB.php.metadata 2011-07-07 00:11:24.000000000 +0200 -+++ PEAR/DependencyDB.php 2012-09-26 16:02:29.832393782 +0200 -@@ -122,8 +122,11 @@ class PEAR_DependencyDB - - $this->_registry = &$this->_config->getRegistry(); - if (!$depdb) { -- $this->_depdb = $this->_config->get('php_dir', null, 'pear.php.net') . -- DIRECTORY_SEPARATOR . '.depdb'; -+ $dir = $this->_config->get('metadata_dir', null, 'pear.php.net'); -+ if (!$dir) { -+ $dir = $this->_config->get('php_dir', null, 'pear.php.net'); -+ } -+ $this->_depdb = $dir . DIRECTORY_SEPARATOR . '.depdb'; - } else { - $this->_depdb = $depdb; - } -@@ -766,4 +769,4 @@ class PEAR_DependencyDB - ); - } - } --} -\ Pas de fin de ligne à la fin du fichier -+} -diff -up PEAR/Installer.php.metadata PEAR/Installer.php ---- PEAR/Installer.php.metadata 2011-07-07 00:11:24.000000000 +0200 -+++ PEAR/Installer.php 2012-09-26 16:03:15.079556967 +0200 -@@ -1162,15 +1162,6 @@ class PEAR_Installer extends PEAR_Downlo - - $pkgname = $pkg->getName(); - $channel = $pkg->getChannel(); -- if (isset($this->_options['packagingroot'])) { -- $regdir = $this->_prependPath( -- $this->config->get('php_dir', null, 'pear.php.net'), -- $this->_options['packagingroot']); -- -- $packrootphp_dir = $this->_prependPath( -- $this->config->get('php_dir', null, $channel), -- $this->_options['packagingroot']); -- } - - if (isset($options['installroot'])) { - $this->config->setInstallRoot($options['installroot']); -@@ -1182,7 +1173,21 @@ class PEAR_Installer extends PEAR_Downlo - $this->config->setInstallRoot(false); - $this->_registry = &$this->config->getRegistry(); - if (isset($this->_options['packagingroot'])) { -- $installregistry = &new PEAR_Registry($regdir); -+ $regdir = $this->_prependPath( -+ $this->config->get('php_dir', null, 'pear.php.net'), -+ $this->_options['packagingroot']); -+ -+ $metadata_dir = $this->config->get('metadata_dir', null, 'pear.php.net'); -+ if ($metadata_dir) { -+ $metadata_dir = $this->_prependPath( -+ $metadata_dir, -+ $this->_options['packagingroot']); -+ } -+ $packrootphp_dir = $this->_prependPath( -+ $this->config->get('php_dir', null, $channel), -+ $this->_options['packagingroot']); -+ -+ $installregistry = &new PEAR_Registry($regdir, false, false, $metadata_dir); - if (!$installregistry->channelExists($channel, true)) { - // we need to fake a channel-discover of this channel - $chanobj = $this->_registry->getChannel($channel, true); -@@ -1820,4 +1825,4 @@ class PEAR_Installer extends PEAR_Downlo - } - - // }}} --} -\ Pas de fin de ligne à la fin du fichier -+} -diff --git a/PEAR/Registry.php b/PEAR/Registry.php -index 3a7bbb1..17de529 100644 ---- PEAR/Registry.php -+++ PEAR/Registry.php -@@ -132,23 +132,26 @@ class PEAR_Registry extends PEAR - * @access public - */ - function PEAR_Registry($pear_install_dir = PEAR_INSTALL_DIR, $pear_channel = false, -- $pecl_channel = false) -+ $pecl_channel = false, $pear_metadata_dir = '') - { - parent::PEAR(); -- $this->setInstallDir($pear_install_dir); -+ $this->setInstallDir($pear_install_dir, $pear_metadata_dir); - $this->_pearChannel = $pear_channel; - $this->_peclChannel = $pecl_channel; - $this->_config = false; - } - -- function setInstallDir($pear_install_dir = PEAR_INSTALL_DIR) -+ function setInstallDir($pear_install_dir = PEAR_INSTALL_DIR, $pear_metadata_dir = '') - { - $ds = DIRECTORY_SEPARATOR; - $this->install_dir = $pear_install_dir; -- $this->channelsdir = $pear_install_dir.$ds.'.channels'; -- $this->statedir = $pear_install_dir.$ds.'.registry'; -- $this->filemap = $pear_install_dir.$ds.'.filemap'; -- $this->lockfile = $pear_install_dir.$ds.'.lock'; -+ if (!$pear_metadata_dir) { -+ $pear_metadata_dir = $pear_install_dir; -+ } -+ $this->channelsdir = $pear_metadata_dir.$ds.'.channels'; -+ $this->statedir = $pear_metadata_dir.$ds.'.registry'; -+ $this->filemap = $pear_metadata_dir.$ds.'.filemap'; -+ $this->lockfile = $pear_metadata_dir.$ds.'.lock'; - } - - function hasWriteAccess() -@@ -181,7 +184,7 @@ class PEAR_Registry extends PEAR - { - $this->_config = &$config; - if ($resetInstallDir) { -- $this->setInstallDir($config->get('php_dir')); -+ $this->setInstallDir($config->get('php_dir'), $config->get('metadata_dir')); - } - } - -@@ -328,9 +331,9 @@ class PEAR_Registry extends PEAR - $this->_dependencyDB = &PEAR_DependencyDB::singleton($this->_config); - if (PEAR::isError($this->_dependencyDB)) { - // attempt to recover by removing the dep db -- if (file_exists($this->_config->get('php_dir', null, 'pear.php.net') . -+ if (file_exists($this->_config->get('metadata_dir', null, 'pear.php.net') . - DIRECTORY_SEPARATOR . '.depdb')) { -- @unlink($this->_config->get('php_dir', null, 'pear.php.net') . -+ @unlink($this->_config->get('metadata_dir', null, 'pear.php.net') . - DIRECTORY_SEPARATOR . '.depdb'); - } - -@@ -2328,4 +2331,4 @@ class PEAR_Registry extends PEAR - } - return $ret; - } --} -\ No newline at end of file -+} diff --git a/php-pear.spec b/php-pear.spec index fc081ac..1f7edaa 100644 --- a/php-pear.spec +++ b/php-pear.spec @@ -14,6 +14,7 @@ # Structures_Graph 1.0.4 - incorrect FSF address %global structver 1.1.1 %global xmlutil 1.3.0 +%global manpages 1.10.0dev2 # Tests are only run with rpmbuild --with tests # Can't be run in mock / koji because PEAR is the first package @@ -21,18 +22,20 @@ %global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) +%global pearprever dev2 + Summary: PHP Extension and Application Repository framework Name: php-pear -Version: 1.9.5 -Release: 11%{?dist} +Version: 1.10.0 +Release: 0.1.%{pearprever}%{?dist} Epoch: 1 -# PEAR, Archive_Tar, XML_Util, Console_Getopt are BSD +# PEAR, PEAR_Manpages, Archive_Tar, XML_Util, Console_Getopt are BSD # Structures_Graph is LGPLv3+ License: BSD and LGPLv3+ Group: Development/Languages URL: http://pear.php.net/package/PEAR -Source0: http://download.pear.php.net/package/PEAR-%{version}.tgz -# wget https://raw.github.com/pear/pear-core/master/install-pear.php +Source0: http://download.pear.php.net/package/PEAR-%{version}%{?pearprever}.tgz +# wget https://raw.githubusercontent.com/pear/pear-core/stable/install-pear.php Source1: install-pear.php Source3: strip.php Source10: pear.sh @@ -43,20 +46,7 @@ Source21: http://pear.php.net/get/Archive_Tar-%{arctarver}.tgz Source22: http://pear.php.net/get/Console_Getopt-%{getoptver}.tgz Source23: http://pear.php.net/get/Structures_Graph-%{structver}.tgz Source24: http://pear.php.net/get/XML_Util-%{xmlutil}.tgz -# Man pages -# https://github.com/pear/pear-core/pull/14 -Source30: pear.1 -Source31: pecl.1 -Source32: peardev.1 -# https://github.com/pear/pear-core/pull/16 -Source33: pear.conf.5 - - -# From RHEL: ignore REST cache creation failures as non-root user (#747361) -# TODO See https://github.com/pear/pear-core/commit/dfef86e05211d2abc7870209d69064d448ef53b3#PEAR/REST.php -Patch0: php-pear-1.9.4-restcache.patch -# Relocate Metadata -Patch1: php-pear-metadata.patch +Source25: http://pear.php.net/get/PEAR_Manpages-%{manpages}.tgz BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -73,6 +63,8 @@ Provides: php-pear(Archive_Tar) = %{arctarver} Provides: php-pear(PEAR) = %{version} Provides: php-pear(Structures_Graph) = %{structver} Provides: php-pear(XML_Util) = %{xmlutil} +Provides: php-pear(PEAR_Manpages) = %{manpages} + Provides: php-composer(pear/console_getopt) = %{getoptver} Provides: php-composer(pear/archive_tar) = %{arctarver} Provides: php-composer(pear/pear-core-minimal) = %{version} @@ -82,7 +74,7 @@ Provides: php-composer(pear/xml_util) = %{xmlutil} # Archive_Tar requires 5.2 # XML_Util, Structures_Graph require 5.3 # Console_Getopt requires 5.4 -# PEAR requires 4.4 +# PEAR requires 5.4 Requires: php(language) > 5.4 Requires: php-cli # phpci detected extension @@ -99,13 +91,8 @@ Requires: php-bz2 # Structures_Graph: none # XML_Util: pcre # optional: overload and xdebug -%if 0%{?fedora} >= 21 -%global with_html_dir 0 # for /var/www/html ownership Requires: httpd-filesystem -%else -%global with_html_dir 1 -%endif %description @@ -116,7 +103,7 @@ components. This package contains the basic PEAR components. %setup -cT # Create a usable PEAR directory (used by install-pear.php) -for archive in %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} +for archive in %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE25} do tar xzf $archive --strip-components 1 || tar xzf $archive --strip-path 1 file=${archive##*/} @@ -127,10 +114,10 @@ do [ -f package2.xml ] && mv package2.xml ${file%%-*}.xml \ || mv package.xml ${file%%-*}.xml done -cp %{SOURCE1} %{SOURCE30} %{SOURCE31} %{SOURCE32} %{SOURCE33} . +cp %{SOURCE1} . # apply patches on used PEAR during install -%patch1 -p0 -b .metadata +# None \o/ sed -e 's:@BINDIR@:%{_bindir}:' \ -e 's:@LIBDIR@:%{_localstatedir}/lib:' \ @@ -165,6 +152,8 @@ install -d $RPM_BUILD_ROOT%{peardir} \ export INSTALL_ROOT=$RPM_BUILD_ROOT +%{_bindir}/php --version + %{_bindir}/php -dmemory_limit=64M -dshort_open_tag=0 -dsafe_mode=0 \ -d 'error_reporting=E_ALL&~E_DEPRECATED' -ddetect_unicode=0 \ install-pear.php --force \ @@ -177,7 +166,8 @@ export INSTALL_ROOT=$RPM_BUILD_ROOT --test %{_datadir}/tests/pear \ --data %{_datadir}/pear-data \ --metadata %{metadir} \ - %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} + --man %{_mandir} \ + %{SOURCE0} %{SOURCE21} %{SOURCE22} %{SOURCE23} %{SOURCE24} %{SOURCE25} # Replace /usr/bin/* with simple scripts: install -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_bindir}/pear @@ -196,10 +186,7 @@ install -m 644 -D macros.pear \ # apply patches on installed PEAR tree pushd $RPM_BUILD_ROOT%{peardir} - pushd PEAR - %__patch -s --no-backup --fuzz 0 -p0 < %{PATCH0} - popd - %__patch -s --no-backup --fuzz 0 -p0 < %{PATCH1} +# none popd # Why this file here ? @@ -208,12 +195,6 @@ rm -rf $RPM_BUILD_ROOT/.depdb* $RPM_BUILD_ROOT/.lock $RPM_BUILD_ROOT/.channels $ # Need for re-registrying XML_Util install -m 644 *.xml $RPM_BUILD_ROOT%{_localstatedir}/lib/pear/pkgxml -# The man pages -install -d $RPM_BUILD_ROOT%{_mandir}/man1 -install -p -m 644 pear.1 pecl.1 peardev.1 $RPM_BUILD_ROOT%{_mandir}/man1/ -install -d $RPM_BUILD_ROOT%{_mandir}/man5 -install -p -m 644 pear.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5/ - %check # Check that no bogus paths are left in the configuration, or in @@ -330,9 +311,6 @@ fi %config(noreplace) %{_sysconfdir}/pear.conf %{macrosdir}/macros.pear %dir %{_localstatedir}/cache/php-pear -%if %{with_html_dir} -%dir %{_localstatedir}/www/html -%endif %dir %{_sysconfdir}/pear %{!?_licensedir:%global license %%doc} %license LICENSE* @@ -351,6 +329,12 @@ fi %changelog +* Fri Jul 31 2015 Remi Collet 1:1.10.0-0.1.dev2 +- update PEAR to 1.10.0dev2 +- drop all patches, merged upstream +- drop man pages from sources +- add PEAR_Manpages upstream package + * Tue Jul 21 2015 Remi Collet 1:1.9.5-12 - update Console_Getopt to 1.4.1 - update Structures_Graph to 1.1.1 diff --git a/sources b/sources index 53864cc..cb52642 100644 --- a/sources +++ b/sources @@ -1,5 +1,6 @@ f547764b567155219a87273b23b148fb Archive_Tar-1.4.0.tgz f9276d111618284efb3f900b6f753c6a Console_Getopt-1.4.1.tgz -f44a56765988dafbe348828cac2562ca PEAR-1.9.5.tgz +9fe616ae8937abce56358df10aaa183d PEAR-1.10.0dev2.tgz +f95923875fbfd1bfbd48ad5b5c27cbf7 PEAR_Manpages-1.10.0dev2.tgz ee63a3d24c94338af90334f3dd42c518 Structures_Graph-1.1.1.tgz 7639263e35f5d2bc3cdee52484a2f366 XML_Util-1.3.0.tgz