[CalendarServer-changes] [1318] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Mon Mar 5 17:09:57 PST 2007
Revision: 1318
http://trac.macosforge.org/projects/calendarserver/changeset/1318
Author: wsanchez at apple.com
Date: 2007-03-05 17:09:56 -0800 (Mon, 05 Mar 2007)
Log Message:
-----------
Move non-CalendarServer bits to contrib/
Modified Paths:
--------------
CalendarServer/trunk/run
CalendarServer/trunk/support/Makefile.Apple
Added Paths:
-----------
CalendarServer/trunk/contrib/SBS/
CalendarServer/trunk/contrib/SBS/bin/
CalendarServer/trunk/contrib/SBS/bin/calendarServer_restore
CalendarServer/trunk/contrib/SBS/conf/
CalendarServer/trunk/contrib/SBS/conf/85-calendarServer.plist
CalendarServer/trunk/contrib/launchd/
CalendarServer/trunk/contrib/launchd/calendarserver.plist
CalendarServer/trunk/contrib/tests/
CalendarServer/trunk/contrib/tests/stress_xattr.py
Removed Paths:
-------------
CalendarServer/trunk/bin/calendarServer_restore
CalendarServer/trunk/conf/85-calendarServer.plist
CalendarServer/trunk/conf/launchd.plist
CalendarServer/trunk/contrib/stress_xattr.py
Deleted: CalendarServer/trunk/bin/calendarServer_restore
===================================================================
--- CalendarServer/trunk/bin/calendarServer_restore 2007-03-06 00:33:48 UTC (rev 1317)
+++ CalendarServer/trunk/bin/calendarServer_restore 2007-03-06 01:09:56 UTC (rev 1318)
@@ -1,92 +0,0 @@
-#!/usr/bin/env python
-##
-# Copyright (c) 2005-2007 Apple Inc. All rights reserved.
-#
-# 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.
-#
-# DRI: David Reid, dreid at apple.com
-##
-
-import os
-import sys
-import fnmatch
-import plistlib
-
-ServiceConf = "85-calendarServer.plist"
-
-configFile = "/private/etc/caldavd/caldavd.plist"
-
-documentRoot = "/Library/CalendarServer/Documents/"
-
-removePatterns = ['.db.sqlite']
-
-
-class Options(dict):
- def parseOpts(self, argv):
- for x in xrange(0, len(argv)):
- opt = argv[x]
- if opt.startswith('-'):
- self[opt.strip('-')] = argv[x+1]
-
-
-def cleanDocRoot():
- root = None
- if os.path.exists(configFile):
- root = plistlib.readPlist(configFile)['DocumentRoot']
-
- if not root and os.path.exists(configFile + '.default'):
- root = plistlib.readPlist(configFile + '.default')['DocumentRoot']
-
- if not root:
- root = documentRoot
-
- if not root:
- print "Could not find document root"
- sys.exit(1)
-
- removed = []
-
- for root, dirs, files in os.walk(root):
- dirs.extend(files)
- for file in dirs:
- for pat in removePatterns:
- if fnmatch.fnmatch(file, pat):
- full = os.path.join(root, file)
-
- os.remove(full)
-
- removed.append(full)
-
- return removed
-
-
-def cmd_restore(options):
- cleanDocRoot()
-
-
-if __name__ == '__main__':
- options = Options({'cmd': None,
- 'target': None,
- 'path': None,
- 'log': None,
- 'opt': 'all'})
-
- options.parseOpts(sys.argv[1:])
-
- cmd = globals().get('cmd_%s' % (options['cmd'],), None)
-
- if not cmd:
- print "Unknown Command: %s" % (options['cmd'],)
- sys.exit(1)
-
- cmd(options)
Deleted: CalendarServer/trunk/conf/85-calendarServer.plist
===================================================================
--- CalendarServer/trunk/conf/85-calendarServer.plist 2007-03-06 00:33:48 UTC (rev 1317)
+++ CalendarServer/trunk/conf/85-calendarServer.plist 2007-03-06 01:09:56 UTC (rev 1318)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>ServiceName</key>
- <string>calendarServer</string>
-
- <key>RestoreBinaryPath</key>
- <string>/usr/libexec/sbs_backup/calendarServer_restore</string>
- <key>RestoreLog</key>
- <string>/private/var/log/sbs_backup/calendarServer_restore.log</string>
-
- <key>Version</key>
- <string>10.5</string>
-</dict>
-</plist>
Deleted: CalendarServer/trunk/conf/launchd.plist
===================================================================
--- CalendarServer/trunk/conf/launchd.plist 2007-03-06 00:33:48 UTC (rev 1317)
+++ CalendarServer/trunk/conf/launchd.plist 2007-03-06 01:09:56 UTC (rev 1318)
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
-Copyright (c) 2006-2007 Apple Inc. All rights reserved.
-
-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.
- -->
-
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-
- <key>Label</key>
- <string>org.calendarserver.calendarserver</string>
-
- <key>Disabled</key>
- <true/>
-
- <key>ProgramArguments</key>
- <array>
- <string>/usr/sbin/caldavd</string>
- <string>-X</string>
- </array>
-
- <key>InitGroups</key>
- <true/>
-
- <key>KeepAlive</key>
- <true/>
-
- <key>StandardOutPath</key>
- <string>/var/log/caldavd/error.log</string>
-
- <key>StandardErrorPath</key>
- <string>/var/log/caldavd/error.log</string>
-
-</dict>
-</plist>
Copied: CalendarServer/trunk/contrib/SBS/bin/calendarServer_restore (from rev 1314, CalendarServer/trunk/bin/calendarServer_restore)
===================================================================
--- CalendarServer/trunk/contrib/SBS/bin/calendarServer_restore (rev 0)
+++ CalendarServer/trunk/contrib/SBS/bin/calendarServer_restore 2007-03-06 01:09:56 UTC (rev 1318)
@@ -0,0 +1,92 @@
+#!/usr/bin/env python
+##
+# Copyright (c) 2005-2007 Apple Inc. All rights reserved.
+#
+# 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.
+#
+# DRI: David Reid, dreid at apple.com
+##
+
+import os
+import sys
+import fnmatch
+import plistlib
+
+ServiceConf = "85-calendarServer.plist"
+
+configFile = "/private/etc/caldavd/caldavd.plist"
+
+documentRoot = "/Library/CalendarServer/Documents/"
+
+removePatterns = ['.db.sqlite']
+
+
+class Options(dict):
+ def parseOpts(self, argv):
+ for x in xrange(0, len(argv)):
+ opt = argv[x]
+ if opt.startswith('-'):
+ self[opt.strip('-')] = argv[x+1]
+
+
+def cleanDocRoot():
+ root = None
+ if os.path.exists(configFile):
+ root = plistlib.readPlist(configFile)['DocumentRoot']
+
+ if not root and os.path.exists(configFile + '.default'):
+ root = plistlib.readPlist(configFile + '.default')['DocumentRoot']
+
+ if not root:
+ root = documentRoot
+
+ if not root:
+ print "Could not find document root"
+ sys.exit(1)
+
+ removed = []
+
+ for root, dirs, files in os.walk(root):
+ dirs.extend(files)
+ for file in dirs:
+ for pat in removePatterns:
+ if fnmatch.fnmatch(file, pat):
+ full = os.path.join(root, file)
+
+ os.remove(full)
+
+ removed.append(full)
+
+ return removed
+
+
+def cmd_restore(options):
+ cleanDocRoot()
+
+
+if __name__ == '__main__':
+ options = Options({'cmd': None,
+ 'target': None,
+ 'path': None,
+ 'log': None,
+ 'opt': 'all'})
+
+ options.parseOpts(sys.argv[1:])
+
+ cmd = globals().get('cmd_%s' % (options['cmd'],), None)
+
+ if not cmd:
+ print "Unknown Command: %s" % (options['cmd'],)
+ sys.exit(1)
+
+ cmd(options)
Copied: CalendarServer/trunk/contrib/SBS/conf/85-calendarServer.plist (from rev 1314, CalendarServer/trunk/conf/85-calendarServer.plist)
===================================================================
--- CalendarServer/trunk/contrib/SBS/conf/85-calendarServer.plist (rev 0)
+++ CalendarServer/trunk/contrib/SBS/conf/85-calendarServer.plist 2007-03-06 01:09:56 UTC (rev 1318)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>ServiceName</key>
+ <string>calendarServer</string>
+
+ <key>RestoreBinaryPath</key>
+ <string>/usr/libexec/sbs_backup/calendarServer_restore</string>
+ <key>RestoreLog</key>
+ <string>/private/var/log/sbs_backup/calendarServer_restore.log</string>
+
+ <key>Version</key>
+ <string>10.5</string>
+</dict>
+</plist>
Added: CalendarServer/trunk/contrib/launchd/calendarserver.plist
===================================================================
--- CalendarServer/trunk/contrib/launchd/calendarserver.plist (rev 0)
+++ CalendarServer/trunk/contrib/launchd/calendarserver.plist 2007-03-06 01:09:56 UTC (rev 1318)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Copyright (c) 2006-2007 Apple Inc. All rights reserved.
+
+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.
+ -->
+
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+
+ <key>Label</key>
+ <string>org.calendarserver.calendarserver</string>
+
+ <key>Disabled</key>
+ <true/>
+
+ <key>ProgramArguments</key>
+ <array>
+ <string>/usr/sbin/caldavd</string>
+ <string>-X</string>
+ </array>
+
+ <key>InitGroups</key>
+ <true/>
+
+ <key>KeepAlive</key>
+ <true/>
+
+ <key>StandardOutPath</key>
+ <string>/var/log/caldavd/error.log</string>
+
+ <key>StandardErrorPath</key>
+ <string>/var/log/caldavd/error.log</string>
+
+</dict>
+</plist>
Deleted: CalendarServer/trunk/contrib/stress_xattr.py
===================================================================
--- CalendarServer/trunk/contrib/stress_xattr.py 2007-03-06 00:33:48 UTC (rev 1317)
+++ CalendarServer/trunk/contrib/stress_xattr.py 2007-03-06 01:09:56 UTC (rev 1318)
@@ -1,49 +0,0 @@
-import os
-from random import choice
-from string import uppercase
-
-from xattr import getxattr, listxattr, removexattr, setxattr
-
-def randstr(length):
- return "".join(choice(uppercase) for n in xrange(length))
-
-def main(path):
- while True:
- try:
- filename = os.path.join(path, randstr(8))
- fout = open(filename, "w")
- fout.write("---")
- fout.close()
-
- print filename
- for n in xrange(1024):
- expectedAttr = {}
- for m in xrange(1024):
- key, value = randstr(10), randstr(100)
- expectedAttr[key] = value
- setxattr(filename, key, value)
- assert getxattr(filename, key) == value, (key,value)
-
- attrList = sorted(listxattr(filename))
- expectedAttrList = sorted(expectedAttr.keys())
- assert attrList == expectedAttrList, (attrList, expectedAttrList)
-
- for key, value in expectedAttr.items():
- assert getxattr(filename, key) == value
- removexattr(filename, key)
-
- attrList = listxattr(filename)
- assert not attrList, attrList
-
- print n
- finally:
- os.remove(filename)
-
-if __name__ == "__main__":
- import sys
- path = "."
- if len(sys.argv) == 2:
- path = sys.argv[1]
- elif len(sys.argv) > 2:
- print "Usage: python stress_xattr.py [path]"
- main(path)
Copied: CalendarServer/trunk/contrib/tests/stress_xattr.py (from rev 1314, CalendarServer/trunk/contrib/stress_xattr.py)
===================================================================
--- CalendarServer/trunk/contrib/tests/stress_xattr.py (rev 0)
+++ CalendarServer/trunk/contrib/tests/stress_xattr.py 2007-03-06 01:09:56 UTC (rev 1318)
@@ -0,0 +1,49 @@
+import os
+from random import choice
+from string import uppercase
+
+from xattr import getxattr, listxattr, removexattr, setxattr
+
+def randstr(length):
+ return "".join(choice(uppercase) for n in xrange(length))
+
+def main(path):
+ while True:
+ try:
+ filename = os.path.join(path, randstr(8))
+ fout = open(filename, "w")
+ fout.write("---")
+ fout.close()
+
+ print filename
+ for n in xrange(1024):
+ expectedAttr = {}
+ for m in xrange(1024):
+ key, value = randstr(10), randstr(100)
+ expectedAttr[key] = value
+ setxattr(filename, key, value)
+ assert getxattr(filename, key) == value, (key,value)
+
+ attrList = sorted(listxattr(filename))
+ expectedAttrList = sorted(expectedAttr.keys())
+ assert attrList == expectedAttrList, (attrList, expectedAttrList)
+
+ for key, value in expectedAttr.items():
+ assert getxattr(filename, key) == value
+ removexattr(filename, key)
+
+ attrList = listxattr(filename)
+ assert not attrList, attrList
+
+ print n
+ finally:
+ os.remove(filename)
+
+if __name__ == "__main__":
+ import sys
+ path = "."
+ if len(sys.argv) == 2:
+ path = sys.argv[1]
+ elif len(sys.argv) > 2:
+ print "Usage: python stress_xattr.py [path]"
+ main(path)
Modified: CalendarServer/trunk/run
===================================================================
--- CalendarServer/trunk/run 2007-03-06 00:33:48 UTC (rev 1317)
+++ CalendarServer/trunk/run 2007-03-06 01:09:56 UTC (rev 1318)
@@ -549,13 +549,14 @@
#
if ! py_have_module pydirector; then
- pydirector="${top}/pydirector-1.0.0";
+ pydirector="${top}/pydirector-1.0.0";
- www_get "PyDirector" "${pydirector}" http://easynews.dl.sourceforge.net/sourceforge/pythondirector/pydirector-1.0.0.tar.gz;
- py_build "PyDirector" "${pydirector}" false;
- py_install "PyDirector" "${pydirector}";
+ www_get "PyDirector" "${pydirector}" http://easynews.dl.sourceforge.net/sourceforge/pythondirector/pydirector-1.0.0.tar.gz;
+ put_setuptools "${pydirector}";
+ py_build "PyDirector" "${pydirector}" false;
+ py_install "PyDirector" "${pydirector}";
- export PYTHONPATH="${PYTHONPATH}:${pydirector}/build/${py_platform_libdir}";
+ export PYTHONPATH="${PYTHONPATH}:${pydirector}/build/${py_platform_libdir}";
fi;
#
Modified: CalendarServer/trunk/support/Makefile.Apple
===================================================================
--- CalendarServer/trunk/support/Makefile.Apple 2007-03-06 00:33:48 UTC (rev 1317)
+++ CalendarServer/trunk/support/Makefile.Apple 2007-03-06 01:09:56 UTC (rev 1318)
@@ -93,11 +93,11 @@
$(_v) $(INSTALL_DIRECTORY) -o $(USER) -g $(GROUP) -m 0750 $(DSTROOT)$(NSLOCALDIR)/$(NSLIBRARYSUBDIR)/$(Project)/Documents
$(_v) $(INSTALL_DIRECTORY) -m 0750 $(DSTROOT)$(VARDIR)/log/caldavd
$(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(NSLIBRARYDIR)/LaunchDaemons
- $(_v) $(INSTALL_FILE) $(Sources)/conf/launchd.plist $(DSTROOT)$(NSLIBRARYDIR)/LaunchDaemons/org.calendarserver.calendarserver.plist
+ $(_v) $(INSTALL_FILE) $(Sources)/contrib/launchd/calendarserver.plist $(DSTROOT)$(NSLIBRARYDIR)/LaunchDaemons/org.calendarserver.calendarserver.plist
$(_v) $(MKDIR) $(DSTROOT)$(ETCDIR)/sbs_backup/
$(_v) $(MKDIR) $(DSTROOT)$(LIBEXECDIR)/sbs_backup/
- $(_v) $(INSTALL_FILE) $(Sources)/conf/85-calendarServer.plist $(DSTROOT)$(ETCDIR)/sbs_backup/
- $(_v) $(INSTALL_FILE) $(Sources)/bin/calendarServer_restore $(DSTROOT)$(LIBEXECDIR)/sbs_backup/
+ $(_v) $(INSTALL_FILE) $(Sources)/contrib/SBS/conf/85-calendarServer.plist $(DSTROOT)$(ETCDIR)/sbs_backup/
+ $(_v) $(INSTALL_FILE) $(Sources)/contrib/SBS/bin/calendarServer_restore $(DSTROOT)$(LIBEXECDIR)/sbs_backup/
#
# Automatic Extract
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20070305/e9f3e8ca/attachment.html
More information about the calendarserver-changes
mailing list