diff --git a/ChangeLog b/ChangeLog index c89c74569..51d44db05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,43 @@ * OGoContentStore/OCSContactFieldExtractor.m (-extractQuickFieldsFromVCard): idem. +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 + inverts the problem we currently have. + + * 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. + + * OpenChange/MAPIStoreObject.m (-ownerTimeZone): removed method, + replaced with the one above. + +2012-03-29 Francis Lachapelle + + * UI/WebServerResources/UIxPreferences.js (savePreferences): fixed + validation of end date of vacation of message when not using ISO + format (currently limited to French). + + * UI/WebServerResources/ContactsUI.js (startDragging): create an + overlapping safety block (div) to avoid possible selection of the + underlying text. + + * UI/WebServerResources/MailerUI.js (startDragging): idem. + 2012-03-29 Francis Lachapelle * UI/WebServerResources/UIxPreferences.js (savePreferences): fixed @@ -44,6 +81,42 @@ * SoObjects/SOGo/LDAPSource.m (-allEntryIDs): take the _filter ivar into account. +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 + 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. + +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. + (-davResourceType): declare resource as "directory" (carddav). + 2012-03-27 Wolfgang Sourdeau * SoObjects/Contacts/SOGoContactFolders.m 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/MAPIStoreCalendarMessage.m b/OpenChange/MAPIStoreCalendarMessage.m index 004a30afc..daa9cc83d 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,10 +766,12 @@ isAllDay = [value boolValue]; if (!isAllDay) { - tzName = [[self ownerTimeZone] name]; + tzName = [[[self userContext] timeZone] name]; 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]; } } @@ -872,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/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/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/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/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/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.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..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 @@ -210,21 +212,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]; @@ -447,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/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/MAPIStoreTasksMessage.m b/OpenChange/MAPIStoreTasksMessage.m index 963c04a0b..e3a24afe5 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 isEqualToString: @"\\n"]) + 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 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) { 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) 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 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 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]]; } 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 diff --git a/debian/control b/debian/control index 7f20d1028..6642d7fb3 100644 --- a/debian/control +++ b/debian/control @@ -22,6 +22,17 @@ 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: 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. + . + This package contains the development files for developing SOGo modules. + Package: sogo-dbg Section: debug Priority: extra diff --git a/debian/control-squeeze b/debian/control-squeeze new file mode 100644 index 000000000..7a047b1a2 --- /dev/null +++ b/debian/control-squeeze @@ -0,0 +1,57 @@ +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-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. + . + 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 +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..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 @@ -14,36 +16,59 @@ 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: dh_testdir dh_testroot rm -f build-arch-stamp - if [ -f config.make ]; then make clean; fi + 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=$(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 cp Scripts/sogo-default debian/tmp/etc/default/sogo mkdir -p debian/tmp/usr/share/lintian/overrides 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 @@ -64,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-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 diff --git a/debian/sogo.install b/debian/sogo.install index e3c791a2d..8a55c7961 100644 --- a/debian/sogo.install +++ b/debian/sogo.install @@ -2,7 +2,14 @@ etc/default/sogo etc/apache2/conf.d/SOGo.conf etc/cron.d/sogo usr/sbin/* -usr/lib/GNUstep/* -usr/lib/lib* -usr/include/GNUstep/* +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/share/lintian/*