RoundCube Calendar Plugin Installation

Hello all,

i just thought i'd give an A-Z summary of my installation of the RoundCube Caledar Plugin (as discussed here and here)

So.. it's been a real adventure.. this is going to be a very, very, very long post..

Basically, i started by following with the instructions found here..
But, as has been found in the posts linked above, there was a huge bug (and a few small ones) that took a lot of sleuthing to resolve.

So, i figured i'd post the whole thing here, to spare anyone the headaches i ran into..

So, to start with, i pretty much followed the instructions from the posts linked above:

(Note that the trailing backslashes are so you can copy-paste the entire block of code in your terminal. Also, this all assumes root privileges; add 'sudo' as needed)

The first step is to temporarily edit the file:
/etc/dnf/dnf.conf

and temporarily remove this from the 'exclude' line, then save the file (we'll add it back when we're done):
php*

Now, we install some stuff, make a backup of your Roundcube db, and do the install:
Code:
dnf install libldb-dev* openldap-dev* php-ldap php-cli php-json php-zip wget unzip epel-release; \
cd /tmp; \
git clone https://git.kolab.org/diffusion/RPK/roundcubemail-plugins-kolab.git; \
cd /var/www/html/roundcube/plugins/; \
cp -r /tmp/roundcubemail-plugins-kolab/plugins/calendar ./; \
cp -r /tmp/roundcubemail-plugins-kolab/plugins/libcalendaring ./; \
cd calendar; \
cp config.inc.php.dist config.inc.php; \
mysqldump -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube > /var/www/html/roundcube/da_roundcubeBK.sql; \
mysql -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube < /var/www/html/roundcube/plugins/calendar/drivers/database/SQL/mysql.initial.sql; \
mysql -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube < /var/www/html/roundcube/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql; \
mysql -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube < /var/www/html/roundcube/SQL/mysql.initial.sql;
Now to add the mention ‘calendar’, to the roundcube config file with your favorite editor; if you've not yet created a custom config for RoundCube, do this, otherwise, skip this step:
Code:
mkdir /usr/local/directadmin/custombuild/custom/roundcube; \
cp /var/www/html/roundcube/config/config.inc.php /usr/local/directadmin/custombuild/custom/roundcube/;
Now edit the file:
/usr/local/directadmin/custombuild/custom/roundcube/config.inc.php

and change this (basically adding the line 'calendar',):
Code:
$config['plugins'] = [
    'password',
    'archive',
    'zipdownload',
];
To this:
Code:
$config['plugins'] = [
    'password',
    'archive',
    'zipdownload',
    'calendar',
];
Now, check if these 2 files exist:
/usr/lib/libldap.so
/usr/lib/liblber.so

If they don't exist, do this:
Code:
ln -s /usr/lib64/libldap.so /usr/lib/libldap.so; \
ln -s /usr/lib64/liblber.so /usr/lib/liblber.so;
If you've not yet created a custom config for your version of php, do this, otherwise, skip this step -- replace the numbers behind php to match your version:
Code:
mkdir /usr/local/directadmin/custombuild/custom/php; \
cp /usr/local/directadmin/custombuild/configure/php/configure.php74 /usr/local/directadmin/custombuild/custom/php/;
This created the file:
/usr/local/directadmin/custombuild/custom/php/configure.php74

Now edit that file to add the following lines -- Make sure there is a trailing backslash \ at the end of every line except the last one!!:
--with-ldap=/usr \
--with-ldap-sasl=/usr

Now we install more stuff, and rebuild php.. This while take about 10 minutes..:
Code:
cd /tmp/; \
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm;  \
dnf --enablerepo=remi install php-sabre; \
/usr/local/directadmin/custombuild/build php -n;
We're done installing php-related stuff, so it's time to re-add the mention:
php*
to the 'exclude' line in the file:
/etc/dnf/dnf.conf

Now we install Composer:
Code:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer; \
cd /var/www/html/roundcube/; \
composer require sabre/dav;
There is one more this to do, which is to build the Calendar css file..
This was a major headache, because, even after installing all the appropriate ruby components, less kept failing with an error..

i copied everything to my Mac, where i built the css file; i'm including it here to save you the aggravation..
The file is called libkolab.min.css.zip, you need to copy it to the following folder, and unzip it (See Addendum 2 if you wish to build it yourself):
/var/www/html/roundcube/plugins/libkolab/skins/elastic/

so that you get:
/var/www/html/roundcube/plugins/libkolab/skins/elastic/libkolab.min.css

Finally, we build RoundCube, and, just for fun, rewrite_confs:
Code:
/usr/local/directadmin/custombuild/build rewrite_confs; \
/usr/local/directadmin/custombuild/build roundcube;
All Done!!!

i sincerely hope this helps!!





Addendum 1:
Here is the problem i kept running into before installing the remi repo, php-sabre, running composer, and rebuilding php..
Basically, it looked like everything worked; the calendar looked fine, but opening individual emails resulted in a 500 error..
See the screenshot for an example..


Addendum 2:
If you wish to build the file libkolab.min.css yourself, this is the command:
Code:
lessc -x /var/www/html/roundcube/plugins/libkolab/skins/elastic/libkolab.less > /var/www/html/roundcube/plugins/libkolab/skins/elastic/libkolab.min.css
But This will most likely not work since you likely don't have the less gem installed, so you'll probably need to do the following -- but this did not work for me!! So do with it what you will:
Code:
yum install rubygems gcc-c++ ruby-devel; \
gem install less; \
gem install therubyracer;
 

Attachments

Hi all, i'm so sorry, i just realized i made a couple of tiny errors, and since i can't edit the original post, here's the whole enchilada, all correct and verified..

Hello all,

