View | Details | Raw Unified | Return to bug 194457 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-6 / +11 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	calendarserver
3
PORTNAME=	calendarserver
4
PORTVERSION=	5.1
4
PORTVERSION=	5.1
5
PORTREVISION=	1
5
PORTREVISION=	2
6
CATEGORIES=	www python
6
CATEGORIES=	www python
7
MASTER_SITES=	LOCAL/wg
7
MASTER_SITES=	LOCAL/wg
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
Lines 39-50 Link Here
39
SUB_FILES=	pkg-message
39
SUB_FILES=	pkg-message
40
SUB_LIST+=	USER=${USERS}
40
SUB_LIST+=	USER=${USERS}
41
41
42
python_OLD_CMD=	/usr/bin/env python
43
python_CMD=		${PYTHON_CMD}
44
42
SHEBANG_FILES=\
45
SHEBANG_FILES=\
43
	${WRKSRC}/calendarserver/tools/backup_pg.py \
46
	bin/calendarserver_* \
44
	${WRKSRC}/calendarserver/tools/backup.py \
47
	bin/icalendar_split \
45
	${WRKSRC}/twext/python/test/pullpipe.py
48
	bin/proxyclean \
49
	calendarserver/tools/backup_pg.py \
50
	calendarserver/tools/backup.py \
51
	twext/python/test/pullpipe.py
46
52
47
USE_RC_SUBR=	caldavd
53
USE_RC_SUBR=	caldavd
54
SUB_LIST+=		PYTHON_CMD=${PYTHON_CMD}
48
55
49
SVN_REPOSITORY_URL=	http://svn.calendarserver.org/repository/calendarserver
56
SVN_REPOSITORY_URL=	http://svn.calendarserver.org/repository/calendarserver
50
SVN_TAG1=	CalendarServer/tags/release/${DISTNAME}
57
SVN_TAG1=	CalendarServer/tags/release/${DISTNAME}
Lines 77-86 Link Here
77
	fi
84
	fi
78
85
79
post-patch:
86
post-patch:
80
81
	@${REINPLACE_CMD} -e 's|"{number} ({info})".format(number=version_number, info=version_info)|"5.1"|' ${WRKSRC}/setup.py
87
	@${REINPLACE_CMD} -e 's|"{number} ({info})".format(number=version_number, info=version_info)|"5.1"|' ${WRKSRC}/setup.py
82
	@${REINPLACE_CMD} -e 's|distutils.core|setuptools|g' ${WRKSRC}/setup.py
88
	@${REINPLACE_CMD} -e 's|distutils.core|setuptools|g' ${WRKSRC}/setup.py
83
	@${REINPLACE_CMD} -e 's|bin/bash|usr/bin/env bash|' ${WRKSRC}/bin/caldavd
84
	@${REINPLACE_CMD} -e 's|/usr/bin|${LOCALBASE}/bin|g' ${WRKSRC}/calendarserver/tools/bootstrapdatabase.py
89
	@${REINPLACE_CMD} -e 's|/usr/bin|${LOCALBASE}/bin|g' ${WRKSRC}/calendarserver/tools/bootstrapdatabase.py
85
	@${REINPLACE_CMD} -e 's|"/etc/caldavd/caldavd.plist"|"${ETCDIR}/caldavd.plist"|g' ${WRKSRC}/twistedcaldav/stdconfig.py
90
	@${REINPLACE_CMD} -e 's|"/etc/caldavd/caldavd.plist"|"${ETCDIR}/caldavd.plist"|g' ${WRKSRC}/twistedcaldav/stdconfig.py
86
	@${REINPLACE_CMD} -e 's|/usr/share/caldavd/lib/python/txdav/common/datastore|${SHAREDIR}|' ${WRKSRC}/calendarserver/tools/bootstrapdatabase.py
91
	@${REINPLACE_CMD} -e 's|/usr/share/caldavd/lib/python/txdav/common/datastore|${SHAREDIR}|' ${WRKSRC}/calendarserver/tools/bootstrapdatabase.py
