Hi, I would like to get a freeze exception for libsynthesis 3.4.0.16.8-1. This is a library that is currently only used by the syncevolution package, which I will also submit an unblock request for.
It contains small fixes, and a change which is required by the current syncevolution upstream version. Below is the git log between the current version in wheezy and the new version. The debdiff is attached. Please CC me in replies. Thanks in advance and regards, Tino commit 99159e0991664f8c8319e634598ea6c9bd73fcc2 Author: Patrick Ohly <patrick.o...@intel.com> Date: Mon Sep 10 09:15:20 2012 +0200 autotools: bumped minor version Bumped minor version so that SyncEvolution can ensure that the version it is compiled against really fixes the VJOURNAL<->plain text conversion problem. commit 344208aa749a8258163c879bb786a3a68aa67a7a Author: Patrick Ohly <patrick.o...@intel.com> Date: Mon Sep 3 12:51:24 2012 +0000 engine: updated logging of sync keys The additonal logging helped to understand that the sync keys provided by a datastore are not getting updated during a one-way sync. commit 292d5f5d4f7dc1a857f52fe79999c25f9148ca97 Author: Patrick Ohly <patrick.o...@intel.com> Date: Mon Sep 3 12:49:00 2012 +0000 SyncML TK: don't read past end of buffer The code which dumps the buffer after a parsing error had no way of obtaining the buffer size and thus read past the end of the buffer, as seen in SyncEvolution nightly testing under valgrind. Must provide the buffer length together with a pointer. The extra information is optional, so only the places which needed to know the length were updated. commit 0a4a64f976a0f1812c9011efe7d832e381889e97 Author: Patrick Ohly <patrick.o...@intel.com> Date: Thu Aug 16 18:59:22 2012 +0200 engine: allow text->VJOURNAL conversion SyncEvolution uses the Synthesis engine to convert a plain text memo to iCalendar 2.0 in the local storage. This is done like this: - define a text datatype which uses the same field list as calendar data: <textprofile name="JournalText" fieldlist="calendar"> <linemap field="SUMMARY"> <numlines>1</numlines> <inheader>false</inheader> <allowempty>true</allowempty> <filterkeyword>SUMMARY</filterkeyword> </linemap> <linemap field="DESCRIPTION"> <numlines>0</numlines> <inheader>false</inheader> <allowempty>true</allowempty> </linemap> </textprofile> <datatype name="journaltext10" basetype="text"> <use profile="JournalText"/> <typestring>text/plain</typestring> <versionstring>1.0</versionstring> ... same for text/plain 1.1 - The "calendar" profile was extended to support VJOURNAL. - The incoming script of "journaltext10" sets ISEVENT in the "calendar" field list so that the data is marked as "journal". - define a store which supports iCalendar and plain text: <use datatype='icalendar20' mode='rw' preferred='yes'/> <use datatype='journaltext10' mode='rw'/> <use datatype='journaltext11' mode='rw'/> The problem with that is: 1. A text/plain item from the peer is parsed and turned into an item with TTextItemType (corresponds to "journaltext10"). 2. Before writing into the local storage, MAKETEXTWITHPROFILE("vCalendar", 2) is called. 3. For the value of VERSION, that method calls TTTextItemType::getTypeVers() = TSyncItemType::getTypeVers(), which returns the configured 1.0 (from "journaltext10"). 4. The backend fails to parse the generated item because it only supports iCalendar 2.0 and is given something which has VERSION:1.0 (and iCalendar 2.0 encoding rules). The "fix" in this patch is to extend TTextItemType specifically for the case where getTypeVers() is called with a non-zero mode. I checked the source, that should only happen when used in combination with a MIME profile, something which only SyncEvolution does. I had to hard-code the support for iCalendar 2.0 (aMode = 2) and vCalendar 1.0 (aMode = 1), something that IMHO does not really belong into TTextItemType. commit 3ba7cb8ce8c7adcba5d32944d73625fa618f664c Author: Patrick Ohly <patrick.o...@intel.com> Date: Thu Jul 12 15:47:18 2012 +0000 autotools: must link against libpthreads Some libpthreads functions are called directly, and therefore libsynthesis should be linked to it directly. Otherwise it depends on other libs or executables loading that library, which can fail.
diff -Nru libsynthesis-3.4.0.16.7/configure.in libsynthesis-3.4.0.16.8/configure.in --- libsynthesis-3.4.0.16.7/configure.in 2012-06-26 21:57:49.000000000 +0200 +++ libsynthesis-3.4.0.16.8/configure.in 2012-10-24 13:45:19.000000000 +0200 @@ -4,7 +4,7 @@ AC_CONFIG_MACRO_DIR([m4]) # four digit upstream version, one additional digit for # Linux/SyncEvolution specific extensions: -AM_INIT_AUTOMAKE(synthesis, 3.4.0.16.7) +AM_INIT_AUTOMAKE(synthesis, 3.4.0.16.8) AM_CONFIG_HEADER(config.h) AC_LIBTOOL_DLOPEN diff -Nru libsynthesis-3.4.0.16.7/debian/changelog libsynthesis-3.4.0.16.8/debian/changelog --- libsynthesis-3.4.0.16.7/debian/changelog 2012-06-27 17:34:13.000000000 +0200 +++ libsynthesis-3.4.0.16.8/debian/changelog 2012-11-22 22:50:32.000000000 +0100 @@ -1,3 +1,10 @@ +libsynthesis (3.4.0.16.8-1) unstable; urgency=low + + * New upstream release, required by syncevolution 1.3.1 + (Closes: #694005) + + -- Tino Keitel <tino+deb...@tikei.de> Thu, 22 Nov 2012 22:49:47 +0100 + libsynthesis (3.4.0.16.7-1) unstable; urgency=low * New upstream version for syncevolution release candidate 1.2.99.1 diff -Nru libsynthesis-3.4.0.16.7/debian/rules libsynthesis-3.4.0.16.8/debian/rules --- libsynthesis-3.4.0.16.7/debian/rules 2012-06-27 17:34:13.000000000 +0200 +++ libsynthesis-3.4.0.16.8/debian/rules 2012-11-22 22:50:32.000000000 +0100 @@ -1,6 +1,6 @@ #!/usr/bin/make -f # -*- makefile -*- -UPSTREAMTAG=upstream/3.4.0.16.7 +UPSTREAMTAG=upstream/3.4.0.16.8 UPSTREAM_VERSION=$(subst upstream/,,${UPSTREAMTAG}) SOURCEPKG=$(shell dpkg-parsechangelog | sed -n 's/^Source: \(.*\)/\1/p') diff -Nru libsynthesis-3.4.0.16.7/src/Makefile.am.in libsynthesis-3.4.0.16.8/src/Makefile.am.in --- libsynthesis-3.4.0.16.7/src/Makefile.am.in 2012-06-26 21:57:49.000000000 +0200 +++ libsynthesis-3.4.0.16.8/src/Makefile.am.in 2012-10-24 13:45:19.000000000 +0200 @@ -78,7 +78,7 @@ $(LIBICAL_CFLAGS) \ $(LIBECAL_CFLAGS) libsynthesis_la_CXXFLAGS = $(libsynthesis_la_CFLAGS) -libsynthesis_la_LIBADD = $(PCRE_LIBS) $(SQLITE3_LIBS) $(XMLPARSE_LIBS) $(LIBICAL_LIBS) $(LIBECAL_LIBS) libsmltk.la -lz -ldl +libsynthesis_la_LIBADD = $(PCRE_LIBS) $(SQLITE3_LIBS) $(XMLPARSE_LIBS) $(LIBICAL_LIBS) $(LIBECAL_LIBS) libsmltk.la -lz -ldl -lpthread libsynthesis_la_LDFLAGS = -version-info $(ENGINE_CURRENT):$(ENGINE_REVISION):$(ENGINE_AGE) \ -Wl,--version-script=$(srcdir)/synthesis-linker.map libsynthesis_la_DEPENDENCIES = $(srcdir)/synthesis-linker.map libsmltk.la diff -Nru libsynthesis-3.4.0.16.7/src/syncml_tk/src/sml/xlt/all/xltdec.c libsynthesis-3.4.0.16.8/src/syncml_tk/src/sml/xlt/all/xltdec.c --- libsynthesis-3.4.0.16.7/src/syncml_tk/src/sml/xlt/all/xltdec.c 2012-06-26 21:57:49.000000000 +0200 +++ libsynthesis-3.4.0.16.8/src/syncml_tk/src/sml/xlt/all/xltdec.c 2012-10-24 13:45:19.000000000 +0200 @@ -246,10 +246,15 @@ SMLERRPRINTFX(DBG_ERROR,("%s: smlErr 0x%hX (%s) while parsing",aRoutineName,aRc,smlErrorText(aRc))); // Show details if (aScanner && aScanner->curtok) { + Long_t currentBytesShow = numBytesShow; + Long_t remaining; + // show what token we are parsing show_token(aScanner->curtok,DBG_ERROR); - // show hex of 32 bytes after scan position - b = aScanner->getPos(aScanner); + // show hex of at most 32 bytes after scan position + b = aScanner->getPos(aScanner, &remaining); + if (remaining < currentBytesShow) + currentBytesShow = remaining; SMLERRPRINTFX(DBG_ERROR,( "- Tag start at 0x%lX, scanner pos at 0x%lX%s, data:", (unsigned long)aScanner->curtok->start, @@ -258,16 +263,16 @@ )); if (b!=NULL) { p=hexshow; - for (i=0; i<numBytesShow; i++) { + for (i=0; i<currentBytesShow; i++) { *p++ = NibbleToHexDigit(*b>>4); *p++ = NibbleToHexDigit(*b++); *p++ = ' '; } *p=0; - b-=numBytesShow; // rewind + b-=currentBytesShow; // rewind SMLERRPRINTFX(DBG_ERROR,("%s", hexshow)); p=hexshow; - for (i=0; i<numBytesShow; i++) { + for (i=0; i<currentBytesShow; i++) { *p++ = (*b>=0x20) && (*b<0x7F) ? *b : '_'; b++; } @@ -470,7 +475,7 @@ return rc; } - *ppBufPos = pDecoder->scanner->getPos(pDecoder->scanner); + *ppBufPos = pDecoder->scanner->getPos(pDecoder->scanner, NULL); *ppDecoder = (XltDecoderPtr_t)pDecoder; @@ -590,7 +595,7 @@ } } - *ppBufPos = pScanner->getPos(pScanner); + *ppBufPos = pScanner->getPos(pScanner, NULL); return SML_ERR_OK; } diff -Nru libsynthesis-3.4.0.16.7/src/syncml_tk/src/sml/xlt/all/xltdeccom.h libsynthesis-3.4.0.16.8/src/syncml_tk/src/sml/xlt/all/xltdeccom.h --- libsynthesis-3.4.0.16.7/src/syncml_tk/src/sml/xlt/all/xltdeccom.h 2012-06-26 21:57:49.000000000 +0200 +++ libsynthesis-3.4.0.16.8/src/syncml_tk/src/sml/xlt/all/xltdeccom.h 2012-10-24 13:45:19.000000000 +0200 @@ -143,8 +143,13 @@ /** * Get the current position of the scanner within the working buffer. + * + * @param pScanner (IN/OUT) + * the scanner + * @param remaining (OUT) + * number of valid bytes after current position, optional (NULL acceptable) */ - MemPtr_t (*getPos)(XltDecScannerPtr_t pScanner); + MemPtr_t (*getPos)(XltDecScannerPtr_t pScanner, Long_t *remaining); /* public attributes */ diff -Nru libsynthesis-3.4.0.16.7/src/syncml_tk/src/sml/xlt/all/xltdecwbxml.c libsynthesis-3.4.0.16.8/src/syncml_tk/src/sml/xlt/all/xltdecwbxml.c --- libsynthesis-3.4.0.16.7/src/syncml_tk/src/sml/xlt/all/xltdecwbxml.c 2012-06-26 21:57:49.000000000 +0200 +++ libsynthesis-3.4.0.16.8/src/syncml_tk/src/sml/xlt/all/xltdecwbxml.c 2012-10-24 13:45:19.000000000 +0200 @@ -124,7 +124,7 @@ Ret_t (*destroy)(XltDecScannerPtr_t); Ret_t (*pushTok)(XltDecScannerPtr_t); void (*setBuf)(XltDecScannerPtr_t pScanner, const MemPtr_t pBufStart, const MemPtr_t pBufEnd); - MemPtr_t (*getPos)(XltDecScannerPtr_t pScanner); + MemPtr_t (*getPos)(XltDecScannerPtr_t pScanner, Long_t *remaining); /* public attributes */ XltDecTokenPtr_t curtok; /**< current token */ @@ -168,7 +168,7 @@ static Ret_t _nextTok(XltDecScannerPtr_t); static Ret_t _pushTok(XltDecScannerPtr_t); static void _setBuf(XltDecScannerPtr_t, const MemPtr_t, const MemPtr_t); -static MemPtr_t _getPos(XltDecScannerPtr_t); +static MemPtr_t _getPos(XltDecScannerPtr_t, Long_t *remaining); /** * Advance the current position pointer after checking whether the end of @@ -398,8 +398,10 @@ } static MemPtr_t -_getPos(XltDecScannerPtr_t pScanner) +_getPos(XltDecScannerPtr_t pScanner, Long_t *remaining) { + if (remaining) + *remaining = ((wbxmlScannerPrivPtr_t)pScanner)->bufend - ((wbxmlScannerPrivPtr_t)pScanner)->pos; return ((wbxmlScannerPrivPtr_t)pScanner)->pos; } diff -Nru libsynthesis-3.4.0.16.7/src/syncml_tk/src/sml/xlt/all/xltdecxml.c libsynthesis-3.4.0.16.8/src/syncml_tk/src/sml/xlt/all/xltdecxml.c --- libsynthesis-3.4.0.16.7/src/syncml_tk/src/sml/xlt/all/xltdecxml.c 2012-06-26 21:57:49.000000000 +0200 +++ libsynthesis-3.4.0.16.8/src/syncml_tk/src/sml/xlt/all/xltdecxml.c 2012-10-24 13:45:19.000000000 +0200 @@ -71,7 +71,7 @@ Ret_t (*destroy)(XltDecScannerPtr_t); Ret_t (*pushTok)(XltDecScannerPtr_t); void (*setBuf)(XltDecScannerPtr_t pScanner, const MemPtr_t pBufStart, const MemPtr_t pBufEnd); - MemPtr_t (*getPos)(XltDecScannerPtr_t pScanner); + MemPtr_t (*getPos)(XltDecScannerPtr_t pScanner, Long_t *remaining); XltDecTokenPtr_t curtok; /**< current token */ Long_t charset; /**< 0 */ @@ -100,7 +100,7 @@ static Ret_t _nextTok(XltDecScannerPtr_t); static Ret_t _pushTok(XltDecScannerPtr_t); static void _setBuf(XltDecScannerPtr_t, const MemPtr_t, const MemPtr_t); -static MemPtr_t _getPos(XltDecScannerPtr_t); +static MemPtr_t _getPos(XltDecScannerPtr_t, Long_t *remaining); /** * Advance the current position pointer after checking whether the end of @@ -311,8 +311,10 @@ * Get the current position of the scanner within its working buffer. */ static MemPtr_t -_getPos(XltDecScannerPtr_t pScanner) +_getPos(XltDecScannerPtr_t pScanner, Long_t *remaining) { + if (remaining) + *remaining = ((xmlScannerPrivPtr_t)pScanner)->bufend - ((xmlScannerPrivPtr_t)pScanner)->pos; return ((xmlScannerPrivPtr_t)pScanner)->pos; } diff -Nru libsynthesis-3.4.0.16.7/src/sysync/binfileimplds.cpp libsynthesis-3.4.0.16.8/src/sysync/binfileimplds.cpp --- libsynthesis-3.4.0.16.7/src/sysync/binfileimplds.cpp 2012-06-26 21:57:49.000000000 +0200 +++ libsynthesis-3.4.0.16.8/src/sysync/binfileimplds.cpp 2012-10-24 13:45:19.000000000 +0200 @@ -2446,6 +2446,7 @@ fTarget.lastChangeCheck=fPreviousToRemoteSyncCmpRef; #if TARGETS_DB_VERSION>=6 // - identifiers (tokens for StartDataRead) + PDEBUGPRINTFX(DBG_ADMIN+DBG_DBAPI+DBG_EXOTIC,("SaveAdminData: saving target sync token %s", fPreviousToRemoteSyncIdentifier.c_str())); AssignCString(fTarget.dummyIdentifier1,fPreviousToRemoteSyncIdentifier.c_str(),remoteAnchorMaxLen); // former lastSyncIdentifier AssignCString(fTarget.dummyIdentifier2,NULL,remoteAnchorMaxLen); // former lastSuspendIdentifier, not needed, make empty // store remote datastore's display name (is empty if we haven't got one from the remote via devInf) @@ -2597,7 +2598,7 @@ PDEBUGPRINTFX(DBG_ERROR,("Error writing pending item file, bferr=%hd",bfe)); } } - PDEBUGPRINTFX(DBG_ADMIN+DBG_DBAPI+DBG_DETAILS,("SaveAdminData: resumeAlertCode = %hd, lastSuspendModCount = %ld",fResumeAlertCode,(long)fTarget.lastSuspendModCount)); + PDEBUGPRINTFX(DBG_ADMIN+DBG_DBAPI+DBG_DETAILS,("SaveAdminData: fTargetIndex %d resumeAlertCode = %hd, lastSuspendModCount = %ld",fTargetIndex,fResumeAlertCode,(long)fTarget.lastSuspendModCount)); // update the target record if (fTargetIndex>=0) { targetsBinFileP->updateRecord(fTargetIndex,&fTarget); diff -Nru libsynthesis-3.4.0.16.7/src/sysync/customimplds.cpp libsynthesis-3.4.0.16.8/src/sysync/customimplds.cpp --- libsynthesis-3.4.0.16.7/src/sysync/customimplds.cpp 2012-06-26 21:57:49.000000000 +0200 +++ libsynthesis-3.4.0.16.8/src/sysync/customimplds.cpp 2012-10-24 13:45:19.000000000 +0200 @@ -3187,6 +3187,9 @@ } // also update opaque reference string possibly needed in DS API implementations fPreviousToRemoteSyncIdentifier = fCurrentSyncIdentifier; + PDEBUGPRINTFX(DBG_ADMIN+DBG_DBAPI+DBG_EXOTIC,("updating sync token (fPreviousToRemoteSyncIdentifier) from %s to current sync token %s",fPreviousToRemoteSyncIdentifier.c_str(),fCurrentSyncIdentifier.c_str())); + } else { + PDEBUGPRINTFX(DBG_ADMIN+DBG_DBAPI+DBG_EXOTIC,("keeping old sync token (fPreviousToRemoteSyncIdentifier) %s instead of updating to current sync token %s",fPreviousToRemoteSyncIdentifier.c_str(),fCurrentSyncIdentifier.c_str())); } // updating anchor means invalidating last Suspend fPreviousSuspendCmpRef = fPreviousToRemoteSyncCmpRef; // setting to current reference can do less harm than setting it to zero diff -Nru libsynthesis-3.4.0.16.7/src/sysync/textitemtype.cpp libsynthesis-3.4.0.16.8/src/sysync/textitemtype.cpp --- libsynthesis-3.4.0.16.7/src/sysync/textitemtype.cpp 2012-06-26 21:57:49.000000000 +0200 +++ libsynthesis-3.4.0.16.8/src/sysync/textitemtype.cpp 2012-10-24 13:45:19.000000000 +0200 @@ -157,6 +157,23 @@ delete fProfileHandlerP; } // TTextItemType::~TTextItemType +cAppCharP TTextItemType::getTypeVers(sInt32 aMode) +{ + // This function is called by TMimeDirProfile when generating the + // VERSION property. Allow converting a plain text item to + // iCalendar 2.0 (aMode = 2) or vCalendar 1.0 (aMode = 1) by + // overriding the base version that was configured for the + // underlying text item type. + switch (aMode) { + default: + return inherited::getTypeVers(aMode); + case 1: + return "1.0"; + case 2: + return "2.0"; + } +} // TTextItemType::getTypeVers + #ifdef OBJECT_FILTERING diff -Nru libsynthesis-3.4.0.16.7/src/sysync/textitemtype.h libsynthesis-3.4.0.16.8/src/sysync/textitemtype.h --- libsynthesis-3.4.0.16.7/src/sysync/textitemtype.h 2012-06-26 21:57:49.000000000 +0200 +++ libsynthesis-3.4.0.16.8/src/sysync/textitemtype.h 2012-10-24 13:45:19.000000000 +0200 @@ -61,6 +61,7 @@ // destructor virtual ~TTextItemType(); // access to type + virtual cAppCharP getTypeVers(sInt32 aMode=0); virtual uInt16 getTypeID(void) const { return ity_text; }; virtual bool isBasedOn(uInt16 aItemTypeID) const { return aItemTypeID==ity_text ? true : TMultiFieldItemType::isBasedOn(aItemTypeID); }; // differentiation between implemented and just descriptive TSyncTypeItems