New layout for PEAR packages
+
Par Remi le mardi 21 août 2012, 10:47 - HowTo - Lien permanent
The /usr/share/pear directory, used for installation of PEAR extensions on Fedora and Enterprise Linux , contains a lot of files which should not be stored there. Especially because this folder in part of the default include_path.
Starting with Fedora 18, this gets better.
1. Documentation
Extensions store their documentation in /usr/share/pear/doc.
This directory is moved (since Fedora 15) in /usr/share/doc/pear (value of %{pear_docdir} macro).
No impact on existing packages as, by definition, documentation is not necessary for use.
2. RPM metadata
RPM packages store their metadata, a copy of package.xml from project's archive, for registering the extensio in the /usr/share/pear/.pkgxml.
This directory is moved to /var/lib/pear/pkgxml (value of %{pear_xmldir} macro).
No impact on old packages, as the path is hardcoded in the RPM (evaluated during its build).
3. Unit tests
Unit tests provided by each extension are installed in /usr/share/pear/test.
This directory is moved to /usr/share/tests/pear (valule of %{pear_testdir} macro).
No impact on old packages, as these files are not required for use. Despite, a rebuild is preferred.
4. Data
Extensions data are stored in /usr/share/pear/data.
This directory is moved to /usr/share/pear-data (value of %{pear_datadir} macro).
No impact on old packages or manually installed extensions, in fact, this value is evaluated during RPM build, or manual installation of an extension and result is harcoded in the scripts. Of course, existing content is preserved. A rebuild is also preferred.
5. PEAR metadata
PEAR installer store its metadata in various folders: /usr/share/pear/.registry, .channels, .depdb, and .filemap.
As this is alive data, this clearly should not be stored there. See the FHS.
Its move to /var/lib/pear is planed, and is the subject of a RFC for PEAR project, mainly because it requires significant change to the code.
So, for now, it is not moved.
6. Conclusion
Changes are done in php-pear-1.9.4-11.
A huge work have been done in Fedora 18 (and will be soon backported to remi repository). More than one hundred of packaged extensions have been rebuilt.
More work are needed for metadata, especially to insure a smooth upgrade from current layout. I will see when this become possible (Fedora 18 or 19), according to upstream answer, time needed for the change, and distribution schedule.
To be continued...
Commentaires
I've finished the backport, packages are available in:
I expect your feedback, for any possible issue, using the forum.
I have moved the latest version from remi-test to remi.