[Webapps-common-discuss] webapps-common/doc PHP-Policy-Manual-DRAFT.sgml, 1.2, 1.3

seanius at haydn.debian.org seanius at haydn.debian.org
Thu Aug 4 06:59:17 UTC 2005


Update of /cvsroot/webapps-common/webapps-common/doc
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv18693

Modified Files:
	PHP-Policy-Manual-DRAFT.sgml 
Log Message:
some more work on php policy.  also added some annotations for stuff
that needs to be further discussed.


Index: PHP-Policy-Manual-DRAFT.sgml
===================================================================
RCS file: /cvsroot/webapps-common/webapps-common/doc/PHP-Policy-Manual-DRAFT.sgml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- PHP-Policy-Manual-DRAFT.sgml	4 Aug 2005 01:59:37 -0000	1.2
+++ PHP-Policy-Manual-DRAFT.sgml	4 Aug 2005 06:59:11 -0000	1.3
@@ -87,9 +87,26 @@
 			</list>
 		<sect id="terms">Terms and Conventions
 			<p>
-				<taglist>
-					<tag><item>do we need any?
-				</taglist>
+			<taglist>
+			<tag><var>PHPVERSION</var>
+			<item>The major, or possibly major and minor
+			      version of a PHP engine packaged for debian.
+			<tag><var>PHPSAPI</var>
+			<item>XXX what exactly? apache vs cli vs cgi...
+			<tag><var>PHPMODULENAME</var>
+			<item>An identifying name for a precompiled
+			      PHP module.
+			<tag><var>PEARLIBRARYNAME</var>
+			<item>An identifying name for a prepackaged PEAR
+			      library, with the following modifications
+			      to the upstream name to comply with
+			      debian policy:
+				<list>
+				<item>all uppercase letters are lowercased
+				<item>all underscores are replaced
+				      by dashes
+				</list>
+			</taglist>
 
 	<chapt id="php-int">PHP Interpreters and Engines
 		<sect id="php-interpreter-naming">Packages and naming scheme
@@ -106,44 +123,48 @@
 			interpreter, as well as a prebuilt set of bundled
 			modules provided along with the PHP source code.
 		<p>
-			For each version of PHP, the following naming conventions
-			are followed:
+			For each version of PHP, the following naming
+			conventions are followed:
 		<taglist>
-		<tag>php<var>PHPVERSION</var>
-			<item>A meta-package depending on one of any of the "server-side"
-			      modules, such as <package>libapache2-mod-php4</package>.  This
-					is the most common package to have installed for using PHP
-					with web pages.
-		<tag>php<var>PHPVERSION</var>-cli
-			<item>Provides the command-line PHP interpreter for use in
-			      scripting.
-		<tag>php<var>PHPVERSION</var>-cgi
-			<item>Provides the command-line CGI interpreter for use with
-			      webservers that provide CGI functionality but do not have
-					built-in support for PHP.
-		<tag>php<var>PHPVERSION</var>-<var>PHPMODULENAME</var>
-			<item>One of a small collection of prebuilt php modules such
-			      as <package>php4-mysql</package>, which are included
-					with PHP by the upstream authors.
+		<tag><package>php<var>PHPVERSION</var></package>
+		<item>A meta-package depending on one of any of the
+		      "server-side" modules, such as
+		      <package>libapache2-mod-php4</package>.  This is
+		      the most common package to have installed for
+		      using PHP with web pages.
+		<tag><package>php<var>PHPVERSION</var>-cli</package>
+		<item>Provides the command-line PHP interpreter for use
+		      in scripting.
+		<tag><package>php<var>PHPVERSION</var>-cgi</package>
+		<item>Provides the command-line CGI interpreter for use
+		      with webservers that provide CGI functionality
+		      but do not have built-in support for PHP.
+		<tag><package>php<var>PHPVERSION</var>-<var>PHPMODULENAME</var></package>
+		<item>One of a small collection of prebuilt php modules
+		      such as <package>php4-mysql</package>, which are
+		      included with PHP by the upstream authors.
 		</taglist>
 			
 		<sect id="php-interpreter-fs">File and directory layout
 			<sect1 id="php-interpreter-fs-bins">PHP executable binaries
 			<p>
-				The "cli" packages provide the interpreter binary provided in
-				<file>/usr/bin</file> as php<var>PHPVERSION</var>.  For example,
-				<file>/usr/bin/php4</file>.
+				The "cli" packages provide the interpreter
+				binary provided in <file>/usr/bin</file>
+				as <prgn>php<var>PHPVERSION</var></prgn>.
+				For example, <file>/usr/bin/php4</file>.
 			<p>
-				The "cgi" packages similarly provide the binaries as
-				php<var>PHPVERSION</var>-cgi.
+				The "cgi" packages similarly provide
+				the binaries as
+				<file>/usr/bin/php<var>PHPVERSION</var>-cgi</file>.
 			<p>
