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

Collapse All | Expand All

(-)Makefile (-3 / +31 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=\
46
    ${WRKSRC}/bin/calendarserver_backup \
47
    ${WRKSRC}/bin/calendarserver_bootstrap_database \
48
    ${WRKSRC}/bin/calendarserver_command_gateway \
49
    ${WRKSRC}/bin/calendarserver_config \
50
    ${WRKSRC}/bin/calendarserver_dbinspect \
51
    ${WRKSRC}/bin/calendarserver_dkimtool \
52
    ${WRKSRC}/bin/calendarserver_export \
53
    ${WRKSRC}/bin/calendarserver_icalendar_validate \
54
    ${WRKSRC}/bin/calendarserver_load_augmentdb \
55
    ${WRKSRC}/bin/calendarserver_make_partition \
56
    ${WRKSRC}/bin/calendarserver_manage_postgres \
57
    ${WRKSRC}/bin/calendarserver_manage_principals \
58
    ${WRKSRC}/bin/calendarserver_manage_push \
59
    ${WRKSRC}/bin/calendarserver_manage_timezones \
60
    ${WRKSRC}/bin/calendarserver_migrate_resources \
61
    ${WRKSRC}/bin/calendarserver_monitor_amp_notifications \
62
    ${WRKSRC}/bin/calendarserver_monitor_notifications \
63
    ${WRKSRC}/bin/calendarserver_monitor_work \
64
    ${WRKSRC}/bin/calendarserver_purge_attachments \
65
    ${WRKSRC}/bin/calendarserver_purge_events \
66
    ${WRKSRC}/bin/calendarserver_purge_principals \
67
    ${WRKSRC}/bin/calendarserver_shell \
68
    ${WRKSRC}/bin/calendarserver_upgrade \
69
    ${WRKSRC}/bin/calendarserver_verify_data \
70
    ${WRKSRC}/bin/icalendar_split \
71
    ${WRKSRC}/bin/proxyclean \
43
	${WRKSRC}/calendarserver/tools/backup_pg.py \
72
	${WRKSRC}/calendarserver/tools/backup_pg.py \
44
	${WRKSRC}/calendarserver/tools/backup.py \
73
	${WRKSRC}/calendarserver/tools/backup.py \
45
	${WRKSRC}/twext/python/test/pullpipe.py
74
	${WRKSRC}/twext/python/test/pullpipe.py
46
75
47
USE_RC_SUBR=	caldavd
76
USE_RC_SUBR=	caldavd
77
SUB_LIST+=		PYTHON_CMD=${PYTHON_CMD}
48
78
49
SVN_REPOSITORY_URL=	http://svn.calendarserver.org/repository/calendarserver
79
SVN_REPOSITORY_URL=	http://svn.calendarserver.org/repository/calendarserver
50
SVN_TAG1=	CalendarServer/tags/release/${DISTNAME}
80
SVN_TAG1=	CalendarServer/tags/release/${DISTNAME}
Lines 77-86 Link Here
77
	fi
107
	fi
78
108
79
post-patch:
109
post-patch:
80
81
	@${REINPLACE_CMD} -e 's|"{number} ({info})".format(number=version_number, info=version_info)|"5.1"|' ${WRKSRC}/setup.py
110
	@${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
111
	@${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
112
	@${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
113
	@${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
114
	@${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
 
(-)pkg-plist (+14 lines)
Lines 1-13 Link Here
1
bin/_calendarserver_preamble.py
1
bin/_calendarserver_preamble.py
2
bin/calendarserver_backup
3
bin/calendarserver_bootstrap_database
4
bin/calendarserver_command_gateway
5
bin/calendarserver_config
2
bin/calendarserver_dbinspect
6
bin/calendarserver_dbinspect
3
bin/calendarserver_dkimtool
7
bin/calendarserver_dkimtool
8
bin/calendarserver_export
4
bin/calendarserver_icalendar_validate
9
bin/calendarserver_icalendar_validate
5
bin/calendarserver_load_augmentdb
10
bin/calendarserver_load_augmentdb
6
bin/calendarserver_make_partition
11
bin/calendarserver_make_partition
7
bin/calendarserver_manage_postgres
12
bin/calendarserver_manage_postgres
13
bin/calendarserver_manage_principals
14
bin/calendarserver_manage_push
15
bin/calendarserver_manage_timezones
16
bin/calendarserver_migrate_resources
8
bin/calendarserver_monitor_amp_notifications
17
bin/calendarserver_monitor_amp_notifications
9
bin/calendarserver_monitor_notifications
18
bin/calendarserver_monitor_notifications
10
bin/calendarserver_monitor_work
19
bin/calendarserver_monitor_work
20
bin/calendarserver_purge_attachments
21
bin/calendarserver_purge_events
22
bin/calendarserver_purge_principals
23
bin/calendarserver_shell
24
bin/calendarserver_upgrade
11
bin/calendarserver_verify_data
25
bin/calendarserver_verify_data
12
bin/icalendar_split
26
bin/icalendar_split
13
bin/make-ssl-ca
27
bin/make-ssl-ca

Return to bug 194457