From 905d2c885ca8c8167c811018841bc9e542bbf9a5 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 27 Mar 2012 16:47:14 +0000 Subject: [PATCH 01/21] Monotone-Parent: b4a3ddf3836324fd1f4925acb0426089a4a0350a Monotone-Revision: c1548a6a3e72a7d9b567b63d50198115fa48ab0b Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-27T16:47:14 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 17 ++ SoObjects/Contacts/SOGoContactFolders.m | 46 ++++ SoObjects/Contacts/SOGoContactLDIFEntry.m | 5 + SoObjects/Contacts/SOGoContactSourceFolder.m | 274 +++++++++++++++++++ SoObjects/Contacts/SOGoUserFolder+Contacts.m | 27 ++ 5 files changed, 369 insertions(+) diff --git a/ChangeLog b/ChangeLog index 7afe15f01..8c39ecf6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +2012-03-27 Wolfgang Sourdeau + + * SoObjects/Contacts/SOGoContactFolders.m + (-lookupName:inContext:acquire:): overriden method that enables + the lookup of hidden public sources with iOS devices. + + * SoObjects/Contacts/SOGoContactLDIFEntry.m (-davAddressData): new + getter similar to davCalendarData. + + * SoObjects/Contacts/SOGoContactSourceFolder.m + (-davAddressbookMultiget): new REPORT handler based on + -[SOGoAppointmentFolder davCalendarMultiget]. + + * SoObjects/Contacts/SOGoUserFolder+Contacts.m + (-davDirectoryGateway): new getter that returns the url to the + first available directory source. + 2012-03-26 Wolfgang Sourdeau * OpenChange/MAPIStoreTasksMessage.m (-save): take PR_HTML as diff --git a/SoObjects/Contacts/SOGoContactFolders.m b/SoObjects/Contacts/SOGoContactFolders.m index 01b1f3abb..537d7a08a 100644 --- a/SoObjects/Contacts/SOGoContactFolders.m +++ b/SoObjects/Contacts/SOGoContactFolders.m @@ -259,6 +259,52 @@ return keys; } +- (id) lookupName: (NSString *) name + inContext: (WOContext *) lookupContext + acquire: (BOOL) acquire +{ + id folder = nil; + SOGoUser *currentUser; + SOGoUserManager *um; + SOGoSystemDefaults *sd; + NSEnumerator *domains; + NSArray *sourceIDs; + NSString *domain, *srcDisplayName; + + if ([[context request] isIPhoneAddressBookApp]) + { + currentUser = [context activeUser]; + if (activeUserIsOwner + || [[currentUser login] isEqualToString: owner]) + { + domain = [currentUser domain]; + um = [SOGoUserManager sharedUserManager]; + sd = [SOGoSystemDefaults sharedSystemDefaults]; + domains = [[sd visibleDomainsForDomain: domain] objectEnumerator]; + while (domain) + { + sourceIDs = [um addressBookSourceIDsInDomain: domain]; + if ([sourceIDs containsObject: name]) + { + srcDisplayName = [um displayNameForSourceWithID: name]; + folder = [SOGoContactSourceFolder + folderWithName: name + andDisplayName: srcDisplayName + inContainer: self]; + [folder setSource: [um sourceWithID: name]]; + } + domain = [domains nextObject]; + } + } + } + + if (!folder) + folder = [super lookupName: name inContext: lookupContext + acquire: acquire]; + + return folder; +} + - (NSException *) setDavContactsCategories: (NSString *) newCategories { SOGoUser *ownerUser; diff --git a/SoObjects/Contacts/SOGoContactLDIFEntry.m b/SoObjects/Contacts/SOGoContactLDIFEntry.m index 6801875fb..4472ae901 100644 --- a/SoObjects/Contacts/SOGoContactLDIFEntry.m +++ b/SoObjects/Contacts/SOGoContactLDIFEntry.m @@ -166,6 +166,11 @@ return @"text/x-vcard"; } +- (NSString *) davAddressData +{ + return [self contentAsString]; +} + - (NSException *) save { return [(SOGoContactSourceFolder *) container saveLDIFEntry: self]; diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index b4a5b2318..1f6437bb9 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -24,6 +24,7 @@ #import #import #import +#import #import #import @@ -34,17 +35,23 @@ #import #import #import +#import #import +#import +#import #import #import +#import #import #import #import +#import #import #import #import #import +#import #import "SOGoContactFolders.h" #import "SOGoContactGCSFolder.h" @@ -350,6 +357,273 @@ return result; } +- (NSString *) _deduceObjectNameFromURL: (NSString *) url + fromBaseURL: (NSString *) baseURL +{ + NSRange urlRange; + NSString *name; + + urlRange = [url rangeOfString: baseURL]; + if (urlRange.location != NSNotFound) + { + name = [url substringFromIndex: NSMaxRange (urlRange)]; + if ([name hasPrefix: @"/"]) + name = [name substringFromIndex: 1]; + } + else + name = nil; + + return name; +} + +/* TODO: multiget reorg */ +- (NSString *) _nodeTagForProperty: (NSString *) property +{ + NSString *namespace, *nodeName, *nsRep; + NSRange nsEnd; + + nsEnd = [property rangeOfString: @"}"]; + namespace + = [property substringFromRange: NSMakeRange (1, nsEnd.location - 1)]; + nodeName = [property substringFromIndex: nsEnd.location + 1]; + if ([namespace isEqualToString: XMLNS_CARDDAV]) + nsRep = @"C"; + else + nsRep = @"D"; + + return [NSString stringWithFormat: @"%@:%@", nsRep, nodeName]; +} + +- (NSString *) _nodeTag: (NSString *) property +{ + static NSMutableDictionary *tags = nil; + NSString *nodeTag; + + if (!tags) + tags = [NSMutableDictionary new]; + nodeTag = [tags objectForKey: property]; + if (!nodeTag) + { + nodeTag = [self _nodeTagForProperty: property]; + [tags setObject: nodeTag forKey: property]; + } + + return nodeTag; +} + +- (NSString **) _properties: (NSString **) properties + count: (unsigned int) propertiesCount + ofObject: (NSDictionary *) object +{ + SOGoContactLDIFEntry *ldifEntry; + NSString **currentProperty; + NSString **values, **currentValue; + SEL methodSel; + +// NSLog (@"_properties:ofObject:: %@", [NSDate date]); + + values = NSZoneMalloc (NULL, + (propertiesCount + 1) * sizeof (NSString *)); + *(values + propertiesCount) = nil; + + ldifEntry = [SOGoContactLDIFEntry + contactEntryWithName: [object objectForKey: @"c_name"] + withLDIFEntry: object + inContainer: self]; + currentProperty = properties; + currentValue = values; + while (*currentProperty) + { + methodSel = SOGoSelectorForPropertyGetter (*currentProperty); + if (methodSel && [ldifEntry respondsToSelector: methodSel]) + *currentValue = [[ldifEntry performSelector: methodSel] + stringByEscapingXMLString]; + currentProperty++; + currentValue++; + } + +// NSLog (@"/_properties:ofObject:: %@", [NSDate date]); + + return values; +} + +- (NSArray *) _propstats: (NSString **) properties + count: (unsigned int) propertiesCount + ofObject: (NSDictionary *) object +{ + NSMutableArray *propstats, *properties200, *properties404, *propDict; + NSString **property, **values, **currentValue; + NSString *propertyValue, *nodeTag; + +// NSLog (@"_propstats:ofObject:: %@", [NSDate date]); + + propstats = [NSMutableArray array]; + + properties200 = [NSMutableArray array]; + properties404 = [NSMutableArray array]; + + values = [self _properties: properties count: propertiesCount + ofObject: object]; + currentValue = values; + + property = properties; + while (*property) + { + nodeTag = [self _nodeTag: *property]; + if (*currentValue) + { + propertyValue = [NSString stringWithFormat: @"<%@>%@", + nodeTag, *currentValue, nodeTag]; + propDict = properties200; + } + else + { + propertyValue = [NSString stringWithFormat: @"<%@/>", nodeTag]; + propDict = properties404; + } + [propDict addObject: propertyValue]; + property++; + currentValue++; + } + free (values); + + if ([properties200 count]) + [propstats addObject: [NSDictionary dictionaryWithObjectsAndKeys: + properties200, @"properties", + @"HTTP/1.1 200 OK", @"status", + nil]]; + if ([properties404 count]) + [propstats addObject: [NSDictionary dictionaryWithObjectsAndKeys: + properties404, @"properties", + @"HTTP/1.1 404 Not Found", @"status", + nil]]; +// NSLog (@"/_propstats:ofObject:: %@", [NSDate date]); + + return propstats; +} + +- (void) _appendPropstat: (NSDictionary *) propstat + toBuffer: (NSMutableString *) r +{ + NSArray *properties; + unsigned int count, max; + + [r appendString: @""]; + properties = [propstat objectForKey: @"properties"]; + max = [properties count]; + for (count = 0; count < max; count++) + [r appendString: [properties objectAtIndex: count]]; + [r appendString: @""]; + [r appendString: [propstat objectForKey: @"status"]]; + [r appendString: @""]; +} + +- (void) appendObject: (NSDictionary *) object + properties: (NSString **) properties + count: (unsigned int) propertiesCount + withBaseURL: (NSString *) baseURL + toBuffer: (NSMutableString *) r +{ + NSArray *propstats; + unsigned int count, max; + + [r appendFormat: @""]; + [r appendString: baseURL]; + [r appendString: [[object objectForKey: @"c_name"] stringByEscapingURL]]; + [r appendString: @""]; + +// NSLog (@"(appendPropstats...): %@", [NSDate date]); + propstats = [self _propstats: properties count: propertiesCount + ofObject: object]; + max = [propstats count]; + for (count = 0; count < max; count++) + [self _appendPropstat: [propstats objectAtIndex: count] + toBuffer: r]; +// NSLog (@"/(appendPropstats...): %@", [NSDate date]); + + [r appendString: @""]; +} + +- (void) appendMissingObjectRef: (NSString *) href + toBuffer: (NSMutableString *) r +{ + [r appendString: @""]; + [r appendString: href]; + [r appendString: @"HTTP/1.1 404 Not Found"]; +} + +- (void) _appendComponentProperties: (NSArray *) properties + matchingURLs: (id ) refs + toResponse: (WOResponse *) response +{ + NSObject *element; + NSString *url, *baseURL, *cname; + NSString **propertiesArray; + NSMutableString *buffer; + unsigned int count, max, propertiesCount; + + baseURL = [self davURLAsString]; +#warning review this when fixing http://www.scalableogo.org/bugs/view.php?id=276 + if (![baseURL hasSuffix: @"/"]) + baseURL = [NSString stringWithFormat: @"%@/", baseURL]; + + propertiesArray = [properties asPointersOfObjects]; + propertiesCount = [properties count]; + + max = [refs length]; + buffer = [NSMutableString stringWithCapacity: max*512]; + + for (count = 0; count < max; count++) + { + element = [refs objectAtIndex: count]; + url = [[[element firstChild] nodeValue] stringByUnescapingURL]; + cname = [self _deduceObjectNameFromURL: url fromBaseURL: baseURL]; + if (cname) + [self appendObject: [source lookupContactEntry: cname] + properties: propertiesArray + count: propertiesCount + withBaseURL: baseURL + toBuffer: buffer]; + else + [self appendMissingObjectRef: url + toBuffer: buffer]; + } + [response appendContentString: buffer]; +// NSLog (@"/adding properties with url"); + + NSZoneFree (NULL, propertiesArray); +} + +- (WOResponse *) performMultigetInContext: (WOContext *) queryContext + inNamespace: (NSString *) namespace +{ + WOResponse *r; + id document; + DOMElement *documentElement, *propElement; + + r = [context response]; + [r prepareDAVResponse]; + [r appendContentString: + [NSString stringWithFormat: @"", namespace]]; + document = [[queryContext request] contentAsDOMDocument]; + documentElement = (DOMElement *) [document documentElement]; + propElement = [documentElement firstElementWithTag: @"prop" + inNamespace: @"DAV:"]; + [self _appendComponentProperties: [propElement flatPropertyNameOfSubElements] + matchingURLs: [documentElement getElementsByTagName: @"href"] + toResponse: r]; + [r appendContentString:@""]; + + return r; +} + +- (id) davAddressbookMultiget: (id) queryContext +{ + return [self performMultigetInContext: queryContext + inNamespace: @"urn:ietf:params:xml:ns:carddav"]; +} + - (NSString *) davDisplayName { return displayName; diff --git a/SoObjects/Contacts/SOGoUserFolder+Contacts.m b/SoObjects/Contacts/SOGoUserFolder+Contacts.m index 817c91cb8..2244456d4 100644 --- a/SoObjects/Contacts/SOGoUserFolder+Contacts.m +++ b/SoObjects/Contacts/SOGoUserFolder+Contacts.m @@ -29,6 +29,7 @@ #import #import +#import #import #import @@ -58,4 +59,30 @@ return [NSArray arrayWithObject: tag]; } +- (NSArray *) davDirectoryGateway +{ + NSArray *tag, *sources; + SOGoContactFolders *parent; + SOGoUserManager *um; + NSString *domain, *url; + + domain = [[context activeUser] domain]; + um = [SOGoUserManager sharedUserManager]; + sources = [um addressBookSourceIDsInDomain: domain]; + if ([sources count] > 0) + { + parent = [self privateContacts: @"Contacts" inContext: context]; + url = [NSString stringWithFormat: @"%@%@/", [parent davURLAsString], + [sources objectAtIndex: 0]]; + tag = [NSArray arrayWithObject: + [NSArray arrayWithObjects: @"href", @"DAV:", @"D", + url, nil]]; + } + else + tag = nil; + + return tag; +} + + @end From 4489085c59496805223fb1df9e885cd9a5dfae5f Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 27 Mar 2012 20:55:20 +0000 Subject: [PATCH 02/21] Monotone-Parent: c1548a6a3e72a7d9b567b63d50198115fa48ab0b Monotone-Revision: 7a38303ac45419355a1bdedefd53d63339248410 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-27T20:55:20 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 1 + SoObjects/Contacts/SOGoContactSourceFolder.m | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c39ecf6a..b053aa93c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ * SoObjects/Contacts/SOGoUserFolder+Contacts.m (-davDirectoryGateway): new getter that returns the url to the first available directory source. + (-davResourceType): declare resource as "directory" (carddav). 2012-03-26 Wolfgang Sourdeau diff --git a/SoObjects/Contacts/SOGoContactSourceFolder.m b/SoObjects/Contacts/SOGoContactSourceFolder.m index 1f6437bb9..260a7ce35 100644 --- a/SoObjects/Contacts/SOGoContactSourceFolder.m +++ b/SoObjects/Contacts/SOGoContactSourceFolder.m @@ -137,14 +137,13 @@ - (NSArray *) davResourceType { NSMutableArray *resourceType; - NSArray *cardDavCollection; - - cardDavCollection - = [NSArray arrayWithObjects: @"addressbook", - @"urn:ietf:params:xml:ns:carddav", nil]; + NSArray *type; resourceType = [NSMutableArray arrayWithArray: [super davResourceType]]; - [resourceType addObject: cardDavCollection]; + type = [NSArray arrayWithObjects: @"addressbook", XMLNS_CARDDAV, nil]; + [resourceType addObject: type]; + type = [NSArray arrayWithObjects: @"directory", XMLNS_CARDDAV, nil]; + [resourceType addObject: type]; return resourceType; } @@ -621,7 +620,7 @@ - (id) davAddressbookMultiget: (id) queryContext { return [self performMultigetInContext: queryContext - inNamespace: @"urn:ietf:params:xml:ns:carddav"]; + inNamespace: XMLNS_CARDDAV]; } - (NSString *) davDisplayName From d28ca1ecdcdfbcbd3c2090d04f3132885cdb04f3 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 28 Mar 2012 04:42:02 +0000 Subject: [PATCH 03/21] Monotone-Parent: 7a38303ac45419355a1bdedefd53d63339248410 Monotone-Revision: f8af7a968c459aff400e85a6c5422a0c7a370167 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-28T04:42:02 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ SoObjects/SOGo/LDAPSource.m | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b053aa93c..efb9ae8ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-03-28 Wolfgang Sourdeau + + * SoObjects/SOGo/LDAPSource.m (-allEntryIDs): take the _filter + ivar into account. + 2012-03-27 Wolfgang Sourdeau * SoObjects/Contacts/SOGoContactFolders.m diff --git a/SoObjects/SOGo/LDAPSource.m b/SoObjects/SOGo/LDAPSource.m index b5cbc146a..3269ca10c 100644 --- a/SoObjects/SOGo/LDAPSource.m +++ b/SoObjects/SOGo/LDAPSource.m @@ -830,6 +830,8 @@ andMultipleBookingsField: (NSString *) newMultipleBookingsField NSEnumerator *entries; NGLdapEntry *currentEntry; NGLdapConnection *ldapConnection; + EOQualifier *qualifier; + NSMutableString *qs; NSString *value; NSArray *attributes; NSMutableArray *ids; @@ -838,17 +840,23 @@ andMultipleBookingsField: (NSString *) newMultipleBookingsField ldapConnection = [self _ldapConnection]; attributes = [NSArray arrayWithObject: IDField]; + + qs = [NSMutableString stringWithFormat: @"(%@='*')", CNField]; + if ([_filter length]) + [qs appendFormat: @" AND %@", _filter]; + qualifier = [EOQualifier qualifierWithQualifierFormat: qs]; + if ([_scope caseInsensitiveCompare: @"BASE"] == NSOrderedSame) entries = [ldapConnection baseSearchAtBaseDN: baseDN - qualifier: nil + qualifier: qualifier attributes: attributes]; else if ([_scope caseInsensitiveCompare: @"ONE"] == NSOrderedSame) entries = [ldapConnection flatSearchAtBaseDN: baseDN - qualifier: nil + qualifier: qualifier attributes: attributes]; else entries = [ldapConnection deepSearchAtBaseDN: baseDN - qualifier: nil + qualifier: qualifier attributes: attributes]; while ((currentEntry = [entries nextObject])) From dcb952e1b7e04e2c42c43338e72602d0a588e7f9 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 28 Mar 2012 15:05:58 +0000 Subject: [PATCH 04/21] Monotone-Parent: f8af7a968c459aff400e85a6c5422a0c7a370167 Monotone-Revision: 600b3a1c268cabeca401fb335f2e4c76bd1709b7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-28T15:05:58 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ SoObjects/Contacts/SOGoFolder+CardDAV.m | 17 +++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index efb9ae8ec..ca5486e35 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2012-03-28 Wolfgang Sourdeau + * SoObjects/Contacts/SOGoFolder+CardDAV.m (_isValidFilter:): + accept "email" as filter name. + (_appendObject:withBaseURL:toREPORTResponse:): fixed the ordering + of XML elements as the address*-data props where put outside of + the tree. + * SoObjects/SOGo/LDAPSource.m (-allEntryIDs): take the _filter ivar into account. diff --git a/SoObjects/Contacts/SOGoFolder+CardDAV.m b/SoObjects/Contacts/SOGoFolder+CardDAV.m index fed4c2105..3466e940e 100644 --- a/SoObjects/Contacts/SOGoFolder+CardDAV.m +++ b/SoObjects/Contacts/SOGoFolder+CardDAV.m @@ -73,17 +73,17 @@ etagLine = [NSString stringWithFormat: @"%@", [component davEntityTag]]; [r appendContentString: etagLine]; - [r appendContentString: @"" - @"HTTP/1.1 200 OK" - @"" - @""]; + [r appendContentString: @""]; contactString = [[component contentAsString] stringByEscapingXMLString]; [r appendContentString: contactString]; - [r appendContentString: @"" - @""]; - [r appendContentString: contactString]; [r appendContentString: @"" - @""]; + @""]; + [r appendContentString: contactString]; + [r appendContentString: @"" + @"" + @"HTTP/1.1 200 OK" + @"" + @""]; } } @@ -124,6 +124,7 @@ return ([newString isEqualToString: @"sn"] || [newString isEqualToString: @"givenname"] + || [newString isEqualToString: @"email"] || [newString isEqualToString: @"mail"] || [newString isEqualToString: @"telephonenumber"]); } From 269393250b5b2a4b2aece6145b5c20a9a0e47f6a Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 28 Mar 2012 20:04:32 +0000 Subject: [PATCH 05/21] Monotone-Parent: 600b3a1c268cabeca401fb335f2e4c76bd1709b7 Monotone-Revision: d93b5b4142f73cdb24bac181e6d92140b7a59313 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-28T20:04:32 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 7 +++++++ OpenChange/SOGoMAPIFSMessage.h | 2 +- OpenChange/SOGoMAPIFSMessage.m | 33 ++++++++++++++++----------------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca5486e35..a7793891b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2012-03-28 Wolfgang Sourdeau + * OpenChange/SOGoMAPIFSMessage.m + (_readFileChangesDataWithDate:andInode:): use the inode number + rather than the filesize as change indicator since a new file is + created each time the dictionary is written to disk, thanks to the + "atomically" flag. + (-save): write the file atomically. + * SoObjects/Contacts/SOGoFolder+CardDAV.m (_isValidFilter:): accept "email" as filter name. (_appendObject:withBaseURL:toREPORTResponse:): fixed the ordering diff --git a/OpenChange/SOGoMAPIFSMessage.h b/OpenChange/SOGoMAPIFSMessage.h index 0a0385721..ec6494938 100644 --- a/OpenChange/SOGoMAPIFSMessage.h +++ b/OpenChange/SOGoMAPIFSMessage.h @@ -31,7 +31,7 @@ @interface SOGoMAPIFSMessage : SOGoMAPIVolatileMessage { NSString *completeFilename; - NSUInteger fileSize; + NSUInteger inode; NSData *lastModificationTime; } diff --git a/OpenChange/SOGoMAPIFSMessage.m b/OpenChange/SOGoMAPIFSMessage.m index 495bba96d..8a854fa1d 100644 --- a/OpenChange/SOGoMAPIFSMessage.m +++ b/OpenChange/SOGoMAPIFSMessage.m @@ -41,7 +41,7 @@ if ((self = [super init])) { completeFilename = nil; - fileSize = 0; + inode = 0; lastModificationTime = nil; } @@ -86,7 +86,7 @@ } - (BOOL) _readFileChangesDataWithDate: (NSDate **) newLMTime - andSize: (NSUInteger *) newFileSize + andInode: (NSUInteger *) newInode { BOOL rc; NSDictionary *attributes; @@ -97,7 +97,7 @@ if (attributes) { *newLMTime = [attributes fileModificationDate]; - *newFileSize = [attributes fileSize]; + *newInode = [attributes fileSystemFileNumber]; rc = YES; } else @@ -107,22 +107,22 @@ } - (BOOL) _checkFileChangesDataWithDate: (NSDate **) newLMTime - andSize: (NSUInteger *) newFileSize + andInode: (NSUInteger *) newInode { BOOL hasChanged = NO; NSDate *lastLMTime; - NSUInteger lastFileSize; + NSUInteger lastInode; if ([self _readFileChangesDataWithDate: &lastLMTime - andSize: &lastFileSize]) + andInode: &lastInode]) { - if (fileSize != lastFileSize + if (inode != lastInode || ![lastModificationTime isEqual: lastLMTime]) { if (lastLMTime) *newLMTime = lastLMTime; - if (newFileSize) - *newFileSize = lastFileSize; + if (newInode) + *newInode = lastInode; hasChanged = YES; } } @@ -136,10 +136,10 @@ NSString *error; NSPropertyListFormat format; NSDate *lastLMTime; - NSUInteger lastFileSize; + NSUInteger lastInode; if ([self _checkFileChangesDataWithDate: &lastLMTime - andSize: &lastFileSize]) + andInode: &lastInode]) { [self logWithFormat: @"file '%@' new or modified: rereading properties", [self completeFilename]]; @@ -158,7 +158,7 @@ @" of message: '%@'", error]; } ASSIGN (lastModificationTime, lastLMTime); - fileSize = lastFileSize; + inode = lastInode; } return [super properties]; @@ -168,7 +168,7 @@ { NSData *content; NSDate *lastLMTime; - NSUInteger lastFileSize; + NSUInteger lastInode; [container ensureDirectory]; @@ -178,14 +178,13 @@ dataFromPropertyList: [self properties] format: NSPropertyListBinaryFormat_v1_0 errorDescription: NULL]; - if (![content writeToFile: [self completeFilename] atomically: NO]) + if (![content writeToFile: [self completeFilename] atomically: YES]) [NSException raise: @"MAPIStoreIOException" format: @"could not save message"]; - [self _readFileChangesDataWithDate: &lastLMTime - andSize: &lastFileSize]; + [self _readFileChangesDataWithDate: &lastLMTime andInode: &lastInode]; ASSIGN (lastModificationTime, lastLMTime); - fileSize = lastFileSize; + inode = lastInode; // [self logWithFormat: @"fs message written to '%@'", [self completeFilename]]; } From 64b8498eac7f1aa0b900e98675889cf2daa0dd5b Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 30 Mar 2012 14:09:07 +0000 Subject: [PATCH 06/21] Monotone-Parent: 34215cf1c90ce31c32de705320b2cd5f2bee55ec Monotone-Revision: d1a795ace9b3ecfe78615e345153f5c37d0ca4b2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-30T14:09:07 Monotone-Branch: ca.inverse.sogo --- Version | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Version b/Version index 4364995c1..09503ebca 100644 --- a/Version +++ b/Version @@ -2,6 +2,6 @@ # This file is included by library makefiles to set the version information # of the executable. -MAJOR_VERSION=1 -MINOR_VERSION=3 -SUBMINOR_VERSION=15 +MAJOR_VERSION=2 +MINOR_VERSION=0 +SUBMINOR_VERSION=0 From 2adcb276b2f09ada9c427de36d4625c84dabdefb Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 30 Mar 2012 15:33:47 +0000 Subject: [PATCH 07/21] Monotone-Parent: 4899b773e21bd6c56bae726bf720e184b8ef9ec0 Monotone-Revision: cb7b77723f765942d950c5620150b720f5d0c5b1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-30T15:33:47 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ OpenChange/MAPIStoreCalendarMessage.m | 4 ++-- OpenChange/MAPIStoreContext.h | 4 ++-- OpenChange/MAPIStoreMailMessage.m | 2 +- OpenChange/MAPIStoreObject.h | 2 -- OpenChange/MAPIStoreObject.m | 15 --------------- OpenChange/MAPIStoreUserContext.h | 4 ++++ OpenChange/MAPIStoreUserContext.m | 14 ++++++++++++++ 8 files changed, 31 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 646dab57b..8859b3097 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-03-30 Wolfgang Sourdeau + + * OpenChange/MAPIStoreUserContext.m (-timeZone): new method that + returns the timezone of an owner user. + + * OpenChange/MAPIStoreObject.m (-ownerTimeZone): removed method, + replaced with the one above. + 2012-03-29 Francis Lachapelle * UI/WebServerResources/UIxPreferences.js (savePreferences): fixed diff --git a/OpenChange/MAPIStoreCalendarMessage.m b/OpenChange/MAPIStoreCalendarMessage.m index 004a30afc..6890fe172 100644 --- a/OpenChange/MAPIStoreCalendarMessage.m +++ b/OpenChange/MAPIStoreCalendarMessage.m @@ -118,7 +118,7 @@ [MAPIStoreAppointmentWrapper wrapperWithICalEvent: event andUser: [userContext sogoUser] andSenderEmail: nil - inTimeZone: [self ownerTimeZone] + inTimeZone: [userContext timeZone] withConnectionInfo: [context connectionInfo]]); } @@ -766,7 +766,7 @@ isAllDay = [value boolValue]; if (!isAllDay) { - tzName = [[self ownerTimeZone] name]; + tzName = [[[self userContext] timeZone] name]; tz = [iCalTimeZone timeZoneForName: tzName]; [vCalendar addTimeZone: tz]; } diff --git a/OpenChange/MAPIStoreContext.h b/OpenChange/MAPIStoreContext.h index ef3be71a6..fdea9bbd1 100644 --- a/OpenChange/MAPIStoreContext.h +++ b/OpenChange/MAPIStoreContext.h @@ -55,8 +55,8 @@ { struct mapistore_connection_info *connInfo; NSMutableArray *containersBag; - SOGoUser *activeUser; - MAPIStoreUserContext *userContext; + SOGoUser *activeUser; /* the user accessing the resource */ + MAPIStoreUserContext *userContext; /* the owner or the resource */ NSURL *contextUrl; } diff --git a/OpenChange/MAPIStoreMailMessage.m b/OpenChange/MAPIStoreMailMessage.m index aa0469774..005cade2f 100644 --- a/OpenChange/MAPIStoreMailMessage.m +++ b/OpenChange/MAPIStoreMailMessage.m @@ -284,7 +284,7 @@ _compareBodyKeysByPriority (id entry1, id entry2, void *data) wrapperWithICalEvent: event andUser: [context activeUser] andSenderEmail: senderEmail - inTimeZone: [self ownerTimeZone] + inTimeZone: [[self userContext] timeZone] withConnectionInfo: [context connectionInfo]]; [appointmentWrapper retain]; } diff --git a/OpenChange/MAPIStoreObject.h b/OpenChange/MAPIStoreObject.h index 773e806ac..cb7ed7809 100644 --- a/OpenChange/MAPIStoreObject.h +++ b/OpenChange/MAPIStoreObject.h @@ -77,8 +77,6 @@ - (uint64_t) objectId; - (NSString *) url; -- (NSTimeZone *) ownerTimeZone; - /* properties */ - (BOOL) canGetProperty: (enum MAPITAGS) propTag; diff --git a/OpenChange/MAPIStoreObject.m b/OpenChange/MAPIStoreObject.m index c0649c7a3..f2f8d0ebe 100644 --- a/OpenChange/MAPIStoreObject.m +++ b/OpenChange/MAPIStoreObject.m @@ -210,21 +210,6 @@ static Class NSExceptionK, MAPIStoreFolderK; containerURL, [self nameInContainer]]; } -- (NSTimeZone *) ownerTimeZone -{ - NSString *owner; - SOGoUserDefaults *ud; - NSTimeZone *tz; - WOContext *woContext; - - woContext = [[self userContext] woContext]; - owner = [sogoObject ownerInContext: woContext]; - ud = [[SOGoUser userWithLogin: owner] userDefaults]; - tz = [ud timeZone]; - - return tz; -} - - (void) addProperties: (NSDictionary *) newNewProperties { [properties addEntriesFromDictionary: newNewProperties]; diff --git a/OpenChange/MAPIStoreUserContext.h b/OpenChange/MAPIStoreUserContext.h index 43ae2e7ed..5cdd38710 100644 --- a/OpenChange/MAPIStoreUserContext.h +++ b/OpenChange/MAPIStoreUserContext.h @@ -27,6 +27,7 @@ @class NSMutableDictionary; @class NSString; +@class NSTimeZone; @class WOContext; @@ -43,6 +44,7 @@ { NSString *username; SOGoUser *sogoUser; + NSTimeZone *timeZone; SOGoUserFolder *userFolder; NSMutableArray *containersBag; @@ -63,6 +65,8 @@ - (NSString *) username; - (SOGoUser *) sogoUser; +- (NSTimeZone *) timeZone; + - (SOGoUserFolder *) userFolder; - (NSDictionary *) rootFolders; diff --git a/OpenChange/MAPIStoreUserContext.m b/OpenChange/MAPIStoreUserContext.m index 53f20d37c..dcb3cfb72 100644 --- a/OpenChange/MAPIStoreUserContext.m +++ b/OpenChange/MAPIStoreUserContext.m @@ -137,6 +137,20 @@ static NSMapTable *contextsTable = nil; return sogoUser; } +- (NSTimeZone *) timeZone +{ + if (!timeZone) + { + SOGoUser *user; + + user = [self sogoUser]; + timeZone = [[user userDefaults] timeZone]; + [timeZone retain]; + } + + return timeZone; +} + - (SOGoUserFolder *) userFolder { if (!userFolder) From a4b083eb1e8a564e321e49788f546fb6848aac98 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 30 Mar 2012 19:51:37 +0000 Subject: [PATCH 08/21] Monotone-Parent: cb7b77723f765942d950c5620150b720f5d0c5b1 Monotone-Revision: 1900d82b81c570a73d4db548a566ed09b57ee43a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-30T19:51:37 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 5 +++++ OpenChange/MAPIApplication.m | 5 +++++ OpenChange/MAPIStoreAppointmentWrapper.h | 2 -- OpenChange/MAPIStoreAppointmentWrapper.m | 4 ---- OpenChange/MAPIStoreContactsAttachment.m | 2 -- OpenChange/MAPIStoreTypes.h | 3 +++ OpenChange/MAPIStoreTypes.m | 2 ++ 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8859b3097..2f00edb37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2012-03-30 Wolfgang Sourdeau + * OpenChange/MAPIApplication.m (-init): utcTZ is now initialized + here. + + * OpenChange/MAPIStoreTypes.[hm]: new host module for utcTZ. + * OpenChange/MAPIStoreUserContext.m (-timeZone): new method that returns the timezone of an owner user. diff --git a/OpenChange/MAPIApplication.m b/OpenChange/MAPIApplication.m index 707e0f579..8da1c1078 100644 --- a/OpenChange/MAPIApplication.m +++ b/OpenChange/MAPIApplication.m @@ -21,6 +21,7 @@ */ #import +#import #import #import @@ -28,6 +29,7 @@ #import #import "MAPIStoreUserContext.h" +#import "MAPIStoreTypes.h" #import "MAPIApplication.h" @@ -49,6 +51,9 @@ MAPIApplication *MAPIApp = nil; MAPIApp = [super init]; [MAPIApp retain]; + + utcTZ = [NSTimeZone timeZoneWithName: @"UTC"]; + [utcTZ retain]; } return MAPIApp; diff --git a/OpenChange/MAPIStoreAppointmentWrapper.h b/OpenChange/MAPIStoreAppointmentWrapper.h index efb5ac2a1..74b275275 100644 --- a/OpenChange/MAPIStoreAppointmentWrapper.h +++ b/OpenChange/MAPIStoreAppointmentWrapper.h @@ -35,8 +35,6 @@ @class SOGoUser; -extern NSTimeZone *utcTZ; - @interface MAPIStoreAppointmentWrapper : NSObject { struct mapistore_connection_info *connInfo; diff --git a/OpenChange/MAPIStoreAppointmentWrapper.m b/OpenChange/MAPIStoreAppointmentWrapper.m index b3eb8df02..c3eddf6fe 100644 --- a/OpenChange/MAPIStoreAppointmentWrapper.m +++ b/OpenChange/MAPIStoreAppointmentWrapper.m @@ -59,16 +59,12 @@ #include #include -NSTimeZone *utcTZ; - static NSCharacterSet *hexCharacterSet = nil; @implementation MAPIStoreAppointmentWrapper + (void) initialize { - utcTZ = [NSTimeZone timeZoneWithName: @"UTC"]; - [utcTZ retain]; if (!hexCharacterSet) { hexCharacterSet = [NSCharacterSet characterSetWithCharactersInString: @"1234567890abcdefABCDEF"]; diff --git a/OpenChange/MAPIStoreContactsAttachment.m b/OpenChange/MAPIStoreContactsAttachment.m index 6a9afe86a..00fc652d6 100644 --- a/OpenChange/MAPIStoreContactsAttachment.m +++ b/OpenChange/MAPIStoreContactsAttachment.m @@ -35,8 +35,6 @@ #include -extern NSTimeZone *utcTZ; - /* TODO: handle URL pictures via PidTagAttachMethod = ref ? */ @implementation MAPIStoreContactsAttachment diff --git a/OpenChange/MAPIStoreTypes.h b/OpenChange/MAPIStoreTypes.h index 286c0b298..8e2fb7d46 100644 --- a/OpenChange/MAPIStoreTypes.h +++ b/OpenChange/MAPIStoreTypes.h @@ -32,6 +32,9 @@ @class NSData; @class NSDictionary; +@class NSTimeZone; + +extern NSTimeZone *utcTZ; uint8_t *MAPIBoolValue (void *memCtx, BOOL value); uint32_t *MAPILongValue (void *memCtx, uint32_t value); diff --git a/OpenChange/MAPIStoreTypes.m b/OpenChange/MAPIStoreTypes.m index bcef90ae1..fc4ca727a 100644 --- a/OpenChange/MAPIStoreTypes.m +++ b/OpenChange/MAPIStoreTypes.m @@ -36,6 +36,8 @@ #include #include +NSTimeZone *utcTZ; + uint8_t * MAPIBoolValue (void *memCtx, BOOL value) { From 4f148bafc653837d50509ec8cca7f6e134dd5b3c Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 30 Mar 2012 19:58:16 +0000 Subject: [PATCH 09/21] Monotone-Parent: 1900d82b81c570a73d4db548a566ed09b57ee43a Monotone-Revision: b0de6c606ce6f295a8956a42ed0f0bc3b6e3cca3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-30T19:58:16 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++ OpenChange/MAPIStoreCalendarMessage.m | 30 +++++++------- OpenChange/MAPIStoreMailVolatileMessage.m | 7 +++- OpenChange/MAPIStoreObject.m | 33 ++++++++++++--- OpenChange/MAPIStoreTasksMessage.m | 49 ++++++++--------------- 5 files changed, 75 insertions(+), 52 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f00edb37..ed8c5bedd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2012-03-30 Wolfgang Sourdeau + * OpenChange/MAPIStoreTasksMessage.m (-save): do not reset fields + that have not been passed in the properties array, since only + RopDeleteProperties should remove them. + + * OpenChange/MAPIStoreObject.m (-addPropertiesFromRow:): dates are + now all converted to the user's timezone, even though it just + inverts the problem we currently have. + * OpenChange/MAPIApplication.m (-init): utcTZ is now initialized here. diff --git a/OpenChange/MAPIStoreCalendarMessage.m b/OpenChange/MAPIStoreCalendarMessage.m index 6890fe172..70aa0b64a 100644 --- a/OpenChange/MAPIStoreCalendarMessage.m +++ b/OpenChange/MAPIStoreCalendarMessage.m @@ -770,6 +770,8 @@ tz = [iCalTimeZone timeZoneForName: tzName]; [vCalendar addTimeZone: tz]; } + else + tz = nil; // start value = [properties objectForKey: MAPIPropertyKey (PR_START_DATE)]; @@ -779,18 +781,18 @@ if (value) { start = (iCalDateTime *) [newEvent uniqueChildWithTag: @"dtstart"]; + [start setTimeZone: tz]; if (isAllDay) + { + [start setDate: value]; + [start setTimeZone: nil]; + } + else { tzOffset = [[value timeZone] secondsFromGMTForDate: value]; value = [value dateByAddingYears: 0 months: 0 days: 0 hours: 0 minutes: 0 - seconds: -tzOffset]; - [start setTimeZone: nil]; - [start setDate: value]; - } - else - { - [start setTimeZone: tz]; + seconds: tzOffset]; [start setDateTime: value]; } } @@ -802,18 +804,18 @@ if (value) { end = (iCalDateTime *) [newEvent uniqueChildWithTag: @"dtend"]; + [end setTimeZone: tz]; if (isAllDay) + { + [end setDate: value]; + [end setTimeZone: nil]; + } + else { tzOffset = [[value timeZone] secondsFromGMTForDate: value]; value = [value dateByAddingYears: 0 months: 0 days: 0 hours: 0 minutes: 0 - seconds: -tzOffset]; - [end setTimeZone: nil]; - [end setDate: value]; - } - else - { - [end setTimeZone: tz]; + seconds: tzOffset]; [end setDateTime: value]; } } diff --git a/OpenChange/MAPIStoreMailVolatileMessage.m b/OpenChange/MAPIStoreMailVolatileMessage.m index 2d5a937e5..3a3d66be3 100644 --- a/OpenChange/MAPIStoreMailVolatileMessage.m +++ b/OpenChange/MAPIStoreMailVolatileMessage.m @@ -29,6 +29,7 @@ #import #import #import +#import #import #import #import @@ -495,7 +496,11 @@ FillMessageHeadersFromProperties (NGMutableHashMap *headers, date = [mailProperties objectForKey: MAPIPropertyKey (PR_CLIENT_SUBMIT_TIME)]; if (date) - [headers addObject: [date rfc822DateString] forKey: @"date"]; + { + date = [date addYear: 0 month: 0 day: 0 + hour: 0 minute: 0 second: [[date timeZone] secondsFromGMT]]; + [headers addObject: [date rfc822DateString] forKey: @"date"]; + } [headers addObject: @"1.0" forKey: @"MIME-Version"]; } diff --git a/OpenChange/MAPIStoreObject.m b/OpenChange/MAPIStoreObject.m index f2f8d0ebe..fd727e180 100644 --- a/OpenChange/MAPIStoreObject.m +++ b/OpenChange/MAPIStoreObject.m @@ -20,7 +20,9 @@ * Boston, MA 02111-1307, USA. */ +#import #import +#import #import #import #import @@ -432,16 +434,37 @@ static Class NSExceptionK, MAPIStoreFolderK; struct SPropValue *cValue; NSUInteger counter; NSMutableDictionary *newProperties; + NSTimeZone *tz; + NSInteger tzOffset; + id value; + + tz = nil; newProperties = [NSMutableDictionary dictionaryWithCapacity: aRow->cValues]; for (counter = 0; counter < aRow->cValues; counter++) { cValue = aRow->lpProps + counter; - if ((cValue->ulPropTag & 0xfff) == PT_STRING8) - [self warnWithFormat: - @"attempting to set string property as PR_STRING8: %.8x", - cValue->ulPropTag]; - [newProperties setObject: NSObjectFromSPropValue (cValue) + value = NSObjectFromSPropValue (cValue); + switch (cValue->ulPropTag & 0xffff) + { + case PT_STRING8: + case PT_MV_STRING8: + [self warnWithFormat: + @"attempting to set string property as PR_STRING8: %.8x", + cValue->ulPropTag]; + break; + case PT_SYSTIME: + if (!tz) + { + tz = [[self userContext] timeZone]; + tzOffset = -[tz secondsFromGMT]; + } + value = [value addYear: 0 month: 0 day: 0 + hour: 0 minute: 0 second: tzOffset]; + [value setTimeZone: tz]; + break; + } + [newProperties setObject: value forKey: MAPIPropertyKey (cValue->ulPropTag)]; } diff --git a/OpenChange/MAPIStoreTasksMessage.m b/OpenChange/MAPIStoreTasksMessage.m index 963c04a0b..cad848f76 100644 --- a/OpenChange/MAPIStoreTasksMessage.m +++ b/OpenChange/MAPIStoreTasksMessage.m @@ -329,7 +329,8 @@ iCalToDo *vToDo; id value; iCalDateTime *date; - NSString *status, *priority; + iCalTimeZone *tz; + NSString *status, *priority, *tzName; NSCalendarDate *now; NSInteger tzOffset; double doubleValue; @@ -338,6 +339,10 @@ vCalendar = [vToDo parent]; [vCalendar setProdID: @"-//Inverse inc.//OpenChange+SOGo//EN"]; + tzName = [[[self userContext] timeZone] name]; + tz = [iCalTimeZone timeZoneForName: tzName]; + [vCalendar addTimeZone: tz]; + // summary value = [properties objectForKey: MAPIPropertyKey (PR_NORMALIZED_SUBJECT_UNICODE)]; @@ -358,12 +363,12 @@ value = [value htmlToText]; } } - if (value && [value length] == 0) - value = nil; - [vToDo setComment: value]; - if (value) - [vToDo setComment: value]; + { + if ([value length] == 0) + value = nil; + [vToDo setComment: value]; + } // location value = [properties objectForKey: MAPIPropertyKey (PidLidLocation)]; @@ -388,31 +393,17 @@ if (value) { date = (iCalDateTime *) [vToDo uniqueChildWithTag: @"dtstart"]; - tzOffset = [[value timeZone] secondsFromGMTForDate: value]; - value = [value dateByAddingYears: 0 months: 0 days: 0 - hours: 0 minutes: 0 - seconds: -tzOffset]; - [date setDate: value]; + [date setTimeZone: tz]; + [date setDateTime: value]; } - else - { - [vToDo setStartDate: nil]; - } - + // due value = [properties objectForKey: MAPIPropertyKey (PidLidTaskDueDate)]; if (value) { date = (iCalDateTime *) [vToDo uniqueChildWithTag: @"due"]; - tzOffset = [[value timeZone] secondsFromGMTForDate: value]; - value = [value dateByAddingYears: 0 months: 0 days: 0 - hours: 0 minutes: 0 - seconds: -tzOffset]; - [date setDate: value]; - } - else - { - [vToDo setDue: nil]; + [date setTimeZone: tz]; + [date setDateTime: value]; } // completed @@ -426,10 +417,6 @@ seconds: -tzOffset]; [date setDate: value]; } - else - { - [vToDo setCompleted: nil]; - } // status value = [properties objectForKey: MAPIPropertyKey (PidLidTaskStatus)]; @@ -459,10 +446,8 @@ default: // IMPORTANCE_NORMAL priority = @"5"; } + [vToDo setPriority: priority]; } - else - priority = @"0"; // None - [vToDo setPriority: priority]; // percent complete // NOTE: this does not seem to work on Outlook 2003. PidLidPercentComplete's value From 07b500412fc0d2b7542a3ff6199a5efa51c81213 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 30 Mar 2012 20:02:33 +0000 Subject: [PATCH 10/21] Monotone-Parent: b0de6c606ce6f295a8956a42ed0f0bc3b6e3cca3 Monotone-Revision: 24970ed1a272e80da6d29bce76d7fb4093a1d2a6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-30T20:02:33 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ OpenChange/MAPIStoreCalendarMessage.m | 11 +++++++---- OpenChange/MAPIStoreTasksMessage.m | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ed8c5bedd..be5956ea4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,12 @@ 2012-03-30 Wolfgang Sourdeau + * OpenChange/MAPIStoreCalendarMessage.m (-save): remove comment if + content is "\n". + * OpenChange/MAPIStoreTasksMessage.m (-save): do not reset fields that have not been passed in the properties array, since only RopDeleteProperties should remove them. + Remove comment if content is "\n". * OpenChange/MAPIStoreObject.m (-addPropertiesFromRow:): dates are now all converted to the user's timezone, even though it just diff --git a/OpenChange/MAPIStoreCalendarMessage.m b/OpenChange/MAPIStoreCalendarMessage.m index 70aa0b64a..daa9cc83d 100644 --- a/OpenChange/MAPIStoreCalendarMessage.m +++ b/OpenChange/MAPIStoreCalendarMessage.m @@ -874,10 +874,13 @@ value = [value htmlToText]; } } - if (value && [value length] == 0) - value = nil; - [newEvent setComment: value]; - + if (value) + { + if ([value length] == 0 || [value isEqualToString: @"\\n"]) + value = nil; + [newEvent setComment: value]; + } + /* recurrence */ value = [properties objectForKey: MAPIPropertyKey (PidLidAppointmentRecur)]; diff --git a/OpenChange/MAPIStoreTasksMessage.m b/OpenChange/MAPIStoreTasksMessage.m index cad848f76..e3a24afe5 100644 --- a/OpenChange/MAPIStoreTasksMessage.m +++ b/OpenChange/MAPIStoreTasksMessage.m @@ -365,7 +365,7 @@ } if (value) { - if ([value length] == 0) + if ([value length] == 0 || [value isEqualToString: @"\\n"]) value = nil; [vToDo setComment: value]; } From 060b29f5562acf8ef509f180388815229cee8970 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 3 Apr 2012 20:56:58 +0000 Subject: [PATCH 11/21] Monotone-Parent: 24970ed1a272e80da6d29bce76d7fb4093a1d2a6 Monotone-Revision: 4759c8b57eaf377a0e0d928df4a65adaa731ad74 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-03T20:56:58 Monotone-Branch: ca.inverse.sogo --- debian/control-squeeze | 45 ++++++++++++++++++++++++++++++++++++++++++ debian/rules | 10 ++++++++++ 2 files changed, 55 insertions(+) create mode 100644 debian/control-squeeze diff --git a/debian/control-squeeze b/debian/control-squeeze new file mode 100644 index 000000000..019b6335b --- /dev/null +++ b/debian/control-squeeze @@ -0,0 +1,45 @@ +Source: sogo +Priority: optional +Maintainer: Inverse Support +Build-Depends: debhelper (>= 7.0.15), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libmapi-dev, libmapistore-dev, libmapiproxy-dev +Section: web +Standards-Version: 3.9.1 + +Package: sogo +Section: web +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, tmpreaper, sope4.9-libxmlsaxdriver, sope4.9-db-connector, gnustep-make, libcurl3 +Suggests: nginx +Description: a modern and scalable groupware + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + The Inverse edition of this project has many feature enhancements: + * CalDAV and GroupDAV compliance + * full handling of vCard as well as vCalendar/iCalendar formats + * support for folder sharing and ACLs + . + The Web interface has been rewritten in an AJAX fashion to provide a faster + UI for the users, consistency in look and feel with the Mozilla applications, + and to reduce the load of the transactions on the server. + +Package: sogo-openchange +Section: net +Priority: extra +Architecture: any +Depends: sogo (= ${binary:Version}), ${misc:Depends} +Description: a modern and scalable groupware - OpenChange backend + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package contains the backend plugin for using SOGo as a backend to OpenChange. + +Package: sogo-dbg +Section: debug +Priority: extra +Architecture: any +Depends: sogo (= ${binary:Version}), ${misc:Depends} +Description: a modern and scalable groupware - debugging symbols + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package contains the debugging symbols for SOGo. diff --git a/debian/rules b/debian/rules index 4c5529411..38028afbf 100755 --- a/debian/rules +++ b/debian/rules @@ -14,6 +14,9 @@ build-arch: build-arch-stamp build-arch-stamp: config.make # Add here commands to compile the arch part of the package. $(MAKE) + if pkg-config --atleast-version=1.0 libmapi; \ + then (cd OpenChange; $(MAKE)); \ + fi touch $@ clean: @@ -21,6 +24,9 @@ clean: dh_testroot rm -f build-arch-stamp if [ -f config.make ]; then make clean; fi + if pkg-config --atleast-version=1.0 libmapi; \ + then (cd OpenChange; make clean); \ + fi dh_clean install: install-arch @@ -37,6 +43,10 @@ install-arch: build-arch # dh_installdirs -s $(MAKE) DESTDIR=$(CURDIR)/debian/tmp GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install + if pkg-config --atleast-version=1.0 libmapi; \ + then (cd OpenChange; $(MAKE) DESTDIR=$(CURDIR)/debian/tmp GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install); \ + fi + mkdir -p debian/tmp/etc/default cp Scripts/sogo-default debian/tmp/etc/default/sogo mkdir -p debian/tmp/usr/share/lintian/overrides From 1e1cdcc89c84624095701fe2fcf576057d881270 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Apr 2012 14:25:42 +0000 Subject: [PATCH 12/21] Monotone-Parent: 4759c8b57eaf377a0e0d928df4a65adaa731ad74 Monotone-Revision: 187ac928b725957508cddf0bb5f4aeebc606ab3e Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-04T14:25:42 Monotone-Branch: ca.inverse.sogo --- OpenChange/SOGoMAPIFSFolder.m | 1 + 1 file changed, 1 insertion(+) diff --git a/OpenChange/SOGoMAPIFSFolder.m b/OpenChange/SOGoMAPIFSFolder.m index 429e23f93..b26e0ea9d 100644 --- a/OpenChange/SOGoMAPIFSFolder.m +++ b/OpenChange/SOGoMAPIFSFolder.m @@ -39,6 +39,7 @@ #import "SOGoMAPIFSFolder.h" #undef DEBUG +#include #include #include #include From 6d22a0bb495e6a21d4ce48cc5a9791dee2faabeb Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Apr 2012 14:33:59 +0000 Subject: [PATCH 13/21] Monotone-Parent: 187ac928b725957508cddf0bb5f4aeebc606ab3e Monotone-Revision: ef03560e468928024dd2c8b7176bc66f200c293c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-04T14:33:59 Monotone-Branch: ca.inverse.sogo --- OpenChange/MAPIStoreFAIMessage.m | 1 + OpenChange/MAPIStoreFallbackContext.m | 1 + OpenChange/MAPIStoreRecurrenceUtils.m | 2 ++ OpenChange/NSArray+MAPIStore.m | 1 + OpenChange/NSDate+MAPIStore.m | 1 + 5 files changed, 6 insertions(+) diff --git a/OpenChange/MAPIStoreFAIMessage.m b/OpenChange/MAPIStoreFAIMessage.m index 81a9dfb9c..0611c6347 100644 --- a/OpenChange/MAPIStoreFAIMessage.m +++ b/OpenChange/MAPIStoreFAIMessage.m @@ -28,6 +28,7 @@ #import "MAPIStoreFAIMessage.h" #undef DEBUG +#include #include #include #include diff --git a/OpenChange/MAPIStoreFallbackContext.m b/OpenChange/MAPIStoreFallbackContext.m index f77ecea68..c5270d055 100644 --- a/OpenChange/MAPIStoreFallbackContext.m +++ b/OpenChange/MAPIStoreFallbackContext.m @@ -31,6 +31,7 @@ #import "MAPIStoreFallbackContext.h" #undef DEBUG +#include #include @implementation MAPIStoreFallbackContext diff --git a/OpenChange/MAPIStoreRecurrenceUtils.m b/OpenChange/MAPIStoreRecurrenceUtils.m index 010066e43..09d6ce793 100644 --- a/OpenChange/MAPIStoreRecurrenceUtils.m +++ b/OpenChange/MAPIStoreRecurrenceUtils.m @@ -21,6 +21,7 @@ */ #import +#import #import #import @@ -32,6 +33,7 @@ #import "NSDate+MAPIStore.h" #import "MAPIStoreRecurrenceUtils.h" +#include #include #include #include diff --git a/OpenChange/NSArray+MAPIStore.m b/OpenChange/NSArray+MAPIStore.m index 1192ce124..7a41245d4 100644 --- a/OpenChange/NSArray+MAPIStore.m +++ b/OpenChange/NSArray+MAPIStore.m @@ -29,6 +29,7 @@ #import "NSArray+MAPIStore.h" #undef DEBUG +#include #include #include #include diff --git a/OpenChange/NSDate+MAPIStore.m b/OpenChange/NSDate+MAPIStore.m index 1c09fd0a2..eb873978b 100644 --- a/OpenChange/NSDate+MAPIStore.m +++ b/OpenChange/NSDate+MAPIStore.m @@ -27,6 +27,7 @@ #import "NSDate+MAPIStore.h" #undef DEBUG +#include #include #include #include From ad900e855517f6ffdb286b0b1a3428d01510ed55 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Apr 2012 14:42:03 +0000 Subject: [PATCH 14/21] Monotone-Parent: ef03560e468928024dd2c8b7176bc66f200c293c Monotone-Revision: 5917f0d7b5316a06c638876b97dc983b080ce797 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-04T14:42:03 Monotone-Branch: ca.inverse.sogo --- Apache/SOGo-debian.conf | 67 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Apache/SOGo-debian.conf diff --git a/Apache/SOGo-debian.conf b/Apache/SOGo-debian.conf new file mode 100644 index 000000000..f4f32a335 --- /dev/null +++ b/Apache/SOGo-debian.conf @@ -0,0 +1,67 @@ +Alias /SOGo.woa/WebServerResources/ \ + /usr/share/SOGo/WebServerResources/ +Alias /SOGo/WebServerResources/ \ + /usr/share/SOGo/WebServerResources/ +AliasMatch /SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) \ + /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2 + + + AllowOverride None + Order deny,allow + Allow from all + + + + SetHandler default-handler + + +## Uncomment the following to enable proxy-side authentication, you will then +## need to set the "SOGoTrustProxyAuthentication" SOGo user default to YES and +## adjust the "x-webobjects-remote-user" proxy header in the "Proxy" section +## below. +# +# AuthType XXX +# Require valid-user +# SetEnv proxy-nokeepalive 1 +# Allow from all +# + +ProxyRequests Off +SetEnv proxy-nokeepalive 1 +ProxyPreserveHost On + +# When using CAS, you should uncomment this and install cas-proxy-validate.py +# in /usr/lib/cgi-bin to reduce server overloading +# +# ProxyPass /SOGo/casProxy http://localhost/cgi-bin/cas-proxy-validate.py +# +# Order deny,allow +# Allow from your-cas-host-addr +# + +ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0 + + +## adjust the following to your configuration + RequestHeader set "x-webobjects-server-port" "443" + RequestHeader set "x-webobjects-server-name" "yourhostname" + RequestHeader set "x-webobjects-server-url" "https://yourhostname" + +## When using proxy-side autentication, you need to uncomment and +## adjust the following line: +# RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" + + RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0" + RequestHeader set "x-webobjects-remote-host" %{REMOTE_HOST}e env=REMOTE_HOST + + AddDefaultCharset UTF-8 + + Order allow,deny + Allow from all + + +## We use mod_rewrite to pass remote address to the SOGo proxy. +# The remote address will appear in SOGo's log files and in the X-Forward +# header of emails. +RewriteEngine On +RewriteRule ^/SOGo/(.*)$ /SOGo/$1 [env=REMOTE_HOST:%{REMOTE_ADDR},PT] From 57e55c105dd2cf0998210a099d3bfd6e9263c982 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Apr 2012 14:55:54 +0000 Subject: [PATCH 15/21] Monotone-Parent: 5917f0d7b5316a06c638876b97dc983b080ce797 Monotone-Revision: 3d32d81fda0002213d650cb8e71bfd4508d1b134 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-04T14:55:54 Monotone-Branch: ca.inverse.sogo --- Apache/SOGo-debian.conf | 67 ----------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 Apache/SOGo-debian.conf diff --git a/Apache/SOGo-debian.conf b/Apache/SOGo-debian.conf deleted file mode 100644 index f4f32a335..000000000 --- a/Apache/SOGo-debian.conf +++ /dev/null @@ -1,67 +0,0 @@ -Alias /SOGo.woa/WebServerResources/ \ - /usr/share/SOGo/WebServerResources/ -Alias /SOGo/WebServerResources/ \ - /usr/share/SOGo/WebServerResources/ -AliasMatch /SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) \ - /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2 - - - AllowOverride None - Order deny,allow - Allow from all - - - - SetHandler default-handler - - -## Uncomment the following to enable proxy-side authentication, you will then -## need to set the "SOGoTrustProxyAuthentication" SOGo user default to YES and -## adjust the "x-webobjects-remote-user" proxy header in the "Proxy" section -## below. -# -# AuthType XXX -# Require valid-user -# SetEnv proxy-nokeepalive 1 -# Allow from all -# - -ProxyRequests Off -SetEnv proxy-nokeepalive 1 -ProxyPreserveHost On - -# When using CAS, you should uncomment this and install cas-proxy-validate.py -# in /usr/lib/cgi-bin to reduce server overloading -# -# ProxyPass /SOGo/casProxy http://localhost/cgi-bin/cas-proxy-validate.py -# -# Order deny,allow -# Allow from your-cas-host-addr -# - -ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0 - - -## adjust the following to your configuration - RequestHeader set "x-webobjects-server-port" "443" - RequestHeader set "x-webobjects-server-name" "yourhostname" - RequestHeader set "x-webobjects-server-url" "https://yourhostname" - -## When using proxy-side autentication, you need to uncomment and -## adjust the following line: -# RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e" - - RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0" - RequestHeader set "x-webobjects-remote-host" %{REMOTE_HOST}e env=REMOTE_HOST - - AddDefaultCharset UTF-8 - - Order allow,deny - Allow from all - - -## We use mod_rewrite to pass remote address to the SOGo proxy. -# The remote address will appear in SOGo's log files and in the X-Forward -# header of emails. -RewriteEngine On -RewriteRule ^/SOGo/(.*)$ /SOGo/$1 [env=REMOTE_HOST:%{REMOTE_ADDR},PT] From 9e503e7d8f10c16638624098c21fc4644f6c33e7 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Apr 2012 16:01:21 +0000 Subject: [PATCH 16/21] Debian: new "sogo-openchange" and "sogo-dev" packages; fixed some issues reported by lintian Monotone-Parent: 3d32d81fda0002213d650cb8e71bfd4508d1b134 Monotone-Revision: a1bd23348352232bd3363b00a4cd69557a3c780e Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-04T16:01:21 Monotone-Branch: ca.inverse.sogo --- debian/control | 24 +++++++++++++++++++++++- debian/rules | 39 +++++++++++++++++++++++++++------------ debian/sogo.install | 12 ++++++++++-- 3 files changed, 60 insertions(+), 15 deletions(-) diff --git a/debian/control b/debian/control index 7f20d1028..ce8e0415e 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: sogo Priority: optional Maintainer: Inverse Support -Build-Depends: debhelper (>= 7.0.15), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev +Build-Depends: debhelper (>= 7.0.15), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libmapi-dev, libmapistore-dev, libmapiproxy-dev Section: web Standards-Version: 3.9.1 @@ -22,6 +22,28 @@ Description: a modern and scalable groupware UI for the users, consistency in look and feel with the Mozilla applications, and to reduce the load of the transactions on the server. +Package: sogo-dev +Section: devel +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: a modern and scalable groupware - development files + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package contains the development files for developing SOGo modules. + +Package: sogo-openchange +Section: net +Priority: extra +Architecture: any +Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: a modern and scalable groupware - OpenChange backend + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package contains the backend plugin for using SOGo as a backend + to OpenChange. + Package: sogo-dbg Section: debug Priority: extra diff --git a/debian/rules b/debian/rules index 38028afbf..486706ba2 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,8 @@ export DH_VERBOSE=1 # export DH_OPTIONS="-p sogo" +DESTDIR=$(CURDIR)/debian/tmp + config.make: configure dh_testdir ./configure @@ -23,28 +25,41 @@ clean: dh_testdir dh_testroot rm -f build-arch-stamp - if [ -f config.make ]; then make clean; fi - if pkg-config --atleast-version=1.0 libmapi; \ - then (cd OpenChange; make clean); \ + if [ -f config.make ]; \ + then \ + if pkg-config --atleast-version=1.0 libmapi; \ + then \ + (cd OpenChange; make clean); \ + fi; \ + make clean; \ fi dh_clean install: install-arch dh_testdir dh_testroot - dh_prep -i - dh_installdirs -i - dh_install -i +# dh_prep -i +# dh_installdirs -i +# dh_install -i install-arch: build-arch dh_testdir dh_testroot - dh_prep -i + dh_prep # dh_installdirs -s - $(MAKE) DESTDIR=$(CURDIR)/debian/tmp GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install + $(MAKE) DESTDIR=$(DESTDIR) GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install if pkg-config --atleast-version=1.0 libmapi; \ - then (cd OpenChange; $(MAKE) DESTDIR=$(CURDIR)/debian/tmp GNUSTEP_INSTALLATION_DOMAIN=SYSTEM install); \ + then \ + (cd OpenChange; \ + $(MAKE) \ + DESTDIR=$(DESTDIR) \ + GNUSTEP_INSTALLATION_DOMAIN=SYSTEM \ + install); \ + rm -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so.1; \ + rm -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so; \ + mv -f $(DESTDIR)/usr/lib/mapistore_backends/libMAPIStoreSOGo.so.1.0.0 \ + $(DESTDIR)/usr/lib/mapistore_backends/SOGo.so; \ fi mkdir -p debian/tmp/etc/default @@ -53,7 +68,7 @@ install-arch: build-arch cp debian/sogo.overrides debian/tmp/usr/share/lintian/overrides/sogo mkdir -p debian/tmp/etc/apache2/conf.d cp Apache/SOGo.conf debian/tmp/etc/apache2/conf.d/SOGo.conf - install -D -m 600 Scripts/sogo.cron debian/tmp/etc/cron.d/sogo + install -D -m 644 Scripts/sogo.cron debian/tmp/etc/cron.d/sogo # Build architecture dependant packages using the common target. binary-arch: build-arch install-arch @@ -74,8 +89,8 @@ binary-arch: build-arch install-arch ( cd debian/sogo-dbg/usr/lib/debug/usr/lib/; \ ln -s GNUstep/Frameworks/SOGo.framework/Versions/*/libSOGo* ./ ) dh_compress - dh_fixperms -X/etc/cron.d/sogo - dh_makeshlibs + dh_fixperms + dh_makeshlibs -X/usr/lib/mapistore_backends dh_shlibdeps dh_installdeb dh_gencontrol diff --git a/debian/sogo.install b/debian/sogo.install index e3c791a2d..61cbf5074 100644 --- a/debian/sogo.install +++ b/debian/sogo.install @@ -2,7 +2,15 @@ etc/default/sogo etc/apache2/conf.d/SOGo.conf etc/cron.d/sogo usr/sbin/* -usr/lib/GNUstep/* -usr/lib/lib* +usr/lib/GNUstep/Frameworks/* +usr/lib/GNUstep/Libraries/* +usr/lib/GNUstep/OCSTypeModels/* +usr/lib/GNUstep/SaxDrivers-4.9/* +usr/lib/GNUstep/SaxMappings/* +usr/lib/GNUstep/WOxElemBuilders-4.9/* +usr/lib/GNUstep/SOGo/*.SOGo +usr/lib/GNUstep/SOGo/Templates +usr/lib/GNUstep/SOGo/WebServerResources +usr/lib/lib*.so.* usr/include/GNUstep/* usr/share/lintian/* From 54cf621005f03cdc15399e15a45a7430d99e07b5 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Apr 2012 16:05:04 +0000 Subject: [PATCH 17/21] Monotone-Parent: a1bd23348352232bd3363b00a4cd69557a3c780e Monotone-Revision: e3a9ec04316de2d167901095be0994ce71e98dd5 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-04T16:05:04 Monotone-Branch: ca.inverse.sogo --- debian/control | 12 ------------ debian/control-squeeze | 15 +++++++++++++-- debian/sogo-dev.install | 2 ++ debian/sogo-openchange.install | 2 ++ 4 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 debian/sogo-dev.install create mode 100644 debian/sogo-openchange.install diff --git a/debian/control b/debian/control index ce8e0415e..fd59a148d 100644 --- a/debian/control +++ b/debian/control @@ -32,18 +32,6 @@ Description: a modern and scalable groupware - development files . This package contains the development files for developing SOGo modules. -Package: sogo-openchange -Section: net -Priority: extra -Architecture: any -Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Description: a modern and scalable groupware - OpenChange backend - SOGo is a groupware server built around OpenGroupware.org (OGo) and - the SOPE application server with focus on scalability. - . - This package contains the backend plugin for using SOGo as a backend - to OpenChange. - Package: sogo-dbg Section: debug Priority: extra diff --git a/debian/control-squeeze b/debian/control-squeeze index 019b6335b..ce8e0415e 100644 --- a/debian/control-squeeze +++ b/debian/control-squeeze @@ -22,16 +22,27 @@ Description: a modern and scalable groupware UI for the users, consistency in look and feel with the Mozilla applications, and to reduce the load of the transactions on the server. +Package: sogo-dev +Section: devel +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: a modern and scalable groupware - development files + SOGo is a groupware server built around OpenGroupware.org (OGo) and + the SOPE application server with focus on scalability. + . + This package contains the development files for developing SOGo modules. + Package: sogo-openchange Section: net Priority: extra Architecture: any -Depends: sogo (= ${binary:Version}), ${misc:Depends} +Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: a modern and scalable groupware - OpenChange backend SOGo is a groupware server built around OpenGroupware.org (OGo) and the SOPE application server with focus on scalability. . - This package contains the backend plugin for using SOGo as a backend to OpenChange. + This package contains the backend plugin for using SOGo as a backend + to OpenChange. Package: sogo-dbg Section: debug diff --git a/debian/sogo-dev.install b/debian/sogo-dev.install new file mode 100644 index 000000000..a29817742 --- /dev/null +++ b/debian/sogo-dev.install @@ -0,0 +1,2 @@ +usr/include/GNUstep/* +usr/lib/lib*.so diff --git a/debian/sogo-openchange.install b/debian/sogo-openchange.install new file mode 100644 index 000000000..dcae5f4e2 --- /dev/null +++ b/debian/sogo-openchange.install @@ -0,0 +1,2 @@ +usr/lib/mapistore_backends/* +usr/lib/GNUstep/SOGo/SOGoBackend.MAPIStore From fb1e560c71d850f84d71646dc012f3d5194e436b Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Apr 2012 16:10:25 +0000 Subject: [PATCH 18/21] Debian fixes Monotone-Parent: e3a9ec04316de2d167901095be0994ce71e98dd5 Monotone-Revision: 929e17ff05c17b5978929e33d5250710c9674c66 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-04T16:10:25 Monotone-Branch: ca.inverse.sogo --- debian/sogo.install | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/sogo.install b/debian/sogo.install index 61cbf5074..8a55c7961 100644 --- a/debian/sogo.install +++ b/debian/sogo.install @@ -12,5 +12,4 @@ usr/lib/GNUstep/SOGo/*.SOGo usr/lib/GNUstep/SOGo/Templates usr/lib/GNUstep/SOGo/WebServerResources usr/lib/lib*.so.* -usr/include/GNUstep/* usr/share/lintian/* From 3d2c13d1a7515879e13a8610ab67ae7d313e2497 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Apr 2012 20:28:18 +0000 Subject: [PATCH 19/21] Monotone-Parent: 929e17ff05c17b5978929e33d5250710c9674c66 Monotone-Revision: 403e9c9f8b6284761ab422dee636699902d4babe Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-04T20:28:18 Monotone-Branch: ca.inverse.sogo --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index fd59a148d..fb4425a7f 100644 --- a/debian/control +++ b/debian/control @@ -1,7 +1,7 @@ Source: sogo Priority: optional Maintainer: Inverse Support -Build-Depends: debhelper (>= 7.0.15), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev, libmapi-dev, libmapistore-dev, libmapiproxy-dev +Build-Depends: debhelper (>= 7.0.15), gobjc | objc-compiler, libgnustep-base-dev, libsope-appserver4.9-dev, libsope-core4.9-dev, libsope-gdl1-4.9-dev, libsope-ldap4.9-dev, libsope-mime4.9-dev, libsope-xml4.9-dev, libmemcached-dev, libxml2-dev, libsbjson-dev, libssl-dev, libcurl4-openssl-dev | libcurl4-gnutls-dev Section: web Standards-Version: 3.9.1 From e70aeda75b862c7eb3086d15cbc4e3f5cd8791c2 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Apr 2012 20:37:42 +0000 Subject: [PATCH 20/21] Monotone-Parent: 49a23fbd758d213ee3123b508598dcc5bdede2a5 Monotone-Revision: 14299c2bb1edae221876accbfabb1adecd109549 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-04T20:37:42 Monotone-Branch: ca.inverse.sogo --- debian/control | 2 +- debian/control-squeeze | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index fb4425a7f..cb378e19b 100644 --- a/debian/control +++ b/debian/control @@ -25,7 +25,7 @@ Description: a modern and scalable groupware Package: sogo-dev Section: devel Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: a modern and scalable groupware - development files SOGo is a groupware server built around OpenGroupware.org (OGo) and the SOPE application server with focus on scalability. diff --git a/debian/control-squeeze b/debian/control-squeeze index ce8e0415e..e4339f79a 100644 --- a/debian/control-squeeze +++ b/debian/control-squeeze @@ -25,7 +25,7 @@ Description: a modern and scalable groupware Package: sogo-dev Section: devel Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: a modern and scalable groupware - development files SOGo is a groupware server built around OpenGroupware.org (OGo) and the SOPE application server with focus on scalability. From fde6d06c098ca643ae52389fca1e2c7cc8bb78d6 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Apr 2012 20:45:21 +0000 Subject: [PATCH 21/21] Monotone-Parent: 14299c2bb1edae221876accbfabb1adecd109549 Monotone-Revision: 366adf06b05b4f972813f3e731ae3338140ba86e Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-04T20:45:21 Monotone-Branch: ca.inverse.sogo --- debian/control | 1 + debian/control-squeeze | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/control b/debian/control index cb378e19b..6642d7fb3 100644 --- a/debian/control +++ b/debian/control @@ -26,6 +26,7 @@ Package: sogo-dev Section: devel Architecture: any Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Replaces: sogo (<< ${binary:Version}) Description: a modern and scalable groupware - development files SOGo is a groupware server built around OpenGroupware.org (OGo) and the SOPE application server with focus on scalability. diff --git a/debian/control-squeeze b/debian/control-squeeze index e4339f79a..7a047b1a2 100644 --- a/debian/control-squeeze +++ b/debian/control-squeeze @@ -26,6 +26,7 @@ Package: sogo-dev Section: devel Architecture: any Depends: sogo (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} +Replaces: sogo (<< ${binary:Version}) Description: a modern and scalable groupware - development files SOGo is a groupware server built around OpenGroupware.org (OGo) and the SOPE application server with focus on scalability.