Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: pu
Hi, the current version of evolution in wheezy works with Exchange 2013 server (despite another issue in libsoup that I’ll fix separately), but the free/busy feature is missing. According to my tests, this patch fixes the bug. Please consider for wheezy. -- Joss
Index: debian/changelog =================================================================== --- debian/changelog (révision 2536) +++ debian/changelog (révision 2537) @@ -1,3 +1,10 @@ +evolution-ews (3.4.4-2) stable; urgency=low + + * 01_freebusy.patch: patch from upstream git. Fix free/busy indicators + with Exhange 2013 servers. + + -- Josselin Mouette <j...@debian.org> Fri, 11 Apr 2014 15:30:48 +0200 + evolution-ews (3.4.4-1) unstable; urgency=low * New upstream bugfix release (closes: #681802). Index: debian/patches/01_freebusy.patch =================================================================== --- debian/patches/01_freebusy.patch (révision 0) +++ debian/patches/01_freebusy.patch (révision 2537) @@ -0,0 +1,142 @@ +From 428f9d0ccb7e905fbd63b204a0e4244ed09597ec Mon Sep 17 00:00:00 2001 +From: Punit Jain <jpu...@suse.com> +Date: Mon, 26 Mar 2012 18:49:21 +0530 +Subject: Bug #659717 free busy not working + + +Index: evolution-ews-3.4.4/src/calendar/e-cal-backend-ews-utils.c +=================================================================== +--- evolution-ews-3.4.4.orig/src/calendar/e-cal-backend-ews-utils.c 2012-08-12 23:30:47.000000000 +0200 ++++ evolution-ews-3.4.4/src/calendar/e-cal-backend-ews-utils.c 2014-04-11 15:21:40.588569198 +0200 +@@ -400,6 +400,27 @@ + } + + static void ++ewscal_add_availability_default_timechange (ESoapMessage *msg) ++{ ++ ++ e_soap_message_start_element(msg, "StandardTime", NULL, NULL); ++ e_ews_message_write_string_parameter(msg, "Bias", NULL, "0"); ++ e_ews_message_write_string_parameter(msg, "Time", NULL, "00:00:00"); ++ e_ews_message_write_string_parameter(msg, "DayOrder", NULL, "0"); ++ e_ews_message_write_string_parameter(msg, "Month", NULL, "0"); ++ e_ews_message_write_string_parameter(msg, "DayOfWeek", NULL, "Sunday"); ++ e_soap_message_end_element (msg); ++ ++ e_soap_message_start_element(msg, "DaylightTime", NULL, NULL); ++ e_ews_message_write_string_parameter(msg, "Bias", NULL, "0"); ++ e_ews_message_write_string_parameter(msg, "Time", NULL, "00:00:00"); ++ e_ews_message_write_string_parameter(msg, "DayOrder", NULL, "0"); ++ e_ews_message_write_string_parameter(msg, "Month", NULL, "0"); ++ e_ews_message_write_string_parameter(msg, "DayOfWeek", NULL, "Sunday"); ++ e_soap_message_end_element (msg); ++} ++ ++static void + ewscal_add_availability_timechange (ESoapMessage *msg, + icalcomponent *comp, + gint baseoffs) +@@ -448,16 +469,16 @@ + xstd = icalcomponent_get_first_component (comp, ICAL_XSTANDARD_COMPONENT); + xdaylight = icalcomponent_get_first_component (comp, ICAL_XDAYLIGHT_COMPONENT); + +- /* Should never happen. Exchange will bail out */ +- if (!xstd || !xdaylight) +- return; +- ++ /*TimeZone is the root element of GetUserAvailabilityRequest*/ + e_soap_message_start_element(msg, "TimeZone", NULL, NULL); + + /* Fetch the timezone offsets for the standard (or only) zone. + * Negate it, because Exchange does it backwards */ +- prop = icalcomponent_get_first_property (xstd, ICAL_TZOFFSETTO_PROPERTY); +- std_utcoffs = -icalproperty_get_tzoffsetto (prop) / 60; ++ if (xstd) { ++ prop = icalcomponent_get_first_property(xstd, ICAL_TZOFFSETTO_PROPERTY); ++ std_utcoffs = -icalproperty_get_tzoffsetto(prop)/60; ++ } else ++ std_utcoffs = 0; + + /* This is the overall BaseOffset tag, which the Standard and Daylight + * zones are offset from. It's redundant, but Exchange always sets it +@@ -477,7 +498,10 @@ + e_soap_message_start_element(msg, "DaylightTime", NULL, NULL); + ewscal_add_availability_timechange (msg, xdaylight, std_utcoffs); + e_soap_message_end_element(msg); /* "DaylightTime" */ +- } ++ } else ++ /* Set default values*/ ++ ewscal_add_availability_default_timechange (msg); ++ + e_soap_message_end_element(msg); /* "TimeZone" */ + } + +Index: evolution-ews-3.4.4/src/server/e-ews-connection.c +=================================================================== +--- evolution-ews-3.4.4.orig/src/server/e-ews-connection.c 2012-08-12 23:30:47.000000000 +0200 ++++ evolution-ews-3.4.4/src/server/e-ews-connection.c 2014-04-11 15:21:40.588569198 +0200 +@@ -32,6 +32,7 @@ + #include <glib/gstdio.h> + #include <libical/icalcomponent.h> + #include <libical/icalproperty.h> ++#include <libical/ical.h> + #include "e-ews-connection.h" + #include <libedataserver/e-flag.h> + #include "e-ews-message.h" +@@ -4990,7 +4991,7 @@ + ESoapParameter *viewparam, *eventarray, *event_param, *subparam; + GTimeVal t_val; + const gchar *name; +- gchar *value; ++ gchar *value, *new_val = NULL; + EwsAsyncData *async_data = g_simple_async_result_get_op_res_gpointer (enode->simple); + + /* stop on errors */ +@@ -5007,17 +5008,41 @@ + + if (!g_ascii_strcasecmp (name, "StartTime")) { + value = e_soap_parameter_get_string_value (subparam); +- g_time_val_from_iso8601 (value, &t_val); +- g_free (value); ++ /*We are sending UTC timezone and expect server to return in same*/ ++ ++ /*Remove leading and trailing whitespace*/ ++ g_strstrip (value); ++ ++ if (g_utf8_strlen (value, -1) == 19) { ++ /*If server returns time without zone add Z to treat it in UTC*/ ++ new_val = g_strdup_printf ("%sZ", value); ++ g_free (value); ++ } else ++ new_val = value; ++ ++ g_time_val_from_iso8601 (new_val, &t_val); ++ g_free (new_val); + +- ipt.start = icaltime_from_timet (t_val.tv_sec, 0); ++ ipt.start = icaltime_from_timet_with_zone (t_val.tv_sec, 0, NULL); + + } else if (!g_ascii_strcasecmp (name, "EndTime")) { + value = e_soap_parameter_get_string_value (subparam); +- g_time_val_from_iso8601 (value, &t_val); +- g_free (value); ++ /*We are sending UTC timezone and expect server to return in same*/ ++ ++ /*Remove leading and trailing whitespace*/ ++ g_strstrip (value); ++ ++ if (g_utf8_strlen (value, -1) == 19) { ++ /*If server returns time without zone add Z to treat it in UTC*/ ++ new_val = g_strdup_printf ("%sZ", value); ++ g_free (value); ++ } else ++ new_val = value; ++ ++ g_time_val_from_iso8601 (new_val, &t_val); ++ g_free (new_val); + +- ipt.end = icaltime_from_timet (t_val.tv_sec, 0); ++ ipt.end = icaltime_from_timet_with_zone (t_val.tv_sec, 0, NULL); + + icalprop = icalproperty_new_freebusy (ipt); + } else if (!g_ascii_strcasecmp (name, "BusyType")) { Index: debian/patches/series =================================================================== --- debian/patches/series (révision 2536) +++ debian/patches/series (révision 2537) @@ -1 +1,2 @@ +01_freebusy.patch 02_liblzx_noinst.patch