-				In both cases, PHP interpreters will
-				use the debian alternatives system for determining what
-				binary will provide
-				<file>/usr/bin/php</file> and <file>/usr/bin/php-cgi</file>
+				In both cases, PHP interpreters
+				use the debian alternatives system
+				for determining what binary will
+				provide <file>/usr/bin/php</file> and
+				<file>/usr/bin/php-cgi</file>
 			<sect1 id="php-interpreter-fs-include">Default include path
 			<p>
-				The standard PHP include path is:
+				The default PHP include path is:
 				<tt>
 .:/etc/php:/usr/local/share/php/5.0:/usr/share/php5:/usr/share/php/5.0:/usr/share/php:/usr/local/share/php 
 				</tt>
@@ -164,33 +185,69 @@
 				<file>/usr/share/php<var>PHPVERSION</var></file>
 				and
 				<file>/usr/share/php/<var>PHPVERSION</var></file>
-				are used for PHP libraries installed via the debian
-				package management system that are dependant on a
-				particular version of PHP.
+				are used for PHP libraries installed via
+				the debian package management system that
+				are dependant on a particular version
+				of PHP.
 
 			<sect1 id="php-interpreter-fs-conf">Configuration files
 			<p>
-				Each PHP engine has a seperate configuration file located
-				at <file>/etc/php<var>PHPVERSION</var>/<var>PHPSAPI</var>/php.ini</file>
+				Each PHP engine has a seperate
+				configuration file located at
+				<file>/etc/php<var>PHPVERSION</var>/<var>PHPSAPI</var>/php.ini</file>
 			<p>
 				Additionally, each engine
 				provides a directory at
 				<file>/etc/php<var>PHPVERSION</var>/<var>PHPSAPI</var>/conf.d</file>
-				where 3rd party PHP libraries and modules can provide additional
-				configuration information.
+				where 3rd party PHP libraries and modules
+				can provide additional configuration
+				information.
 			<p>XXX this second part is not yet true.
 
 	<chapt id="php-apps">PHP applications
+	<p>
+		XXX do we actually need anything here?  maybe talking about proper dependencies?
 		<sect id="php-apps-naming">Packages and naming scheme
 		<sect id="php-apps-fs">File and directory layout
 
 	<chapt id="php-libs">PHP libraries
-		<sect id="php-libs-naming">Packages and naming scheme
-		<sect id="php-libs-fs">File and directory layout
 		<p>
 			PHP libraries should be located in
-			<tt>/usr/share/php/<var>PACKAGE</var></tt>.
+			<file>/usr/share/php/<var>PACKAGE</var></file>.
+			for packages that depend on a specific
+			version of php libraries can be placed in
+			<file>/usr/share/php<var>PHPVERSION</var></file>
+
 		<sect id="php-libs-pear">Requirements for PHP PEAR libraries
+		<p>
+			PEAR is a 3rd party repository for PHP code
+			libraries that is accompanied by its own package
+			management utilities, similar to perl's CPAN
+			system.  similar to the perl mini-policy, PHP
+			packaging and policy are designed to accommodate
+			debian systems where the local administrator
+			has elected to install packages via PEAR.
+		<sect1 id="php-libs-pear-naming">Package Naming Requirements for PEAR libraries
+		<p>
+			PHP libraries that are debianized
+			from the PHP PEAR repository should be
+			prefixed to identify themselves as such.
+			Package names should be in the form
+			<package>php-<var>PEARLIBRARYNAME</var></package>.
+		<p>
+			XXX should this be <package>php-pear-<var>PEARLIBRARYNAME</var></package>?
+		<sect1 id="php-libs-pear-extra">Other installation requirements for PEAR packages
+		<p>
+			PHP PEAR library packages must also register and unregister themselves in the pear package management system.  this can be done by adding the following code in the packages postinst script:
+			<example>
+			pear install -r package.xml
+			</example>
+			and the following in the prerm script:
+			<example>
+			pear uninstall -r PEARLIBRARYNAME
+			</example>
+		<p>
+			XXX: does this conflict with piotr's recommendation for having pear work only in /usr/local?
 	
 	<chapt id="php-modules">PHP modules
 		<sect id="php-modules-naming">Packages and naming scheme
@@ -198,7 +255,7 @@
 			<p>
 				Precompiled binary modules
 				for PHP must be located in
-				<tt>/usr/lib/php<var>PHPVERSION</var>/<var>PHP_API_VERSION</var></tt>.
+				<file>/usr/lib/php<var>PHPVERSION</var>/<var>PHP_API_VERSION</var></file>.
 				PHPVERSION is the numeric major
 				version number (such as 3, 4, or 5),
 				and PHP_API_VERSION is the version




More information about the Webapps-common-discuss mailing list