Contribute  :  Advanced Search  :  Directory  :  Forum  :  FAQ's  :  My Downloads  :  Links  :  Polls  
AFP548 Changing the world one server at a time.
Welcome to AFP548
Thursday, July 29 2010 @ 09:38 am MDT
   

Running iCal Server on Tiger Part 1

ArticlesSo if you are at WWDC you picked up your Leopard preview disks and have been tearing through them with great enthusiasm. We have ours and it's really cool stuff, but we also can't tell you about anything beyond what is on the Apple webpage or the NDA ninjas will drop from the ceiling and attack.

One bit that we can talk about in a bit more detail is the iCal Server since it, along with a few other projects, have been turned out to the community on the new Mac OS Forge site.

This article is going to cover the quick and dirty way to get caldavd running on Mac OS X Server 10.4. Part 2 is going to cover how to integrate it with your existing directory services the best that we can with the currently available code.

(Updated 9/13/2006)

Read on for more...

First things first

Apple has released several more projects as traditional open source efforts this week. Bonjour, xnu, launchd, and caldavd (iCal Server) have all joined WebKit at the new Mac OS Forge site. This is really cool stuff, as some of these projects are completely home grown, and not things that Apple had simply modified existing OSS projects for.

Anyway, there are a few things that we need to download before we can get everything up and running. Obviously to do any of this you need to have a current version of Xcode installed.

Getting the source

Getting the source code is pretty easy with Subversion. Since it's not part of the default Tiger install you probably need to install it. Fire up a terminal and enter

$ curl -O http://metissian.com/downloads/macosx/subversion/subversion-client-1.3.1.dmg

Followed by

$ hdiutil mount subversion-client-1.3.1.dmg $ sudo installer -pkg /Volumes/Subversion Client 1.3.1/SubversionClient-1.3.1.pkg -target /

(As of 9/13/2006 you need svn 1.3.1 as shown above.)

Once that is done we can create a download directory and checkout the latest version of the caldavd code.

$ mkdir iCalServer
$ cd iCalServer
$ svn checkout http://svn.macosforge.org/repository/collaboration/CalendarServer/trunk CalendarServer

After a few minutes you will have the current source code for the iCalServer sitting on your Tiger machine.

Before you get too excited though we also need to install the current version of Python since that is what the iCal Server is written in. You can get a .pkg installer from the official Python site here. If you are doing all this from the command line then do the following:

$ curl -O http://www.python.org/ftp/python/2.4.3/Universal-MacPython-2.4.3.dmg
$ hdiutil mount Universal-MacPython-2.4.3.dmg
$ sudo installer -pkg /Volumes/Univeral MacPython 2.4.3/MacPython.mpkg -target / 

Build time

The developers have made it very easy to build the server by including a script that will download all the needed libraries and build. (Update: In the current builds there is no need to do all the run script hacking as before.)

Just move into the source folder and use the "run" script. The -s flag will tell it to just set everything up but not run yet.

./run -s

Wait a while and it will download and build all the bits and pieces that you need.

Basic dev config

Since this is just a quick and dirty test of caldavd we are just going to copy a test config file that has a single local user in it. From the CalendarServer folder do a:

cp ./conf/repository-static.xml ./conf/repository-dev.xml

This file contains a user named "admin" with a password of "admin" and full rights on the server. If you want to add other static users in here you can simply take a look at the existing demo account and copy it as needed.

The current build has a functioning, self-signed, SSL cert. It should come up secure up without issue.

Fire it up

Now all you need to do is change into your CalendarServer source folder and run:

./run

and you will see the server start up. Now point a web browser at your server on port 8008 and you should be able to login and see the basic structure of the iCal Server. If you have the WWDC Leopard iCal you can point that at it or download Chandler or Sunbird and run those on earlier versions of Mac OS X. Mac OS Forge has setup pages that show how to configure the clients here.

Wrapping up...

OK, so this is about as nasty a test as you can get. It's not installed anywhere meaningful, it's not integrated into anything, and it won't start at boot time. That's for part 2, when we will look at OD, Kerberos, and launchd.

Have fun!

Story Options

Advertising

Running iCal Server on Tiger Part 1 | 61 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Running iCal Server on Tiger Part 1
Authored by: BobC on Thursday, August 10 2006 @ 10:29 am MDT
I was trying to get it to work since morning (there is 4PM) but still have a problem.

Traceback (most recent call last):
  File "/Users/rcerny/Documents/Projects/CalendarServer/bin/caldavd", line 26, 
in ?
    from plistlib import readPlist
