viernes 27 de marzo de 2009

Pear for begginners like me

Esto a continuación es un casi copy/paste de un documento acerca de algo que intenté hacer hace unas semanas con pear. Casi ni recuerdo lo que era, pero antes de perder el hilo definitivamente, lo cuelgo.

nouser@nohost:/var/www$ man pear
No manual entry for pear
See 'man 7 undocumented' for help when manual pages are not available.
nouser@nohost:/var/www$ pear
Commands:
build Build an Extension From C Source
bundle Unpacks a Pecl Package
channel-add Add a Channel
channel-alias Specify an alias to a channel name
channel-delete Remove a Channel From the List
channel-discover Initialize a Channel from its server
channel-info Retrieve Information on a Channel
channel-update Update an Existing Channel
clear-cache Clear Web Services Cache
config-create Create a Default configuration file
config-get Show One Setting
config-help Show Information About Setting
config-set Change Setting
config-show Show All Settings
convert Convert a package.xml 1.0 to package.xml 2.0 format
cvsdiff Run a "cvs diff" for all files in a package
cvstag Set CVS Release Tag
download Download Package
download-all Downloads each available package from the default channel
info Display information about a package
install Install Package
list List Installed Packages In The Default Channel
list-all List All Packages
list-channels List Available Channels
list-files List Files In Installed Package
list-upgrades List Available Upgrades
login Connects and authenticates to remote server
logout Logs out from the remote server
makerpm Builds an RPM spec file from a PEAR package
package Build Package
package-dependencies Show package dependencies
package-validate Validate Package Consistency
pickle Build PECL Package
remote-info Information About Remote Packages
remote-list List Remote Packages
run-scripts Run Post-Install Scripts bundled with a package
run-tests Run Regression Tests
search Search remote package database
shell-test Shell Script Test
sign Sign a package distribution file
uninstall Un-install Package
update-channels Update the Channel List
upgrade Upgrade Package
upgrade-all Upgrade All Packages
Usage: pear [options] command [command-options]
Type "pear help options" to list all options.
Type "pear help shortcuts" to list all command shortcuts.
Type "pear help " to get the help for the specified command.

nouser@nohost:/var/www$ pear config-show
Configuration (channel pear.php.net):
=====================================
Auto-discover new Channels auto_discover
Default Channel default_channel pear.php.net
HTTP Proxy Server Address http_proxy
PEAR server [DEPRECATED] master_server pear.php.net
Default Channel Mirror preferred_mirror pear.php.net
Remote Configuration File remote_config
PEAR executables directory bin_dir /usr/bin
PEAR documentation directory doc_dir /usr/share/php/docs
PHP extension directory ext_dir /usr/lib/php5/20060613+lfs
PEAR directory php_dir /usr/share/php
PEAR Installer cache directory cache_dir /tmp/pear/cache
PEAR data directory data_dir /usr/share/php/data
PEAR Installer download download_dir /tmp/pear/cache
directory
PHP CLI/CGI binary php_bin /usr/bin/php
php.ini location php_ini
PEAR Installer temp directory temp_dir /tmp/pear/temp
PEAR test directory test_dir /usr/share/php/tests
Cache TimeToLive cache_ttl 3600
Preferred Package State preferred_state stable
Unix file mask umask 22
Debug Log Level verbose 1
PEAR password (for password
maintainers)
Signature Handling Program sig_bin /usr/bin/gpg
Signature Key Directory sig_keydir /usr/etc/pearkeys
Signature Key Id sig_keyid
Package Signature Type sig_type gpg
PEAR username (for username
maintainers)
User Configuration File Filename /home/nouser/.pearrc
System Configuration File Filename /usr/etc/pear.conf

...

nouser@nohost:/var/www$ pear install LiveUser
Failed to download pear/LiveUser within preferred state "stable", latest release is version 0.16.13, stability "beta", use "channel://pear.php.net/LiveUser-0.16.13" to install
Cannot initialize 'channel://pear.php.net/LiveUser', invalid or missing package file
Package "channel://pear.php.net/LiveUser" is not valid
install failed

