There is a PHP extension to which I need to pass a configure option when I install it with a pecl
command. I can't find a way to do this.
Of course I can install it manually, but I need it to be able to install it with single command - so that it is easily installable through puppet.
Any ideas?
To just accept the defaults, you may use this:
Found here.
Based on http://old.nabble.com/unattended-PECL-installs--td29760522.html you could try:
To answer no to every question, or:
To answer "yes" once.
Neither answer is very satisfying though.
There's an outstanding bug (3 years old at the time of writing) asking for a native PECL provider and a similar, older one for Pear packages. It doesn't look like either of those will be included in Puppet any time soon.
There are PECL and Pear providers here which you could include in your Puppet setup. There's also another PECL provider here. I haven't tested them myself and I can't vouch for how easy they are to use or how well they work.
The best suggestion I have seen involves re-packaging each PECL extension you ant to use as
.deb
or.rpm
packages and either running your own internal repository or pushing the package files out through puppet and installing them viadpkg
orrpm
. There's a HOWTO for Debian-based distros here.For your situation, you would install the PECL extension into a staging directory on a dev box, supplying the required command-line options manually, and then package up what gets created into a package for your OS package management system.
The upside is having a single package management system rather than all of apt, pecl, pear, gem, etc. The downside is that since you would be repackaging these extensions yourself, you will still have to monitor the upstream providers (pecl in your case) and update your packages whenever a security patch comes through.