[openchange/f16] Update to OpenChange 0.11 Transporter upstream release
Milan Crha
mcrha at fedoraproject.org
Thu Aug 11 09:58:54 UTC 2011
commit f4b75d780a427e23ecb407c170d1de2a3be4af78
Author: Milan Crha <mcrha at redhat.com>
Date: Thu Aug 11 11:58:24 2011 +0200
Update to OpenChange 0.11 Transporter upstream release
openchange-0.10.9-TF16S2-fix-fedora-build.patch | 17 --
openchange-0.11-pt-mv-unicode.patch | 311 +++++++++++++++++++++++
openchange.spec | 22 +-
samba-util-common-workaround.patch | 12 -
4 files changed, 321 insertions(+), 41 deletions(-)
---
diff --git a/openchange-0.11-pt-mv-unicode.patch b/openchange-0.11-pt-mv-unicode.patch
new file mode 100644
index 0000000..1c558df
--- /dev/null
+++ b/openchange-0.11-pt-mv-unicode.patch
@@ -0,0 +1,311 @@
+Index: libmapi/emsmdb.c
+===================================================================
+--- libmapi/emsmdb.c (revision 3168)
++++ libmapi/emsmdb.c (working copy)
+@@ -814,6 +814,8 @@
+ struct Binary_r *sbin = NULL;
+ struct mapi_SLPSTRArray pt_slpstr;
+ struct StringArray_r *slpstr = NULL;
++ struct mapi_SLPSTRArrayW pt_slpstrw;
++ struct StringArrayW_r *slpstrw = NULL;
+ struct mapi_MV_LONG_STRUCT pt_MVl;
+ struct LongArray_r *MVl = NULL;
+ struct mapi_SBinaryArray pt_MVbin;
+@@ -913,6 +915,17 @@
+ }
+ talloc_free(ndr);
+ return (const void *) slpstr;
++ case PT_MV_UNICODE:
++ ndr_pull_mapi_SLPSTRArrayW(ndr, NDR_SCALARS, &pt_slpstrw);
++ *offset = ndr->offset;
++ slpstrw = talloc_zero(mem_ctx, struct StringArrayW_r);
++ slpstrw->cValues = pt_slpstrw.cValues;
++ slpstrw->lppszW = talloc_array(mem_ctx, const char *, pt_slpstrw.cValues);
++ for (i = 0; i < slpstrw->cValues; i++) {
++ slpstrw->lppszW[i] = talloc_strdup(mem_ctx, pt_slpstrw.strings[i].lppszW);
++ }
++ talloc_free(ndr);
++ return (const void *) slpstrw;
+ case PT_MV_BINARY:
+ ndr_pull_mapi_SBinaryArray(ndr, NDR_SCALARS, &pt_MVbin);
+ *offset = ndr->offset;
+Index: libmapi/nspi.c
+===================================================================
+--- libmapi/nspi.c (revision 3168)
++++ libmapi/nspi.c (working copy)
+@@ -1140,7 +1140,7 @@
+ struct PropertyTagArray_r ***pppMIds)
+ {
+ struct NspiResolveNamesW r;
+- struct WStringsArray_r *paWStr;
++ struct StringsArrayW_r *paWStr;
+ NTSTATUS status;
+ enum MAPISTATUS retval;
+ uint32_t count;
+@@ -1160,7 +1160,7 @@
+ r.in.Reserved = 0;
+ r.in.pPropTags = pPropTags;
+
+- paWStr = talloc(mem_ctx, struct WStringsArray_r);
++ paWStr = talloc(mem_ctx, struct StringsArrayW_r);
+ paWStr->Count = count;
+ paWStr->Strings = usernames;
+ r.in.paWStr = paWStr;
+Index: libmapi/property.c
+===================================================================
+--- libmapi/property.c (revision 3168)
++++ libmapi/property.c (working copy)
+@@ -298,6 +298,8 @@
+ return (const void *)(struct mapi_MV_LONG_STRUCT *)&lpProp->value.MVl;
+ case PT_MV_STRING8:
+ return (const void *)(struct mapi_SLPSTRArray *)&lpProp->value.MVszA;
++ case PT_MV_UNICODE:
++ return (const void *)(struct mapi_SLPSTRArrayW *)&lpProp->value.MVszW;
+ case PT_MV_BINARY:
+ return (const void *)(struct mapi_SBinaryArray *)&lpProp->value.MVbin;
+ default:
+@@ -343,7 +345,7 @@
+ case PT_MV_STRING8:
+ return (const void *)(struct StringArray_r *)&lpProps->value.MVszA;
+ case PT_MV_UNICODE:
+- return (const void *)(struct WStringArray_r *)&lpProps->value.MVszW;
++ return (const void *)(struct StringArrayW_r *)&lpProps->value.MVszW;
+ case PT_MV_BINARY:
+ return (const void *)(struct BinaryArray_r *)&lpProps->value.MVbin;
+ case PT_MV_SYSTIME:
+@@ -435,7 +437,7 @@
+ lpProps->value.MVguid = *((const struct FlatUIDArray_r *)data);
+ break;
+ case PT_MV_UNICODE:
+- lpProps->value.MVszW = *((const struct WStringArray_r *)data);
++ lpProps->value.MVszW = *((const struct StringArrayW_r *)data);
+ break;
+ case PT_MV_SYSTIME:
+ lpProps->value.MVft = *((const struct DateTimeArray_r *)data);
+@@ -574,7 +576,7 @@
+ mapi_sprop->value.MVszW.cValues);
+ for (i = 0; i < mapi_sprop->value.MVszW.cValues; i++) {
+ mapi_sprop->value.MVszW.strings[i].lppszW = sprop->value.MVszW.lppszW[i];
+- size += strlen(mapi_sprop->value.MVszW.strings[i].lppszW) + 1;
++ size += get_utf8_utf16_conv_length(mapi_sprop->value.MVszW.strings[i].lppszW);
+ }
+ return size;
+ }
+@@ -721,7 +723,7 @@
+ sprop->value.MVszW.lppszW = talloc_array(mem_ctx, const char*, sprop->value.MVszW.cValues);
+ for (i = 0; i < sprop->value.MVszW.cValues; i++) {
+ sprop->value.MVszW.lppszW[i] = mapi_sprop->value.MVszW.strings[i].lppszW;
+- size += 2 * (strlen(sprop->value.MVszW.lppszW[i]) + 1);
++ size += get_utf8_utf16_conv_length(sprop->value.MVszW.lppszW[i]);
+ }
+ return size;
+ }
+Index: libmapi/mapidump.c
+===================================================================
+--- libmapi/mapidump.c (revision 3168)
++++ libmapi/mapidump.c (working copy)
+@@ -47,7 +47,7 @@
+ const void *data;
+ TALLOC_CTX *mem_ctx = NULL;
+ const struct StringArray_r *StringArray_r = NULL;
+- const struct WStringArray_r *WStringArray_r = NULL;
++ const struct StringArrayW_r *StringArrayW_r = NULL;
+ const struct BinaryArray_r *BinaryArray_r = NULL;
+ const struct LongArray_r *LongArray_r = NULL;
+ uint32_t i;
+@@ -140,12 +140,12 @@
+ printf("%s\n", StringArray_r->lppszA[i]);
+ break;
+ case PT_MV_UNICODE:
+- WStringArray_r = (const struct WStringArray_r *) get_SPropValue_data(&lpProp);
++ StringArrayW_r = (const struct StringArrayW_r *) get_SPropValue_data(&lpProp);
+ printf("%s%s: ", sep?sep:"", proptag);
+- for (i = 0; i < WStringArray_r->cValues - 1; i++) {
+- printf("%s, ", WStringArray_r->lppszW[i]);
++ for (i = 0; i < StringArrayW_r->cValues - 1; i++) {
++ printf("%s, ", StringArrayW_r->lppszW[i]);
+ }
+- printf("%s\n", WStringArray_r->lppszW[i]);
++ printf("%s\n", StringArrayW_r->lppszW[i]);
+ break;
+ case PT_MV_BINARY:
+ BinaryArray_r = (const struct BinaryArray_r *) get_SPropValue_data(&lpProp);
+Index: libocpf/ocpf_write.c
+===================================================================
+--- libocpf/ocpf_write.c (revision 3168)
++++ libocpf/ocpf_write.c (working copy)
+@@ -323,7 +323,7 @@
+ }
+
+
+-static char *ocpf_write_mv_unicode(struct ocpf_context *ctx, const struct WStringArray_r *value)
++static char *ocpf_write_mv_unicode(struct ocpf_context *ctx, const struct StringArrayW_r *value)
+ {
+ char *str = NULL;
+ char *tmp = NULL;
+@@ -398,7 +398,7 @@
+ *found = true;
+ break;
+ case PT_MV_UNICODE:
+- line = ocpf_write_mv_unicode(ctx, (const struct WStringArray_r *)value);
++ line = ocpf_write_mv_unicode(ctx, (const struct StringArrayW_r *)value);
+ *found = true;
+ break;
+ case PT_MV_BINARY:
+Index: libocpf/ocpf.y
+===================================================================
+--- libocpf/ocpf.y (revision 3168)
++++ libocpf/ocpf.y (working copy)
+@@ -47,7 +47,7 @@
+ char *var;
+ struct LongArray_r MVl;
+ struct StringArray_r MVszA;
+- struct WStringArray_r MVszW;
++ struct StringArrayW_r MVszW;
+ struct BinaryArray_r MVbin;
+ }
+
+Index: libocpf/ocpf_api.c
+===================================================================
+--- libocpf/ocpf_api.c (revision 3168)
++++ libocpf/ocpf_api.c (working copy)
+@@ -235,9 +235,9 @@
+ }
+ return OCPF_SUCCESS;
+ case PT_MV_UNICODE:
+- *value = (const void *)talloc_zero(ctx, struct WStringArray_r);
+- ((struct WStringArray_r *)*value)->cValues = lpProp.MVszW.cValues;
+- ((struct WStringArray_r *)*value)->lppszW = talloc_array(ctx, const char *, lpProp.MVszW.cValues);
++ *value = (const void *)talloc_zero(ctx, struct StringArrayW_r);
++ ((struct StringArrayW_r *)*value)->cValues = lpProp.MVszW.cValues;
++ ((struct StringArrayW_r *)*value)->lppszW = talloc_array(ctx, const char *, lpProp.MVszW.cValues);
+ {
+ uint32_t i;
+
+@@ -247,7 +247,7 @@
+ } else {
+ str = (char *)lpProp.MVszW.lppszW[i];
+ }
+- ((struct WStringArray_r *)*value)->lppszW[i] = talloc_strdup(ctx, str);
++ ((struct StringArrayW_r *)*value)->lppszW[i] = talloc_strdup(ctx, str);
+ talloc_free(str);
+ }
+ }
+Index: mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.c
+===================================================================
+--- mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.c (revision 3168)
++++ mapiproxy/servers/default/nspi/dcesrv_exchange_nsp.c (working copy)
+@@ -884,7 +884,7 @@
+ const char *purportedSearch;
+ struct PropertyTagArray_r *pMIds = NULL;
+ struct SRowSet *pRows = NULL;
+- struct WStringsArray_r *paWStr;
++ struct StringsArrayW_r *paWStr;
+ uint32_t i;
+ int ret;
+ bool found = false;
+Index: exchange.idl
+===================================================================
+--- exchange.idl (revision 3168)
++++ exchange.idl (working copy)
+@@ -275,12 +275,12 @@
+ typedef struct {
+ [range(0,100000)] uint32 cValues;
+ [string,size_is(cValues),charset(UTF16)] uint16 **lppszW;
+- } WStringArray_r;
++ } StringArrayW_r;
+
+ typedef struct {
+ [range(0,100000)] uint32 Count;
+ [string,size_is(Count),charset(UTF16)] uint16 *Strings[];
+- } WStringsArray_r;
++ } StringsArrayW_r;
+
+ typedef struct {
+ [range(0,100001)] uint32 cValues;
+@@ -340,7 +340,7 @@
+ [case(PT_MV_STRING8)] StringArray_r MVszA;
+ [case(PT_MV_BINARY)] BinaryArray_r MVbin;
+ [case(PT_MV_CLSID)] FlatUIDArray_r MVguid;
+- [case(PT_MV_UNICODE)] WStringArray_r MVszW;
++ [case(PT_MV_UNICODE)] StringArrayW_r MVszW;
+ [case(PT_MV_SYSTIME)] DateTimeArray_r MVft;
+ [case(PT_NULL)] uint32 null;
+ [case(PT_OBJECT)] uint32 object;
+@@ -694,7 +694,7 @@
+ [in] uint32 Reserved,
+ [in] STAT *pStat,
+ [in,unique] SPropTagArray *pPropTags,
+- [in] WStringsArray_r *paWStr,
++ [in] StringsArrayW_r *paWStr,
+ [out] PropertyTagArray_r **ppMIds,
+ [out] SRowSet **ppRows
+ );
+@@ -936,7 +936,7 @@
+ uint32 lpl[cValues];
+ } mapi_MV_LONG_STRUCT;
+
+- typedef [public] struct {
++ typedef struct {
+ raw8string lppszA;
+ } mapi_LPSTR;
+
+@@ -949,10 +949,10 @@
+ [flag(STR_NULLTERM)] string lppszW;
+ } mapi_LPWSTR;
+
+- typedef struct {
++ typedef [public] struct {
+ uint32 cValues;
+ mapi_LPWSTR strings[cValues];
+- } mapi_SPLSTRArrayW;
++ } mapi_SLPSTRArrayW;
+
+ typedef [public] struct {
+ uint32 cValues;
+@@ -1068,7 +1068,7 @@
+ [case(PT_SVREID)] SBinary_short bin;
+ [case(PT_MV_LONG)] mapi_MV_LONG_STRUCT MVl;
+ [case(PT_MV_STRING8)] mapi_SLPSTRArray MVszA;
+- [case(PT_MV_UNICODE)] mapi_SPLSTRArrayW MVszW;
++ [case(PT_MV_UNICODE)] mapi_SLPSTRArrayW MVszW;
+ [case(PT_MV_CLSID)] mapi_SGuidArray MVguid;
+ [case(PT_MV_BINARY)] mapi_SBinaryArray MVbin;
+ } mapi_SPropValue_CTR;
+Index: utils/mapitest/modules/module_noserver.c
+===================================================================
+--- utils/mapitest/modules/module_noserver.c (revision 3168)
++++ utils/mapitest/modules/module_noserver.c (working copy)
+@@ -913,8 +913,8 @@
+ {
+ bool res;
+ struct SPropValue propvalue;
+- struct WStringArray_r unicodearray;
+- const struct WStringArray_r *unicodearrayget;
++ struct StringArrayW_r unicodearray;
++ const struct StringArrayW_r *unicodearrayget;
+
+ // create and initialise unicodearray
+ unicodearray.cValues = 4;
+@@ -930,7 +930,7 @@
+ mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue set with PT_MV_UNICODE");
+ return false;
+ }
+- unicodearrayget = (const struct WStringArray_r *)get_SPropValue_data(&propvalue);
++ unicodearrayget = (const struct StringArrayW_r *)get_SPropValue_data(&propvalue);
+ if (!unicodearrayget || (unicodearray.cValues != unicodearrayget->cValues) || (unicodearray.lppszW != unicodearrayget->lppszW)) {
+ /* failure */
+ mapitest_print(mt, "* %-40s: [FAILURE]\n", "SPropValue get/set with PT_MV_UNICODE");
+Index: utils/mapitest/modules/module_mapidump.c
+===================================================================
+--- utils/mapitest/modules/module_mapidump.c (revision 3168)
++++ utils/mapitest/modules/module_mapidump.c (working copy)
+@@ -118,7 +118,7 @@
+ // struct LongArray_r MVl;/* [case(0x1003)] */
+ // struct BinaryArray_r MVbin;/* [case(0x1102)] */
+ // struct FlatUIDArray_r MVguid;/* [case(0x1048)] */
+- // struct WStringArray_r MVszW;/* [case(0x101f)] */
++ // struct StringArrayW_r MVszW;/* [case(0x101f)] */
+ // struct DateTimeArray_r MVft;/* [case(0x1040)] */
+ // uint32_t object;/* [case(0x000d)] */
+ #endif
diff --git a/openchange.spec b/openchange.spec
index 8d41e35..98dafa5 100644
--- a/openchange.spec
+++ b/openchange.spec
@@ -1,6 +1,6 @@
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
-%global samba4_version 4.0.0-35alpha16
+%global samba4_version 4.0.0-36.alpha16
%global talloc_version 2.0.5
%global nickname TRANSPORTER
@@ -49,14 +49,11 @@ Patch0: libmapi-0.8.2-libmapi-conflict.patch
# RH bug #552984
Patch1: openchange-0.9-generate-xml-doc.patch
-# Needed to workaround a samba4 library chain bug
-Patch2: openchange-0.10.9-TF16S2-fix-fedora-build.patch
-
-# Extra linker flags for samba/libsamba-util-common.so
-Patch3: samba-util-common-workaround.patch
-
# http://tracker.openchange.org/issues/366
-Patch4: openchange-0.11-session-as-memctx.patch
+Patch2: openchange-0.11-session-as-memctx.patch
+
+# http://tracker.openchange.org/issues/367
+Patch3: openchange-0.11-pt-mv-unicode.patch
%description
OpenChange provides libraries to access Microsoft Exchange servers
@@ -115,9 +112,8 @@ This package provides the server elements for OpenChange.
%setup -q -n %{name}-%{version}-%{nickname}
%patch0 -p1 -b .libmapi-conflict
%patch1 -p1 -b .generate-xml-doc
-%patch2 -p0 -b .fix-build
-%patch3 -p1 -b .samba-util-common-workaround
-%patch4 -p1 -b .session-as-memctx
+%patch2 -p1 -b .session-as-memctx
+%patch3 -p0 -b .pt-mv-unicode
%build
%configure
@@ -248,9 +244,11 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
-* Mon Aug 05 2011 Milan Crha <mcrha at redhat.com> - 0.11-1
+* Thu Aug 11 2011 Milan Crha <mcrha at redhat.com> - 0.11-1
- Update to OpenChange 0.11 Transporter upstream release
+- Remove unnecessary build modification patches.
- Add patch to not use mapi_ctx->session as a TALLOC_CTX (OpenChange issue #366)
+- Add patch to read/write PidNameKeywords (OpenChange issue #367)
* Wed Apr 6 2011 Matthew Barnes <mbarnes at redhat.com> - 0.10.9-4
- OpenChange relies on a private Samba 4 library (libsamba-util-common).
More information about the scm-commits
mailing list