From 9da073994d97ad4a7c584dfd89c9be9464b95478 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 10 Apr 2014 09:14:51 +0200 Subject: php-pear: sync with rawhide --- macros.pear | 8 +- pear.1 | 271 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pear.conf.5 | 50 +++++++++++ pear.sh | 5 +- peardev.1 | 2 + pecl.1 | 2 + pecl.sh | 5 +- php-pear.spec | 114 +++++++++++++++++++++--- 8 files changed, 441 insertions(+), 16 deletions(-) create mode 100644 pear.1 create mode 100644 pear.conf.5 create mode 100644 peardev.1 create mode 100644 pecl.1 diff --git a/macros.pear b/macros.pear index 5862d80..471c28d 100644 --- a/macros.pear +++ b/macros.pear @@ -1,8 +1,8 @@ # # Define full path to pear/pecl commands to be used in scriptlets: # -%__pear %{_bindir}/pear -%__pecl %{_bindir}/pecl +%__pear @BINDIR@/pear +%__pecl @BINDIR@/pecl # # Define PEAR directories used in php-pear-* spec files @@ -26,8 +26,8 @@ # # Define XML directories to store package registration information: # -%pear_xmldir %{_localstatedir}/lib/pear/pkgxml -%pecl_xmldir %{_localstatedir}/lib/pear/pkgxml +%pear_xmldir @LIBDIR@/pear/pkgxml +%pecl_xmldir @LIBDIR@/pear/pkgxml # # Define macros to be used in scriplets for php-pecl-* spec files: diff --git a/pear.1 b/pear.1 new file mode 100644 index 0000000..ed91290 --- /dev/null +++ b/pear.1 @@ -0,0 +1,271 @@ +.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 new file mode 100644 index 0000000..00216e7 --- /dev/null +++ b/pear.conf.5 @@ -0,0 +1,50 @@ +.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/pear.sh b/pear.sh index 36be863..aa2c1a9 100644 --- a/pear.sh +++ b/pear.sh @@ -1,5 +1,8 @@ #!/bin/sh -exec /usr/bin/php -C -q \ +exec /usr/bin/php -C \ + -n \ + -d extension=posix.so \ + -d extension=xml.so \ -d include_path=/usr/share/pear \ -d date.timezone=UTC \ -d output_buffering=1 \ diff --git a/peardev.1 b/peardev.1 new file mode 100644 index 0000000..62180fe --- /dev/null +++ b/peardev.1 @@ -0,0 +1,2 @@ +.so man1/pear.1 + diff --git a/pecl.1 b/pecl.1 new file mode 100644 index 0000000..62180fe --- /dev/null +++ b/pecl.1 @@ -0,0 +1,2 @@ +.so man1/pear.1 + diff --git a/pecl.sh b/pecl.sh index 58cbdc5..7c56e2c 100644 --- a/pecl.sh +++ b/pecl.sh @@ -1,5 +1,8 @@ #!/bin/sh -exec /usr/bin/php -C -q \ +exec /usr/bin/php -C \ + -n \ + -d extension=posix.so \ + -d extension=xml.so \ -d include_path=/usr/share/pear \ -d date.timezone=UTC \ -d output_buffering=1 \ diff --git a/php-pear.spec b/php-pear.spec index 68b720b..5c367c3 100644 --- a/php-pear.spec +++ b/php-pear.spec @@ -12,10 +12,12 @@ # Can't be run in mock / koji because PEAR is the first package %global with_tests %{?_with_tests:1}%{!?_with_tests:0} +%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) + Summary: PHP Extension and Application Repository framework Name: php-pear Version: 1.9.4 -Release: 16%{?dist}.1 +Release: 25%{?dist} Epoch: 1 # PEAR, Archive_Tar, XML_Util are BSD # Console_Getopt is PHP @@ -35,6 +37,15 @@ 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 @@ -55,14 +66,18 @@ Provides: php-pear(Structures_Graph) = %{structver} Provides: php-pear(XML_Util) = %{xmlutil} Obsoletes: php-pear-XML-Util < %{xmlutil} Provides: php-pear-XML-Util = %{xmlutil} + +%if "%{?vendor}" == "Remi Collet" # From other third party Obsoletes: php53-pear Obsoletes: php53u-pear -%if "%{php_version}" > "5.4" -Obsoletes: php54-pear +Obsoletes: php54-pear +%if "%{php_version}" > "5.5" +Obsoletes: php55u-pear %endif %if "%{php_version}" > "5.5" -Obsoletes: php55-pear +Obsoletes: php56u-pear +%endif %endif Requires: php-cli @@ -101,11 +116,15 @@ do [ -f package2.xml ] && mv package2.xml ${file%%-*}.xml \ || mv package.xml ${file%%-*}.xml done -cp %{SOURCE1} . +cp %{SOURCE1} %{SOURCE30} %{SOURCE31} %{SOURCE32} %{SOURCE33} . # apply patches on used PEAR during install %patch1 -p0 -b .metadata +sed -e 's:@BINDIR@:%{_bindir}:' \ + -e 's:@LIBDIR@:%{_localstatedir}/lib:' \ + %{SOURCE13} > macros.pear + %build # This is an empty build section. @@ -129,7 +148,8 @@ install -d $RPM_BUILD_ROOT%{peardir} \ $RPM_BUILD_ROOT%{_localstatedir}/cache/php-pear \ $RPM_BUILD_ROOT%{_localstatedir}/www/html \ $RPM_BUILD_ROOT%{_localstatedir}/lib/pear/pkgxml \ - $RPM_BUILD_ROOT%{_sysconfdir}/rpm \ + $RPM_BUILD_ROOT%{_docdir}/pecl \ + $RPM_BUILD_ROOT%{_datadir}/tests/pecl \ $RPM_BUILD_ROOT%{_sysconfdir}/pear export INSTALL_ROOT=$RPM_BUILD_ROOT @@ -160,8 +180,8 @@ install -m 755 %{SOURCE12} $RPM_BUILD_ROOT%{_bindir}/peardev %{_bindir}/php -r "print_r(unserialize(substr(file_get_contents('$RPM_BUILD_ROOT%{_sysconfdir}/pear.conf'),17)));" -install -m 644 -c %{SOURCE13} \ - $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.pear +install -m 644 -D macros.pear \ + $RPM_BUILD_ROOT%{macrosdir}/macros.pear # apply patches on installed PEAR tree pushd $RPM_BUILD_ROOT%{peardir} @@ -177,6 +197,12 @@ 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 @@ -220,17 +246,42 @@ fi %post # force new value as pear.conf is (noreplace) +current=$(%{_bindir}/pear config-get test_dir system) +if [ "$current" != "%{_datadir}/tests/pear" ]; then %{_bindir}/pear config-set \ test_dir %{_datadir}/tests/pear \ system >/dev/null || : +fi +current=$(%{_bindir}/pear config-get data_dir system) +if [ "$current" != "%{_datadir}/pear-data" ]; then %{_bindir}/pear config-set \ data_dir %{_datadir}/pear-data \ system >/dev/null || : +fi +current=$(%{_bindir}/pear config-get metadata_dir system) +if [ "$current" != "%{metadir}" ]; then %{_bindir}/pear config-set \ metadata_dir %{metadir} \ system >/dev/null || : +fi + +current=$(%{_bindir}/pear config-get -c pecl doc_dir system) +if [ "$current" != "%{_docdir}/pecl" ]; then +%{_bindir}/pear config-set \ + -c pecl \ + doc_dir %{_docdir}/pecl \ + system >/dev/null || : +fi + +current=$(%{_bindir}/pear config-get -c pecl test_dir system) +if [ "$current" != "%{_datadir}/tests/pecl" ]; then +%{_bindir}/pear config-set \ + -c pecl \ + test_dir %{_datadir}/tests/pecl \ + system >/dev/null || : +fi %triggerpostun -- php-pear-XML-Util @@ -242,22 +293,65 @@ fi %files %defattr(-,root,root,-) %{peardir} -%{metadir} +%dir %{metadir} +%{metadir}/.channels +%verify(not mtime size md5) %{metadir}/.depdb +%verify(not mtime)%{metadir}/.depdblock +%verify(not mtime size md5)%{metadir}/.filemap +%verify(not mtime)%{metadir}/.lock +%{metadir}/.registry +%{metadir}/pkgxml %{_bindir}/* %config(noreplace) %{_sysconfdir}/pear.conf -%{_sysconfdir}/rpm/macros.pear +%{macrosdir}/macros.pear %dir %{_localstatedir}/cache/php-pear %dir %{_localstatedir}/www/html %dir %{_sysconfdir}/pear %doc README* LICENSE* %dir %{_docdir}/pear %doc %{_docdir}/pear/* +%dir %{_docdir}/pecl %dir %{_datadir}/tests +%dir %{_datadir}/tests/pecl %{_datadir}/tests/pear %{_datadir}/pear-data +%{_mandir}/man1/pear.1* +%{_mandir}/man1/pecl.1* +%{_mandir}/man1/peardev.1* +%{_mandir}/man5/pear.conf.5* %changelog +* Wed Apr 9 2014 Remi Collet 1:1.9.4-25 +- only enable needed extensions for pear/pecl commands +- fix typo in pear man page + +* Tue Feb 11 2014 Remi Collet 1:1.9.4-24 +- Expand path in macros.pear +- Install macros to /usr/lib/rpm/macros.d where available + +* Tue Oct 15 2013 Remi Collet 1:1.9.4-23 +- set pecl test_dir to /usr/share/tests/pecl + +* Mon Oct 14 2013 Remi Collet 1:1.9.4-22 +- set pecl doc_dir to /usr/share/doc/pecl + +* Sun Aug 04 2013 Fedora Release Engineering - 1:1.9.4-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Wed Jul 10 2013 Remi Collet 1:1.9.4-20 +- add man page for pear.conf file + +* Tue Jun 18 2013 Remi Collet 1:1.9.4-19 +- add man pages for pear, peardev and pecl commands + +* Fri May 3 2013 Remi Collet 1:1.9.4-18 +- don't verify metadata file content + +* Thu Apr 25 2013 Remi Collet 1:1.9.4-17 +- improve post scriptlet to avoid updating pear.conf + when not needed + * Wed Mar 20 2013 Remi Collet 1:1.9.4-16 - sync with rawhide -- cgit