nouser@nohost:/var/www$ pear list-all
All packages [Channel pear.php.net]:
====================================
Package Latest Local
pear/Benchmark 1.2.7 Framework to benchmark PHP scripts or function calls.
pear/Cache 1.5.5 Framework for caching of arbitrary data.
pear/Cache_Lite 1.7.4 Fast and Safe little cache system
pear/Config 1.10.11 Your configuration's swiss-army knife.
pear/Date_Holidays_Italy 0.1.0 Driver based class to calculate holidays in Italy.
pear/Date_Holidays_Japan 0.1.0 Driver based class to calculate holidays in Japan.
pear/Date 1.5.0a1 Generic date/time handling class for PEAR
pear/Calendar 0.5.4 A package for building Calendar data structures (irrespective of output)
pear/Date_Holidays 0.20.1 Driver based class to calculate holidays.
pear/Date_Holidays_Ireland 0.1.1 Driver based class to calculate holidays in Ireland.
pear/Date_Holidays_Iceland 0.1.1 Driver based class to calculate holidays in Iceland.
pear/Date_Holidays_Germany 0.1.1 Driver based class to calculate holidays in Germany.
pear/Date_Holidays_EnglandWales 0.1.1 Driver based class to calculate holidays in England and Wales.
pear/Date_Holidays_Discordian 0.1.1 Driver based class to calculate Discordian holidays.
pear/Date_Holidays_Denmark 0.1.1 Driver based class to calculate holidays in Denmark.
pear/Date_Holidays_Brazil 0.1.2 Driver based class to calculate holidays in Brazil.
pear/Date_Holidays_Austria 0.1.2 Driver based class to calculate holidays in Austria.
pear/Date_Holidays_Netherlands 0.1.1 Driver based class to calculate holidays in the Netherlands.
pear/Date_Holidays_Norway 0.1.1 Driver based class to calculate holidays in Norway.
pear/Date_Holidays_PHPdotNet 0.1.2 Driver based class to calculate birthdays of some members of the PHP.net community.
pear/Date_Holidays_Romania 0.1.1 Driver based class to calculate holidays in Romania.
pear/Date_Holidays_Slovenia 0.1.2 Driver based class to calculate holidays in Slovenia.
pear/Date_Holidays_Sweden 0.1.1 Driver based class to calculate holidays in Sweden.
pear/Date_Holidays_Ukraine 0.1.1 Driver based class to calculate holidays in the Ukraine.
pear/Date_Holidays_UNO 0.1.2 Driver based class to calculate holidays in UNO.
pear/Date_Holidays_USA 0.1.1 Driver based class to calculate holidays in USA.
pear/Event_Dispatcher 1.0.0 1.0.0 Dispatch notifications using PHP callbacks
pear/Event_SignalEmitter 0.3.1 Generic signal emitting class with the same API as GObject.
pear/Gtk_VarDump 1.0.0 A simple GUI to example php data trees
pear/Gtk_ScrollingLabel 1.0.0 A scrolling label for PHP-Gtk
pear/Gtk_FileDrop 1.0.2 Make Gtk widgets accept file drops
pear/Gtk_Styled 1.0.0 PHP-GTK pseudo-widgets that mimic GtkData based objects and allow the look and feel to be controlled by the programmer.
pear/Log 1.11.3 Logging Framework
pear/Payment_PayPal_SOAP 0.1.0 This package provides an easy-to-use wrapper of PHP 5's SOAP client for use with the PayPal SOAP API.
pear/Payment_Clieop 0.1.2 These classes can create a clieop03 file for you which you can send to a Dutch Bank. Ofcourse you need also a Dutch bank account.
pear/Payment_Process 0.6.6 Unified payment processor
pear/Payment_DTA 1.3.0a1 Creates DTA files containing money transaction data (Germany).
pear/FSM 1.3.0 Finite State Machine
pear/QA_Peardoc_Coverage 1.1.1 PEAR documentation coverage analysis.
pear/Science_Chemistry 1.1.0 Classes to manipulate chemical objects: atoms, molecules, etc.
pear/Services_Akismet Services_Akismet is a package to use Akismet spam-filtering from PHP
pear/Stream_SHM 1.0.0 Shared Memory Stream
pear/Stream_Var 1.0.0 Allows stream based access to any variable.
pear/VersionControl_SVN 0.3.1 Simple OO wrapper interface for the Subversion command-line client.
pear/Console_Getopt 1.2.3 Command-line option parser
pear/PEAR 1.6.1 PEAR Base System
pear/Archive_Tar 1.3.2 Tar file management class
pear/Structures_Graph 1.0.2 Graph datastructure manipulation library
nouser@nohost:/var/www$ pear search liveuser
Retrieving data...0%.Matched packages, channel pear.php.net:
=======================================
Package Stable/(Latest) Local
LiveUser 0.16.13 (beta) User authentication and permission management framework
LiveUser_Admin 0.3.9 (beta) User authentication and permission management framework
nouser@nohost:/var/www$ pear install LiveUser
Failed to download pear/LiveUser within preferred state "stable", latest release is version 0.16.13, stability "beta", use "channel://pear.php.net/LiveUser-0.16.13" to install
Cannot initialize 'channel://pear.php.net/LiveUser', invalid or missing package file
Package "channel://pear.php.net/LiveUser" is not valid
install failed
nouser@nohost:/var/www$ pear install LiveUser-0.16.13
Cannot install, php_dir for channel "pear.php.net" is not writeable by the current user
nouser@nohost:/var/www$ sudo pear install LiveUser-0.16.13
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
WARNING: "pear/MDB" is deprecated in favor of "pear/MDB2"
WARNING: "pear/XML_Tree" is deprecated in favor of "pear/XML_Serializer"
Did not download optional dependencies: pear/Log, pear/DB, pear/MDB, pear/MDB2, pear/MDB2_Schema, pear/XML_Tree, pear/Crypt_RC4, use --alldeps to download automatically
pear/LiveUser can optionally use package "pear/Log" (version >= 1.7.0)
pear/LiveUser can optionally use package "pear/DB" (version >= 1.6.0)
pear/LiveUser can optionally use package "pear/MDB" (version >= 1.1.4)
pear/LiveUser can optionally use package "pear/MDB2" (version >= 2.0.0)
pear/LiveUser can optionally use package "pear/MDB2_Schema"
pear/LiveUser can optionally use package "pear/XML_Tree"
pear/LiveUser can optionally use package "pear/Crypt_RC4"
pear/LiveUser can optionally use PHP extension "mcrypt"
downloading LiveUser-0.16.13.tgz ...
Starting to download LiveUser-0.16.13.tgz (76,849 bytes)
.................done: 76,849 bytes
install ok: channel://pear.php.net/LiveUser-0.16.13