[CalendarServer-changes] [12431] CalendarServer/trunk
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:18:22 PDT 2014
Revision: 12431
http://trac.calendarserver.org//changeset/12431
Author: sagen at apple.com
Date: 2014-01-23 10:57:47 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
Consolidate data+config+logs under OS X Server
Modified Paths:
--------------
CalendarServer/trunk/calendarserver/tools/config.py
CalendarServer/trunk/calendarserver/tools/test/test_config.py
CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
CalendarServer/trunk/conf/caldavd-apple.plist
CalendarServer/trunk/contrib/launchd/calendarserver.plist
CalendarServer/trunk/twistedcaldav/stdconfig.py
Modified: CalendarServer/trunk/calendarserver/tools/config.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/config.py 2014-01-23 03:26:38 UTC (rev 12430)
+++ CalendarServer/trunk/calendarserver/tools/config.py 2014-01-23 18:57:47 UTC (rev 12431)
@@ -39,7 +39,6 @@
"Authentication.Kerberos.AllowedOverWireUnencrypted",
"Authentication.Kerberos.Enabled",
"Authentication.Wiki.Enabled",
- "DataRoot",
"DefaultLogLevel",
"DirectoryAddressBook.params.queryPeopleRecords",
"DirectoryAddressBook.params.queryUserRecords",
@@ -75,6 +74,7 @@
"SSLPrivateKey",
]
+
def usage(e=None):
if e:
print(e)
@@ -482,9 +482,9 @@
def respond(command, result):
- sys.stdout.write(writePlistToString({'command' : command['command'], 'result' : result}))
+ sys.stdout.write(writePlistToString({'command': command['command'], 'result': result}))
def respondWithError(msg, status=1):
- sys.stdout.write(writePlistToString({'error' : msg, }))
+ sys.stdout.write(writePlistToString({'error': msg, }))
Modified: CalendarServer/trunk/calendarserver/tools/test/test_config.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_config.py 2014-01-23 03:26:38 UTC (rev 12430)
+++ CalendarServer/trunk/calendarserver/tools/test/test_config.py 2014-01-23 18:57:47 UTC (rev 12431)
@@ -148,8 +148,8 @@
self.assertEquals(results["result"]["EnableSSL"], True)
self.assertEquals(results["result"]["Notifications"]["Services"]["APNS"]["Enabled"], True)
self.assertEquals(results["result"]["Notifications"]["Services"]["APNS"]["CalDAV"]["CertificatePath"], "/example/changed.cer")
- dataRoot = "Data/%s/%s" % (unichr(208), u"\ud83d\udca3")
- self.assertTrue(results["result"]["DataRoot"].endswith(dataRoot))
+ hostName = "hostname_%s_%s" % (unichr(208), u"\ud83d\udca3")
+ self.assertTrue(results["result"]["ServerHostName"].endswith(hostName))
# The static plist should still have EnableCalDAV = True
staticPlist = plistlib.readPlist(self.configFileName)
@@ -237,8 +237,8 @@
<true/>
<key>Notifications.Services.APNS.CalDAV.CertificatePath</key>
<string>/example/changed.cer</string>
- <key>DataRoot</key>
- <string>Data/%s/%s</string>
+ <key>ServerHostName</key>
+ <string>hostname_%s_%s</string>
</dict>
</dict>
</plist>
Modified: CalendarServer/trunk/calendarserver/tools/test/test_gateway.py
===================================================================
--- CalendarServer/trunk/calendarserver/tools/test/test_gateway.py 2014-01-23 03:26:38 UTC (rev 12430)
+++ CalendarServer/trunk/calendarserver/tools/test/test_gateway.py 2014-01-23 18:57:47 UTC (rev 12431)
@@ -369,8 +369,8 @@
self.assertEquals(results["result"]["EnableSSL"], True)
self.assertEquals(results["result"]["Notifications"]["Services"]["APNS"]["Enabled"], True)
self.assertEquals(results["result"]["Notifications"]["Services"]["APNS"]["CalDAV"]["CertificatePath"], "/example/changed.cer")
- dataRoot = "Data/%s/%s" % (unichr(208), u"\ud83d\udca3")
- self.assertTrue(results["result"]["DataRoot"].endswith(dataRoot))
+ hostName = "hostname_%s_%s" % (unichr(208), u"\ud83d\udca3")
+ self.assertTrue(results["result"]["ServerHostName"].endswith(hostName))
# The static plist should still have EnableCalDAV = True
staticPlist = plistlib.readPlist(self.configFileName)
@@ -807,8 +807,8 @@
<true/>
<key>Notifications.Services.APNS.CalDAV.CertificatePath</key>
<string>/example/changed.cer</string>
- <key>DataRoot</key>
- <string>Data/%s/%s</string>
+ <key>ServerHostName</key>
+ <string>hostname_%s_%s</string>
</dict>
</dict>
</plist>
Modified: CalendarServer/trunk/conf/caldavd-apple.plist
===================================================================
--- CalendarServer/trunk/conf/caldavd-apple.plist 2014-01-23 03:26:38 UTC (rev 12430)
+++ CalendarServer/trunk/conf/caldavd-apple.plist 2014-01-23 18:57:47 UTC (rev 12431)
@@ -311,7 +311,7 @@
<!-- Log root -->
<key>LogRoot</key>
- <string>/var/log/caldavd</string>
+ <string>Logs</string>
<!-- Apache-style access log -->
<key>AccessLogFile</key>
@@ -542,11 +542,13 @@
<key>Includes</key>
<array>
- <string>/Library/Server/Calendar and Contacts/Config/caldavd-system.plist</string>
- <string>/Library/Server/Calendar and Contacts/Config/caldavd-user.plist</string>
+ <string>/Library/Preferences/com.apple.servermgr_calendar.plist</string>
+ <string>caldavd-system.plist</string>
+ <string>caldavd-user.plist</string>
</array>
+
<key>WritableConfigFile</key>
- <string>/Library/Server/Calendar and Contacts/Config/caldavd-system.plist</string>
+ <string>caldavd-system.plist</string>
</dict>
</plist>
Modified: CalendarServer/trunk/contrib/launchd/calendarserver.plist
===================================================================
--- CalendarServer/trunk/contrib/launchd/calendarserver.plist 2014-01-23 03:26:38 UTC (rev 12430)
+++ CalendarServer/trunk/contrib/launchd/calendarserver.plist 2014-01-23 18:57:47 UTC (rev 12431)
@@ -64,10 +64,10 @@
<true/>
<key>StandardOutPath</key>
- <string>/var/log/caldavd/error.log</string>
+ <string>/Library/Server/Logs/caldavd.log</string>
<key>StandardErrorPath</key>
- <string>/var/log/caldavd/error.log</string>
+ <string>/Library/Server/Logs/caldavd.log</string>
</dict>
</plist>
Modified: CalendarServer/trunk/twistedcaldav/stdconfig.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/stdconfig.py 2014-01-23 03:26:38 UTC (rev 12430)
+++ CalendarServer/trunk/twistedcaldav/stdconfig.py 2014-01-23 18:57:47 UTC (rev 12431)
@@ -1035,11 +1035,21 @@
# means no automatic shutdown.
"AgentInactivityTimeoutSeconds" : 4 * 60 * 60,
- # These aren't relative to ConfigRoot:
- "ImportConfig": "", # Config to read first and merge
- "Includes": [], # Other plists to parse after this one
- "WritableConfigFile" : "", # which config file calendarserver_config should
- # write to for changes; empty string means the main config file.
+
+ # These three keys are relative to ConfigRoot:
+
+ # Config to read first and merge
+ "ImportConfig": "",
+
+ # Other plists to parse after this one; note that an Include can change
+ # the ServerRoot and/or ConfigRoot, thereby affecting the locations of
+ # the following Includes in the list. (Useful for service directory
+ # relocation)
+ "Includes": [],
+
+ # Which config file calendarserver_config should write to for changes;
+ # empty string means the main config file
+ "WritableConfigFile": "",
}
@@ -1091,9 +1101,11 @@
def _loadIncludes(parentDict):
# Now check for Includes and parse and add each of those
if "Includes" in parentDict:
- configRoot = os.path.join(parentDict.ServerRoot, parentDict.ConfigRoot)
for include in parentDict.Includes:
- # Includes are not relative to ConfigRoot
+ # Recompute this because ServerRoot and ConfigRoot
+ # could change when including another file
+ configRoot = os.path.join(parentDict.ServerRoot,
+ parentDict.ConfigRoot)
path = _expandPath(fullServerPath(configRoot, include))
if os.path.exists(path):
additionalDict = ConfigDict(self._parseConfigFromFile(path))
@@ -1145,6 +1157,7 @@
("ConfigRoot", ("Scheduling", "iSchedule", "DKIM", "PrivateKeyFile",)),
("ConfigRoot", ("Scheduling", "iSchedule", "DKIM", "PublicKeyFile",)),
("ConfigRoot", ("Scheduling", "iSchedule", "DKIM", "PrivateExchanges",)),
+ ("ConfigRoot", "WritableConfigFile"),
("LogRoot", "AccessLogFile"),
("LogRoot", "ErrorLogFile"),
("LogRoot", "AgentLogFile"),
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/e6ce5558/attachment.html>
More information about the calendarserver-changes
mailing list