ImportError: cannot import name readPlist
Anyone has a clue?
Running iCal Server on Tiger Part 1
Authored by: matx on Thursday, August 10 2006 @ 01:09 pm MDT
I got it running on my osx 10.4.7 client box. neat-o. Now I will poke it with a big
stick. ;)

---
Mat X - Mac VFX SysAdmin
Running iCal Server on Tiger Part 1
Authored by: Anonymous on Friday, August 11 2006 @ 10:23 pm MDT
Ok, reading between the lines, clearly the very most latest Dev Tools are
required. Trying that now.
Running iCal Server on Tiger Part 1
Authored by: afaict on Saturday, August 12 2006 @ 05:49 am MDT
Checking out PyKerberos...
subversion/libsvn_client/checkout.c:96: (apr_err=170000)
svn: URL 'http://svn.macosforge.org/repository/collaboration/PyKerberos/
trunk@14' doesn't exist

I'm not sure what that means... any ideas?
Running iCal Server on Tiger Part 1
Authored by: playersons on Tuesday, August 15 2006 @ 06:49 pm MDT
I am trying to set up Chandler according to the infos on macosforge.org, but I
must be missing something. I get a "permission denied" error if I enter login/
pass for the default admin user. I am not sure about the path either, since
this path does not seem to exist on my installation (made according to this
article).
Mac OS X Server 10.4.7, Mac OS X 10.4.7 client, Chandler .07alpha3

Anybody any clue?

Thanks.
Running iCal Server on Tiger Part 1
Authored by: afaict on Wednesday, August 16 2006 @ 04:33 am MDT
I get the same error every time I try the checkout. Looks like I have to do a little
researching & googling (Subversion newbie)

Thanks!
Thanks for writing this up!
Authored by: Anonymous on Wednesday, August 16 2006 @ 02:53 pm MDT
This really came in handy in the Enterprise IT Lab.

The documentation was sparse on macosforge.
You made it seem so easy!


Keep breaking your server!

I thank you.
Running iCal Server on Tiger Part 1
Authored by: Anonymous on Friday, August 18 2006 @ 04:41 am MDT
Hi
when I type
./run
the terminal show thi error:

Building PySQLite...
running build
running build_py
running build_ext
'import site' failed; use -v for traceback
Traceback (most recent call last):
File "/iCalServer/Twisted/bin/twistd", line 12, in ?
import sys, os, string
File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
os.py", line 133
from os.path import (curdir, pardir, sep, pathsep, defpath, extsep, altsep,
^
SyntaxError: invalid syntax
Starting CalDAV Server [Done]

I have installed CalendarServer onto Mac Os X server 10.4.7 build 8K1079
/iCalServer/CalendarServer/run is the path for run command.
Any idea?
Thanks a lot
maybe a stupid question about command
Authored by: eboelens on Sunday, August 20 2006 @ 10:40 am MDT
serverbenee:~/iCalServer/CalendarServer eboelens$ ls
LICENSE bin patches support twistedcaldav
Makefile conf run test
README doc setup.py testcaldav
serverbenee:~/iCalServer/CalendarServer eboelens$ ./run -s
: command not found


What am I doing wrong here ?


Thanks for your time,
Erik Boelens
Running iCal Server on Tiger Part 1
Authored by: Anonymous on Wednesday, August 23 2006 @ 10:30 am MDT
Ive been trying to install this for a while now and i got to the part where i
wanna execute the run script.

i typ ./run

The script seems to run fine and at the end i get this.

---------------------
2006/08/23 16:10 CEST [-] File "/iCalServer/pyOpenSSL-0.6/build/
lib.macosx-10.4-fat-2.4/OpenSSL/__init__.py", line 11, in ?
2006/08/23 16:10 CEST [-] import rand, crypto, SSL, tsafe
2006/08/23 16:10 CEST [-] ImportError: No module named rand
2006/08/23 16:10 CEST [-] Failed to load application: No module named rand
2006/08/23 16:10 CEST [-] Traceback (most recent call last):
File "/iCalServer/Twisted/bin/twistd", line 25, in ?
run()
File "/iCalServer/Twisted/twisted/scripts/twistd.py", line 205, in run
app.run(runApp, ServerOptions)
File "/iCalServer/Twisted/twisted/application/app.py", line 278, in run
runApp(config)
File "/iCalServer/Twisted/twisted/scripts/twistd.py", line 195, in runApp
application = app.getApplication(config, passphrase)
--- <exception caught here> ---
File "/iCalServer/Twisted/twisted/application/app.py", line 159, in
getApplication
application = service.loadApplication(filename, style, passphrase)
File "/iCalServer/Twisted/twisted/application/service.py", line 301, in
loadApplication
application = sob.loadValueFromFile(filename, 'application',
passphrase)
File "/iCalServer/Twisted/twisted/persisted/sob.py", line 206, in
loadValueFromFile
exec fileObj in d, d
File "/tmp/caldavuVMb3Z", line 47, in ?
from twisted.internet.ssl import DefaultOpenSSLContextFactory
File "/iCalServer/Twisted/twisted/internet/ssl.py", line 47, in ?
from OpenSSL import SSL
File "/iCalServer/pyOpenSSL-0.6/build/lib.macosx-10.4-fat-2.4/
OpenSSL/__init__.py", line 11, in ?
import rand, crypto, SSL, tsafe
exceptions.ImportError: No module named rand


Failed to load application: No module named rand
2006/08/23 16:10 CEST [-]
Starting CalDAV Server [Done]

---------------------
./run issue
Authored by: ceetee on Saturday, August 26 2006 @ 06:15 am MDT


I did "./run" instead of "./run -s" (whoops) and got these sort of errors:
/Library/Frameworks/Python.framework/Versions/2.4/include/
python2.4/pyport.h:90:76: error: math.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/
pyport.h:97:22: error: sys/time.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/
pyport.h:98:18: error: time.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/
pyport.h:116:24: error: sys/select.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/
pyport.h:155:22: error: sys/stat.h: No such file or directory
/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4/
pyport.h:395:21: error: termios.h: No such file or directory
etc etc

When I tried "./run -s" next the same errors appeared...

Any ideas?

CT
Running iCal Server on Tiger Part 1
Authored by: iccmac on Monday, August 28 2006 @ 04:47 am MDT
I followed your instructions but forgot to change the PATH setting and started the ./run -s command and got some errors, so I fixed the PATH and did it again without any problems.
I also renamed the xml file, and tried to start the server, this is the out put from the terminal when typing: ./run

Building Zope Interface...
running build
running build_py
running build_ext

Building PyXML...
running build
running build_py
running build_ext
running build_scripts

Building PyOpenSSL...
running build
running build_py
running build_ext

Building xattr...
running build
running build_py
running build_ext

Building PySQLite...
running build
running build_py
running build_ext
Traceback (most recent call last):
File "/Users/hger/Documents/icalserver/Twisted/bin/twistd", line 19, in ?
from twisted.python.runtime import platformType
File "/Users/hger/Documents/icalserver/Twisted/twisted/__init__.py", line 22, in ?
raise ImportError("you need zope.interface installed "
ImportError: you need zope.interface installed (http://zope.org/Products/ZopeInterface/)
Starting CalDAV Server [Done]

Any ideas? Thanks for the instruction.
Running iCal Server on Tiger Part 1
Authored by: Anonymous on Thursday, August 31 2006 @ 03:15 am MDT
Yep, that one got me as well. Good catch...

Peter Glock
Running iCal Server on Tiger Part 1
Authored by: Anonymous on Monday, September 04 2006 @ 01:29 pm MDT
Everything works like a charm. Well except that there isn't a usable client
to really work with. Chandler is close. Anyway, simple queston. Is there a
graceful way to stop iCal Server?
run line 105
Authored by: johne.mac on Saturday, September 09 2006 @ 01:33 pm MDT
Thanks for the article. I'm a bit unclear about the run modification. My line
105 is as follows:

101 if [ -z "${PYTHONPATH:-}" ]; then
102 export PYTHONPATH="${caldav}";
103 else
104 export PYTHONPATH="${PYTHONPATH}:${caldav}";
105 fi;
106

Could someone please post an example of how that should look?

Also I am using Darwin Ports for most of my installs. Does anyone know if the
run modification work with Python in /opt/local/bin?

Best,
-- jmca
Running iCal Server on Tiger Part 1
Authored by: Anonymous on Wednesday, September 13 2006 @ 01:27 pm MDT
When I try ./run -s, it downloads and builds the components it needs, but ends
with:

Unable to locate subversion base URI for sources.

Any ideas?
GCC compile error
Authored by: jasonoleary on Wednesday, September 13 2006 @ 02:29 pm MDT
I am also having trouble with
./run -s
but I see to be crashing with a compilation error (gcc flags not allowed) - not missing resources.

Error:
---
server:/iCalServer/CalendarServer root# ./run -s

Building PyOpenSSL...
running build_ext
building 'OpenSSL.crypto' extension
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -I/sw/include -I/usr/kerberos/include -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4 -c src/crypto/crypto.c -o build/temp.macosx-10.4-fat-2.4/src/crypto/crypto.o
gcc: cannot specify -o with -c or -S and multiple compilations
error: command 'gcc' failed with exit status 1

---
Any ideas?
  • GCC compile error - Authored by: Anonymous on Friday, September 15 2006 @ 01:26 pm MDT
  • GCC compile error - Authored by: Anonymous on Tuesday, April 03 2007 @ 12:25 pm MDT
Running iCal Server on Tiger Part 1
Authored by: cperalt1 on Sunday, September 17 2006 @ 08:31 pm MDT
CalDav refuses to startup for me. The following is the error that I receive.

Traceback (most recent call last):
File "/Library/WebServer/Documents/iCalServer/Twisted/bin/twistd", line 19,
in ?
from twisted.python.runtime import platformType
File "/Library/WebServer/Documents/iCalServer/Twisted/twisted/
__init__.py", line 31, in ?
__version__ = version.short()
File "/Library/WebServer/Documents/iCalServer/Twisted/twisted/python/
versions.py", line 37, in short
svnver = self._getSVNVersion()
File "/Library/WebServer/Documents/iCalServer/Twisted/twisted/python/
versions.py", line 90, in _getSVNVersion
doc = parse(file(ent)).documentElement
File "/Library/WebServer/Documents/iCalServer/PyXML-0.8.4/build/
lib.macosx-10.4-fat-2.4/_xmlplus/dom/minidom.py", line 1915, in parse
return expatbuilder.parse(file)
File "/Library/WebServer/Documents/iCalServer/PyXML-0.8.4/build/
lib.macosx-10.4-fat-2.4/_xmlplus/dom/expatbuilder.py", line 930, in parse
result = builder.parseFile(file)
File "/Library/WebServer/Documents/iCalServer/PyXML-0.8.4/build/
lib.macosx-10.4-fat-2.4/_xmlplus/dom/expatbuilder.py", line 207, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: syntax error: line 1, column 0
Starting CalDAV Server [Done]

Any ideas? by the way I did have an older version of the CalDav server
running before. This was the older version from early August. Thanks...
Running iCal Server on Tiger Part 1
Authored by: Peggaweng on Monday, October 02 2006 @ 06:19 am MDT
I have this error....

./run -s
Checking out Twisted...
subversion/libsvn_ra_svn/client.c:141: (apr_err=61)
svn: Can't connect to host 'svn.twistedmatrix.com': Connection refused


Is this a problem with me or them?
Running iCal Server on Tiger Part 1
Authored by: Peggaweng on Wednesday, October 04 2006 @ 03:47 am MDT
Anyone?? Please???

I have this error....

./run -s
Checking out Twisted...
subversion/libsvn_ra_svn/client.c:141: (apr_err=61)
svn: Can't connect to host 'svn.twistedmatrix.com': Connection refused


Is this a problem with me or them?
MacOSForge Down. SVN link doesn't work
Authored by: Anonymous on Thursday, October 12 2006 @ 04:48 pm MDT
Saw that MacOSForge was taken down for "upgrades" or something. Anyway, I see people still are getting this downloaded if the comments are proof of their success. I tried the svn link in the walkthrough, but got:

patriot:/iCalServer root# svn checkout http://svn.macosforge.org/repository/collaboration/calendarserver/trunk calendarserver
subversion/libsvn_client/checkout.c:90: (apr_err=170000) svn: URL 'http://svn.macosforge.org/repository/collaboration/calendarserver/trunk' doesn't exist

I did find a link into the svn.macosforge.org site and was able to get to the CalendarServer trunk. http://svn.macosforge.org/repository/collaboration/CalendarServer/trunk/ However, I get the following when I run the svn checkout:

patriot:/iCalServer root# svn checkout http://svn.macosforge.org/repository/collaboration/CalendarServer/trunk calendarserver
subversion/libsvn_ra_dav/util.c:826: (apr_err=175002) svn: REPORT request failed on '/repository/collaboration/!svn/vcc/default'
subversion/libsvn_ra_dav/util.c:296: (apr_err=175002) svn: REPORT of '/repository/collaboration/!svn/vcc/default': 400 Bad Request (http://svn.macosforge.org)

Anyone?

Running iCal Server on Tiger Part 1
Authored by: Anonymous on Thursday, January 18 2007 @ 05:36 pm MST
When is Part 2 coming?
Running iCal Server on Tiger Part 1
Authored by: clwolf on Tuesday, August 28 2007 @ 08:11 pm MDT
Has Part 2 come out yet?