CalendarServer
From Arnout Engelen
http://trac.calendarserver.org/
Contents |
[edit] Dependencies
CalendarServer currently (as of march 2009) conflicts with the current version of python-pyxattr in ubuntu (0.4.0). If you remove it, ./run will fetch the proper version automatically.
apt-get remove python-pyxattr
The site has no list of requirements yet. The ones I didn't have yet:
apt-get install curl
[edit] Where to install
Note that when you check out CalendarServer in /foo/bar/CalendarServer, './run -s' will install a bunch of stuff in other directories under /foo/bar/.
[edit] Running
Follow the instructions at https://trac.calendarserver.org/wiki/QuickStart
[edit] xattrs
You need to enable 'user xattrs' on the filesystem you want to run the calendarserver. In my case:
sudo mount -o remount,rw,user_xattr rootfs /
[edit] memcached
If memcached is whining:
[memcached] memcached: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
I submitted a patch for this problem at here.
Disabling memcached is not a workaround, as it will introduce problems (such as being unable to get resources due to 'Authentication failed: Invalid nonce value' errors).
[edit] twisted.cred
You might get errors like:
exceptions.ImportError: No module named strcred
More information on twisted.cred is at http://python.net/crew/mwh/apidocs/twisted.cred.html . I worked around this by removing the python-twisted-core package from my system, but of course a better solution would be preferrable.
[edit] creating calendars
After you've added a user, you can subscribe to your calendar though i.e. sunbird by pointing it to http://localhost:8008/calendars/users/username/calendar . This calendar is automatically generated. You can't just create more calendars by creating directories though: those will not have a 'calendars' entry in the {DAV:}resourcetype attribute. Instead, use the mkcal command from the webcal client library shell.
[edit] Caldav4j interoperability
One of the caldav4j unittests sends a REPORT query to 'http://localhost:8008/calendars/users/raboof/caldav4j'. calendarserver responds with a '301 moved permanently' to 'http://localhost:8008/calendars/users/raboof/caldav4j/' (adding the '/'). http://www.ietf.org/rfc/rfc2616.txt 10.3.2 (HTTP) says about this:
If the 301 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.
An automatic redirect is thus not allowed. Either caldav4j should include the '/' or calendarserver shouldn't return a 301, I suppose.
All examples in http://www.ietf.org/rfc/rfc4791.txt include a trailing '/' for REPORT queries.
According to http://www.ietf.org/rfc/rfc2518.txt:
There is a standing convention that when a collection is referred to by its name without a trailing slash, the trailing slash is automatically appended. Due to this, a resource may accept a URI without a trailing "/" to point to a collection. In this case it SHOULD return a content-location header in the response pointing to the URI ending with the "/". For example, if a client invokes a method on http://foo.bar/blah (no trailing slash), the resource http://foo.bar/blah/ (trailing slash) may respond as if the operation were invoked on it, and should return a content-location header with http://foo.bar/blah/ in it. In general clients SHOULD use the "/" form of collection names.
