[dev] Installation Thoughts

Michael M Slusarz slusarz at horde.org
Thu Oct 17 20:16:29 UTC 2013


Going through our installation process on a Debian VM (specifically  
using a distro that has given us issues), and here's what I think so  
far.  (This is simply on the PEAR install process - this is  
independent of configuring/running any of our code.)

* Two immediate fatal flaws I see.  beta/alpha packages are NEVER  
installed and packages from foreign channels are NEVER installed.  At  
least with the default PEAR settings on Debian 7.

I think we need to immediately change the installation command in the  
docs to this:

pear -d auto_discover=1 -d preferred_state=alpha install -a -B horde/horde

Preferred state is irrelevant to an *installer* - it should only  
matter to a *developer*.  Thus, if a developer has decided to use the  
package, it should be installed no matter the state.

And, for obvious reasons, we need to auto discover any additional  
channels found during dependency processing.


* This may already be known, but the '-B' flag is terribly dangerous  
(i.e. don't compile binaries).  After running an install of the base  
horde package, for example, I see this:

Installed packages, channel pear.horde.org:
===========================================
[...]
horde_lz4              1.0.2   stable

horde_lz4 is installed.  But it wasn't built at compile time.  Hmmm.   
"Well, that's not a problem, since later in INSTALL it tells me to run  
pecl install horde/horde_lz4."

Unfortunately, this is what happens:

root at ruraljuror:/usr/share/php# pecl install horde/horde_lz4
horde/horde_lz4 is already installed and is the same as the released  
version 1.0.2
install failed

In other words, a PECL-like package will NEVER be built if the -B flag  
is given (at least until the version changes on the file during a  
subsequent pear update call).

This can be fixed by doing a force install (-f).  But I have to admit  
that, as someone familiar with PEAR/PECL, this is not apparent to me  
at all.  For someone -- i.e. pretty much every one else -- they are  
going to think that horde_lz4 is properly installed on their system.

Takeaways from all this:
   1. Not saying we should remove -B, but we have to workaround this.
   2. Think our install documentation needs to be changed to require  
'-f' for any PECL install.
   3. I pick on horde_lz4 because, in my mind, it is pretty much a  
REQUIREMENT.  Really.  The performance benefits
      for the cost of installation are overwhelming.  So it pains me  
to see that pretty much anyone installing
      horde using the basic instructions is losing out on this (same  
with the fallback - lzf).


* What would be nice is a way to script all this, to hide the details  
from the user.  Even better, a script could then go and query the  
installer whether they want to install/compile the optional PECL  
packages and/or do some sanity checking.

Seems to me like we could do something like with PHARs like the  
composer script (getcomposer.org) that would handle all this for us.   
i.e.:

$ curl -sS https://install.horde.org/ | php

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list