wissel.net

Usability - Productivity - Business - The web - Singapore & Twins

This article is part of a mini series. Read them all:

Adventures in Calendars

A calDAV reference server


After having a look at the many standards involved, it is time to check out a standard or reference implementation. Cutting a long story short: it looks to me the OpenSource Apple Calendar and Contacts Server (ccs) is my best bet. While the documentation is rather light, it has been battle tested with my range of targeted clients

To Docker or to VM?

Trying to avoid the Works on my machine certification, a native install was out of the question. So Docker or VM? A search yielded one hit (with explanation) and none for for a ready baked VM. On closer inspection, the docker image, being 2 years old, didn't use the current version, so we had to re-create the image. While on it, I decided to give a VM a shot:

Apple calendar server on Ubuntu 18.04

To keep things light, I started with the current LTS version 18.04 desktop and a minimal install with 4G RAM. First order after the install is to get updates and install modules for the VirtualBox extensions:

sudo apt update
sudo apt install gcc make perl
sudo apt dist-upgrade

Thereafter "insert" the add-on CD, install the add-ons and create a snapshot. Next step is to install some of the needed packages. Took a little experimentation to get there:

sudo apt install libsasl2-dev python-dev libldap2-dev libssl-dev curl \
    make gcc bzip2 libreadline-dev zlib1g-dev libkrb5-dev \
    python-pip libffi-dev libffi6 memcached git python-xattr \
    postgresql postgresql-contrib libssl1.0

The libssl1.0 is essential (and not mentioned anywhere), to ensure the outdated Python2.7 can work with existing security libraries

PostgreSQL

In the previous step we installed postgres system wide. This affords a new username postgres who owns the database. My current user calendar didn't have access, so I needed to add this to postgres. Failing so would trigger the download of Postgres 9.5.3 sources (instead of current 10.10) and a compilaton error:

sudo su - postgres -c "createuser calendar"
sudo -u postgres psql

and thereALTER USER calendar Superuser Createrole CreateDB Replication BypassRLS;. Use \q to exit psql.
Then, check for the file bin\_build.sh and replace the following lines:

 if command -v postgres > /dev/null; then
    using_system "Postgres";
  else
    local v="9.5.3";

with

 if command -v psql > /dev/null; then
    using_system "Postgres";
  else
    local v="10.10";

Finally edit ~/.profile and add PATH=$PATH:/usr/lib/postgresql/10/bin so the Postgres binaries can be found.

Next on the list: clone the ccs and run the develop command. I had to do that more than once to get all dependencies right. If you installed the packages as listed above, you are all good.

mkdir ~/CalendarServer
cd ~/CalendarServer
git clone https://github.com/apple/ccs-calendarserver.git
cd ccs-calendarserver
git checkout release/CalendarServer-9.3-dev
bin/develop

If this goes off to error land, make sure you had installed libssl1.0. Without it the configuration will fail.
You are now able to start the calendar server as your reference using bin/run -n.


Posted by on 11 October 2019 | Comments (0) | categories: calDAV HTTP(S) Protocols

Comments

  1. No comments yet, be the first to comment