[CalendarServer-changes] [5665] CalendarServer/branches/new-store
source_changes at macosforge.org
source_changes at macosforge.org
Mon May 31 14:14:27 PDT 2010
Revision: 5665
http://trac.macosforge.org/projects/calendarserver/changeset/5665
Author: glyph at apple.com
Date: 2010-05-31 14:14:21 -0700 (Mon, 31 May 2010)
Log Message:
-----------
pull in (among other things) parallel-build change from trunk
Modified Paths:
--------------
CalendarServer/branches/new-store/bin/carddavd
CalendarServer/branches/new-store/support/build.sh
CalendarServer/branches/new-store/twistedcaldav/static.py
Property Changed:
----------------
CalendarServer/branches/new-store/
Property changes on: CalendarServer/branches/new-store
___________________________________________________________________
Modified: svn:mergeinfo
- /CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:5594-5658
+ /CalendarServer/branches/config-separation:4379-4443
/CalendarServer/branches/egg-info-351:4589-4625
/CalendarServer/branches/users/cdaboo/directory-cache-on-demand-3627:3628-3644
/CalendarServer/branches/users/cdaboo/more-sharing-5591:5592-5601
/CalendarServer/branches/users/cdaboo/partition-4464:4465-4957
/CalendarServer/branches/users/cdaboo/relative-config-paths-5070:5071-5105
/CalendarServer/branches/users/cdaboo/shared-calendars-5187:5188-5440
/CalendarServer/branches/users/glyph/contacts-server-merge:4971-5080
/CalendarServer/branches/users/glyph/sendfdport:5388-5424
/CalendarServer/branches/users/glyph/use-system-twisted:5084-5149
/CalendarServer/branches/users/sagen/locations-resources:5032-5051
/CalendarServer/branches/users/sagen/locations-resources-2:5052-5061
/CalendarServer/branches/users/sagen/resource-delegates-4038:4040-4067
/CalendarServer/branches/users/sagen/resource-delegates-4066:4068-4075
/CalendarServer/branches/users/sagen/resources-2:5084-5093
/CalendarServer/branches/users/wsanchez/transations:5515-5593
/CalendarServer/trunk:5594-5664
Modified: CalendarServer/branches/new-store/bin/carddavd
===================================================================
--- CalendarServer/branches/new-store/bin/carddavd 2010-05-31 19:19:20 UTC (rev 5664)
+++ CalendarServer/branches/new-store/bin/carddavd 2010-05-31 21:14:21 UTC (rev 5665)
@@ -21,6 +21,7 @@
#PYTHONPATH
daemonize="";
+errorlogenabled="";
username="";
groupname="";
configfile="";
@@ -97,11 +98,12 @@
exit 64;
}
-while getopts 'hXu:g:f:T:P:t:p:R:' option; do
+while getopts 'hXLu:g:f:T:P:t:p:R:' option; do
case "${option}" in
'?') usage; ;;
'h') usage -; exit 0; ;;
'X') daemonize="-n"; ;;
+ 'L') errorlogenabled="-o ErrorLogEnabled=False"; ;;
'f') configfile="-f ${OPTARG}"; ;;
'T') twistdpath="${OPTARG}"; ;;
'u') username="-u ${OPTARG}"; ;;
@@ -119,6 +121,5 @@
export PYTHONPATH
-echo exec "${python}" "${twistdpath}" "${twistd_reactor}" ${daemonize} ${username} ${groupname} "${plugin_name}" ${configfile} ${service_type} ${profile} "${child_reactor}";
-exec "${python}" "${twistdpath}" ${twistd_reactor} ${daemonize} ${username} ${groupname} "${plugin_name}" ${configfile} ${service_type} ${profile} ${child_reactor};
+exec "${python}" "${twistdpath}" ${twistd_reactor} ${daemonize} ${username} ${groupname} "${plugin_name}" ${configfile} ${service_type} ${errorlogenabled} ${profile} ${child_reactor};
Modified: CalendarServer/branches/new-store/support/build.sh
===================================================================
--- CalendarServer/branches/new-store/support/build.sh 2010-05-31 19:19:20 UTC (rev 5664)
+++ CalendarServer/branches/new-store/support/build.sh 2010-05-31 21:14:21 UTC (rev 5665)
@@ -395,7 +395,24 @@
fi;
}
+jmake () {
+ case "$(uname -s)" in
+ Darwin|Linux)
+ ncpu="$(getconf _NPROCESSORS_ONLN)";
+ ;;
+ FreeBSD)
+ ncpu="$(sysctl hw.ncpu)";
+ ncpu="${cpu##hw.ncpu: }";
+ ;;
+ esac;
+ if [ -n "${ncpu:-}" ] && [[ "${ncpu}" =~ ^[0-9]+$ ]]; then
+ make -j "${ncpu}" "$@";
+ else
+ make "$@";
+ fi;
+}
+
# Declare a dependency on a C project built with autotools.
c_dependency () {
local name="$1"; shift;
@@ -413,8 +430,8 @@
echo "Building ${name}...";
cd "${srcdir}";
./configure --prefix="${srcdir}/_root" "$@";
- make;
- make install;
+ jmake;
+ jmake install;
fi;
export PATH="${PATH}:${srcdir}/_root/bin";
@@ -471,7 +488,7 @@
"http://internap.dl.sourceforge.net/sourceforge/pyxml/${px}.tar.gz";
local po="pyOpenSSL-0.10";
- py_dependency -v 0.10 \
+ py_dependency -v 0.9 \
"PyOpenSSL" "OpenSSL" "${po}" \
"http://pypi.python.org/packages/source/p/pyOpenSSL/${po}.tar.gz";
Modified: CalendarServer/branches/new-store/twistedcaldav/static.py
===================================================================
--- CalendarServer/branches/new-store/twistedcaldav/static.py 2010-05-31 19:19:20 UTC (rev 5664)
+++ CalendarServer/branches/new-store/twistedcaldav/static.py 2010-05-31 21:14:21 UTC (rev 5665)
@@ -948,6 +948,7 @@
return super(CalendarHomeFile, self).liveProperties() + (
(customxml.calendarserver_namespace, "push-transports"),
+ (customxml.calendarserver_namespace, "pushkey"),
(customxml.calendarserver_namespace, "xmpp-uri"),
(customxml.calendarserver_namespace, "xmpp-heartbeat-uri"),
(customxml.calendarserver_namespace, "xmpp-server"),
@@ -1096,7 +1097,6 @@
else:
return succeed(customxml.PubSubPushTransportsProperty())
-
if qname == (customxml.calendarserver_namespace, "pushkey"):
pubSubConfiguration = getPubSubConfiguration(config)
if pubSubConfiguration['enabled']:
@@ -1113,7 +1113,6 @@
return succeed(customxml.PubSubXMPPPushKeyProperty())
-
if qname == (customxml.calendarserver_namespace, "xmpp-uri"):
pubSubConfiguration = getPubSubConfiguration(config)
if pubSubConfiguration['enabled']:
@@ -1539,6 +1538,8 @@
def liveProperties(self):
return super(AddressBookHomeFile, self).liveProperties() + (
+ (customxml.calendarserver_namespace, "push-transports"),
+ (customxml.calendarserver_namespace, "pushkey"),
(customxml.calendarserver_namespace, "xmpp-uri"),
(customxml.calendarserver_namespace, "xmpp-heartbeat-uri"),
(customxml.calendarserver_namespace, "xmpp-server"),
@@ -1614,6 +1615,67 @@
else:
qname = property.qname()
+ if qname == (customxml.calendarserver_namespace, "push-transports"):
+ pubSubConfiguration = getPubSubConfiguration(config)
+ if (pubSubConfiguration['enabled'] and
+ getattr(self, "clientNotifier", None) is not None):
+ id = self.clientNotifier.getID()
+ nodeName = getPubSubPath(id, pubSubConfiguration)
+ children = []
+ if pubSubConfiguration['aps-bundle-id']:
+ children.append(
+ customxml.PubSubTransportProperty(
+ customxml.PubSubSubscriptionProperty(
+ davxml.HRef(
+ pubSubConfiguration['subscription-url']
+ ),
+ ),
+ customxml.PubSubAPSBundleIDProperty(
+ pubSubConfiguration['aps-bundle-id']
+ ),
+ type="APSD",
+ )
+ )
+ if pubSubConfiguration['xmpp-server']:
+ children.append(
+ customxml.PubSubTransportProperty(
+ customxml.PubSubXMPPServerProperty(
+ pubSubConfiguration['xmpp-server']
+ ),
+ customxml.PubSubXMPPURIProperty(
+ getPubSubXMPPURI(id, pubSubConfiguration)
+ ),
+ type="XMPP",
+ )
+ )
+
+ propVal = customxml.PubSubPushTransportsProperty(*children)
+ nodeCacher = getNodeCacher()
+ d = nodeCacher.waitForNode(self.clientNotifier, nodeName)
+ # In either case we're going to return the value
+ d.addBoth(lambda ignored: propVal)
+ return d
+
+
+ else:
+ return succeed(customxml.PubSubPushTransportsProperty())
+
+ if qname == (customxml.calendarserver_namespace, "pushkey"):
+ pubSubConfiguration = getPubSubConfiguration(config)
+ if pubSubConfiguration['enabled']:
+ if getattr(self, "clientNotifier", None) is not None:
+ id = self.clientNotifier.getID()
+ nodeName = getPubSubPath(id, pubSubConfiguration)
+ propVal = customxml.PubSubXMPPPushKeyProperty(nodeName)
+ nodeCacher = getNodeCacher()
+ d = nodeCacher.waitForNode(self.clientNotifier, nodeName)
+ # In either case we're going to return the xmpp-uri value
+ d.addBoth(lambda ignored: propVal)
+ return d
+ else:
+ return succeed(customxml.PubSubXMPPPushKeyProperty())
+
+
if qname == (customxml.calendarserver_namespace, "xmpp-uri"):
pubSubConfiguration = getPubSubConfiguration(config)
if pubSubConfiguration['enabled']:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100531/d24a626a/attachment-0001.html>
More information about the calendarserver-changes
mailing list