[dev] Installation Thoughts

Jan Schneider jan at horde.org
Fri Oct 18 19:36:11 UTC 2013


Zitat von Michael M Slusarz <slusarz at horde.org>:

> 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.

Wrong, because it will also install alpha packages as soon as they  
exist, no matter what the developer suggested.

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

I've pondered suggesting to enable auto_discover too, but we don't  
have any required dependencies other than from pear yet, so this  
really hasn't been an issue so far.

> * 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).

The idea is (see my other reply), that you should be able to install  
all, even optional dependencies, even if you don't have a build  
environment and required libraries available. This is especially true  
for installing into a personal pear space, but we also want the  
installation to succeed immediately for admins. This only works with  
the -B flag unfortunately.

> 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.

FWIW one should always use upgrade -f, not install -f.

> 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.

It's only required if you initially installed with -B

>   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).

We may change the order so that the -a instructions come before the -a  
-B instructions.

> * 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]


-- 
Jan Schneider
The Horde Project
http://www.horde.org/



More information about the dev mailing list