diff options
author | Rahul Amaram <rahul@amaram.name> | 2009-12-12 15:38:38 +0530 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-01-04 20:31:46 +0100 |
commit | 57d7cbdc44f646d1f403731a205bb47a1adcba08 (patch) | |
tree | 4ddb2f8307fdfa55ac091c970ec8d1a154ee541a /debian | |
parent | 76c42579aff07f199fb913a83152378fdb324950 (diff) |
Add patches from Apple Calendarserver 2.3
acked by Jeffrey Harris
Thanks: to Rahul Amaram for preparing this release
Diffstat (limited to 'debian')
-rw-r--r-- | debian/patches/0001-don-t-install-ics_diff.patch | 2 | ||||
-rw-r--r-- | debian/patches/0002-Deepcopy-params.patch | 54 | ||||
-rw-r--r-- | debian/patches/0003-Treat-untils-as-floating.patch | 54 | ||||
-rw-r--r-- | debian/patches/series | 2 |
4 files changed, 111 insertions, 1 deletions
diff --git a/debian/patches/0001-don-t-install-ics_diff.patch b/debian/patches/0001-don-t-install-ics_diff.patch index 1ecb910..fd14364 100644 --- a/debian/patches/0001-don-t-install-ics_diff.patch +++ b/debian/patches/0001-don-t-install-ics_diff.patch @@ -1,4 +1,4 @@ -From: =?utf-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> +From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org> Date: Fri, 17 Apr 2009 22:46:06 +0200 Subject: [PATCH] don't install ics_diff diff --git a/debian/patches/0002-Deepcopy-params.patch b/debian/patches/0002-Deepcopy-params.patch new file mode 100644 index 0000000..3166bbf --- /dev/null +++ b/debian/patches/0002-Deepcopy-params.patch @@ -0,0 +1,54 @@ +From: Morgen Sagen <sagen@apple.com> +Date: Mon, 4 Jan 2010 20:26:58 +0100 +Subject: [PATCH] Deepcopy params + +--- + vobject/base.py | 14 +++++++++----- + 1 files changed, 9 insertions(+), 5 deletions(-) + +diff --git a/vobject/base.py b/vobject/base.py +index b56c36a..40baf1e 100644 +--- a/vobject/base.py ++++ b/vobject/base.py +@@ -284,6 +284,8 @@ class ContentLine(VBase): + self.value = copy.copy(copyit.value) + self.encoded = self.encoded + self.params = copy.copy(copyit.params) ++ for k,v in self.params.items(): ++ self.params[k] = copy.copy(v) + self.singletonparams = copy.copy(copyit.singletonparams) + self.lineNumber = copyit.lineNumber + +@@ -627,16 +629,16 @@ class Component(VBase): + print + + class VObjectError(Exception): +- def __init__(self, message, lineNumber=None): +- self.message = message ++ def __init__(self, msg, lineNumber=None): ++ self.msg = msg + if lineNumber is not None: + self.lineNumber = lineNumber + def __str__(self): + if hasattr(self, 'lineNumber'): + return "At line %s: %s" % \ +- (self.lineNumber, self.message) ++ (self.lineNumber, self.msg) + else: +- return repr(self.message) ++ return repr(self.msg) + + class ParseError(VObjectError): + pass +@@ -953,7 +955,9 @@ def defaultSerialize(obj, buf, lineLength): + if obj.group is not None: + s.write(obj.group + '.') + s.write(obj.name.upper()) +- for key, paramvals in obj.params.iteritems(): ++ keys = sorted(obj.params.iterkeys()) ++ for key in keys: ++ paramvals = obj.params[key] + s.write(';' + key + '=' + ','.join(dquoteEscape(p) for p in paramvals)) + s.write(':' + obj.value) + if obj.behavior and not startedEncoded: obj.behavior.decode(obj) +-- diff --git a/debian/patches/0003-Treat-untils-as-floating.patch b/debian/patches/0003-Treat-untils-as-floating.patch new file mode 100644 index 0000000..ec978d3 --- /dev/null +++ b/debian/patches/0003-Treat-untils-as-floating.patch @@ -0,0 +1,54 @@ +From: Morgen Sagen <sagen@apple.com> +Date: Mon, 4 Jan 2010 20:27:01 +0100 +Subject: [PATCH] Treat untils as floating + +--- + vobject/icalendar.py | 19 ++++++++++++++++--- + 1 files changed, 16 insertions(+), 3 deletions(-) + +diff --git a/vobject/icalendar.py b/vobject/icalendar.py +index 4a1da7c..8917476 100644 +--- a/vobject/icalendar.py ++++ b/vobject/icalendar.py +@@ -427,6 +427,18 @@ class RecurringComponent(Component): + if dtstart.tzinfo is not None: + until = until.astimezone(dtstart.tzinfo) + ++ # RFC2445 actually states that UNTIL must be a UTC value. Whilst the ++ # changes above work OK, one problem case is if DTSTART is floating but ++ # UNTIL is properly specified as UTC (or with a TZID). In that case dateutil ++ # will fail datetime comparisons. There is no easy solution to this as ++ # there is no obvious timezone (at this point) to do proper floating time ++ # offset compisons. The best we can do is treat the UNTIL value as floating. ++ # This could mean incorrect determination of the last instance. The better ++ # solution here is to encourage clients to use COUNT rather than UNTIL ++ # when DTSTART is floating. ++ if dtstart.tzinfo is None: ++ until = until.replace(tzinfo=None) ++ + rule._until = until + + # add the rrule or exrule to the rruleset +@@ -473,7 +485,7 @@ class RecurringComponent(Component): + untilSerialize = lambda x: dateTimeToString(x, True) + + for name in DATESANDRULES: +- if hasattr(self.contents, name): ++ if name in self.contents: + del self.contents[name] + setlist = getattr(rruleset, '_' + name) + if name in DATENAMES: +@@ -1663,9 +1675,10 @@ def stringToTextValues(s, listSeparator=',', charList=None, strict=False): + else: + current.append(char) + else: +- state = "read normal" ++ #state = "read normal" + # leave unrecognized escaped characters for later passes +- current.append('\\' + char) ++ #current.append('\\' + char) ++ raise ParseError("error: illegal escape sequence: '\\%s'" % (char,)) + + elif state == "end": #an end state + if len(current) or len(results) == 0: +-- diff --git a/debian/patches/series b/debian/patches/series index d435fd5..d0a5236 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,3 @@ 0001-don-t-install-ics_diff.patch +0002-Deepcopy-params.patch +0003-Treat-untils-as-floating.patch |