[CalendarServer-changes] [10959] CalendarServer/branches/users/gaya/sharedgroups
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 20 12:31:17 PDT 2013
Revision: 10959
http://trac.calendarserver.org//changeset/10959
Author: gaya at apple.com
Date: 2013-03-20 12:31:17 -0700 (Wed, 20 Mar 2013)
Log Message:
-----------
merge from trunk
Modified Paths:
--------------
CalendarServer/branches/users/gaya/sharedgroups/calendarserver/accesslog.py
CalendarServer/branches/users/gaya/sharedgroups/calendarserver/tools/config.py
CalendarServer/branches/users/gaya/sharedgroups/support/Makefile.Apple
CalendarServer/branches/users/gaya/sharedgroups/twext/python/sendfd.py
CalendarServer/branches/users/gaya/sharedgroups/twistedcaldav/scheduling/ischedule/utils.py
CalendarServer/branches/users/gaya/sharedgroups/txdav/base/propertystore/xattr.py
Removed Paths:
-------------
CalendarServer/branches/users/gaya/sharedgroups/contrib/certupdate/
CalendarServer/branches/users/gaya/sharedgroups/contrib/migration/
Modified: CalendarServer/branches/users/gaya/sharedgroups/calendarserver/accesslog.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/calendarserver/accesslog.py 2013-03-20 19:16:27 UTC (rev 10958)
+++ CalendarServer/branches/users/gaya/sharedgroups/calendarserver/accesslog.py 2013-03-20 19:31:17 UTC (rev 10959)
@@ -33,6 +33,7 @@
import psutil
except ImportError:
psutil = None
+from sys import platform
import time
from calendarserver.logAnalysis import getAdjustedMethodName, \
@@ -627,7 +628,7 @@
self.previous_cpu = cpu_now
# Memory usage
- if psutil is not None:
+ if psutil is not None and 'freebsd' not in platform:
mem = psutil.virtual_memory()
self.items["memory used"] = mem.used
self.items["memory percent"] = mem.percent
Modified: CalendarServer/branches/users/gaya/sharedgroups/calendarserver/tools/config.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/calendarserver/tools/config.py 2013-03-20 19:16:27 UTC (rev 10958)
+++ CalendarServer/branches/users/gaya/sharedgroups/calendarserver/tools/config.py 2013-03-20 19:31:17 UTC (rev 10959)
@@ -32,6 +32,9 @@
from twistedcaldav.config import config, ConfigDict, ConfigurationError, mergeData
from twistedcaldav.stdconfig import DEFAULT_CONFIG_FILE
WRITABLE_CONFIG_KEYS = [
+ "ServerHostName",
+ "HTTPPort",
+ "SSLPort",
"EnableSSL",
"RedirectHTTPToHTTPS",
"EnableCalDAV",
Modified: CalendarServer/branches/users/gaya/sharedgroups/support/Makefile.Apple
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/support/Makefile.Apple 2013-03-20 19:16:27 UTC (rev 10958)
+++ CalendarServer/branches/users/gaya/sharedgroups/support/Makefile.Apple 2013-03-20 19:31:17 UTC (rev 10959)
@@ -36,7 +36,6 @@
Extra_Environment += PATH="$(SIPP)/usr/bin:$$PATH"
CALDAVDSUBDIR = /caldavd
-WEBAPPSSUBDIR = /apache2/webapps
PYTHON = $(USRBINDIR)/python
PY_HOME = $(SIPP)$(SHAREDIR)$(CALDAVDSUBDIR)
@@ -86,9 +85,6 @@
$(_v) for so in $$(find "$(DSTROOT)$(PY_HOME)/lib" -type f -name '*.so'); do $(STRIP) -Sx "$${so}"; done
$(_v) $(INSTALL_DIRECTORY) "$(DSTROOT)$(SIPP)$(ETCDIR)$(CALDAVDSUBDIR)"
$(_v) $(INSTALL_FILE) "$(Sources)/conf/caldavd-apple.plist" "$(DSTROOT)$(SIPP)$(ETCDIR)$(CALDAVDSUBDIR)/caldavd-apple.plist"
- $(_v) $(INSTALL_DIRECTORY) "$(DSTROOT)$(SIPP)$(ETCDIR)$(WEBAPPSSUBDIR)"
- $(_v) $(INSTALL_FILE) "$(Sources)/contrib/migration/com.apple.webapp.contacts.plist" "$(DSTROOT)$(SIPP)$(ETCDIR)$(WEBAPPSSUBDIR)/com.apple.webapp.contacts.plist"
- $(_v) $(INSTALL_FILE) "$(Sources)/contrib/migration/com.apple.webapp.contactsssl.plist" "$(DSTROOT)$(SIPP)$(ETCDIR)$(WEBAPPSSUBDIR)/com.apple.webapp.contactsssl.plist"
$(_v) chmod -R ugo+r "$(DSTROOT)$(PY_HOME)"
$(_v) for f in $$(find "$(DSTROOT)$(SIPP)$(ETCDIR)" -type f ! -name '*.default'); do cp "$${f}" "$${f}.default"; done
@@ -116,10 +112,6 @@
$(_v) $(INSTALL_DIRECTORY) "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/changeip"
$(_v) $(INSTALL_FILE) "$(Sources)/calendarserver/tools/changeip_calendar.py" "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/changeip/changeip_calendar.py"
$(_v) chmod ugo+x "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/changeip/changeip_calendar.py"
- @echo "Installing certificate update scripts..."
- $(_v) $(INSTALL_DIRECTORY) "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/certupdate"
- $(_v) $(INSTALL_FILE) "$(Sources)/contrib/certupdate/calendarcertupdate.py" "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/certupdate/calendarcertupdate.py"
- $(_v) chmod ugo+x "$(DSTROOT)$(SIPP)$(LIBEXECDIR)/certupdate/calendarcertupdate.py"
install::
@echo "Installing CalDAVTester package..."
Modified: CalendarServer/branches/users/gaya/sharedgroups/twext/python/sendfd.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/twext/python/sendfd.py 2013-03-20 19:16:27 UTC (rev 10958)
+++ CalendarServer/branches/users/gaya/sharedgroups/twext/python/sendfd.py 2013-03-20 19:31:17 UTC (rev 10959)
@@ -15,7 +15,7 @@
# limitations under the License.
##
-from struct import pack, unpack
+from struct import pack, unpack, calcsize
from socket import SOL_SOCKET
from twext.python.sendmsg import sendmsg, recvmsg, SCM_RIGHTS
@@ -62,5 +62,10 @@
# cmsg_level and cmsg_type really need to be SOL_SOCKET / SCM_RIGHTS, but
# since those are the *only* standard values, there's not much point in
# checking.
- [unpackedFD] = unpack("i", packedFD)
+ unpackedFD = 0
+ int_size = calcsize("i")
+ if len(packedFD) > int_size: # [ar]happens on 64 bit architecture (FreeBSD)
+ [unpackedFD] = unpack("i", packedFD[0:int_size])
+ else:
+ [unpackedFD] = unpack("i", packedFD)
return (unpackedFD, data)
Modified: CalendarServer/branches/users/gaya/sharedgroups/twistedcaldav/scheduling/ischedule/utils.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/twistedcaldav/scheduling/ischedule/utils.py 2013-03-20 19:16:27 UTC (rev 10958)
+++ CalendarServer/branches/users/gaya/sharedgroups/twistedcaldav/scheduling/ischedule/utils.py 2013-03-20 19:31:17 UTC (rev 10959)
@@ -41,10 +41,13 @@
@return: a C{set} of IPs
"""
ips = set()
- for family in (socket.AF_INET, socket.AF_INET6):
- results = socket.getaddrinfo(host, None, family, socket.SOCK_STREAM)
- for _ignore_family, _ignore_socktype, _ignore_proto, _ignore_canonname, sockaddr in results:
- ips.add(sockaddr[0])
+ # Use AF_UNSPEC rather than iterating (socket.AF_INET, socket.AF_INET6)
+ # because getaddrinfo() will raise an exception if no match is found for
+ # the specified family
+ # TODO: potentially use twext.internet.gaiendpoint instead
+ results = socket.getaddrinfo(host, None, socket.AF_UNSPEC, socket.SOCK_STREAM)
+ for _ignore_family, _ignore_socktype, _ignore_proto, _ignore_canonname, sockaddr in results:
+ ips.add(sockaddr[0])
return ips
Modified: CalendarServer/branches/users/gaya/sharedgroups/txdav/base/propertystore/xattr.py
===================================================================
--- CalendarServer/branches/users/gaya/sharedgroups/txdav/base/propertystore/xattr.py 2013-03-20 19:16:27 UTC (rev 10958)
+++ CalendarServer/branches/users/gaya/sharedgroups/txdav/base/propertystore/xattr.py 2013-03-20 19:31:17 UTC (rev 10959)
@@ -47,7 +47,7 @@
# expose. Its value is 93.
#
-if sys.platform in ("darwin", "freebsd8"):
+if sys.platform in ("darwin", "freebsd8", "freebsd9"):
_ERRNO_NO_ATTR = getattr(errno, "ENOATTR", 93)
else:
_ERRNO_NO_ATTR = errno.ENODATA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20130320/5f72ac03/attachment-0001.html>
More information about the calendarserver-changes
mailing list