On Wednesday 20 January 2016 10:43 PM, Ximin Luo wrote:
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

I had removed the calenarserver_upgrade instructions from README.Debian because it was not working and I was assuming that when I start calendarserver the upgrade will happen automatically. I will take care of all the points that you have mentioned and also mostly write a script for xml file upgrade while installing calendarserver 7.0. But this is odd. I feel, upstream should take care of all these upgrades automatically :).

Thanks for all the help. I just can't tell you how awesome you have been. I do have one final request. I need the packages twextypy and pg8000 to be uploaded to Debian. I have reached out to my mentor but have not yet heard. He gets busy at times. In case I do not hear from him, would you be willing to upload these two packages? I have already raised ITP for them.


Thanks,
Rahul.

Reply via email to