Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Radicale thoughts

In a wild and random activity that might help me leave Google someday, I decided to reinvestigate radicale. I had never set it up before; just read a lot about it. Now it was time to stand it up on a pre-production server.

Compiling radicale3 for CentOS 7

Radicale3 can be compiled for centos 7 just fine! You need to compile some of the python3 dependencies for it, which you can adapt with minimal changes from the fedora rpm sources.

Use https://src.fedoraproject.org/rpms/radicale for git clone sources. radicale needs custom python36 packages for:

  • python36-passlib
  • python36-vobject >= 0.9.6

And radicale.spec run 's/policycoreutils-python-utils/policycoreutils-python/g'

python36-passlib needs:

  • python3-nose
  • needs python36-bcrypt installed; it's already available but not in the dep list?

python3-nose needs, and then built just fine with no changes

  • python3-coverage

python3-coverage built just fine, no changes.

python36-vobject needs:

  • to be adjusted to use python36-dateutil package name

radicale application needs python36-dateutil>=2.7.3, which therefore needs to be built.

python-dateutil needs:

  • to be adjusted to use python36 buildreq names, and customized to disable building docs. Fairly simple spec modifications.

Radicale can then be installed from the rpms that you built:

$ sudo yum install ~/rpmbuild/RPMS/noarch/radicale3-*.rpm ~/rpmbuild/RPMS/noarch/python36-radicale3-3.1.7-30.el7.noarch.rpm
Installed:
  python36-radicale3.noarch 0:3.1.7-30.el7   radicale3.noarch 0:3.1.7-30.el7   radicale3-httpd.noarch 0:3.1.7-30.el7  
  radicale3-selinux.noarch 0:3.1.7-30.el7

Running radicale

I have not tested any authentication on my radicale server yet. I went out and exported my entire google contacts into the .vcf format (labeled "vCard for iOS Contacts"). I used the web interface of radicale to sign in with a blank or any password (no auth yet, remember?). I then tried to upload my 80KB .vcf file. It fails, and the server logs indicate that FN cannot be blank. FN is first name, and I had to manually poke around my .vcf file to find where I had a blank first name.

$ awk 'BEGIN{c=0} /FN:/{a=a+1} /END:VCARD/{b=b+1;if(b>(a+c)){c=c+1;print NR}} END{print a,b}' < contacts.vcf 
2506
2557
390 392

So these were the line numbers where END:VCARD occurred without a preceding FN: field. So I had two contacts (which I discovered after I had found and finally fixed the first one). I would actually consider this a bug in radicale, but after investigating the github issues for the app repo, it's related to that Radicale conforms to spec and the spec says a Vcard must have a FN field. So at least now I've fixed those two contacts!

I then set up RadicaleInfCloud which provides a web interface to the calendars and contact book. It looks really slick, but I haven't tested all my use cases yet.

Next steps

Investigate these use cases

  1. Can I import an invitation, say from my email, e.g., click the .ics invitation to an event, and add it to my calendar?
  2. Can I export an invitation, probably in .ics format, to send to others so they can add my event to their calendar?

If I go to production with this solution: 1. build copr repo with these customized packages! 2. install radicale with (ldap) authentication 3. install radicale_infcloud with auth

Comments