[Phpdocumentor-cvs] Re: [Pear_server-cvs] [PEAR_Server] finally got PEAR_PackageFileManager2 working

Davey Shafik davey at php.net
Fri Nov 4 21:13:56 CST 2005


You know what would be kinda neat to add to PEAR_Server?

Automagic Packaging.

By that I mean you could upload a standard tar/tar.gz file and it would 
create the package.

Now to make this cool we would add a form to input all the unique things 
for the package e.g.:

* Release Notes
* Version
* License (defaults to current one)
* API Version
* Dependencies

It would automagically filter out SVN and CVS files, and also (even more 
cool) automagically scan the file for a) BC Breaks (and depending on 
settings, deny the release, bump the version to next major one or just 
ignore it) b) API changes (and generate a new API version number) c) 
Next version number (I would suggest a set of checkboxes/radio like: 
Whats New? [ ] Major Version [ ] Feature Additions [ ] Bug Fixes

Dunno, maybe not worth it.

- Davey


Greg Beaver <CelloG at phpdoc.org> phpdocumentor devel wrote:

> Commit in *PEAR_Server* on MAIN
> makepackage.php <#file1> 	+7 	-23 	1.4 
> <http://cvs.phpdoc.org/co.php/PEAR_Server/makepackage.php?r=1.4> -> 
> <http://cvs.phpdoc.org/diff.php/PEAR_Server/makepackage.php?r1=1.4&r2=1.5> 
> 1.5 <http://cvs.phpdoc.org/co.php/PEAR_Server/makepackage.php?r=1.5>
> package.xml <#file2> 	+9 	-7 	1.40 
> <http://cvs.phpdoc.org/co.php/PEAR_Server/package.xml?r=1.40> -> 
> <http://cvs.phpdoc.org/diff.php/PEAR_Server/package.xml?r1=1.40&r2=1.41> 
> 1.41 <http://cvs.phpdoc.org/co.php/PEAR_Server/package.xml?r=1.41>
>
> 	+16 	-30 	
>
> 2 modified files
>
>finally got PEAR_PackageFileManager2 working
>fix script, generate package.xml
>  
>
> ------------------------------------------------------------------------
> PEAR_Server <http://cvs.phpdoc.org/cvs.php/PEAR_Server>
> *makepackage.php* 1.4 
> <http://cvs.phpdoc.org/co.php/PEAR_Server/makepackage.php?r=1.4> -> 
> <http://cvs.phpdoc.org/diff.php/PEAR_Server/makepackage.php?r1=1.4&r2=1.5> 
> 1.5 <http://cvs.phpdoc.org/co.php/PEAR_Server/makepackage.php?r=1.5>
>
>diff -u -r1.4 -r1.5
>--- makepackage.php	4 Oct 2005 04:58:51 -0000	1.4
>+++ makepackage.php	4 Nov 2005 23:52:16 -0000	1.5
>@@ -9,35 +9,19 @@
>
>  * @var PEAR_PackageFileManager
>  */
> PEAR::setErrorHandling(PEAR_ERROR_DIE);
>  
>
>+chdir(dirname(__FILE__));
>  
>
> $pfm = PEAR_PackageFileManager2::importOptions('package.xml', array(
>  
>
>-'state' => 'devel',
>-'version' => '0.18.2',
>-'notes' =>
>-'
>-   * Fixes bug which prevented non-admin leads from releasing.
>-   * Adds support for groupings of user handles by channel
>-   * Fixes bug relating to DB_DataObject configuration when channel database 
>-     name is not the default.
>-   * Minor revisions for clarity in install/update messages
>-   * Check to see if specified database exists before attempting to create it
>-     on first-time installations.
>-',
>  
>
> 'packagedirectory' => dirname(__FILE__),
>  
>
>-'filelistgenerator' => 'CVS',
>  
>
> 'baseinstalldir' => 'Chiara/PEAR',
>  
>
>-'package' => 'Chiara_PEAR_Server',
>  
>
>+'filelistgenerator' => 'CVS',
>  
>
> 'ignore' => array('test.php', 'MDB.php', 'pearweb.php', '*Frontend/Xmlrpc*.php',
>     '*Server/Channels.php', 'Dbsetup.php', 'makepackage.php', 'restsetup.php'),
> 'simpleoutput' => true,
>  
>
>-'summary' => 'A lightweight pearweb-compatible channel server for hosting a PEAR channel',
>-'description' => 'Chiara_PEAR_Server provides a modular
>-approach to implementing the channel protocol.
>-By default, a lightweight database is used,
>-accessed by a DB_DataObject backend,
>-with an administrative frontend using HTML_QuickForm and
>-REST-based static frontend
>-Chiara_PEAR_Server replaces PEAR_Server',
>  
>
> ));
>  
>
>+$pfm->setReleaseStability('alpha');
>+$pfm->setReleaseVersion('0.18.3');
>+$pfm->setNotes(' * fix missing brace in mysqlinstall.php - now post-install script works
>+');
>  
>
> $pfm->addMaintainer('cellog', 'lead', 'Greg Beaver', 'cellog at php.net');
> $pfm->setPhpDep('5.0.0');
> $pfm->setPearinstallerDep('1.4.2');
>  
>
>@@ -84,8 +68,8 @@
>
>     $task->getParam('ssl', 'protocol clients should use to connect (http or https)', 'string', 'http'),
>     )
>     );
>  
>
>+$pfm->addPostinstallTask($task, 'Server/mysqlinstall.php');
>  
>
> $pfm->generateContents();
>  
>
>-$pfm->addTaskToFile('Server/mysqlinstall.php', $task);
>  
>
> if (isset($_SERVER['argv']) && $_SERVER['argv'][1] == 'make') {
>     $pfm->writePackageFile();
> } else {
>  
>
> ------------------------------------------------------------------------
> PEAR_Server <http://cvs.phpdoc.org/cvs.php/PEAR_Server>
> *package.xml* 1.40 
> <http://cvs.phpdoc.org/co.php/PEAR_Server/package.xml?r=1.40> -> 
> <http://cvs.phpdoc.org/diff.php/PEAR_Server/package.xml?r1=1.40&r2=1.41> 
> 1.41 <http://cvs.phpdoc.org/co.php/PEAR_Server/package.xml?r=1.41>
>
>diff -u -r1.40 -r1.41
>--- package.xml	3 Nov 2005 05:42:59 -0000	1.40
>+++ package.xml	4 Nov 2005 23:52:16 -0000	1.41
>@@ -1,5 +1,5 @@
>
> <?xml version="1.0" encoding="UTF-8"?>
>  
>
>-<package packagerversion="1.4.2" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
>  
>
>+<package packagerversion="1.4.3" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
>  
>
>  <name>Chiara_PEAR_Server</name>
>  <channel>pear.chiaraquartet.net</channel>
>  <summary>A lightweight pearweb-compatible channel server for hosting a PEAR channel</summary>
>  
>
>@@ -28,8 +28,8 @@
>
>   <email>clay at killersoft.com</email>
>   <active>yes</active>
>  </lead>
>  
>
>- <date>2005-10-04</date>
>- <time>23:31:05</time>
>  
>
>+ <date>2005-11-04</date>
>+ <time>17:50:14</time>
>  
>
>  <version>
>   <release>0.18.3</release>
>   <api>0.18.0</api>
>  
>
>@@ -39,7 +39,8 @@
>
>   <api>alpha</api>
>  </stability>
>  <license uri="http://www.php.net/license">PHP License</license>
>  
>
>- <notes>* Fix fatal error in post-install script.</notes>
>  
>
>+ <notes> * fix missing brace in mysqlinstall.php - now post-install script works
>+ </notes>
>  
>
>  <contents>
>   <dir baseinstalldir="Chiara/PEAR" name="/">
>    <dir name="data">
>  
>
>@@ -198,8 +199,8 @@
>
>      </tasks:postinstallscript>
>     </file>
>     <file name="Package.php" role="php" />
>  
>
>-    <file name="REST.php" role="php" />
>  
>
>     <file name="Release.php" role="php" />
>  
>
>+    <file name="REST.php" role="php" />
>  
>
>    </dir> <!-- /Server -->
>    <file name="Server.php" role="php" />
>   </dir> <!-- / -->
>  
>
>@@ -537,9 +538,10 @@
>
>     <release>alpha</release>
>     <api>alpha</api>
>    </stability>
>  
>
>-   <date>2005-10-04</date>
>  
>
>+   <date>2005-11-04</date>
>  
>
>    <license>PHP License</license>
>  
>
>-   <notes>* Fix fatal error in post-install script.</notes>
>  
>
>+   <notes> * fix missing brace in mysqlinstall.php - now post-install script works
>+   </notes>
>  
>
>   </release>
>  </changelog>
> </package>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Pear_server-cvs mailing list
>Pear_server-cvs at lists.bluga.net
>http://lists.bluga.net/mailman/listinfo/pear_server-cvs
>



More information about the Phpdocumentor-cvs mailing list