We are registering the PEAR extensions, so "pear list" give the install list.
But we do nothing for PECL extensions.
It seems that it is now possible (since pear 1.5.0 ?) using
pecl install --nodeps --soft --force --register-only --nobuild /path/to/package.xml pecl uninstall --nodeps --ignore-errors --register-only package_name
Read : https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=244045 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=221129
An example : http://remi.collet.free.fr/rpms/SPEC/php-pecl-apc.spec (i've don't use >/dev/null to see warning/notice i have to work on, to file an upstream bug)
Please post feedback - should php-pecl-apc be renamed to php-pecl-APC ? - about using this feature - about updating Guidelines - about using this with pear < 1.5.0 (i don't have it available)
We'll probaly have to think of using the same dir for %{pear_xmldir} and %{pecl_xmldir}
Remi.
I've just submit "php-pecl-phar" to review. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=247515
This introduce some new stuff for PECL extension.
I done this because it requires PHP >= 5.2.0, so will only be push to Fedora >= 7 (with pear >= 1.5.0)
This can be a "study case" if we want a (new) pecl template.
1 bad point : this introduce a new dependence on php-pear for pecl extensions.
Remi.
On Tue, Jul 10, 2007 at 07:13:48AM +0200, Remi Collet wrote:
I've just submit "php-pecl-phar" to review. https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=247515
This introduce some new stuff for PECL extension.
Would it be useful to define some macros for the "pecl install"/"pecl uninstall" %post/postun invocations in macros.pear?
%define pecl_install %{__pecl} install --nodeps --soft --force --register-only --nobuild %define pecl_uninstall %{__pecl} uninstall --nodeps --ignore-errors --register-only
?
joe
Joe Orton a écrit :
Would it be useful to define some macros for the "pecl install"/"pecl uninstall" %post/postun invocations in macros.pear?
%define pecl_install %{__pecl} install --nodeps --soft --force --register-only --nobuild %define pecl_uninstall %{__pecl} uninstall --nodeps --ignore-errors --register-only
?
First idea is to add the missing "php/pecl_extdir" (php-config --extension-dir) which is needed in all extension package (probably in macros.php rather than in macros.pear...).
pecl_(un)install macro (and probably pear_(un)install too) could be usefull when a new PEAR version changes options : for example php-pear 1.6.1 requires "-d download_dir=$(mktemp -d)" to work (ok, it's probably a bug)
This will avoid to break build system or need to update all extension spec files on php-pear update.
But this will requires a Guidelines update...
Remi
P.S. : Joe does this mean you are favorable to the "register" of pecl extension ?
joe
Fedora-php-devel-list mailing list Fedora-php-devel-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-php-devel-list
On Tue, Jul 10, 2007 at 08:42:19PM +0200, Remi Collet wrote:
First idea is to add the missing "php/pecl_extdir" (php-config --extension-dir) which is needed in all extension package (probably in macros.php rather than in macros.pear...).
This is just the directory to contain the DSO? So we just need:
%php_extdir %{_libdir}/php/modules
added to macros.php, correct?
pecl_(un)install macro (and probably pear_(un)install too) could be usefull when a new PEAR version changes options : for example php-pear 1.6.1 requires "-d download_dir=$(mktemp -d)" to work (ok, it's probably a bug)
Yeah :) I'd rather fix that bug than workaround it I think.
But this will requires a Guidelines update...
Since this is new ground let's work out everything that's needed before submitting anything, and get it in and working with your APC package in review.
P.S. : Joe does this mean you are favorable to the "register" of pecl extension ?
Sure, it seems like a good idea to me.
Regards,
joe
Joe Orton a écrit :
%php_extdir %{_libdir}/php/modules
added to macros.php, correct?
Yes. or : %php_extdir %(%{_bindir}/php --extension-dir)
pecl_(un)install macro (and probably pear_(un)install too) could be usefull when a new PEAR version changes options : for example php-pear 1.6.1 requires "-d download_dir=$(mktemp -d)" to work (ok, it's probably a bug)
Yeah :) I'd rather fix that bug than workaround it I think.
Patch proposed upstream... waiting. http://pear.php.net/bugs/bug.php?id=11517
But this will requires a Guidelines update...
Since this is new ground let's work out everything that's needed before submitting anything, and get it in and working with your APC package in review.
It's php-pecl-phar ;) https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=247515
It have been approved by tibbs. Only pushed to "devel" to make it more available for tests.
I will work on the PHP Guidelines Draft ASAP (Waiting for feedback before).
I Think i will propose to use something like :
%post %if 0%{?pecl_install:1} %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : %endif
In this way, the same spec could be use with old PEAR version (where "pear install" doesn't work, especially in EPEL) and with new where it works (and where macros are defined, Fedora >= 7). Because, i don't find a simple solution to check PEAR version in scriptlet (without using rpm command).
Remi.
On Sun, Jul 15, 2007 at 05:19:16PM +0200, Remi Collet wrote:
Joe Orton a écrit :
%php_extdir %{_libdir}/php/modules
added to macros.php, correct?
Yes. or : %php_extdir %(%{_bindir}/php --extension-dir)
It's not like this is going to change often :) %php_extdir and %pecl_*install are now in dist-fc7; how does it look?
Yeah :) I'd rather fix that bug than workaround it I think.
Patch proposed upstream... waiting. http://pear.php.net/bugs/bug.php?id=11517
Thanks for chasing that!
I Think i will propose to use something like :
%post %if 0%{?pecl_install:1} %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : %endif
+1 to that.
joe
php-devel@lists.fedoraproject.org