diff --git a/SOURCES/evolution-data-server-3.28.5-test-cal-client-get-revision.patch b/SOURCES/evolution-data-server-3.28.5-test-cal-client-get-revision.patch new file mode 100644 index 0000000..2c776fc --- /dev/null +++ b/SOURCES/evolution-data-server-3.28.5-test-cal-client-get-revision.patch @@ -0,0 +1,100 @@ +diff -up evolution-data-server-3.28.5/src/addressbook/libedata-book/e-data-book.c.test-cal-client-get-revision evolution-data-server-3.28.5/src/addressbook/libedata-book/e-data-book.c +--- evolution-data-server-3.28.5/src/addressbook/libedata-book/e-data-book.c.test-cal-client-get-revision 2018-07-30 15:17:06.000000000 +0200 ++++ evolution-data-server-3.28.5/src/addressbook/libedata-book/e-data-book.c 2019-05-23 19:31:07.484064234 +0200 +@@ -1856,6 +1856,12 @@ e_data_book_report_backend_property_chan + g_strfreev (strv); + } + ++ /* Ensure the property change signal on the D-Bus is invoked immediately, not on idle */ ++ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (dbus_interface)); ++ ++ if (book->priv->connection && !g_dbus_connection_is_closed (book->priv->connection)) ++ g_dbus_connection_flush_sync (book->priv->connection, NULL, NULL); ++ + /* Disregard anything else. */ + } + +diff -up evolution-data-server-3.28.5/src/calendar/libedata-cal/e-data-cal.c.test-cal-client-get-revision evolution-data-server-3.28.5/src/calendar/libedata-cal/e-data-cal.c +--- evolution-data-server-3.28.5/src/calendar/libedata-cal/e-data-cal.c.test-cal-client-get-revision 2018-07-30 15:17:06.000000000 +0200 ++++ evolution-data-server-3.28.5/src/calendar/libedata-cal/e-data-cal.c 2019-05-23 19:31:07.485064234 +0200 +@@ -2470,6 +2470,12 @@ e_data_cal_report_backend_property_chang + if (g_str_equal (prop_name, CAL_BACKEND_PROPERTY_DEFAULT_OBJECT)) + e_dbus_calendar_set_default_object (dbus_interface, prop_value); + ++ /* Ensure the property change signal on the D-Bus is invoked immediately, not on idle */ ++ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (dbus_interface)); ++ ++ if (cal->priv->connection && !g_dbus_connection_is_closed (cal->priv->connection)) ++ g_dbus_connection_flush_sync (cal->priv->connection, NULL, NULL); ++ + /* Disregard anything else. */ + } + +diff -up evolution-data-server-3.28.5/tests/libebook/client/test-book-client-get-revision.c.test-cal-client-get-revision evolution-data-server-3.28.5/tests/libebook/client/test-book-client-get-revision.c +--- evolution-data-server-3.28.5/tests/libebook/client/test-book-client-get-revision.c.test-cal-client-get-revision 2018-07-30 15:17:06.000000000 +0200 ++++ evolution-data-server-3.28.5/tests/libebook/client/test-book-client-get-revision.c 2019-05-23 19:31:07.485064234 +0200 +@@ -48,9 +48,22 @@ get_revision_compare_cycle (EBookClient + if (!e_client_get_backend_property_sync (E_CLIENT (client), CLIENT_BACKEND_PROPERTY_REVISION, &revision_after, NULL, &error)) + g_error ("Error getting book revision: %s", error->message); + ++ /* Sometimes, kind of rarely, the D-Bus property change is not delivered on time, ++ thus give it some time to be received and processed. */ ++ if (g_strcmp0 (revision_before, revision_after) == 0) { ++ g_message (" D-Bus property 'revision' change not received yet, trying to wait a bit"); ++ ++ g_usleep (G_USEC_PER_SEC / 2); ++ ++ g_clear_pointer (&revision_after, g_free); ++ ++ if (!e_client_get_backend_property_sync (E_CLIENT (client), CLIENT_BACKEND_PROPERTY_REVISION, &revision_after, NULL, &error)) ++ g_error ("Error getting book revision: %s", error->message); ++ } ++ + g_assert (revision_before); + g_assert (revision_after); +- g_assert (strcmp (revision_before, revision_after) != 0); ++ g_assert_cmpstr (revision_before, !=, revision_after); + + g_message ( + "Passed cycle, revision before '%s' revision after '%s'", +diff -up evolution-data-server-3.28.5/tests/libecal/client/test-cal-client-get-revision.c.test-cal-client-get-revision evolution-data-server-3.28.5/tests/libecal/client/test-cal-client-get-revision.c +--- evolution-data-server-3.28.5/tests/libecal/client/test-cal-client-get-revision.c.test-cal-client-get-revision 2018-07-30 15:17:06.000000000 +0200 ++++ evolution-data-server-3.28.5/tests/libecal/client/test-cal-client-get-revision.c 2019-05-23 19:31:07.485064234 +0200 +@@ -42,18 +42,34 @@ get_revision_compare_cycle (ECalClient * + + if (!e_client_get_backend_property_sync (E_CLIENT (client), CLIENT_BACKEND_PROPERTY_REVISION, + &revision_before, NULL, &error)) +- g_error ("Error getting book revision: %s", error->message); ++ g_error ("Error getting calendar revision: %s", error->message); + + if (!e_cal_client_create_object_sync (client, icalcomp, &uid, NULL, &error)) + g_error ("Error creating object: %s", error->message); + ++ if (!e_cal_client_remove_object_sync (client, uid, NULL, E_CAL_OBJ_MOD_ALL, NULL, &error)) ++ g_error ("Error removing created object: %s", error->message); ++ + if (!e_client_get_backend_property_sync (E_CLIENT (client), CLIENT_BACKEND_PROPERTY_REVISION, + &revision_after, NULL, &error)) +- g_error ("Error getting book revision: %s", error->message); ++ g_error ("Error getting calendar revision: %s", error->message); ++ ++ /* Sometimes, kind of rarely, the D-Bus property change is not delivered on time, ++ thus give it some time to be received and processed. */ ++ if (g_strcmp0 (revision_before, revision_after) == 0) { ++ g_message (" D-Bus property 'revision' change not received yet, trying to wait a bit"); ++ ++ g_usleep (G_USEC_PER_SEC / 2); ++ ++ g_clear_pointer (&revision_after, g_free); ++ ++ if (!e_client_get_backend_property_sync (E_CLIENT (client), CLIENT_BACKEND_PROPERTY_REVISION, &revision_after, NULL, &error)) ++ g_error ("Error getting book revision: %s", error->message); ++ } + + g_assert (revision_before); + g_assert (revision_after); +- g_assert (strcmp (revision_before, revision_after) != 0); ++ g_assert_cmpstr (revision_before, !=, revision_after); + + g_message ( + "Passed cycle, revision before '%s' revision after '%s'", diff --git a/SPECS/evolution-data-server.spec b/SPECS/evolution-data-server.spec index c9e7f1b..815dee2 100644 --- a/SPECS/evolution-data-server.spec +++ b/SPECS/evolution-data-server.spec @@ -32,7 +32,7 @@ Name: evolution-data-server Version: 3.28.5 -Release: 1%{?dist} +Release: 3%{?dist} Group: System Environment/Libraries Summary: Backend data server for Evolution License: LGPLv2+ @@ -55,6 +55,9 @@ Obsoletes: compat-evolution-data-server310-libcamel < 3.12 Patch02: evolution-data-server-3.28.2-cmake-version.patch Patch03: evolution-data-server-3.28.2-sqlite-deterministic.patch +# RH bug #1610744 +Patch04: evolution-data-server-3.28.5-test-cal-client-get-revision.patch + ### Dependencies ### Requires: dconf @@ -176,6 +179,7 @@ the functionality of the installed %{name} package. %patch02 -p1 -b .cmake-version %patch03 -p1 -b .sqlite-deterministic +%patch04 -p1 -b .test-cal-client-get-revision %build @@ -437,6 +441,12 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : %{_datadir}/installed-tests %changelog +* Thu May 23 2019 Milan Crha - 3.28.5-3 +- Update patch for RH bug #1610744 (test-cal-client-get-revision could fail) + +* Fri Feb 01 2019 Milan Crha - 3.28.5-2 +- Add patch for RH bug #1610744 (test-cal-client-get-revision could fail) + * Mon Jul 30 2018 Milan Crha - 3.28.5-1 - Update to 3.28.5