SynoCommunity/spksrc — pull request #530 by moneytoo (2013-05-15 18:16:31+00:00)
Title: Add Horde Groupware/Webmail

Name: Spk name is just Horde because installer should be able to install all Horde applications. Currently installer offers Groupware and Webmail Editions.

Installation: Spk contains only unpacked Pear binary/library while actual Horde installation is online and runs on device. I tested offline install (pack all required packages to spk) and it works but it doesn't make the installation significantly shorter. Pear can either install all packages offline or all online - pre-caching files doesn't work. Plus offline install doesn't create caches required for later updates.
Because of this, Horde's update mechanism and different versions of tens of installed packages I decided for online install.

Installation length: Horde Groupware/Webmail consists of about 150 packages, 25 MB of .gz files in total. Even on my DS212+ (120 Mbit internet connection) it takes 10-20 minutes to finish install.
Because of that, the actual install is send to background and temporary page is shown to user meanwhile.

Database: There are CLI and Web ways for creating database tables.
```horde-db-migrate``` - creates and updates tables but some tables aren't created unless configs exist first
```webmail-install```/```groupware-install``` - creates all tables and configs but it's interactive - so the only option is to use Python with ```pexpect``` module
web UI - go to configuration and click on update buttons (database/configurations)
I use ```horde-db-migrate``` but one or two user clicks are requried. Python dependency seems just too much.

Authentication backend: Horde offers insane amount of authentications (like LDAP, Radius, PAM etc). However SQL authentication can be activated completely from web UI (switch to SQL authentication, create new user, add user name to list of admins, logout). SQL authentication works only after the user clicked to update database/configs so it's not part of the installation.

Update mechanism: Some Horde files are in www dir, some are next to Pear libraries. I decided to save only db and all configs and do full reinstall. Update then takes more time but I belive it's safer that way.

Modifications to Pear: I extended the expect script so Pear doesn't attempt to write outside of work directory.

I'm going to contact Synology in a matter of PHP/Zlib bug (gzseek) mentioned in #523. Non interfering workaround should be ok for now.

It really seems like a great software, I hope some users will find it useful.