[CalendarServer-dev] [debian] testing trunk

Glyph glyph at twistedmatrix.com
Wed Nov 14 13:52:06 PST 2012


On Nov 14, 2012, at 3:04 AM, Fredrik Unger <fred at tree.se> wrote:

> This discussion is more debian related, but it might help trunk as well. 

Thanks for sharing this update.

> This is a list of steps and fixes I made for the packaging of trunk with regards
> to the base I have for 4.1.1 which in turn builds on the debian 3.2 package.
> 
> First attempt to build trunk as a package failed in dependency on pycalendar [1].
> (upgrading pycalendar to r214 took 3 attempts as it was not clear what branch to use)

This is "documented" by the call to py_dependency in support/build.sh.  I realize that this is possibly not the best place for it.  How would it be best to surface that information for you, so you would have noticed it?  Where do you typically go looking for that sort of information?

> With the dependencies installed the server died with [2]
> twext.enterprise.dal.parseschema.ViolatedExpectation: Expected Token.Keyword got None:

This is very likely because we depend on a very specific version of python-sqlparse: 0.1.2.  Every subsequent version of python-sqlparse has broken something, so we upgrade that dependency very conservatively.  What version were you working with?

> This was fixed with patch [3] (simple whitespace addition).

Thanks.  Can you attach this patch to a bug in Trac instead of a mailing list message?  It would be much more likely to get applied that way.

> Now the same error as before appeared.
> I also got some information from Peter Mogensen (off list) that detailed that
> he saw the same problem but only when the debian package was installed. 
> (eg, a pure SVN checkout worked, but failed when the debian package was present)
> 
> He reported it was totally dependent on the presens
> /usr/share/pyshared/twisted/plugins/caldav.py

This is most likely because './run' is pulling all of its dependencies from its working directory, rather than the system.  On your system, something - probably a Twisted plugin from some other package which is neither Twisted nor CalendarServer - is pulling in twisted.internet.address before this code can run.  Can you run 'python -vvvv `which twistd` caldavd --help' and look for imports of the twisted.internet.address module?

> I did several tests, but at the end I "fixed it" by removing the RuntimeError
> exception.

Hmm.  Rather than removing the exception you should avoid doing the patches as well.  This will break IPv6 support but otherwise things should work.  You can restore that functionality by just upgrading to a current version of Twisted, anyway.

> [4] The logging in the patch did not work, it can be left out. 
> I probably do not use the log as it is meant to be used. 
> 
> I added a printout in the twext/backport/internet/tcp.py
> and it got printed, so I assume that the patching went fine.
> 
> Lastly psutil in Debian is version 0.5.1 and version 0.6.0 is needed to
> have virtual_memory method. [5]

Once again, we have a lot of dependencies and we don't support a wide range of versions of them, especially when subsequent versions have features that we need :).

> I have not yet backported the change to 4.1.1 but do not expect problems, I just
> wanted to check if the change (removing the exception) is reasonable ?
> 
> If ok, I will prepare the 4.1.1 debian package and put it online for testing.

I guess these changes are OK, but please put everything into Trac so we can eventually integrate your changes (or alternate fixes to those problems) so you do not have to carry a lot of patches in Debian.

Thanks,

-glyph
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-dev/attachments/20121114/9d287568/attachment-0001.html>


More information about the calendarserver-dev mailing list