cvs: peardoc /en/guide/migrating channels.xml customroles.xml customtasks.xml intro.xml postinstall.xml /en/guide/migrating/channels xml.xml
xmlrpcfunctions.xml
| From: | Greg Beaver | Date: | Sat, 26 Mar 2005 05:58:20 +0000 |
| Subject: | cvs: peardoc /en/guide/migrating channels.xml customroles.xml customtasks.xml intro.xml postinstall.xml /en/guide/migrating/channels xml.xml xmlrpcfunctions.xml |
||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-5742@lists.php.net to get a copy of this message | ||
cellog Sat Mar 26 00:58:20 2005 EDT
Added files:
/peardoc/en/guide/migrating channels.xml customroles.xml
customtasks.xml intro.xml
postinstall.xml
/peardoc/en/guide/migrating/channels xml.xml xmlrpcfunctions.xml
Log:
add new docs on
- channel.xml
unfinished docs for
- xml-rpc functions channels should support
- custom file roles
- custom install tasks
- post-install scripts
http://cvs.php.net/co.php/peardoc/en/guide/migrating/channels.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/channels.xml +++ peardoc/en/guide/migrating/channels.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="guide.migrating.channels"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> <date>$Date: 2005/03/26 05:58:19 $</date> </chapterinfo> <title>Channels</title> <simpara> Channels provide a robust and effective way of distributing dependencies, and are the next advance in distributed development. Channels allow developers of applications to provide a 1-step method of installing diverse packages and other application components with a known directory structure and with full dependency validation </simpara> <simpara> Currently, the only solution to depending on code from several sources is to bundle the code. This has several bad side effects, the most obvious of which is that code size increases dramatically, and makes upgrading for a simple bug fix a complicated download for the user. </simpara> <simpara> Channels allow an application developer to depend on packages from pear.php.net, a package from pear.example.com, and others. The user will only need to install/upgrade from a single source using the pear installer. With the current state of affairs, the pear installer is only really useful for installing, well, PEAR packages. Because of this difficulty (among others), traditionally very few packages are available as PEAR packages that can be installed with the PEAR installer. </simpara> <simpara> PEAR 1.4 aims to eliminate this and other barriers to application development. </simpara> <warning> <title>Incomplete documentation</title> <para>Documentation is not yet complete</para> </warning> &guide.migrating.channels.xml; &guide.migrating.channels.xmlrpcfunctions; </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/customroles.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/customroles.xml +++ peardoc/en/guide/migrating/customroles.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="guide.migrating.customroles"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> <date>$Date: 2005/03/26 05:58:19 $</date> </chapterinfo> <title>Custom File Roles</title> <warning> <title>Incomplete documentation</title> <para>Documentation is not yet complete</para> </warning> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/customtasks.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/customtasks.xml +++ peardoc/en/guide/migrating/customtasks.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="guide.migrating.customtasks"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> <date>$Date: 2005/03/26 05:58:19 $</date> </chapterinfo> <title>Custom File Tasks</title> <warning> <title>Incomplete documentation</title> <para>Documentation is not yet complete</para> </warning> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/intro.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/intro.xml +++ peardoc/en/guide/migrating/intro.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="guide.migrating.intro"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> <date>$Date: 2005/03/26 05:58:19 $</date> </chapterinfo> <title>Introduction</title> <simpara> The debut of PEAR 1.4.0 is very exciting. This chapter documents all of the differences between PEAR 1.3.x and the new features introduced in PEAR 1.4. </simpara> <simpara> The most significant change in PEAR 1.4 is the addition of <link linkend="guide.migrating.channels">channels</link>, a simple and effective method of distributing application development. This change has driven most of the other changes to PEAR, and in fact full application support is a major goal of this release. </simpara> <simpara> In addition to channels, support for customization of the install process has been seriously enhanced with the addition of three essential features for application development: </simpara> <para> <itemizedlist> <listitem> <para> <link linkend="guide.migrating.customroles">Custom file installation roles</link> in package.xml </para> </listitem> <listitem> <para> <link linkend="guide.migrating.customtasks">Custom file tasks</link> in package.xml </para> </listitem> <listitem> <para> <link linkend="guide.migrating.postinstall">Post-installation scripts</link> </para> </listitem> </itemizedlist> </para> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/postinstall.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/postinstall.xml +++ peardoc/en/guide/migrating/postinstall.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="guide.migrating.postinstall"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> <date>$Date: 2005/03/26 05:58:19 $</date> </chapterinfo> <title>Post-installation Scripts</title> <warning> <title>Incomplete documentation</title> <para>Documentation is not yet complete</para> </warning> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/channels/xml.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/channels/xml.xml +++ peardoc/en/guide/migrating/channels/xml.xml <!-- $Revision: 1.1 $ --> <refentry id="guide.migrating.channels.xml"> <refnamediv> <refname>channel.xml</refname> <refpurpose>The channel definition file</refpurpose> </refnamediv> <refsect1 id="guide.migrating.channels.xml.intro"> <title>How to describe a channel</title> <para> Discovery of a channel's capabilities is extremely flexible. The XSD schema defining channel.xml can be found at <ulink url="http://pear.php.net/dtd/channel-1.0.xsd">http://pear.php.net/dtd/channel-1.0.xsd</ulink>. Channel.xml defines: <orderedlist> <listitem> <para> the channel name </para> </listitem> <listitem> <para> an optional suggested user alias for the channel </para> </listitem> <listitem> <para> a brief summary of the channel's purpose </para> </listitem> <listitem> <para> an optional package to perform custom validation of packages on both download and packaging </para> </listitem> <listitem> <para> a list of protocols supported by a channel (XML-RPC, SOAP, and REST are supported) </para> </listitem> <listitem> <para> a list of mirrors and the protocols they support. </para> </listitem> </orderedlist> </para> <para> Here is a sample channel.xml with all elements: </para> <para> <programlisting role="xml"> <channel version="1.0" xsi:schemaLocation="http://pear.php.net/channel-1.0 http://pear.php.net/dtd/channel-1.0.xsd"> <link linkend="guide.migrating.channels.xml.name"><name></link>pear.example.com</name> <link linkend="guide.migrating.channels.xml.suggestedalias"><suggestedalias></link>foo</suggestedalias> <link linkend="guide.migrating.channels.xml.summary"><summary></link>Example channel.xml</summary> <link linkend="guide.migrating.channels.xml.validatepackage"><validatepackage</link> version="1.3.4">Foo_Validate</validatepackage> <link linkend="guide.migrating.channels.xml.mirrors"><servers></link> <link linkend="guide.migrating.channels.xml.mirrors"><primary</link> port="8080" ssl="yes"> <link linkend="guide.migrating.channels.xml.protocols"><xmlrpc></link> <!-- default path is xmlrpc.php --> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.1">package.getDownloadURL</function> <function version="1.0">package.getDepDownloadURL</function> <function version="1.1">package.getDepDownloadURL</function> <function version="1.0">package.search</function> <function version="1.0">channel.listAll</function> </xmlrpc> <link linkend="guide.migrating.channels.xml.protocols"><rest></link> <!-- no default path, all must be defined in baseurl --> <baseurl type="package">http://pear.example.com/rest/1.0/package</baseurl> <baseurl type="category">http://pear.example.com/rest/1.0/category</baseurl> </rest> <link linkend="guide.migrating.channels.xml.protocols"><soap</link> path="soapy.php"> <!-- default path is soap.php --> <function version="1.0">package.listAll</function> </soap> </primary> <link linkend="guide.migrating.channels.xml.mirrors"><mirror</link> server="foo2.example.com/pearmirror"> <xmlrpc path="mirrorxmlrpc.php"> <!-- default path is xmlrpc.php --> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.1">package.getDownloadURL</function> <function version="1.0">package.getDepDownloadURL</function> <function version="1.1">package.getDepDownloadURL</function> <function version="1.0">package.search</function> </xmlrpc> <rest> <!-- no default path, all must be defined in baseurl --> <baseurl type="package">http://foo2.example.com/rest/1.0/package</baseurl> </rest> </mirror> </servers> </channel> </programlisting> </para> <refsect2 id="guide.migrating.channels.xml.name"> <title><name></title> <para> A channel's name should be the name of the server that users would browse to in order to learn more about the packages being offered. For instance, PEAR packages are located in the pear.php.net channel. PECL packages are located in the pecl.php.net channel. Note that for backwards compatibility, all existing packages based on package.xml version 1.0 are in the pear.php.net channel. </para> <para> The benefit that comes from using the server name as the channel name is that auto-discovery becomes a real possibility, as well as ease of locating packages increases dramatically. </para> <para> A channel need not be located in the document root, a channel can contain a path. This is a perfectly valid channel name: <filename>foo.example.com/path/to/pear</filename>. Note that users would have to type: </para> <para> <screen> <![CDATA[ $ pear install foo.example.com/path/to/pear/Packagename ]]> </screen> </para> <para> Unless you provide a <suggestedalias>. </para> </refsect2> <refsect2 id="guide.migrating.channels.xml.suggestedalias"> <title><suggestedalias></title> <para> <suggestedalias> defines a shorter, more friendly name to use when installing packages from a channel. For instance, the pear.php.net channel's suggested alias is "pear". The best aliases for a channel will be no more than 6 characters long - remember, a user must type them often when installing or upgrading, and this can be tedious for longer aliases. </para> <para> Rather than call this tag <alias>, as it was originally named, the tag is named <suggestedalias> in order to provide the user some latitude. If the user does not like the alias suggested by the channel owners, he or she can easily re-alias a channel through the channel-alias command. </para> </refsect2> <refsect2 id="guide.migrating.channels.xml.summary"> <title><summary></title> <para> This tag provides a short description of what packages the user should expect to find on this channel. The summary is what users will see when the use the list-channels command. </para> </refsect2> <refsect2 id="guide.migrating.channels.xml.validatepackage"> <title><validatepackage></title> <para> Most channels will be satisfied with the restrictions placed upon package naming, versioning, and so on that PEAR provides by default. However, for some channels, the validation will be too strict, and others, too relaxed. The <validatepackage> tag provides the next level of customization. </para> <para> If omitted, the installer assumed that the <classname>PEAR_Validate</classname> class should be used. Note that a looser version validation is provided by the <classname>PEAR_Validate_PECL</classname> class, for channels like pecl.php.net that do not wish to deal with PEAR's warnings on version transgressions. </para> <para> <validatepackage> requires a version attribute and text content. The text content must be the name of a package that can be installed via: </para> <para> <screen> <![CDATA[ $ pear install channelname.example.com/Packagename-version ]]> </screen> </para> <para> as in: </para> <para> <screen> <![CDATA[ $ pear install pear.example.com/Foo_Validate-1.3.4 ]]> </screen> </para> <para> for the sample channel.xml at the beginning of this section. In addition, the package must provide a single class named after the package in a file using the PEAR naming conventions (all underscores "_" converted into path separators "/" so that Foo_Validate is located in Foo/Validate.php), and this class should extend PEAR_Validate. Methods beginning with "validate" like <function>validateVersion</function> are intended to be overridden by validation classes for use in extending existing validation functionality. </para> </refsect2> <refsect2 id="guide.migrating.channels.xml.mirrors"> <title><servers>: <primary> and <mirror></title> <para> Mirroring is explicitly supported in channel.xml and in the PEAR installer. Users can choose their favorite mirror via the <filename>default_channel</filename> configuration option, and channel.xml can list all the possible mirrors using the (surprise) <mirror> tag. </para> <para> The <primary> tag is used to define the location of protocols, and to list the protocols that are supported by the main channel server. Optional attributes can be used to modify how the PEAR installer will attempt to connect to the server. The "port" attribute can be used to define how the installer will connect to XML-RPC and SOAP services. REST services are always controlled by the individual <baseurl> tags. </para> </refsect2> <refsect2 id="guide.migrating.channels.xml.protocols"> <title><xmlrpc>, <soap>, <rest></title> <para> channel.xml knows about the XML-RPC, SOAP, and REST protocols for web services. However, the PEAR installer only supports XML-RPC currently, and may support REST shortly. No support for SOAP is planned for the near future. However, should it ever be implemented, channel.xml is ready. </para> <para> The <xmlrpc> and <soap> tags have identical formats. Both tags can contain an optional attribute "path" that tells the PEAR installer which URL to query. By default, the path is protocol.php, as in xmlrpc.php or soap.php. In other words, to access XML-RPC functions for the pear.example.com channel defined in the sample channel.xml, the installer would query <filename>https://pear.example.com:8080/xmlrpc.php</filename> for XML-RPC functions, but would query <filename>https://pear.example.com:8080/soapy.php</filename> for SOAP functions. </para> <para> The <rest> tag reflects the design concept behind REST: each resource is defined by a base URL in tag <baseurl> that is then used by the installer along with hyperlinks to glean the same information that XML-RPC or SOAP would provide. Required attribute "type" tells the installer what kind of information is provided by the base URL, and how to parse that information. </para> <refsect3 id="guide.migrating.channels.xml.protocols.function"> <title><function></title> <para> The <function> tag is quite simple. A required version attribute informs the installer what the API is, and the text content informs the installer what the name of the function is. Note that multiple functions with different versions can co-exist peacefully, as in: <programlisting role="xml"> <![CDATA[ <function version="1.0">package.getDownloadURL</function> <function version="1.1">package.getDownloadURL</function> ]]> </programlisting> If a newer API is backwards-compatible, always define every possible API version in order to prevent older installer versions from giving up. </para> </refsect3> </refsect2> <refsect2 id="guide.migrating.channels.xml.whynotwsdl"> <title>Why not use a standard such as wsdl?</title> <para> Some of you may be asking "why create another standard for web services discovery?" The answer is simple: channel.xml does not supplant the role that WSDL has for java, or XML-RPC introspection occupies. channnel.xml is a layer on top of these technologies. The point is to quickly list the remote protocols that are supported, not to describe what they do. </para> <para> The PEAR installer is specialized enough that a generic listing of parameters and return values is entirely unnecessary: the installer knows exactly what xml-rpc function package.info version 1.0 requires and what it returns. Any other information simply adds wasted bandwidth and disk space. </para> </refsect2> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml +++ peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml <!-- $Revision: 1.1 $ --> <refentry id="guide.migrating.channels.xmlrpcfunctions"> <refnamediv> <refname>XML-RPC functions</refname> <refpurpose>XML-RPC function API documentation</refpurpose> </refnamediv> <refsect1 id="guide.migrating.channels.xmlrpcfunctions.intro"> <title>What XML-RPC functions are available in a standard channel?</title> <warning> <title>Incomplete documentation</title> <para>Documentation is not yet complete</para> </warning> <para> A standard PEAR channel should support this list of XML-RPC functions: </para> <para> <itemizedlist> <listitem> <para> logintest - a stub function </para> </listitem> <listitem> <para> package.getDownloadURL - retrieve a URL to download a package </para> </listitem> <listitem> <para> package.getDepDownloadURL - retrieve a URL to download a package dependency </para> </listitem> <listitem> <para> package.info - retrieve information on a package </para> </listitem> <listitem> <para> package.listAll - list all packages and verbose information on each package </para> </listitem> <listitem> <para> package.listLatestReleases - list all packages and their latest release versions </para> </listitem> <listitem> <para> package.search - search all packages for a match </para> </listitem> </itemizedlist> </para> <para> Channels can also implement channel.listAll, but we recommend that this only be implemented by pear.php.net and pecl.php.net channels, as the command is utilized by the update-channels command to retrieve an official list of channels. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
http://cvs.php.net/co.php/peardoc/en/guide/migrating/channels.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/channels.xml +++ peardoc/en/guide/migrating/channels.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="guide.migrating.channels"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> <date>$Date: 2005/03/26 05:58:19 $</date> </chapterinfo> <title>Channels</title> <simpara> Channels provide a robust and effective way of distributing dependencies, and are the next advance in distributed development. Channels allow developers of applications to provide a 1-step method of installing diverse packages and other application components with a known directory structure and with full dependency validation </simpara> <simpara> Currently, the only solution to depending on code from several sources is to bundle the code. This has several bad side effects, the most obvious of which is that code size increases dramatically, and makes upgrading for a simple bug fix a complicated download for the user. </simpara> <simpara> Channels allow an application developer to depend on packages from pear.php.net, a package from pear.example.com, and others. The user will only need to install/upgrade from a single source using the pear installer. With the current state of affairs, the pear installer is only really useful for installing, well, PEAR packages. Because of this difficulty (among others), traditionally very few packages are available as PEAR packages that can be installed with the PEAR installer. </simpara> <simpara> PEAR 1.4 aims to eliminate this and other barriers to application development. </simpara> <warning> <title>Incomplete documentation</title> <para>Documentation is not yet complete</para> </warning> &guide.migrating.channels.xml; &guide.migrating.channels.xmlrpcfunctions; </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/customroles.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/customroles.xml +++ peardoc/en/guide/migrating/customroles.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="guide.migrating.customroles"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> <date>$Date: 2005/03/26 05:58:19 $</date> </chapterinfo> <title>Custom File Roles</title> <warning> <title>Incomplete documentation</title> <para>Documentation is not yet complete</para> </warning> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/customtasks.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/customtasks.xml +++ peardoc/en/guide/migrating/customtasks.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="guide.migrating.customtasks"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> <date>$Date: 2005/03/26 05:58:19 $</date> </chapterinfo> <title>Custom File Tasks</title> <warning> <title>Incomplete documentation</title> <para>Documentation is not yet complete</para> </warning> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/intro.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/intro.xml +++ peardoc/en/guide/migrating/intro.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="guide.migrating.intro"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> <date>$Date: 2005/03/26 05:58:19 $</date> </chapterinfo> <title>Introduction</title> <simpara> The debut of PEAR 1.4.0 is very exciting. This chapter documents all of the differences between PEAR 1.3.x and the new features introduced in PEAR 1.4. </simpara> <simpara> The most significant change in PEAR 1.4 is the addition of <link linkend="guide.migrating.channels">channels</link>, a simple and effective method of distributing application development. This change has driven most of the other changes to PEAR, and in fact full application support is a major goal of this release. </simpara> <simpara> In addition to channels, support for customization of the install process has been seriously enhanced with the addition of three essential features for application development: </simpara> <para> <itemizedlist> <listitem> <para> <link linkend="guide.migrating.customroles">Custom file installation roles</link> in package.xml </para> </listitem> <listitem> <para> <link linkend="guide.migrating.customtasks">Custom file tasks</link> in package.xml </para> </listitem> <listitem> <para> <link linkend="guide.migrating.postinstall">Post-installation scripts</link> </para> </listitem> </itemizedlist> </para> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/postinstall.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/postinstall.xml +++ peardoc/en/guide/migrating/postinstall.xml <?xml version="1.0" encoding="iso-8859-1" ?> <!-- $Revision: 1.1 $ --> <chapter id="guide.migrating.postinstall"> <chapterinfo> <author> <firstname>Gregory</firstname> <surname>Beaver</surname> </author> <date>$Date: 2005/03/26 05:58:19 $</date> </chapterinfo> <title>Post-installation Scripts</title> <warning> <title>Incomplete documentation</title> <para>Documentation is not yet complete</para> </warning> </chapter> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/channels/xml.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/channels/xml.xml +++ peardoc/en/guide/migrating/channels/xml.xml <!-- $Revision: 1.1 $ --> <refentry id="guide.migrating.channels.xml"> <refnamediv> <refname>channel.xml</refname> <refpurpose>The channel definition file</refpurpose> </refnamediv> <refsect1 id="guide.migrating.channels.xml.intro"> <title>How to describe a channel</title> <para> Discovery of a channel's capabilities is extremely flexible. The XSD schema defining channel.xml can be found at <ulink url="http://pear.php.net/dtd/channel-1.0.xsd">http://pear.php.net/dtd/channel-1.0.xsd</ulink>. Channel.xml defines: <orderedlist> <listitem> <para> the channel name </para> </listitem> <listitem> <para> an optional suggested user alias for the channel </para> </listitem> <listitem> <para> a brief summary of the channel's purpose </para> </listitem> <listitem> <para> an optional package to perform custom validation of packages on both download and packaging </para> </listitem> <listitem> <para> a list of protocols supported by a channel (XML-RPC, SOAP, and REST are supported) </para> </listitem> <listitem> <para> a list of mirrors and the protocols they support. </para> </listitem> </orderedlist> </para> <para> Here is a sample channel.xml with all elements: </para> <para> <programlisting role="xml"> <channel version="1.0" xsi:schemaLocation="http://pear.php.net/channel-1.0 http://pear.php.net/dtd/channel-1.0.xsd"> <link linkend="guide.migrating.channels.xml.name"><name></link>pear.example.com</name> <link linkend="guide.migrating.channels.xml.suggestedalias"><suggestedalias></link>foo</suggestedalias> <link linkend="guide.migrating.channels.xml.summary"><summary></link>Example channel.xml</summary> <link linkend="guide.migrating.channels.xml.validatepackage"><validatepackage</link> version="1.3.4">Foo_Validate</validatepackage> <link linkend="guide.migrating.channels.xml.mirrors"><servers></link> <link linkend="guide.migrating.channels.xml.mirrors"><primary</link> port="8080" ssl="yes"> <link linkend="guide.migrating.channels.xml.protocols"><xmlrpc></link> <!-- default path is xmlrpc.php --> <function version="1.0">logintest</function> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.1">package.getDownloadURL</function> <function version="1.0">package.getDepDownloadURL</function> <function version="1.1">package.getDepDownloadURL</function> <function version="1.0">package.search</function> <function version="1.0">channel.listAll</function> </xmlrpc> <link linkend="guide.migrating.channels.xml.protocols"><rest></link> <!-- no default path, all must be defined in baseurl --> <baseurl type="package">http://pear.example.com/rest/1.0/package</baseurl> <baseurl type="category">http://pear.example.com/rest/1.0/category</baseurl> </rest> <link linkend="guide.migrating.channels.xml.protocols"><soap</link> path="soapy.php"> <!-- default path is soap.php --> <function version="1.0">package.listAll</function> </soap> </primary> <link linkend="guide.migrating.channels.xml.mirrors"><mirror</link> server="foo2.example.com/pearmirror"> <xmlrpc path="mirrorxmlrpc.php"> <!-- default path is xmlrpc.php --> <function version="1.0">package.listLatestReleases</function> <function version="1.0">package.listAll</function> <function version="1.0">package.info</function> <function version="1.0">package.getDownloadURL</function> <function version="1.1">package.getDownloadURL</function> <function version="1.0">package.getDepDownloadURL</function> <function version="1.1">package.getDepDownloadURL</function> <function version="1.0">package.search</function> </xmlrpc> <rest> <!-- no default path, all must be defined in baseurl --> <baseurl type="package">http://foo2.example.com/rest/1.0/package</baseurl> </rest> </mirror> </servers> </channel> </programlisting> </para> <refsect2 id="guide.migrating.channels.xml.name"> <title><name></title> <para> A channel's name should be the name of the server that users would browse to in order to learn more about the packages being offered. For instance, PEAR packages are located in the pear.php.net channel. PECL packages are located in the pecl.php.net channel. Note that for backwards compatibility, all existing packages based on package.xml version 1.0 are in the pear.php.net channel. </para> <para> The benefit that comes from using the server name as the channel name is that auto-discovery becomes a real possibility, as well as ease of locating packages increases dramatically. </para> <para> A channel need not be located in the document root, a channel can contain a path. This is a perfectly valid channel name: <filename>foo.example.com/path/to/pear</filename>. Note that users would have to type: </para> <para> <screen> <![CDATA[ $ pear install foo.example.com/path/to/pear/Packagename ]]> </screen> </para> <para> Unless you provide a <suggestedalias>. </para> </refsect2> <refsect2 id="guide.migrating.channels.xml.suggestedalias"> <title><suggestedalias></title> <para> <suggestedalias> defines a shorter, more friendly name to use when installing packages from a channel. For instance, the pear.php.net channel's suggested alias is "pear". The best aliases for a channel will be no more than 6 characters long - remember, a user must type them often when installing or upgrading, and this can be tedious for longer aliases. </para> <para> Rather than call this tag <alias>, as it was originally named, the tag is named <suggestedalias> in order to provide the user some latitude. If the user does not like the alias suggested by the channel owners, he or she can easily re-alias a channel through the channel-alias command. </para> </refsect2> <refsect2 id="guide.migrating.channels.xml.summary"> <title><summary></title> <para> This tag provides a short description of what packages the user should expect to find on this channel. The summary is what users will see when the use the list-channels command. </para> </refsect2> <refsect2 id="guide.migrating.channels.xml.validatepackage"> <title><validatepackage></title> <para> Most channels will be satisfied with the restrictions placed upon package naming, versioning, and so on that PEAR provides by default. However, for some channels, the validation will be too strict, and others, too relaxed. The <validatepackage> tag provides the next level of customization. </para> <para> If omitted, the installer assumed that the <classname>PEAR_Validate</classname> class should be used. Note that a looser version validation is provided by the <classname>PEAR_Validate_PECL</classname> class, for channels like pecl.php.net that do not wish to deal with PEAR's warnings on version transgressions. </para> <para> <validatepackage> requires a version attribute and text content. The text content must be the name of a package that can be installed via: </para> <para> <screen> <![CDATA[ $ pear install channelname.example.com/Packagename-version ]]> </screen> </para> <para> as in: </para> <para> <screen> <![CDATA[ $ pear install pear.example.com/Foo_Validate-1.3.4 ]]> </screen> </para> <para> for the sample channel.xml at the beginning of this section. In addition, the package must provide a single class named after the package in a file using the PEAR naming conventions (all underscores "_" converted into path separators "/" so that Foo_Validate is located in Foo/Validate.php), and this class should extend PEAR_Validate. Methods beginning with "validate" like <function>validateVersion</function> are intended to be overridden by validation classes for use in extending existing validation functionality. </para> </refsect2> <refsect2 id="guide.migrating.channels.xml.mirrors"> <title><servers>: <primary> and <mirror></title> <para> Mirroring is explicitly supported in channel.xml and in the PEAR installer. Users can choose their favorite mirror via the <filename>default_channel</filename> configuration option, and channel.xml can list all the possible mirrors using the (surprise) <mirror> tag. </para> <para> The <primary> tag is used to define the location of protocols, and to list the protocols that are supported by the main channel server. Optional attributes can be used to modify how the PEAR installer will attempt to connect to the server. The "port" attribute can be used to define how the installer will connect to XML-RPC and SOAP services. REST services are always controlled by the individual <baseurl> tags. </para> </refsect2> <refsect2 id="guide.migrating.channels.xml.protocols"> <title><xmlrpc>, <soap>, <rest></title> <para> channel.xml knows about the XML-RPC, SOAP, and REST protocols for web services. However, the PEAR installer only supports XML-RPC currently, and may support REST shortly. No support for SOAP is planned for the near future. However, should it ever be implemented, channel.xml is ready. </para> <para> The <xmlrpc> and <soap> tags have identical formats. Both tags can contain an optional attribute "path" that tells the PEAR installer which URL to query. By default, the path is protocol.php, as in xmlrpc.php or soap.php. In other words, to access XML-RPC functions for the pear.example.com channel defined in the sample channel.xml, the installer would query <filename>https://pear.example.com:8080/xmlrpc.php</filename> for XML-RPC functions, but would query <filename>https://pear.example.com:8080/soapy.php</filename> for SOAP functions. </para> <para> The <rest> tag reflects the design concept behind REST: each resource is defined by a base URL in tag <baseurl> that is then used by the installer along with hyperlinks to glean the same information that XML-RPC or SOAP would provide. Required attribute "type" tells the installer what kind of information is provided by the base URL, and how to parse that information. </para> <refsect3 id="guide.migrating.channels.xml.protocols.function"> <title><function></title> <para> The <function> tag is quite simple. A required version attribute informs the installer what the API is, and the text content informs the installer what the name of the function is. Note that multiple functions with different versions can co-exist peacefully, as in: <programlisting role="xml"> <![CDATA[ <function version="1.0">package.getDownloadURL</function> <function version="1.1">package.getDownloadURL</function> ]]> </programlisting> If a newer API is backwards-compatible, always define every possible API version in order to prevent older installer versions from giving up. </para> </refsect3> </refsect2> <refsect2 id="guide.migrating.channels.xml.whynotwsdl"> <title>Why not use a standard such as wsdl?</title> <para> Some of you may be asking "why create another standard for web services discovery?" The answer is simple: channel.xml does not supplant the role that WSDL has for java, or XML-RPC introspection occupies. channnel.xml is a layer on top of these technologies. The point is to quickly list the remote protocols that are supported, not to describe what they do. </para> <para> The PEAR installer is specialized enough that a generic listing of parameters and return values is entirely unnecessary: the installer knows exactly what xml-rpc function package.info version 1.0 requires and what it returns. Any other information simply adds wasted bandwidth and disk space. </para> </refsect2> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> http://cvs.php.net/co.php/peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml?r=1.1&p=1 Index: peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml +++ peardoc/en/guide/migrating/channels/xmlrpcfunctions.xml <!-- $Revision: 1.1 $ --> <refentry id="guide.migrating.channels.xmlrpcfunctions"> <refnamediv> <refname>XML-RPC functions</refname> <refpurpose>XML-RPC function API documentation</refpurpose> </refnamediv> <refsect1 id="guide.migrating.channels.xmlrpcfunctions.intro"> <title>What XML-RPC functions are available in a standard channel?</title> <warning> <title>Incomplete documentation</title> <para>Documentation is not yet complete</para> </warning> <para> A standard PEAR channel should support this list of XML-RPC functions: </para> <para> <itemizedlist> <listitem> <para> logintest - a stub function </para> </listitem> <listitem> <para> package.getDownloadURL - retrieve a URL to download a package </para> </listitem> <listitem> <para> package.getDepDownloadURL - retrieve a URL to download a package dependency </para> </listitem> <listitem> <para> package.info - retrieve information on a package </para> </listitem> <listitem> <para> package.listAll - list all packages and verbose information on each package </para> </listitem> <listitem> <para> package.listLatestReleases - list all packages and their latest release versions </para> </listitem> <listitem> <para> package.search - search all packages for a match </para> </listitem> </itemizedlist> </para> <para> Channels can also implement channel.listAll, but we recommend that this only be implemented by pear.php.net and pecl.php.net channels, as the command is utilized by the update-channels command to retrieve an official list of channels. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->