From Fedora Project Wiki
Line 30: Line 30:
* CHANNEL packages should be named php-channel-ChannelAlias-%{version}-%{release}.noarch.rpm
* CHANNEL packages should be named php-channel-ChannelAlias-%{version}-%{release}.noarch.rpm
* Packages from another channel  should be named php-ChannelAlias-PackageName-%{version}-%{release}.noarch.rpm.
* Packages from another channel  should be named php-ChannelAlias-PackageName-%{version}-%{release}.noarch.rpm.
FPC notes : PECL/PEAR package from standard channel also follow naming scheme for packages from another channel :)




Line 36: Line 39:
TODO: A new section needs to be added to the guidelines to explain how to package a PEAR package which uses a non-standard channel.
TODO: A new section needs to be added to the guidelines to explain how to package a PEAR package which uses a non-standard channel.


All packages are defined in a channel (extension repository)
2 channels are defined on installation of php-pear
* <code>pear.php.net</code> (alias pear) : the default channel
* <code>__uri</code> : Pseudo-channel for static packages


Other channels must be installed at RPM build time and at at RPM installation time.
Other channels must be installed at RPM build time and at at RPM installation time.
Line 55: Line 53:
* How to package a channel (to be able to BuildRequires and Requires it), see php-channel-phpunit (devel) as a working sample.
* How to package a channel (to be able to BuildRequires and Requires it), see php-channel-phpunit (devel) as a working sample.
* should virtual provide use channel (ex : <code>Provides: php-pear(ChannelName/PackageName) = %{version</code>})
* should virtual provide use channel (ex : <code>Provides: php-pear(ChannelName/PackageName) = %{version</code>})


=== Packages with Optional Requires ===
=== Packages with Optional Requires ===

Revision as of 11:27, 25 January 2009

[[TableOfContents(3)]

Proposed Changes to PHP Guidelines

Synopsis

This page describes items that need to be changed in the PHP Guidelines or other items that need to be reviewed or ratified by the Fedora Packaging Comittee and FESCo .

PHP Guidelines Changes

Packages with Channels

Different kinds of packages

To be add

  • CHANNEL : a package which register a channel which provides extensions from another repository
  • Other package providing php extension not handled by pear/pecl mechanisms

3 channels are defined on installation of php-pear

  • pear.php.net (alias pear) : the default channel for PHP Extension and Application Repository
  • pecl.php.net (alias pecl) : the default channel for PHP Extension Community Library
  • __uri : Pseudo-channel for static packages

FPC notes : we already have 4 extras channels in repository (phing, phpdb, symfony and phpunit). A new one (ezc) is on the road. This Guidelines update proposal "try" to avoid change for already approved packages.

Naming scheme

  • PECL packages from standard pecl channel should be named php-pecl-PECLPackageName-%{version}-%{release}.%{arch}.rpm.
  • PEAR packages from standard pear channel should be named php-pear-PEARPackageName-%{version}-%{release}.noarch.rpm.
  • CHANNEL packages should be named php-channel-ChannelAlias-%{version}-%{release}.noarch.rpm
  • Packages from another channel should be named php-ChannelAlias-PackageName-%{version}-%{release}.noarch.rpm.


FPC notes : PECL/PEAR package from standard channel also follow naming scheme for packages from another channel :)



TODO: A new section needs to be added to the guidelines to explain how to package a PEAR package which uses a non-standard channel.


Other channels must be installed at RPM build time and at at RPM installation time.

For non default channel extension, pear command requires the channel, so %postun scriplet must specify it

if [ "$1" -eq "0" ] ; then
%{_bindir}/pear uninstall --nodeps --ignore-errors --register-only Foo_Channel/Foo_Bar >/dev/null ||:
fi


TODO:

  • How to package a channel (to be able to BuildRequires and Requires it), see php-channel-phpunit (devel) as a working sample.
  • should virtual provide use channel (ex : Provides: php-pear(ChannelName/PackageName) = %{version})

Packages with Optional Requires

TODO: Some PEAR packages such as Auth have many other PEAR packages that are optional Requires. We need to discuss how to handle splitting up large packages such as this.

Other Items

No additional items required.