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.