(-)files/caldavd.in (-10 / +7 lines)
Lines 3-9 Link Here
3
# $FreeBSD$
3
# $FreeBSD$
4
#
4
#
5
# PROVIDE: caldavd
5
# PROVIDE: caldavd
6
# REQUIRE: DAEMON
6
# REQUIRE: LOGIN
7
#
7
#
8
# Add the following lines to /etc/rc.conf to run caldavd:
8
# Add the following lines to /etc/rc.conf to run caldavd:
9
#
9
#
Lines 20-40 Link Here
20
: ${caldavd_enable="NO"}
20
: ${caldavd_enable="NO"}
21
: ${caldavd_conf="%%PREFIX%%/etc/caldavd/caldavd.plist"}
21
: ${caldavd_conf="%%PREFIX%%/etc/caldavd/caldavd.plist"}
22
22
23
23
name="caldavd"
24
name="caldavd"
24
rcvar=`set_rcvar`
25
25
command="%%PREFIX%%/bin/caldavd"
26
command="%%PREFIX%%/bin/caldavd"
26
command_args=" -f ${caldavd_conf} -R kqueue"
27
command_args=" -f ${caldavd_conf} -R kqueue"
27
28
28
extra_commands="reload"
29
pidfile="/var/db/${name}/${name}.pid"
29
pidfile="/var/db/${name}/${name}.pid"
30
required_files="${caldavd_conf}"
30
31
32
procname="%%PYTHON_CMD%%"    
33
PATH=${PATH}:%%PREFIX%%/bin
31
34
32
required_files="${caldavd_conf}"
35
start_precmd="install -d -o caldavd /var/db/caldavd/Data/Documents /var/db/caldavd/Documents && install -d /var/log/caldavd"
33
36
34
stop_cmd=" if [ -f ${pidfile} ] ; then kill -TERM `cat ${pidfile}` ; else echo 'Not running.'; fi "
35
start_precmd="install -d -o %%USER%% /var/db/caldavd/Data/Documents /var/db/caldavd/Documents && install -d /var/log/caldavd"
36
reload_cmd=" if [ -f ${pidfile} ] ; then kill -HUP `cat ${pidfile}` ; else echo 'Not running.'; fi "
37
status_cmd=" if [ -f ${pidfile} ] ; then ps -xl `cat ${pidfile}` ; else echo 'Not running.'; fi "
38
39
load_rc_config ${name}
40
run_rc_command "$1"
37
run_rc_command "$1"
(-)files/patch-twext__python__log.py (+50 lines)
Line 0 Link Here
1
--- twext/python/log.py.orig	2013-09-17 23:08:55 UTC
2
+++ twext/python/log.py
3
@@ -932,24 +932,29 @@
4
         # Don't patch this module
5
         if moduleName is __name__:
6
             continue
7
-
8
-        for name, obj in module.__dict__.iteritems():
9
-            newLogger = Logger(namespace=module.__name__)
10
-            legacyLogger = LegacyLogger(logger=newLogger)
11
-
12
-            if obj is twisted.python.log:
13
-                log.info("Replacing Twisted log module object {0} in {1}"
14
-                         .format(name, module.__name__))
15
-                setattr(module, name, legacyLogger)
16
-            elif obj is twisted.python.log.msg:
17
-                log.info("Replacing Twisted log.msg object {0} in {1}"
18
-                         .format(name, module.__name__))
19
-                setattr(module, name, legacyLogger.msg)
20
-            elif obj is twisted.python.log.err:
21
-                log.info("Replacing Twisted log.err object {0} in {1}"
22
-                         .format(name, module.__name__))
23
-                setattr(module, name, legacyLogger.err)
24
-
25
+    
26
+        try:
27
+            for name, obj in module.__dict__.iteritems():
28
+                newLogger = Logger(namespace=module.__name__)
29
+                legacyLogger = LegacyLogger(logger=newLogger)
30
+    
31
+                if obj is twisted.python.log:
32
+                    log.info("Replacing Twisted log module object {0} in {1}"
33
+                             .format(name, module.__name__))
34
+                    setattr(module, name, legacyLogger)
35
+                elif obj is twisted.python.log.msg:
36
+                    log.info("Replacing Twisted log.msg object {0} in {1}"
37
+                             .format(name, module.__name__))
38
+                    setattr(module, name, legacyLogger.msg)
39
+                elif obj is twisted.python.log.err:
40
+                    log.info("Replacing Twisted log.err object {0} in {1}"
41
+                             .format(name, module.__name__))
42
+                    setattr(module, name, legacyLogger.err)
43
+        except (AttributeError, RuntimeError,):
44
+            # Can't look up __name__.  A hack in the "six" module causes
45
+            # this.  Skip the module.
46
+            # See https://trac.calendarserver.org/ticket/832
47
+            continue
48
 
