From 329b04c2d8dc4f8bbadbc821c1e0c6a62ae2dc95 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2016 06:13:00 +0000 Subject: import evolution-mapi-3.12.10-5.el7 --- diff --git a/SOURCES/evolution-mapi-3.12.10-book-recognize-offline.patch b/SOURCES/evolution-mapi-3.12.10-book-recognize-offline.patch new file mode 100644 index 0000000..3fcacd0 --- /dev/null +++ b/SOURCES/evolution-mapi-3.12.10-book-recognize-offline.patch @@ -0,0 +1,74 @@ +diff -up evolution-mapi-3.12.10/src/addressbook/e-book-backend-mapi.c.book-recognize-offline evolution-mapi-3.12.10/src/addressbook/e-book-backend-mapi.c +--- evolution-mapi-3.12.10/src/addressbook/e-book-backend-mapi.c.book-recognize-offline 2014-10-14 14:42:49.000000000 +0200 ++++ evolution-mapi-3.12.10/src/addressbook/e-book-backend-mapi.c 2016-08-16 17:33:31.513852020 +0200 +@@ -54,7 +54,6 @@ struct _EBookBackendMAPIPrivate + GRecMutex conn_lock; + EMapiConnection *conn; + gchar *book_uid; +- gboolean marked_for_offline; + + GThread *update_cache_thread; + GCancellable *update_cache; +@@ -415,7 +414,7 @@ ebbm_connect_user (EBookBackendMAPI *ebm + + ebbm_notify_connection_status (ebma, TRUE); + +- if (!g_cancellable_is_cancelled (cancellable) && priv->marked_for_offline) { ++ if (!g_cancellable_is_cancelled (cancellable) && e_book_backend_mapi_is_marked_for_offline (ebma)) { + ebbm_maybe_invoke_cache_update (ebma); + } + } +@@ -484,16 +483,12 @@ ebbm_open (EBookBackendMAPI *ebma, + { + EBookBackendMAPIPrivate *priv = ebma->priv; + ESource *source = e_backend_get_source (E_BACKEND (ebma)); +- ESourceOffline *offline_extension; + const gchar *cache_dir; + GError *error = NULL; + + if (e_book_backend_is_opened (E_BOOK_BACKEND (ebma))) + return; + +- offline_extension = e_source_get_extension (source, E_SOURCE_EXTENSION_OFFLINE); +- priv->marked_for_offline = e_source_offline_get_stay_synchronized (offline_extension); +- + if (priv->book_uid) + g_free (priv->book_uid); + priv->book_uid = e_source_dup_uid (source); +@@ -519,7 +514,7 @@ ebbm_open (EBookBackendMAPI *ebma, + + /* Either we are in Online mode or this is marked for offline */ + if (!e_backend_get_online (E_BACKEND (ebma)) && +- !priv->marked_for_offline) { ++ !e_book_backend_mapi_is_marked_for_offline (ebma)) { + g_propagate_error (perror, EDB_ERROR (OFFLINE_UNAVAILABLE)); + return; + } +@@ -742,7 +737,7 @@ ebbm_book_view_thread (gpointer data) + if (ebmac && ebmac->op_book_view_thread) + ebmac->op_book_view_thread (bvtd->ebma, bvtd->book_view, priv->update_cache, &error); + +- if (priv->marked_for_offline) { ++ if (e_book_backend_mapi_is_marked_for_offline (bvtd->ebma)) { + e_book_backend_mapi_update_view_by_cache (bvtd->ebma, bvtd->book_view, &error); + + ebbm_maybe_invoke_cache_update (bvtd->ebma); +@@ -1505,10 +1500,17 @@ e_book_backend_mapi_book_view_is_running + gboolean + e_book_backend_mapi_is_marked_for_offline (EBookBackendMAPI *ebma) + { ++ ESource *source; ++ ESourceOffline *offline_extension; ++ + g_return_val_if_fail (E_IS_BOOK_BACKEND_MAPI (ebma), FALSE); + g_return_val_if_fail (ebma->priv != NULL, FALSE); + +- return ebma->priv->marked_for_offline; ++ source = e_backend_get_source (E_BACKEND (ebma)); ++ ++ offline_extension = e_source_get_extension (source, E_SOURCE_EXTENSION_OFFLINE); ++ ++ return e_source_offline_get_stay_synchronized (offline_extension); + } + + void diff --git a/SOURCES/evolution-mapi-3.12.10-freebusy-time-calc.patch b/SOURCES/evolution-mapi-3.12.10-freebusy-time-calc.patch new file mode 100644 index 0000000..4ec0af1 --- /dev/null +++ b/SOURCES/evolution-mapi-3.12.10-freebusy-time-calc.patch @@ -0,0 +1,110 @@ +diff -up evolution-mapi-3.12.10/src/libexchangemapi/e-mapi-cal-utils.c.freebusy-time-calc evolution-mapi-3.12.10/src/libexchangemapi/e-mapi-cal-utils.c +--- evolution-mapi-3.12.10/src/libexchangemapi/e-mapi-cal-utils.c.freebusy-time-calc 2014-04-28 11:05:45.000000000 +0200 ++++ evolution-mapi-3.12.10/src/libexchangemapi/e-mapi-cal-utils.c 2016-08-16 16:15:04.577028840 +0200 +@@ -453,7 +453,6 @@ populate_freebusy_data (struct Binary_r + uint16_t event_start; + uint16_t event_end; + uint32_t i; +- uint32_t hour; + uint32_t day; + const gchar *month_name; + uint32_t minutes; +@@ -478,57 +477,47 @@ populate_freebusy_data (struct Binary_r + event_start = (bin->lpb[i + 1] << 8) | bin->lpb[i]; + event_end = (bin->lpb[i + 3] << 8) | bin->lpb[i + 2]; + +- for (hour = 0; hour < 24; hour++) { +- if (!(((event_start - (60 * hour)) % 1440) && (((event_start - (60 * hour)) % 1440) - 30))) { +- struct icalperiodtype ipt; +- icalproperty *icalprop; +- icaltimetype itt; +- +- day = ((event_start - (60 * hour)) / 1440) + 1; +- minutes = (event_start - (60 * hour)) % 1440; +- real_month = month - (year * 16); +- +- date_string = g_strdup_printf ("%.2u-%.2u-%.2u", year, real_month, day); +- start = g_strdup_printf ("%sT%.2u:%.2u:00Z", date_string, hour + daylight, minutes); +- g_free (date_string); +- +- day = ((event_end - (60 * hour)) / 1440) + 1; +- minutes = (event_end - (60 * hour)) % 1440; +- +- if (minutes >= 60) { +- hour += minutes / 60; +- minutes %= 60; +- } +- +- date_string = g_strdup_printf ("%.2u-%.2u-%.2u", year, real_month, day); +- end = g_strdup_printf ("%sT%.2u:%.2u:00Z", date_string, hour + daylight, minutes); +- g_free (date_string); +- +- start_date = mapi_get_date_from_string (start); +- end_date = mapi_get_date_from_string (end); +- +- memset (&ipt, 0, sizeof (struct icalperiodtype)); +- +- itt = icaltime_from_timet_with_zone (start_date, 0, icaltimezone_get_utc_timezone ()); +- ipt.start = itt; +- +- itt = icaltime_from_timet_with_zone (end_date, 0, icaltimezone_get_utc_timezone ()); +- ipt.end = itt; +- +- icalcomp = e_cal_component_get_icalcomponent (comp); +- icalprop = icalproperty_new_freebusy (ipt); +- +- if (!strcmp (accept_type, "Busy")) +- icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSY"); +- else if (!strcmp (accept_type, "Tentative")) +- icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSY-TENTATIVE"); +- else if (!strcmp (accept_type, "OutOfOffice")) +- icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSY-UNAVAILABLE"); +- +- icalcomponent_add_property(icalcomp, icalprop); +- g_free (start); +- g_free (end); +- } ++ if (event_start <= event_end) { ++ struct icalperiodtype ipt; ++ icalproperty *icalprop; ++ icaltimetype itt; ++ ++ day = 1; ++ minutes = 0; ++ real_month = month - (year * 16); ++ ++ date_string = g_strdup_printf ("%.2u-%.2u-%.2u", year, real_month, day); ++ start = g_strdup_printf ("%sT%.2u:%.2u:00Z", date_string, 0, minutes); ++ g_free (date_string); ++ ++ date_string = g_strdup_printf ("%.2u-%.2u-%.2u", year, real_month, day); ++ end = g_strdup_printf ("%sT%.2u:%.2u:00Z", date_string, 0, minutes); ++ g_free (date_string); ++ ++ start_date = mapi_get_date_from_string (start) + (60 * event_start); ++ end_date = mapi_get_date_from_string (end) + (60 * event_end); ++ ++ memset (&ipt, 0, sizeof (struct icalperiodtype)); ++ ++ itt = icaltime_from_timet_with_zone (start_date, 0, icaltimezone_get_utc_timezone ()); ++ ipt.start = itt; ++ ++ itt = icaltime_from_timet_with_zone (end_date, 0, icaltimezone_get_utc_timezone ()); ++ ipt.end = itt; ++ ++ icalcomp = e_cal_component_get_icalcomponent (comp); ++ icalprop = icalproperty_new_freebusy (ipt); ++ ++ if (!strcmp (accept_type, "Busy")) ++ icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSY"); ++ else if (!strcmp (accept_type, "Tentative")) ++ icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSY-TENTATIVE"); ++ else if (!strcmp (accept_type, "OutOfOffice")) ++ icalproperty_set_parameter_from_string (icalprop, "FBTYPE", "BUSY-UNAVAILABLE"); ++ ++ icalcomponent_add_property(icalcomp, icalprop); ++ g_free (start); ++ g_free (end); + } + } + } diff --git a/SOURCES/evolution-mapi-3.12.10-openchange-2.3.patch b/SOURCES/evolution-mapi-3.12.10-openchange-2.3.patch new file mode 100644 index 0000000..bed5435 --- /dev/null +++ b/SOURCES/evolution-mapi-3.12.10-openchange-2.3.patch @@ -0,0 +1,49 @@ +commit f3b832780fb70066f5eb5c62996d613e6d187c59 +Author: Milan Crha +Date: Mon May 18 14:30:06 2015 +0200 + + Fix a build break with OpenChange 2.3 QueryRows() API change + +diff --git a/configure.ac b/configure.ac +index 8adb57d..ac11615 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -229,6 +229,21 @@ fi + AC_MSG_RESULT([$ac_cv_have_ecrpcfailed]) + + dnl **************************** ++dnl Check for OpenChange 2.3 QueryRows ++dnl **************************** ++AC_MSG_CHECKING([libmapi QueryRows arguments]) ++save_cflags=$CFLAGS; CFLAGS=$LIBMAPI_CFLAGS ++save_libs=$LIBS; LIBS="$LIBMAPI_LIBS" ++AC_LINK_IFELSE([AC_LANG_PROGRAM( ++ [[#include ]], ++ [[QueryRows(NULL, 1, TBL_ADVANCE, TBL_FORWARD_READ, NULL);]])], ++ [AC_DEFINE(HAVE_QUERYROWS_FORWARDREAD, 1, [libmapi defines QueryRows with ForwardRead argument]) ac_cv_have_queryrows_forwardread=yes],[ac_cv_have_queryrows_forwardread=no]) ++CFLAGS=$save_cflags ++LIBS=$save_libs ++AC_MSG_RESULT([$ac_cv_have_queryrows_forwardread]) ++ ++ ++dnl **************************** + dnl Expose version information + dnl **************************** + API_VERSION=$EDS_PACKAGE +diff --git a/src/libexchangemapi/e-mapi-connection.c b/src/libexchangemapi/e-mapi-connection.c +index bf4945f..8067e25 100644 +--- a/src/libexchangemapi/e-mapi-connection.c ++++ b/src/libexchangemapi/e-mapi-connection.c +@@ -1523,7 +1523,11 @@ foreach_tablerow (EMapiConnection *conn, + break; + + /* Fill the table columns with data from the rows */ +- ms = QueryRows (obj_table, count, TBL_ADVANCE, &SRowSet); ++ ms = QueryRows (obj_table, count, TBL_ADVANCE, ++ #ifdef HAVE_QUERYROWS_FORWARDREAD ++ TBL_FORWARD_READ, ++ #endif ++ &SRowSet); + if (ms != MAPI_E_SUCCESS) { + make_mapi_error (perror, "QueryRows", ms); + break; diff --git a/SPECS/evolution-mapi.spec b/SPECS/evolution-mapi.spec index 72af402..a44ebbd 100644 --- a/SPECS/evolution-mapi.spec +++ b/SPECS/evolution-mapi.spec @@ -1,4 +1,4 @@ -%define openchange_version 2.0 +%define openchange_version 2.3 %define intltool_version 0.35.5 %define evo_base_version 3.12 @@ -9,7 +9,7 @@ Name: evolution-mapi Version: 3.12.10 -Release: 3%{?dist} +Release: 5%{?dist} Group: Applications/Productivity Summary: Evolution extension for MS Exchange 2007 servers License: LGPLv2+ @@ -17,6 +17,17 @@ URL: https://wiki.gnome.org/Apps/Evolution Source: http://ftp.gnome.org/pub/gnome/sources/evolution-mapi/3.12/evolution-mapi-%{version}.tar.xz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +### Patches ### + +# RH bug #1314261 +Patch01: evolution-mapi-3.12.10-openchange-2.3.patch + +# RH bug #1366206 +Patch02: evolution-mapi-3.12.10-freebusy-time-calc.patch + +# RH bug #1367455 +Patch03: evolution-mapi-3.12.10-book-recognize-offline.patch + ### Dependencies ### Requires: evolution >= %{version} @@ -69,6 +80,9 @@ Development files needed for building things which link against %{name}. %prep %setup -q +%patch01 -p1 -b .openchange-2.3 +%patch02 -p1 -b .freebusy-time-calc +%patch03 -p1 -b .book-recognize-offline %build @@ -133,6 +147,13 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/libexchangemapi-1.0.pc %changelog +* Tue Aug 16 2016 Milan Crha - 3.12.10-5 +- Add patch for RH bug #1366206 (Free/Busy Information returns wrong time) +- Add patch for RH bug #1367455 (No contacts are displayed until search is started) + +* Fri Mar 04 2016 Milan Crha - 3.12.10-4 +- Add patch for RH bug #1314261 (Rebuild against OpenChange 2.3) + * Wed Jul 08 2015 Milan Crha - 3.12.10-3 - Rebuild against updated libical