--- calendarserver-1.2.dfsg.orig/debian/README.Debian +++ calendarserver-1.2.dfsg/debian/README.Debian @@ -0,0 +1,63 @@ +calendar server for Debian +========================== + +Basic Setup +=========== +Since calendarserver uses extended attributes you must mount the filesystem +that contains the calendars (/var/spool/caldavd by default) with extended +attributes enabled. On ext2/ext3 filesystems use the user_xattr mount option, +XFS has extended attributes enabled by default. + +You have to add a /etc/caldavd/accounts.xml to tell caldavd about your accounts +and users. See /usr/share/doc/calendarserver/examples/accounts.xml for an +example. Likewise you have to add a /etc/caldavd/sudoers.plist. Both files have +to be present, otherwise the calendarserver will not work. + +By default calendarserver listens on localhost only so the URI to your caldav +calendar will typically look like: + + http://localhost:8008/calendars/users//calendar/ + +where is the username of a calendarserver user as specified in +accounts.xml. And for groups defined in accounts.xml it's: + + http://localhost:8008/calendars/groups//calendar/ + + +Loadbalancing +============= +In order to enable laod balancing onto different processors/cores you need to +install python-pydirecotor and set the ProcessCount in +/etc/caldavd/caldavd.plist accordingly (0 means one process per +processor/core). + + +Enabling SPNEGO/Kerberos +======================== + +To enable SPNEGO/kerberos authentication you have to specify the name of +the ServicePrincipal in /etc/caldavd/caldavd.plist, e.g.: + + + Kerberos + + Enabled + + ServicePrincipal + HTTP/caldavd.example.com@EXAMPLE.COM + + +The name of the service principal must be HTTP/@ since this is +what e.g. iceowl and icedove with the iceowl-extension ask for. The key of +this principal must be present in /etc/krb5.keytab and the keytab must be +readable by the calendarserver which can be achieved by: + +chgrp caldavd /etc/krb5.keytab +chmod g+r /etc/krb5.keytab + +Note: if you use iceowl/iceowl-extension the +network.negotiate-auth.trusted-uris in iceowl/icedove must match on your +calendarservers uri otherwise SPNEGO will not work. A good choice is +"https://". + + -- Guido Guenther Thu, 30 Apr 2008 16:17:56 +0100 --- calendarserver-1.2.dfsg.orig/debian/TODO +++ calendarserver-1.2.dfsg/debian/TODO @@ -0,0 +1,2 @@ +* fix apidoc build +* push pydirector patches upstream --- calendarserver-1.2.dfsg.orig/debian/calendarserver-doc-api.docs +++ calendarserver-1.2.dfsg/debian/calendarserver-doc-api.docs @@ -0,0 +1 @@ +#doc/apidocs --- calendarserver-1.2.dfsg.orig/debian/calendarserver.TODO +++ calendarserver-1.2.dfsg/debian/calendarserver.TODO @@ -0,0 +1,2 @@ + + --- calendarserver-1.2.dfsg.orig/debian/calendarserver.dirs +++ calendarserver-1.2.dfsg/debian/calendarserver.dirs @@ -0,0 +1,3 @@ +/var/log/caldavd +/var/run/caldavd +/var/spool/caldavd --- calendarserver-1.2.dfsg.orig/debian/calendarserver.docs +++ calendarserver-1.2.dfsg/debian/calendarserver.docs @@ -0,0 +1 @@ +README --- calendarserver-1.2.dfsg.orig/debian/calendarserver.examples +++ calendarserver-1.2.dfsg/debian/calendarserver.examples @@ -0,0 +1,2 @@ +conf/accounts.xml +conf/sudoers.plist --- calendarserver-1.2.dfsg.orig/debian/calendarserver.init.d +++ calendarserver-1.2.dfsg/debian/calendarserver.init.d @@ -0,0 +1,84 @@ +#! /bin/sh +# +# calendarserver startup script +# +### BEGIN INIT INFO +# Provides: caldavserver +# Required-Start: $network +# Required-Stop: $network +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: CalDAV Calendarserver +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/bin/caldavd +NAME=caldavd +DESC=calendarserver +RUNDIR=/var/run/caldavd/ +SPOOLDIR=/var/spool/caldavd/ + +test -x $DAEMON || exit 0 + +# Include calendarserver defaults if available +if [ -f /etc/default/calendarserver ] ; then + . /etc/default/calendarserver +fi + +. /lib/lsb/init-functions + +set -e + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + mkdir -p $RUNDIR + chown --reference=$SPOOLDIR $RUNDIR + if start-stop-daemon --start --quiet --pidfile $RUNDIR$NAME.pid \ + --exec $DAEMON -- $DAEMON_OPTS 2>/dev/null; then + log_end_msg 0 + RET=0 + else + log_end_msg 1 + RET=1 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + if start-stop-daemon --stop --quiet --pidfile $RUNDIR$NAME.pid \ + --exec /usr/bin/python; then + log_end_msg 0 + RET=0 + else + log_end_msg 1 + RET=1 + fi + ;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + log_daemon_msg "Restarting $DESC" "$NAME" + start-stop-daemon --stop --quiet --oknodo --pidfile \ + $RUNDIR$NAME.pid --exec /usr/bin/python + sleep 1 + if start-stop-daemon --start --quiet --pidfile \ + $RUNDIR$NAME.pid --exec $DAEMON -- $DAEMON_OPTS 2>/dev/null; then + log_end_msg 0 + RET=0 + else + log_end_msg 1 + RET=1 + fi + ;; + *) + N=/etc/init.d/$NAME + # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $N {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit $RET --- calendarserver-1.2.dfsg.orig/debian/calendarserver.manpages +++ calendarserver-1.2.dfsg/debian/calendarserver.manpages @@ -0,0 +1,2 @@ +doc/caldavd.8 +doc/caladmin.8 --- calendarserver-1.2.dfsg.orig/debian/calendarserver.postinst +++ calendarserver-1.2.dfsg/debian/calendarserver.postinst @@ -0,0 +1,52 @@ +#!/bin/sh +# postinst script for calendarserver +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + if ! getent passwd caldavd >/dev/null 2>&1; then + adduser --system --home /var/spool/caldavd --no-create-home \ + --gecos "calendarserver daemon" --group --disabled-password \ + caldavd + fi + adduser caldavd ssl-cert + + for dir in spool run log; do + if ! dpkg-statoverride --list /var/$dir/caldavd >/dev/null 2>&1; then + chown caldavd: /var/$dir/caldavd + fi + done + ;; + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + --- calendarserver-1.2.dfsg.orig/debian/changelog +++ calendarserver-1.2.dfsg/debian/changelog @@ -0,0 +1,190 @@ +calendarserver (1.2.dfsg-3) unstable; urgency=low + + [ Guido Guenther ] + * upload to unstable - we no longer conflict on twisted + * [31d2b55] drop dependency on ctypes - it's already included in python2.5 + * [652da62] Mention XFS (Closes: #483987) - thanks to Peter Mann + * [29edb85] add Homepage: + * [0c5bcee] redirect stderr to /dev/null on daemon restart This is a + temporary workaround until the twisted deprecation warnings got + fixed. + + [ Noel Köthe ] + * [1c03474] xs- prefix from Vcs fields + + -- Guido Guenther Thu, 19 Jun 2008 17:05:15 +0200 + +calendarserver (1.2.dfsg-2) experimental; urgency=low + + [ Guido Guenther ] + * fix epydoc errors + * use a python-twisted-calendarserver that doesn't ship the whole twisted + + [ Noel Köthe ] + * bind the caldavd only to localhost as described in README.Debian + + -- Guido Guenther Mon, 05 May 2008 17:28:58 +0200 + +calendarserver (1.2.dfsg-1) unstable; urgency=low + + [ Guido Guenther ] + * New upstream 1.2 + * add NSS directory backend + * bump python-twisted-calendarserver dependency to one that has the patches + for 1.2 + * README.Debian: use non SSL port + + [ Noel Köthe ] + * README.Debian: + * s/sudoers.xml/sudoers.plist/ + * correcting path + * update TODO + + -- Guido Guenther Sun, 27 Apr 2008 10:36:57 +0200 + +calendarserver (1.2.dfsg~dev020221-5) unstable; urgency=low + + * first upload to unstable + * tighten dependencies and drop suggests superflous suggests + * switch to Python 2.5 + * README.Debian: add URI for group calendars + + -- Guido Guenther Sun, 20 Apr 2008 13:59:04 +0200 + +calendarserver (1.2.dfsg~dev020221-4) experimental; urgency=low + + * update README.Debian on SPNEGO/Kerberos + * fix snakeoil certificate paths + + -- Guido Guenther Sun, 16 Mar 2008 12:48:34 +0100 + +calendarserver (1.2.dfsg~dev020221-3) experimental; urgency=low + + * repackage upstream branch and remove RFCs too make the document dfsg clean + * add license of bin/xattr + + -- Guido Guenther Wed, 27 Feb 2008 10:31:48 +0100 + +calendarserver (1.2~dev020221-2) experimental; urgency=low + + * disable the api-doc generation until it works with newer epydoc + + -- Guido Guenther Tue, 26 Feb 2008 11:01:00 +0100 + +calendarserver (1.2~dev020221-1) experimental; urgency=low + + * first upload to experimental (Closes: #384644) + * switch to upstreams 1.2 development branch + * drop krb5 patch, applied upstream + * refreh paths.diff + * README.Debian: add calendar URI + * depend on renamed python-twisted-calendarserver package + + -- Guido Guenther Thu, 21 Feb 2008 17:54:56 +0100 + +calendarserver (0.0.svn1755-1) experimental; urgency=low + + * UNRELEASED + * New Upstream SVN Snapshot + * update dependencies + * drop opendirectory-dummy.patch, not needed anymore, can be disabled via + the config file + * drop caldavd-kerberos.patch, not needed anymore. Kerberos can be enabled + via config file now + * update paths.diff to new layout and config options + * new fix-krb-service.diff: fix kerberos service names + * calendarserver.init: daemon switches users itself, new commandline options + * set process count to avoid pydirector for now + + -- Guido Guenther Thu, 09 Aug 2007 10:24:46 +0200 + +calendarserver (0.0.svn209-2) calendarserver; urgency=low + + * create /var/run/caldavd (needed inc ase /var/run is on a tmpfs) + * drop dependencies on python-dateutil and python-zopeinterface since + these are indirect dependencies of python-vobject and + twisted-calendarserver respectively. + * build the api documentation + + -- Guido Guenther Mon, 2 Oct 2006 11:03:27 +0200 + +calendarserver (0.0.svn209-1) calendarserver; urgency=low + + * New Upstream Version + * depend on newer pykerberos + * depend on newer twisted-calendarserver + + -- Guido Guenther Wed, 27 Sep 2006 12:34:28 +0200 + +calendarserver (0.0.svn197-1) calendarserver; urgency=low + + * New Upstream Version + * depend on newer twisted + * twiddle path patch to apply again + + -- Guido Guenther Tue, 26 Sep 2006 10:21:00 +0200 + +calendarserver (0.0.svn188-1) unstable; urgency=low + + * New upstream version 0.0.svn188 + * bump dependencies on python-vobject + * depend on python-xml + * adjust patch path to look for twisted unter /usr/lib/caldavd + since we ship our own twisted version in this subdir now. This way + we don't have to conflict with the twisted shipped in Debian. + * depend on twisted-calendarserver (which was formerly + python-twisted-acl-branch) + + -- Guido Guenther Mon, 25 Sep 2006 18:33:19 +0200 + +calendarserver (0.0.svn142-3) unstable; urgency=low + + * add a sample diff for kerberos authentication + + -- Guido Guenther Tue, 19 Sep 2006 10:06:53 +0200 + +calendarserver (0.0.svn142-2) unstable; urgency=low + + * depend on python-plistlib + + -- Guido Guenther Mon, 18 Sep 2006 19:54:24 +0200 + +calendarserver (0.0.svn142-1) unstable; urgency=low + + * new SVN version (only patches merged into twisted) + * depend on more recent twisted-acl-branch + + -- Guido Guenther Mon, 18 Sep 2006 17:06:15 +0200 + +calendarserver (0.0.svn135-2) unstable; urgency=low + + * really drop upstream-patches/ + * fix restart target in init script, use LSB logging + * add LSB header + + -- Guido Guenther Mon, 18 Sep 2006 16:00:45 +0200 + +calendarserver (0.0.svn135-1) unstable; urgency=low + + * New upstream svn version + * no need to rename patches to upstream-patches, upstream changed that to + lib-patches + * depend on newer twisted-acl-branch and newer pykerberos + * remove superflous heimdal-dev from build-depends + * dropped patches (applied upstream): + * bashism + * move-patch-dir + * linux-xattr + * use snake-oil certificates for SSL + + -- Guido Guenther Fri, 15 Sep 2006 18:38:10 +0200 + +calendarserver (0.0.svn62-1) unstable; urgency=low + + * Initial release + * Add dummies for OpenDirectory interaction from: + http://svn.macosforge.org/projects/calendarserver/browser/PyOpenDirectory + until we have a proper port + + -- Guido Guenther Wed, 6 Sep 2006 13:45:40 +0200 + --- calendarserver-1.2.dfsg.orig/debian/compat +++ calendarserver-1.2.dfsg/debian/compat @@ -0,0 +1 @@ +5 --- calendarserver-1.2.dfsg.orig/debian/control +++ calendarserver-1.2.dfsg/debian/control @@ -0,0 +1,27 @@ +Source: calendarserver +Section: python +Priority: optional +Maintainer: Calendarserver Maintainers +Uploaders: Guido Guenther +Build-Depends: cdbs (>= 0.4.43), debhelper (>= 5), quilt, python-dev, python-central +Standards-Version: 3.7.3 +Vcs-Git: git://git.debian.org/git/calendarserver/calendarserver.git +Vcs-Browser: http://git.debian.org/?p=calendarserver/calendarserver.git +Homepage: http://calendarserver.org +XS-Python-Version: >= 2.4 + +Package: calendarserver +Architecture: all +Depends: ${python:Depends}, ${misc:Depends}, + python-kerberos (>= 1.0), python-pysqlite2, python-pyopenssl, + python-vobject (>= 0.4.8), python-twisted-calendarserver (>= 0.2.0.svn19773-3), + python-dateutil (>= 1.2), + python-xattr, python-plistlib, python-xml, + ssl-cert, adduser, lsb-base (>= 3.0-10) +Suggests: python-pydirector +XB-Python-Version: ${python:Versions} +Description: Apple's Calendar Server + Apple's Calendarserver is a standalone caldav server with: + * Basic or Kerberos Authentication + * support for shared calendars + --- calendarserver-1.2.dfsg.orig/debian/copyright +++ calendarserver-1.2.dfsg/debian/copyright @@ -0,0 +1,213 @@ +This package was debianized by Guido Guenther on +Sun, 27 Aug 2006 19:53:15 +0200. + +It was downloaded from http://trac.macosforge.org/projects/collaboration/browser/calendarserver/ + +Upstream Author: Cyrus Daboo + +Copyright: 2006 Apple Computer, Inc. All rights reserved. + +License: + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +Except for bin/xattr which is: + +## +# Copyright (c) 2007 Apple Inc. +# +# This is the MIT license. This software may also be distributed under the +# same terms as Python (the PSF license). +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +## --- calendarserver-1.2.dfsg.orig/debian/pycompat +++ calendarserver-1.2.dfsg/debian/pycompat @@ -0,0 +1 @@ +2 --- calendarserver-1.2.dfsg.orig/debian/pyversions +++ calendarserver-1.2.dfsg/debian/pyversions @@ -0,0 +1 @@ +2.5- --- calendarserver-1.2.dfsg.orig/debian/rules +++ calendarserver-1.2.dfsg/debian/rules @@ -0,0 +1,21 @@ +#!/usr/bin/make -f + +DEB_PYTHON_SYSTEM = pycentral +DEB_DH_INSTALLINIT_ARGS = --no-start + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk + +DEB_DESTDIR=$(CURDIR)/debian/calendarserver + +calendarserver-doc-api-stamp: + #cd doc/Developer && pydoctor -c twistedcaldav.cfg --resolve-aliases --make-html + touch calendarserver-doc-api-stamp + +build/calendarserver-doc-api:: calendarserver-doc-api-stamp + +clean:: + -rm twistedcaldav/version.py + -rm -r doc/Developer/apidocs calendarserver-doc-api-stamp + --- calendarserver-1.2.dfsg.orig/debian/patches/0001-add-name-service-switch-directory-backend.patch +++ calendarserver-1.2.dfsg/debian/patches/0001-add-name-service-switch-directory-backend.patch @@ -0,0 +1,252 @@ +From 4d4b0465c28ed5b5d5cffb749e5bad1466aa60c8 Mon Sep 17 00:00:00 2001 +From: Guido Guenther +Date: Sat, 26 Apr 2008 21:03:31 +0200 +Subject: [PATCH] add name service switch directory backend + +--- + twistedcaldav/directory/nss.py | 233 ++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 233 insertions(+), 0 deletions(-) + create mode 100644 twistedcaldav/directory/nss.py + +diff --git a/twistedcaldav/directory/nss.py b/twistedcaldav/directory/nss.py +new file mode 100644 +index 0000000..4fb4cfc +--- /dev/null ++++ b/twistedcaldav/directory/nss.py +@@ -0,0 +1,233 @@ ++## ++# vim: set fileencoding=utf-8 : ++# Copyright (c) 2008 Guido Guenther ++# ++# Licensed under the Apache License, Version 2.0 (the "License"); ++# you may not use this file except in compliance with the License. ++# You may obtain a copy of the License at ++# ++# http://www.apache.org/licenses/LICENSE-2.0 ++# ++# Unless required by applicable law or agreed to in writing, software ++# distributed under the License is distributed on an "AS IS" BASIS, ++# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++# See the License for the specific language governing permissions and ++# limitations under the License. ++# ++## ++ ++""" ++NSS Directory service interfaces. ++ ++Uses libc's Name Service Switch for user and groups (/etc/nsswitch.conf). ++Example caldavd.plist configuration: ++ ++ DirectoryService ++ ++ type ++ twistedcaldav.directory.nss.NssDirectoryService ++ ++ params ++ ++ realmName ++ Test Realm ++ ++ groupPrefix ++ caldavd- ++ ++ firstValidUid ++ 1000 ++ lastValidUid ++ 65533 ++ ++ firstValidGid ++ 1000 ++ lastValidGid ++ 65533 ++ ++ mailDomain ++ example.com ++ ++ ++ ++TODO: add enableCalendaring via a special group ++""" ++ ++__all__ = [ ++ "NssDirectoryService", ++] ++ ++from twistedcaldav.directory.directory import DirectoryService, DirectoryRecord ++from twisted.cred.credentials import UsernamePassword ++from twisted.python import log ++import pwd, grp, socket ++ ++class NsSwitch(object): ++ """Simple interface to the nsswitch calls""" ++ ++ def get_user(self, username): ++ try: ++ return pwd.getpwnam(username) ++ except KeyError: ++ return None ++ ++ def get_group(self, groupname): ++ try: ++ return grp.getgrnam(groupname) ++ except KeyError: ++ return None ++ ++ def get_users(self): ++ return pwd.getpwall() ++ ++ def get_groups(self): ++ return grp.getgrall() ++ ++ ++class NssDirectoryService(DirectoryService): ++ """ ++ Nss based Directory Service of L{IDirectoryService} ++ """ ++ ++ baseGUID = "8EFFFAF-5221-4813-B971-58506B963573" ++ ++ def __repr__(self): ++ return "<%s %r>" % (self.__class__.__name__, self.realmName) ++ ++ # Defaults are in twistedcaldav.config: ++ def __init__(self, realmName, groupPrefix, mailDomain, firstValidUid, lastValidUid, ++ firstValidGid, lastValidGid): ++ super(NssDirectoryService, self).__init__() ++ self.nsswitch = NsSwitch() ++ self.groupPrefix = groupPrefix ++ self.realmName = realmName ++ self.first_valid_uid = firstValidUid ++ self.first_valid_gid = firstValidGid ++ self.last_valid_uid = lastValidUid ++ self.last_valid_gid = lastValidGid ++ self.mailDomain = mailDomain ++ ++ def recordTypes(self): ++ recordTypes = ( ++ DirectoryService.recordType_users, ++ DirectoryService.recordType_groups, ++ ) ++ return recordTypes ++ ++ def _isValidUid(self, uid): ++ if uid >= self.first_valid_uid and uid <= self.last_valid_uid: ++ return True ++ ++ def _isValidGid(self, gid): ++ if gid >= self.first_valid_gid and gid <= self.last_valid_gid: ++ return True ++ ++ def listRecords(self, recordType): ++ """ ++ @param type: the type of records to retrieve. ++ @return: an iterable of records of the given type. ++ """ ++ if recordType == DirectoryService.recordType_users: ++ for result in self.nsswitch.get_users(): ++ if self._isValidUid(result[2]): ++ yield NssUserRecord( ++ service = self, ++ recordType = recordType, ++ shortName = result[0], ++ gecos = result[4], ++ ) ++ elif recordType == DirectoryService.recordType_groups: ++ for result in self.nsswitch.get_groups(): ++ if self._isValidGid(result[2]): ++ if result[0].startswith(self.groupPrefix): ++ yield NssGroupRecord( ++ service = self, ++ recordType = recordType, ++ groupName = result[0], ++ members = result[3], ++ ) ++ else: ++ raise AssertionError("Unknown record type: %r" % (recordType,)) ++ ++ def recordWithShortName(self, recordType, shortName): ++ if recordType == DirectoryService.recordType_users: ++ result = self.nsswitch.get_user(shortName) ++ if result and self._isValidUid(result[2]): ++ return NssUserRecord( ++ service = self, ++ recordType = recordType, ++ shortName = result[0], ++ gecos = result[4], ++ ) ++ else: ++ return None ++ elif recordType == DirectoryService.recordType_groups: ++ result = self.nsswitch.get_group(self.groupPrefix + shortName) ++ if result and self._isValidGid(result[2]): ++ return NssGroupRecord( ++ service = self, ++ recordType = recordType, ++ groupName = result[0], ++ members = result[3] ++ ) ++ else: ++ return None ++ else: ++ raise AssertionError("Unknown record type: %r" % (recordType,)) ++ ++ ++class NssDirectoryRecord(DirectoryRecord): ++ """ ++ Nss Directory Record ++ """ ++ def __init__(self, service, recordType, shortName, fullName = None, calendarUserAddresses = set()): ++ super(NssDirectoryRecord, self).__init__( ++ service = service, ++ recordType = recordType, ++ guid = None, ++ shortName = shortName, ++ fullName = fullName, ++ calendarUserAddresses = calendarUserAddresses, ++ autoSchedule = False, ++ ) ++ ++ ++class NssUserRecord(NssDirectoryRecord): ++ """ ++ NSS Users implementation of L{IDirectoryRecord}. ++ """ ++ def __init__(self, service, recordType, shortName, gecos): ++ fullName = gecos.split(",",1)[0] ++ calendarUserAddresses = set() ++ if service.mailDomain: ++ calendarUserAddresses.add("mailto:%s@%s" % (shortName, service.mailDomain)) ++ super(NssUserRecord, self).__init__(service, recordType, shortName, fullName, calendarUserAddresses) ++ ++ def verifyCredentials(self, credentials): ++ # FIXME: plugin in PAM authentication here if you want too - kerberos works ++ #return super(NssUserRecord, self).verifyCredentials(credentials) ++ return False ++ ++ def groups(self): ++ for group in self.service.listRecords(DirectoryService.recordType_groups): ++ for member in group.members(): ++ if member == self: ++ yield group ++ continue ++ ++ ++class NssGroupRecord(NssDirectoryRecord): ++ """ ++ NSS Groups implementation of L{IDirectoryRecord}. ++ """ ++ def __init__(self, service, recordType, groupName, members=()): ++ shortName = groupName.replace(service.groupPrefix,'',1) ++ super(NssGroupRecord, self).__init__(service, recordType, shortName) ++ self._members = members ++ ++ def members(self): ++ for shortName in self._members: ++ yield self.service.recordWithShortName(DirectoryService.recordType_users, shortName) ++ ++# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: +-- +1.5.5.1 + --- calendarserver-1.2.dfsg.orig/debian/patches/0002-add-default-values-for-the-NSS-backend.patch +++ calendarserver-1.2.dfsg/debian/patches/0002-add-default-values-for-the-NSS-backend.patch @@ -0,0 +1,35 @@ +From 56032ff57d7a5ea3cfcf06fdcabe383fcd921df2 Mon Sep 17 00:00:00 2001 +From: Guido Guenther +Date: Sun, 27 Apr 2008 02:53:02 +0200 +Subject: [PATCH] add default values for the NSS backend + +--- + twistedcaldav/config.py | 12 ++++++++++++ + 1 files changed, 12 insertions(+), 0 deletions(-) + +diff --git a/twistedcaldav/config.py b/twistedcaldav/config.py +index ccaa605..2be8daa 100644 +--- a/twistedcaldav/config.py ++++ b/twistedcaldav/config.py +@@ -33,6 +33,18 @@ serviceDefaultParams = { + "node": "/Search", + "requireComputerRecord": True, + }, ++ "twistedcaldav.directory.nss.NssDirectoryService": { ++ "realmName": "Test Realm", ++ # we only consider groups starting with: ++ "groupPrefix": "caldavd-", ++ # dont set calendarUserAdresses by default ++ "mailDomain": None, ++ # exclude system users and nobody by "default": ++ "firstValidUid": 1000, ++ "lastValidUid": 65533, ++ "firstValidGid": 1000, ++ "lastValidGid": 65533, ++ }, + } + + defaultConfig = { +-- +1.5.5.1 + --- calendarserver-1.2.dfsg.orig/debian/patches/epydoc-fixes.diff +++ calendarserver-1.2.dfsg/debian/patches/epydoc-fixes.diff @@ -0,0 +1,144 @@ +fix epydoc errors + +diff --git a/twistedcaldav/admin/logs.py b/twistedcaldav/admin/logs.py +index f9bdb95..117bfbb 100644 +--- a/twistedcaldav/admin/logs.py ++++ b/twistedcaldav/admin/logs.py +@@ -16,12 +16,11 @@ + # DRI: David Reid, dreid@apple.com + ## + """ +- Log Stats: +- # Invitations sent per day/week/month +- # bytes out (bytes in not provided in the current log format.)/ +- # requests +- user agents +- ++Logging Statistics: ++ - # Invitations sent per day/week/month ++ - # bytes out (bytes in not provided in the current log format) ++ - # requests ++ - user agents + """ + + import plistlib +diff --git a/twistedcaldav/admin/principals.py b/twistedcaldav/admin/principals.py +index 07e80ee..64c018b 100644 +--- a/twistedcaldav/admin/principals.py ++++ b/twistedcaldav/admin/principals.py +@@ -16,11 +16,11 @@ + # DRI: David Reid, dreid@apple.com + ## + """ +- Account Stats: +- # of calendars +- # of events +- # storage used (including things that don't count against quota?) +- Last login? ++Account Stats: ++ - # of calendars ++ - # of events ++ - # storage used (including things that don't count against quota?) ++ - Last login? + """ + + from twistedcaldav.admin import util +diff --git a/twistedcaldav/admin/purge.py b/twistedcaldav/admin/purge.py +index d83bc8b..0085aa8 100644 +--- a/twistedcaldav/admin/purge.py ++++ b/twistedcaldav/admin/purge.py +@@ -25,12 +25,12 @@ def purgeEvents(collection, purgeDate): + Recursively purge all events older than purgeDate. + + for VTODO: +- * if completed +- * purge if it's dueDate is older than purgeDate. ++ - if completed ++ - purge if it's dueDate is older than purgeDate. + + for V*: +- * purge if endDate is older than purgeDate +- """ ++ - purge if endDate is older than purgeDate ++ """ + + from twistedcaldav import ical + +diff --git a/twistedcaldav/admin/script.py b/twistedcaldav/admin/script.py +index 4c22afc..d326ab6 100644 +--- a/twistedcaldav/admin/script.py ++++ b/twistedcaldav/admin/script.py +@@ -18,14 +18,10 @@ + + """ + Examples: +- +- caladmin users +- +- caladmin purge +- +- caladmin backup +- +- caladmin restore ++ - caladmin users ++ - caladmin purge ++ - caladmin backup ++ - caladmin restore + """ + + import sys, os +diff --git a/twistedcaldav/admin/stats.py b/twistedcaldav/admin/stats.py +index f2dfb75..ed7aa83 100644 +--- a/twistedcaldav/admin/stats.py ++++ b/twistedcaldav/admin/stats.py +@@ -19,10 +19,10 @@ + """ + Statisitcs Types: + +- Overall Stats: +- # of accounts +- # of calendars +- # of events ++ - Overall Stats: ++ - # of accounts ++ - # of calendars ++ - # of events + + """ + +diff --git a/twistedcaldav/py/plistlib.py b/twistedcaldav/py/plistlib.py +index 0084960..43fc69f 100644 +--- a/twistedcaldav/py/plistlib.py ++++ b/twistedcaldav/py/plistlib.py +@@ -23,7 +23,7 @@ UTF-8. + The plist type is supported through the Data class. This is a + thin wrapper around a Python string. + +-Generate Plist example: ++Generate Plist example:: + + pl = dict( + aString="Doodah", +@@ -44,7 +44,7 @@ Generate Plist example: + pl[u'\xc5benraa'] = "That was a unicode key." + writePlist(pl, fileName) + +-Parse Plist example: ++Parse Plist example:: + + pl = readPlist(pathOrFile) + print pl["aKey"] +diff --git a/twistedcaldav/static.py b/twistedcaldav/static.py +index 7d6edf0..8ec02bc 100644 +--- a/twistedcaldav/static.py ++++ b/twistedcaldav/static.py +@@ -296,8 +296,7 @@ class CalDAVFile (CalDAVResource, DAVFile): + def quotaSize(self, request): + """ + Get the size of this resource. +- TODO: Take into account size of dead-properties. Does stat +- include xattrs size? ++ TODO: Take into account size of dead-properties. Does stat include xattrs size? + + @return: an L{Deferred} with a C{int} result containing the size of the resource. + """ --- calendarserver-1.2.dfsg.orig/debian/patches/fix-krb-service.diff +++ calendarserver-1.2.dfsg/debian/patches/fix-krb-service.diff @@ -0,0 +1,19 @@ +diff --git a/twistedcaldav/authkerb.py b/twistedcaldav/authkerb.py +index 4f9abe3..6cdb7f0 100644 +--- a/twistedcaldav/authkerb.py ++++ b/twistedcaldav/authkerb.py +@@ -84,12 +84,13 @@ class KerberosCredentialFactoryBase(object): + splits = principal.split("/") + servicetype = splits[0] + splits = splits[1].split("@") ++ server = splits[0] + realm = splits[1] + except IndexError: + logging.err("Invalid Kerberos principal: %s" % (principal,), system="KerberosCredentialFactoryBase") + raise ValueError('Authentication System Failure: Invalid Kerberos principal: %s' % (principal,)) + +- self.service = "%s@%s" % (servicetype, realm,) ++ self.service = "%s@%s" % (servicetype, server,) + self.realm = realm + + class BasicKerberosCredentials(credentials.UsernamePassword): --- calendarserver-1.2.dfsg.orig/debian/patches/paths.diff +++ calendarserver-1.2.dfsg/debian/patches/paths.diff @@ -0,0 +1,142 @@ +Index: calendarserver/conf/caldavd.plist +=================================================================== +--- calendarserver.orig/conf/caldavd.plist 2008-04-30 16:33:13.000000000 +0200 ++++ calendarserver/conf/caldavd.plist 2008-04-30 16:42:47.000000000 +0200 +@@ -54,7 +54,7 @@ + + + BindAddresses +- ++ localhost + + + BindHTTPPorts +@@ -75,7 +75,7 @@ + + + DocumentRoot +- /Library/CalendarServer/Documents ++ /var/spool/caldavd + + + UserQuota +@@ -96,7 +96,6 @@ + --> + + +- + +- ++ + + + + ServerStatsFile +- /var/run/caldavd/stats.plist ++ /var/spool/caldavd/stats.plist + + + PIDFile +- /var/run/caldavd.pid ++ /var/run/caldavd/caldavd.pid + + + + SSLCertificate +- ++ /etc/ssl/certs/ssl-cert-snakeoil.pem + + + SSLPrivateKey +- ++ /etc/ssl/private/ssl-cert-snakeoil.key + + + + + UserName +- calendar ++ caldavd + + GroupName +- calendar ++ caldavd + + ProcessType + Combined +@@ -240,7 +239,7 @@ + MultiProcess + + ProcessCount +- 0 ++ 1 + + + +@@ -264,14 +263,27 @@ + EnableNotifications + + +- + + ++ Twisted ++ ++ twistd ++ /usr/bin/twistd ++ ++ ++ PythonDirector ++ ++ pydir ++ /usr/share/pydirector/pydir.py ++ ControlSocket ++ /var/run/caldavd/caldavd-pydir.sock ++ ++ + + ControlSocket +- /var/run/caldavd.sock ++ /var/run/caldavd/caldavd.socket + + + ResponseCompression +Index: calendarserver/setup.py +=================================================================== +--- calendarserver.orig/setup.py 2008-04-30 16:33:13.000000000 +0200 ++++ calendarserver/setup.py 2008-04-30 16:40:20.000000000 +0200 +@@ -140,7 +140,7 @@ + "twistedcaldav": ["zoneinfo/*.ics", "zoneinfo/*/*.ics", "zoneinfo/*/*/*.ics"], + }, + scripts = [ "bin/caldavd", "bin/caladmin" ], +- data_files = [ ("caldavd", ["conf/caldavd.plist"]) ], ++ data_files = [ ("/etc/caldavd", ["conf/caldavd.plist"]) ], + ext_modules = extensions, + ) + --- calendarserver-1.2.dfsg.orig/debian/patches/series +++ calendarserver-1.2.dfsg/debian/patches/series @@ -0,0 +1,4 @@ +paths.diff +0001-add-name-service-switch-directory-backend.patch +0002-add-default-values-for-the-NSS-backend.patch +epydoc-fixes.diff