Description of problem: The latest php-pear update pulls in php-devel, which pulls in automake and autoconf. I don't see why production systems need those things installed. Version-Release number of selected component (if applicable): php-pear-1.9.1-5.fc13.noarch Additional info: $ rpm -q php-pear --requires | grep php-devel php-devel php-pear-1.9.1-3.fc13.noarch did not require it. The RPM changelog does not mention anything about requiring php-devel.
Maybe it was lost in the merge - /usr/bin/pecl doesn't work without php-devel. * Fri Sep 10 2010 Joe Orton <jorton> - 1:1.9.1-3 - require php-devel (without which pecl doesn't work) I don't think it is correct for the package to ignore deps for the sake of convenience; we have had bugs filed about that too. Perhaps we should split /usr/bin/pecl into a separate package?
I agree it's a bad practice to install devel stuff on a production server, when packaged pear/pecl extensions are available in the repository. If we split "pecl" command (with dep to php-devel), in a sub package, we won't be able to register the packaged pecl extension. Or we need to redefine the %pecl_(un)install macro to something like : /usr/bin/php -C -n -q -d include_path=/usr/share/pear -d output_buffering=1 /usr/share/pear/peclcmd.php install --nodeps --soft --force --register-only --nobuild But, most of extension requires Requires(post): %{__pecl} Requires(postun): %{__pecl} So, this will also requires a Guidelines update (and find a solution to keep compatibility) Another solution could be to hack the pecl script to add a test If options contains install and doesn't contains --nobuild and /usr/include/php missing, then echo Have you try ? yum install php-pecl-<extension> ? If you really want to build this extension, you must run yum install php-devel
I would suggest going with patching the pecl script, it seems like the cleanest solution by far. If people manage everything using yum, they will never hit a problem (because they won't need to build stuff on the machine) and if they want to go outside that, installing php-devel seems like a reasonable compromise as long as we clearly explain it (and return non-zero from "pecl" so that any automated scripts will hopefully catch the error).
Created attachment 463772 [details] add check for header in phpize Another (even simpler) solution is to patch the phpize script which is only call before build (impact is less, I think, than patching the pecl script). I also think this patch could be proposed upstream.
I defer to you guys on this; sorry for causing the hassle. Patch looks fine, I'd correct the wording to: "You must install the php-devel package."
Or to be more passive: "The php-devel package is required for use of this command."
In fact this patch can't work. When php-devel is not installed # pecl install /tmp/APC-3.1.6.tgz 49 source files, building running: phpize sh: phpize : commande introuvable ERROR: `phpize' failed Or we have to move the phpize command to php-cli sub-package...
/usr/bin/pecl could (or should) look like: #!/bin/sh if [ -f /usr/bin/phpize ]; then exec /usr/bin/php -C -n -q -d include_path=/usr/share/pear \ -d output_buffering=1 /usr/share/pear/peclcmd.php "$@" else echo "The php-devel package is required for use of this command." fi Using Joe Orton's output message.
(In reply to comment #8) > /usr/bin/pecl could (or should) look like: No, this change will break the "install --nobuild" options used during RPM (un)install scriptlet (which doesn't requires phpize). This also breaks most of pecl commands which really doesn't build anything (help, list, list-all, list-upgrades, ...) My idea, for now is : - wait for upstream feedback on linked bug (or other idea) - patch phpize to check for headers and display an explicit message on error - move phpize to php-cli package - remove php-pear dependency for php-devel This seems (AMHA) the simpler and more robust (less impact).
Fix in php-5.3.4-1 and php-pear-1.9.1-6 in rawhide.