i just thought i'd give an A-Z summary of my installation of the RoundCube Caledar Plugin (as discussed here and here)

So.. it's been a real adventure.. this is going to be a very, very, very long post..

Basically, i started by following with the instructions found here..
But, as has been found in the posts linked above, there was a huge bug (and a few small ones) that took a lot of sleuthing to resolve.

So, i figured i'd post the whole thing here, to spare anyone the headaches i ran into..

So, to start with, i pretty much followed the instructions from the posts linked above:

(Note that the trailing backslashes are so you can copy-paste the entire block of code in your terminal. Also, this all assumes root privileges; add 'sudo' as needed)

The first step is to temporarily edit the file:
/etc/dnf/dnf.conf

and temporarily remove this from the 'exclude' line, then save the file (we'll add it back when we're done):
php*

Now, we install some stuff, make a backup of your Roundcube db, and do the install:
Code:
dnf install libldb-dev* openldap-dev* php-ldap php-cli php-json php-zip wget unzip epel-release; \
cd /tmp; \
git clone https://git.kolab.org/diffusion/RPK/roundcubemail-plugins-kolab.git; \
cd /var/www/html/roundcube/plugins/; \
cp -r /tmp/roundcubemail-plugins-kolab/plugins/calendar ./; \
cp -r /tmp/roundcubemail-plugins-kolab/plugins/libcalendaring ./; \
cp -r /tmp/roundcubemail-plugins-kolab/plugins/libkolab ./; \
cd calendar; \
cp config.inc.php.dist config.inc.php; \
mysqldump -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube > /var/www/html/roundcube/da_roundcubeBK.sql; \
mysql -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube < /var/www/html/roundcube/plugins/calendar/drivers/database/SQL/mysql.initial.sql; \
mysql -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube < /var/www/html/roundcube/plugins/calendar/drivers/kolab/SQL/mysql.initial.sql; \
mysql -u da_admin -p`sed -n -e 's/passwd=//p' /usr/local/directadmin/conf/mysql.conf` da_roundcube < /var/www/html/roundcube/SQL/mysql.initial.sql;
Now to add the mention ‘calendar’, to the roundcube config file with your favorite editor; if you've not yet created a custom config for RoundCube, do this, otherwise, skip this step:
Code:
mkdir /usr/local/directadmin/custombuild/custom/roundcube; \
cp /var/www/html/roundcube/config/config.inc.php /usr/local/directadmin/custombuild/custom/roundcube/;
Now edit the file:
/usr/local/directadmin/custombuild/custom/roundcube/config.inc.php

and change this (basically adding the line 'calendar',):
Code:
$config['plugins'] = [
    'password',
    'archive',
    'zipdownload',
];
To this:
Code:
$config['plugins'] = [
    'password',
    'archive',
    'zipdownload',
    'calendar',
];
Now, check if these 2 files exist:
/usr/lib/libldap.so
/usr/lib/liblber.so

If they don't exist, do this:
Code:
ln -s /usr/lib64/libldap.so /usr/lib/libldap.so; \
ln -s /usr/lib64/liblber.so /usr/lib/liblber.so;
If you've not yet created a custom config for your version of php, do this, otherwise, skip this step -- replace the numbers behind php to match your version:
Code:
mkdir /usr/local/directadmin/custombuild/custom/php; \
cp /usr/local/directadmin/custombuild/configure/php/configure.php74 /usr/local/directadmin/custombuild/custom/php/;
This created the file:
/usr/local/directadmin/custombuild/custom/php/configure.php74

Now edit that file to add the following lines -- Make sure there is a trailing backslash \ at the end of every line except the last one!!:
--with-ldap=/usr \
--with-ldap-sasl=/usr

Now we install more stuff, and rebuild php.. This will take about 10 minutes..:
Code:
cd /tmp/; \
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm;  \
dnf --enablerepo=remi install php-sabre-vobj*; \
/usr/local/directadmin/custombuild/build php -n;
We're done installing php-related stuff, so it's time to re-add the mention:
php*
to the 'exclude' line in the file:
/etc/dnf/dnf.conf

Now we install Composer:
Code:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer; \
cd /var/www/html/roundcube/; \
composer require sabre/dav;
There is one more thing to do, which is to build the Calendar css file..
This was a major headache, because, even after installing all the appropriate ruby components, less kept failing with an error..

i copied everything to my Mac, where i built the css file; i'm including it here to save you the aggravation..
The file is called libkolab.min.css.zip, you need to copy it to the following folder, and unzip it (See Addendum 2 if you wish to build it yourself):
/var/www/html/roundcube/plugins/libkolab/skins/elastic/

so that you get:
/var/www/html/roundcube/plugins/libkolab/skins/elastic/libkolab.min.css

Finally, we build RoundCube, and, just for fun, rewrite_confs:
Code:
/usr/local/directadmin/custombuild/build rewrite_confs; \
/usr/local/directadmin/custombuild/build roundcube;
All Done!!!

i sincerely hope this helps!!





Addendum 1:
Here is the problem i kept running into before installing the remi repo, php-sabre, running composer, and rebuilding php..
Basically, it looked like everything worked; the calendar looked fine, but opening individual emails resulted in a 500 error..
See the screenshot for an example..
RC-Mod-screenie.jpg



Addendum 2:
If you wish to build the file libkolab.min.css yourself, this is the command:
Code:
lessc -x /var/www/html/roundcube/plugins/libkolab/skins/elastic/libkolab.less > /var/www/html/roundcube/plugins/libkolab/skins/elastic/libkolab.min.css
But This will most likely not work since you likely don't have the less gem installed, so you'll probably need to do the following -- but this did not work for me!! So do with it what you will:
Code:
yum install rubygems gcc-c++ ruby-devel; \
gem install less; \
gem install therubyracer;
 
Top