On 20/01/16 17:26, Ximin Luo wrote: > On 20/01/16 15:23, Ximin Luo wrote: >> Hey, I just tested 7.0+dfsg from git and it seems to work fine. Thanks for >> the work, and looking forward to the eventual upload! Just a few notes: >> >> (a) [..] >> >> (b) [..] >> >> (c) [..] >> >> (d) [..] >> > > (e) [..] > > (f) [..] > > (g) [..] > > (h) calendarserver_upgrade is not working for me at the moment. I've migrated > accounts.xml to the new format (<accounts> -> <directory> and <user> -> > <record>) and I get this: > > $ sudo calendarserver_upgrade -D -s > > > Converting augments.xml > Traceback (most recent call last): > [..] >
Oh, this was my fault. It works if you run it as `sudo -u caldavd -g caldavd calendarserver_upgrade` (the `-D` is optional). So we should put that in README.Debian. But then you get a lot of twistd errors in /var/log/caldavd/error.log: 2016-01-20 17:31:24+0100 [-] [directoryproxy] Usage: twistd [options] 2016-01-20 17:31:24+0100 [-] [directoryproxy] Options: [..] 2016-01-20 17:31:24+0100 [-] [directoryproxy] /usr/bin/twistd: Unknown command: caldav_directoryproxy This is due to a bug in calendarserver, which we should forward at some point. The easiest way to work around it is to patch: ~~~~ --- /usr/lib/python2.7/dist-packages/twisted/plugins/caldav.py 2016-01-20 17:53:23.741080020 +0100 +++ /usr/lib/python2.7/dist-packages/twisted/plugins/caldav.py 2016-01-20 17:49:19.201450679 +0100 @@ -50,5 +50,9 @@ return self._serviceMaker.makeService(options) -TwistedCalDAV = TAP("calendarserver.tap.caldav.CalDAVServiceMaker") -DirectoryProxy = TAP("txdav.dps.server.DirectoryProxyServiceMaker") +class T1(TAP): + pass +class T2(TAP): + pass +TwistedCalDAV = T1("calendarserver.tap.caldav.CalDAVServiceMaker") +DirectoryProxy = T2("txdav.dps.server.DirectoryProxyServiceMaker") ~~~~ after doing all of this, I successfully upgraded my instance of 5.2.2+dfsg-2 to 7.0+dfsg-1. (j) You have to upgrade accounts.xml very specifically. Like this: ~~~~ old ~~~~ <accounts realm="Local Realm"> <user> <uid>admin</uid> <guid>XXXX</guid> <password>ZZZZ</password> <name>Anna Mouse</name> </user> </accounts> ~~~~ new ~~~~ <directory realm="Local Realm"> <record> <uid>XXXX</uid> <!-- i.e. same as previous GUID --> <guid>XXXX</guid> <password>ZZZZ</password> <short-name>admin</short-name> <!-- i.e. same as previous UID --> <full-name>Anna Mouse</full-name> <!-- i.e. same as previous name --> </record> </directory> ~~~~ You need to do this *before* running calendarserver_upgrade, otherwise that won't work. If you edit accounts.xml a different way, calendarserver will appear to work but then clients will get authentication/resource-not-found errors. I tested the above with tested with DavDroid 0.9.1.3 and IceOwl 4.0.5, synchronisation (add/del) events works both ways as before. And I think that's everything, finally. :) X -- GPG: 4096R/1318EFAC5FBBDBCE git://github.com/infinity0/pubkeys.git