49
 
50
 ######################################################################
(-)files/patch-twext_python_log.py (-52 lines)
Lines 1-52 Link Here
1
Index: twext/trunk/twext/python/log.py
2
===================================================================
3
--- twext/python/log.py.orig	2013-09-17 23:08:55.000000000 +0000
4
+++ twext/python/log.py	2014-01-22 09:29:56.000000000 +0000
5
@@ -932,24 +932,29 @@
6
         # Don't patch this module
7
         if moduleName is __name__:
8
             continue
9
-
10
-        for name, obj in module.__dict__.iteritems():
11
-            newLogger = Logger(namespace=module.__name__)
12
-            legacyLogger = LegacyLogger(logger=newLogger)
13
-
14
-            if obj is twisted.python.log:
15
-                log.info("Replacing Twisted log module object {0} in {1}"
16
-                         .format(name, module.__name__))
17
-                setattr(module, name, legacyLogger)
18
-            elif obj is twisted.python.log.msg:
19
-                log.info("Replacing Twisted log.msg object {0} in {1}"
20
-                         .format(name, module.__name__))
21
-                setattr(module, name, legacyLogger.msg)
22
-            elif obj is twisted.python.log.err:
23
-                log.info("Replacing Twisted log.err object {0} in {1}"
24
-                         .format(name, module.__name__))
25
-                setattr(module, name, legacyLogger.err)
26
-
27
+    
28
+        try:
29
+            for name, obj in module.__dict__.iteritems():
30
+                newLogger = Logger(namespace=module.__name__)
31
+                legacyLogger = LegacyLogger(logger=newLogger)
32
+    
33
+                if obj is twisted.python.log:
34
+                    log.info("Replacing Twisted log module object {0} in {1}"
35
+                             .format(name, module.__name__))
36
+                    setattr(module, name, legacyLogger)
37
+                elif obj is twisted.python.log.msg:
38
+                    log.info("Replacing Twisted log.msg object {0} in {1}"
39
+                             .format(name, module.__name__))
40
+                    setattr(module, name, legacyLogger.msg)
41
+                elif obj is twisted.python.log.err:
42
+                    log.info("Replacing Twisted log.err object {0} in {1}"
43
+                             .format(name, module.__name__))
44
+                    setattr(module, name, legacyLogger.err)
45
+        except (AttributeError, RuntimeError,):
46
+            # Can't look up __name__.  A hack in the "six" module causes
47
+            # this.  Skip the module.
48
+            # See https://trac.calendarserver.org/ticket/832
49
+            continue
50
 
51
 
52
 ######################################################################
(-)files/patch-txdav__base__propertystore__xattr.py (+20 lines)
Line 0 Link Here
1
--- txdav/base/propertystore/xattr.py.orig	2013-05-30 01:18:39 UTC
2
+++ txdav/base/propertystore/xattr.py
3
@@ -47,10 +47,14 @@
4
 # expose.  Its value is 93.
5
 #
6
 
7
-if sys.platform in ("darwin", "freebsd8", "freebsd9"):
8
-    _ERRNO_NO_ATTR = getattr(errno, "ENOATTR", 93)
9
-else:
10
+_ERRNO_NO_ATTR = 0
11
+try:
12
     _ERRNO_NO_ATTR = errno.ENODATA
13
+except AttributeError:
14
+    if sys.platform[:6] == 'darwin' or sys.platform[:7] == 'freebsd':
15
+        _ERRNO_NO_ATTR = getattr(errno, "ENOATTR", 93)
16
+    else:
17
+        raise
18
 
19
 
20
 

Return to bug 194457