From 7d7c31732ff0b66e9d4d321e59c219f324426714 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Oct 07 2019 08:08:00 +0000 Subject: Update to 3.34.1 --- diff --git a/.gitignore b/.gitignore index 62ed0c2..acea395 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ /gnome-calendar-3.33.1.tar.xz /gnome-calendar-3.33.4.tar.xz /gnome-calendar-3.34.0.tar.xz +/gnome-calendar-3.34.1.tar.xz diff --git a/73.patch b/73.patch deleted file mode 100644 index a8b9681..0000000 --- a/73.patch +++ /dev/null @@ -1,79 +0,0 @@ -From d87152f0327d8a6ba28ca7eb5f629d9becca0c4c Mon Sep 17 00:00:00 2001 -From: Michael Catanzaro -Date: Tue, 2 Jul 2019 12:16:43 -0500 -Subject: [PATCH] Try to fix a crash in update_default_calendar_row() - -This function is crashing in 3.32 because the manager object is invalid. -I think there are two related bugs: - -First, it looks like gcal_quick_add_popover_set_property() is failing to -disconnect its signals from the old GcalManager before setting the new -one. In one backtrace, I see the GcalManager emitting the signal is -different than the GcalQuickAddPopover's current manager, which is -surely unintended. - -But that shouldn't be enough to crash on its own, since the -GcalQuickAddPopover should still have a valid manager, even if not the -intended one. So I suspect the GcalQuickAddPopover itself is invalid at -this point. (The crash occured for me after adding an event, so it was -probably just destroyed.) GcalQuickAddPopover is not disconnecting these -signals in dispose, which is unsafe. We can avoid the need to do so by -using g_signal_connect_object(). - -Now in master, the GcalManager is now owned indirectly by the GcalContext, -but the underlying problems from the 3.32 crash are all still here. This -attempts to fix them. The fix is speculative, but it's surely safer than -the original code. - -Fixes #416, fixes #418, fixes #420, and fixes #392. Probably fixes a lot -more. Who knows. - -https://bugzilla.redhat.com/show_bug.cgi?id=1509551 ---- - src/gui/gcal-quick-add-popover.c | 18 +++++++++++++----- - 1 file changed, 13 insertions(+), 5 deletions(-) - -diff --git a/src/gui/gcal-quick-add-popover.c b/src/gui/gcal-quick-add-popover.c -index a1d7a4cf..4f8e93e5 100644 ---- a/src/gui/gcal-quick-add-popover.c -+++ b/src/gui/gcal-quick-add-popover.c -@@ -782,12 +782,20 @@ gcal_quick_add_popover_set_property (GObject *object, - break; - - case PROP_CONTEXT: -- if (g_set_object (&self->context, g_value_get_object (value))) -+ if (self->context != g_value_get_object (value)) - { - g_autoptr (GList) calendars = NULL; - GcalManager *manager; - GList *l; - -+ if (self->context != NULL) -+ { -+ manager = gcal_context_get_manager (self->context); -+ g_signal_handlers_disconnect_by_data (manager, self); -+ } -+ -+ g_set_object (&self->context, g_value_get_object (value)); -+ - /* Add currently loaded sources */ - manager = gcal_context_get_manager (self->context); - calendars = gcal_manager_get_calendars (manager); -@@ -798,10 +806,10 @@ gcal_quick_add_popover_set_property (GObject *object, - g_list_free (calendars); - - /* Connect to the manager signals and keep the list updates */ -- g_signal_connect (manager, "calendar-added", G_CALLBACK (on_calendar_added), self); -- g_signal_connect (manager, "calendar-changed", G_CALLBACK (on_calendar_changed), self); -- g_signal_connect (manager, "calendar-removed", G_CALLBACK (on_calendar_removed), self); -- g_signal_connect_swapped (manager, "notify::default-calendar", G_CALLBACK (update_default_calendar_row), self); -+ g_signal_connect_object (manager, "calendar-added", G_CALLBACK (on_calendar_added), self, 0); -+ g_signal_connect_object (manager, "calendar-changed", G_CALLBACK (on_calendar_changed), self, 0); -+ g_signal_connect_object (manager, "calendar-removed", G_CALLBACK (on_calendar_removed), self, 0); -+ g_signal_connect_object (manager, "notify::default-calendar", G_CALLBACK (update_default_calendar_row), self, G_CONNECT_SWAPPED); - - g_signal_connect_object (self->context, - "notify::time-format", --- -2.21.0 - diff --git a/76.patch b/76.patch deleted file mode 100644 index 1918e42..0000000 --- a/76.patch +++ /dev/null @@ -1,188 +0,0 @@ -From 7101c5ca5134f78d77348824c3bfbdcf0a9659c0 Mon Sep 17 00:00:00 2001 -From: Michael Catanzaro -Date: Wed, 3 Jul 2019 11:28:02 -0500 -Subject: [PATCH] Fix crashes when e_cal_util_get_system_timezone() returns - NULL - -The return value is nullable so gnome-calendar had better check it. - -I assume falling back to UTC is a sane behavior in this case. - -Fixes #419 ---- - src/core/gcal-event.c | 9 ++++++--- - src/core/gcal-manager.c | 26 ++++++++++++++++++++++---- - src/search/gcal-search-engine.c | 5 ++++- - src/utils/gcal-utils.c | 14 +++++++++----- - 4 files changed, 41 insertions(+), 13 deletions(-) - -diff --git a/src/core/gcal-event.c b/src/core/gcal-event.c -index ef16bf04..a59bfd99 100644 ---- a/src/core/gcal-event.c -+++ b/src/core/gcal-event.c -@@ -224,7 +224,7 @@ build_component_from_datetime (GcalEvent *self, - GDateTime *dt) - { - ICalTime *itt; -- gchar *tzid; -+ gchar *tzid = NULL; - - if (!dt) - return NULL; -@@ -241,8 +241,11 @@ build_component_from_datetime (GcalEvent *self, - ICalTimezone *zone; - - zone = e_cal_util_get_system_timezone (); -- i_cal_time_set_timezone (itt, zone); -- tzid = zone ? g_strdup (i_cal_timezone_get_tzid (zone)) : NULL; -+ if (zone != NULL) -+ { -+ i_cal_time_set_timezone (itt, zone); -+ tzid = g_strdup (i_cal_timezone_get_tzid (zone)); -+ } - } - - /* Call it after setting the timezone, because the DATE values do not let set the timezone */ -diff --git a/src/core/gcal-manager.c b/src/core/gcal-manager.c -index 51619906..a4d8bc9e 100644 ---- a/src/core/gcal-manager.c -+++ b/src/core/gcal-manager.c -@@ -876,6 +876,8 @@ void - gcal_manager_setup_shell_search (GcalManager *self, - ECalDataModelSubscriber *subscriber) - { -+ ICalTimezone *tz; -+ - g_return_if_fail (GCAL_IS_MANAGER (self)); - - if (self->shell_search_data_model) -@@ -888,7 +890,9 @@ gcal_manager_setup_shell_search (GcalManager *self, - self); - - e_cal_data_model_set_expand_recurrences (self->shell_search_data_model, TRUE); -- e_cal_data_model_set_timezone (self->shell_search_data_model, e_cal_util_get_system_timezone ()); -+ tz = e_cal_util_get_system_timezone (); -+ if (tz != NULL) -+ e_cal_data_model_set_timezone (self->shell_search_data_model, tz); - - self->search_view_data = g_new0 (ViewStateData, 1); - self->search_view_data->subscriber = subscriber; -@@ -1419,6 +1423,7 @@ gcal_manager_get_events (GcalManager *self, - ICalTime *end_date) - { - time_t range_start, range_end; -+ ICalTimezone *tz; - GatherEventData data = { - .manager = self, - .events = NULL, -@@ -1428,8 +1433,18 @@ gcal_manager_get_events (GcalManager *self, - - g_return_val_if_fail (GCAL_IS_MANAGER (self), NULL); - -- range_start = i_cal_time_as_timet_with_zone (start_date, e_cal_util_get_system_timezone ()); -- range_end = i_cal_time_as_timet_with_zone (end_date, e_cal_util_get_system_timezone ()); -+ tz = e_cal_util_get_system_timezone (); -+ -+ if (tz) -+ { -+ range_start = i_cal_time_as_timet_with_zone (start_date, tz); -+ range_end = i_cal_time_as_timet_with_zone (end_date, tz); -+ } -+ else -+ { -+ range_start = i_cal_time_as_timet (start_date); -+ range_end = i_cal_time_as_timet (end_date); -+ } - - e_cal_data_model_foreach_component (self->e_data_model, - range_start, -@@ -1519,6 +1534,7 @@ gcal_manager_startup (GcalManager *self) - GList *sources, *l; - GError *error = NULL; - ESourceCredentialsProvider *credentials_provider; -+ ICalTimezone *tz; - - GCAL_ENTRY; - -@@ -1619,7 +1635,9 @@ gcal_manager_startup (GcalManager *self) - self->e_data_model = e_cal_data_model_new (gcal_thread_submit_job); - - e_cal_data_model_set_expand_recurrences (self->e_data_model, TRUE); -- e_cal_data_model_set_timezone (self->e_data_model, e_cal_util_get_system_timezone ()); -+ tz = e_cal_util_get_system_timezone (); -+ if (tz != NULL) -+ e_cal_data_model_set_timezone (self->e_data_model, tz); - - sources = e_source_registry_list_enabled (self->source_registry, E_SOURCE_EXTENSION_CALENDAR); - -diff --git a/src/search/gcal-search-engine.c b/src/search/gcal-search-engine.c -index eadbf80d..afc241c5 100644 ---- a/src/search/gcal-search-engine.c -+++ b/src/search/gcal-search-engine.c -@@ -177,13 +177,16 @@ gcal_search_engine_constructed (GObject *object) - { - GcalSearchEngine *self = (GcalSearchEngine *)object; - GcalManager *manager; -+ ICalTimezone *tz; - - G_OBJECT_CLASS (gcal_search_engine_parent_class)->constructed (object); - - /* Setup the data model */ - self->data_model = e_cal_data_model_new (gcal_thread_submit_job); - e_cal_data_model_set_expand_recurrences (self->data_model, TRUE); -- e_cal_data_model_set_timezone (self->data_model, e_cal_util_get_system_timezone ()); -+ tz = e_cal_util_get_system_timezone (); -+ if (tz != NULL) -+ e_cal_data_model_set_timezone (self->data_model, tz); - - - manager = gcal_context_get_manager (self->context); -diff --git a/src/utils/gcal-utils.c b/src/utils/gcal-utils.c -index 495efc0a..f6de0e55 100644 ---- a/src/utils/gcal-utils.c -+++ b/src/utils/gcal-utils.c -@@ -371,7 +371,7 @@ build_component_from_details (const gchar *summary, - ECalComponent *event; - ECalComponentDateTime *dt; - ECalComponentText *summ; -- ICalTimezone *zone; -+ ICalTimezone *zone = NULL; - ICalTime *itt; - gboolean all_day; - -@@ -388,13 +388,13 @@ build_component_from_details (const gchar *summary, - * When the event is all day, we consider UTC timezone by default. Otherwise, - * we always use the system timezone to create new events - */ -- if (all_day) -+ if (!all_day) - { -- zone = i_cal_timezone_get_utc_timezone (); -+ zone = e_cal_util_get_system_timezone (); - } -- else -+ if (zone == NULL) - { -- zone = e_cal_util_get_system_timezone (); -+ zone = i_cal_timezone_get_utc_timezone (); - } - - /* Start date */ -@@ -482,10 +482,14 @@ icaltime_compare_with_current (const ICalTime *date1, - zone1 = i_cal_time_get_timezone (date1); - if (!zone1) - zone1 = e_cal_util_get_system_timezone (); -+ if (!zone1) -+ zone1 = i_cal_timezone_get_utc_timezone (); - - zone2 = i_cal_time_get_timezone (date2); - if (!zone2) - zone2 = e_cal_util_get_system_timezone (); -+ if (!zone2) -+ zone2 = i_cal_timezone_get_utc_timezone (); - - start1 = i_cal_time_as_timet_with_zone (date1, zone1); - start2 = i_cal_time_as_timet_with_zone (date2, zone2); --- -2.21.0 - diff --git a/98.patch b/98.patch deleted file mode 100644 index 8570e10..0000000 --- a/98.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0b0f72f2ddffcf92c66be33fa3157e3e0037a58b Mon Sep 17 00:00:00 2001 -From: Michael Catanzaro -Date: Sat, 21 Sep 2019 10:57:31 -0500 -Subject: [PATCH] Fix double free in gcal_quick_add_popover_set_property - -This already uses an autoptr. - -Fixes #455 ---- - src/gui/gcal-quick-add-popover.c | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/gui/gcal-quick-add-popover.c b/src/gui/gcal-quick-add-popover.c -index 417fb333..ca34d9ec 100644 ---- a/src/gui/gcal-quick-add-popover.c -+++ b/src/gui/gcal-quick-add-popover.c -@@ -804,8 +804,6 @@ gcal_quick_add_popover_set_property (GObject *object, - for (l = calendars; l; l = l->next) - on_calendar_added (manager, l->data, self); - -- g_list_free (calendars); -- - /* Connect to the manager signals and keep the list updates */ - g_signal_connect_object (manager, "calendar-added", G_CALLBACK (on_calendar_added), self, 0); - g_signal_connect_object (manager, "calendar-changed", G_CALLBACK (on_calendar_changed), self, 0); --- -2.23.0 - diff --git a/gnome-calendar.spec b/gnome-calendar.spec index ad887ac..6f5cf03 100644 --- a/gnome-calendar.spec +++ b/gnome-calendar.spec @@ -5,18 +5,15 @@ %global gtk3_version 3.22.20 Name: gnome-calendar -Version: 3.34.0 -Release: 2%{?dist} +Version: 3.34.1 +Release: 1%{?dist} Summary: Simple and beautiful calendar application designed to fit GNOME 3 License: GPLv3+ URL: https://wiki.gnome.org/Apps/Calendar Source0: https://download.gnome.org/sources/%{name}/3.34/%{name}-%{version}.tar.xz # These are all backports of crasher fix PRs by mcatanzaro -Patch0: 73.patch -Patch1: 76.patch Patch2: 84.patch -Patch3: 98.patch BuildRequires: gcc BuildRequires: gettext @@ -84,6 +81,9 @@ appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.gnome %{_datadir}/gnome-shell/search-providers/org.gnome.Calendar.search-provider.ini %changelog +* Mon Oct 07 2019 Kalev Lember - 3.34.1-1 +- Update to 3.34.1 + * Sat Sep 21 2019 Michael Catanzaro - 3.34.0-2 - Add patch to fix rhbz#1753558 diff --git a/sources b/sources index f831662..47d001a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-calendar-3.34.0.tar.xz) = 97d5bb4bad7578ae60bd5368f4b05c28a7ec5a76f37667383bdf86a08847873a186427ea27f9799b3fec9bd8efb52bac3d08e9fda077bdfb3f6e0093c357d673 +SHA512 (gnome-calendar-3.34.1.tar.xz) = ca2db73e8935875ba9d9b9787aca6eb7bc4369bc3058da42156d1dbfdd570ed18af9b0897046b05379b057455d6777a9bf52971da6b0fbf0673682984c3cc579