Solar, Pear, and Pyrus
| From: | Paul M Jones | Date: | Mon, 15 Sep 2008 00:28:07 +0000 |
| Subject: | Solar, Pear, and Pyrus | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-50754@lists.php.net to get a copy of this message | ||
Hi all,
Short version:
* How well do
pear installations work when you commit the installed libraries to an SCM repository (cvs, svn, git, etc), and then check the code out to a *different* base directory on the target servers?
* If it does not work well, are there workarounds that don't involve the target base directory being exactly the same as the original base?
* Does pyrus address these kinds of concerns in some way?
Long version follows.
----
As some of you may know, I maintain the Solar Framework for PHP 5.
* <http://solarphp.com>
Recently, we at Solar have settled on a standardized project structure that allows for variations in the source library organization, so that developers can incorpate libararies regardless of their directory structure. You can read more about that here:
* <http://solarphp.org/manual:getting_started:skeleton_system>
* <http://svn.solarphp.com/system/trunk/>
I am interested in giving PEAR "first-class" status in this project structure so that we can install PEAR libraries to the project itself, not to the host system or the user directory. That way, we can commit the project as a whole to SVN and check it out on the target system without needing a separate PEAR installation process.
Currently, we are experimenting with a custom wrapper around the pear command-line installer:
* <http://svn.solarphp.com/system/trunk/script/pear>
For example, this ...
{{code: bash
cd /var/www/hosts/solar-system
./script/pear install pear
./script/pear channel-discover example.com
./script/pear install example/Example
}}
... installs PEAR to $system/source/pear, then discovers the example.com channel and installs the Example package.
On examination of the pear-installed files, I noticed that the installer hard-codes replacement strings to reflect the system it is installed on. For example:
{{code: bash
INCDIR="/Users/pmjones/Sites/dev/solar-system/trunk/source/pear/php"}} Such occurrences can be found in these files: * pear/bin/pear * pear/bin/peardev * pear/bin/pecl * pear/php/pearcmd.php * pear/php/peclcmd.php Has anyone else run into trouble with this kind of thing when deploying pear-installed libraries that have been checked out from (e.g.) Subversion? Does this kind of thing happen with all
pear install operations, or only with the initial installation of PEAR itself?
Finally, does Pyrus behave the same way, or does it do something different?
Sorry for the barrage of questions, hope this all makes some kind of sense. :-)
--
Paul M. Jones
http://paul-m-jones.com/