Hi,
For now all our PECL extensions have a dependency on php-pear.
PEAR is mostly dead and most user don't want to install it. (The project is not dead, it even work with PHP 7, but most users have switched to composer)
In fact, the pecl command is only used in scriptlets for extension (un)registration (to allow manual pecl/pear usage). Really nothing is required at runtime.
So I'd like to remove dependency on /usr/bin/pecl for PECL extension.
Here is a proposal for new scriptlets
# when pear installed alone, after us %triggerin -- %{?scl_prefix}php-pear if [ -x %{__pecl} ] ; then %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : fi
# posttrans as pear can be installed after us %posttrans if [ -x %{__pecl} ] ; then %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : fi
%postun if [ $1 -eq 0 -a -x %{__pecl} ] ; then %{pecl_uninstall} %{pecl_name} >/dev/null || : fi
Notice: pear still required at build time for macro definition.
Notice; this is already used to also fix a circular dep issue (php-pecl-jsonc => php-pear => php-cli => php-common => php-pecl-jsonc)
Minor issue, /var/lib/pear/pkgxml (%{pecl_xmldir}) is own by php-pear.
So we also need to move this directory to php-common to avoid unowned dir when pear is not installed.
Comments, before opening a FPC ticket ?
Remi.
"RC" == Remi Collet Fedora@FamilleCollet.com writes:
RC> So I'd like to remove dependency on /usr/bin/pecl for PECL RC> extension.
I've no problem with this, however, I'm not sure it makes much difference in practice.
RC> Here is a proposal for new scriptlets
Could you look at setting up file triggers for these so that we can drop the scriptlets in rawhide? I don't understand all of the dependencies and ordering.
- J<
Le 30/11/2015 21:15, Jason L Tibbitts III a écrit :
"RC" == Remi Collet Fedora@FamilleCollet.com writes:
RC> So I'd like to remove dependency on /usr/bin/pecl for PECL RC> extension.
I've no problem with this, however, I'm not sure it makes much difference in practice.
RC> Here is a proposal for new scriptlets
Could you look at setting up file triggers for these so that we can drop the scriptlets in rawhide?
Good idea :)
Except I need to find a solution to get 'channel" and "extension" name from "file" name... not trivial, especially because this foler get package from different channel (pear, pecl, horde...), some are pure-PHP libraries, other are C extensions, will have to think about this.
Remi.
Le 30/11/2015 21:15, Jason L Tibbitts III a écrit :
Could you look at setting up file triggers for these so that we can drop the scriptlets in rawhide? I don't understand all of the dependencies and ordering.
Could you please give a look at
php changes:
http://pkgs.fedoraproject.org/cgit/rpms/php.git/commit/?h=private-drop-pecl-...
=> define %%pecl_xmldir and own it (/var/lib/php/peclxml)
php-pear changes:
http://pkgs.fedoraproject.org/cgit/rpms/php-pear.git/commit/?h=private-drop-...
=> use file triggers for pecl extensions (un)registration => define %%pecl_install and %%pecl_uninstall as noop macro
php-pecl-raphf changes (only an example)
http://pkgs.fedoraproject.org/cgit/rpms/php-pecl-raphf.git/commit/?h=private...
=> drop scriptlets and dependency on php-pecl
Without change, old packages are still ok: old scriplets work. With a rebuild, take benefit of file triggers. With change, really drop dependency on php-pear.
From my tests, everything seems ok, But more eyes are welcome.
Remi.
packaging@lists.fedoraproject.org