Update to 2.66.2

This commit is contained in:
Kalev Lember 2020-10-19 17:40:22 +02:00
parent 6c5949a8ca
commit b5748c4edb
4 changed files with 6 additions and 98 deletions

View File

@ -1,6 +1,6 @@
Name: glib2 Name: glib2
Version: 2.66.1 Version: 2.66.2
Release: 3%{?dist} Release: 1%{?dist}
Summary: A library of handy utility functions Summary: A library of handy utility functions
License: LGPLv2+ License: LGPLv2+
@ -10,11 +10,6 @@ Source0: http://download.gnome.org/sources/glib/2.66/glib-%{version}.tar.xz
# Avoid requiring a too new gtk-doc version for building glib # Avoid requiring a too new gtk-doc version for building glib
Patch0: gtk-doc-1-32.patch Patch0: gtk-doc-1-32.patch
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1661
Patch1: timezone-madness.patch
# https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1683
Patch2: timezone-madness-pt2.patch
BuildRequires: chrpath BuildRequires: chrpath
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -222,6 +217,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/installed-tests %{_datadir}/installed-tests
%changelog %changelog
* Mon Oct 19 2020 Kalev Lember <klember@redhat.com> - 2.66.2-1
- Update to 2.66.2
* Wed Oct 14 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 2.66.1-3 * Wed Oct 14 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 2.66.1-3
- Fix yet another timezone bug - Fix yet another timezone bug

View File

@ -1 +1 @@
SHA512 (glib-2.66.1.tar.xz) = 7e1d649fc4d5c275793d028a1710f7f50ef4968e5c07fe8c8e500e08b997e0b05be6b7428d5475b42d6a1aafeb993e9f3a31c07bb065a6924bdaa30b2b0bf5c4 SHA512 (glib-2.66.2.tar.xz) = 30278c066c6b209f45fcfdb9ffc4732236451464506b93c0fff0964ff8aac58c15be85c3793c686d4740d9d97857984bc0ab71e38d5da11c5fd860e569fb6cb9

View File

@ -1,44 +0,0 @@
From 4a120c2e2e0a26e1cd5ce7cb4ebe906ef6d588d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD=20=D0=98=D0=B6=D0=B1?=
=?UTF-8?q?=D1=83=D0=BB=D0=B0=D1=82=D0=BE=D0=B2?= <lrn1986@gmail.com>
Date: Mon, 5 Oct 2020 16:53:47 +0000
Subject: [PATCH 2/2] Fix the 6-days-until-the-end-of-the-month bug
The addition causes the date to shift
forward into 1st of the next month, because a 0-based offset
is compared to be "more than" the days in the month instead of "more than
or equal to".
This is triggered by corner-cases where transition date is 6 days
off the end of the month and our calculations put it at N+1th day of the
month (where N is the number of days in the month). The subtraction should
be triggered to move the date back a week, putting it 6 days off the end;
for example, October 25 for CET DST transition; but due to incorrect comparison
the date isn't shifted back, we add 31 days to October 1st and end up
at November 1st).
Fixes issue #2215.
---
glib/gtimezone.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/glib/gtimezone.c b/glib/gtimezone.c
index ef67ec50b..0de5c92a3 100644
--- a/glib/gtimezone.c
+++ b/glib/gtimezone.c
@@ -1041,7 +1041,11 @@ find_relative_date (TimeZoneDate *buffer)
/* week is 1 <= w <= 5, we need 0-based */
days = 7 * (buffer->week - 1) + wday - first_wday;
- while (days > days_in_month)
+ /* "days" is a 0-based offset from the 1st of the month.
+ * Adding days == days_in_month would bring us into the next month,
+ * hence the ">=" instead of just ">".
+ */
+ while (days >= days_in_month)
days -= 7;
g_date_add_days (&date, days);
--
GitLab

View File

@ -1,46 +0,0 @@
From c355b0970521bd8b3e5f4fee6a2a170c65b9d723 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@gnome.org>
Date: Wed, 14 Oct 2020 15:30:18 -0500
Subject: [PATCH] Revert "gtimezone: Cache timezones based on the identifier
they were created by"
This reverts commit 851241f19a3fd9ec693b3dd8f37a84c7f970984a.
---
glib/gtimezone.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/glib/gtimezone.c b/glib/gtimezone.c
index ef67ec50b..8e0621e54 100644
--- a/glib/gtimezone.c
+++ b/glib/gtimezone.c
@@ -196,7 +196,6 @@ struct _GTimeZone
G_LOCK_DEFINE_STATIC (time_zones);
static GHashTable/*<string?, GTimeZone>*/ *time_zones;
G_LOCK_DEFINE_STATIC (tz_local);
-static gchar *tzenv_cached = NULL;
static GTimeZone *tz_local = NULL;
#define MIN_TZYEAR 1916 /* Daylight Savings started in WWI */
@@ -1843,17 +1842,11 @@ g_time_zone_new_local (void)
G_LOCK (tz_local);
/* Is time zone changed and must be flushed? */
- if (tz_local && g_strcmp0 (tzenv, tzenv_cached) != 0)
- {
- g_clear_pointer (&tz_local, g_time_zone_unref);
- g_clear_pointer (&tzenv_cached, g_free);
- }
+ if (tz_local && g_strcmp0 (g_time_zone_get_identifier (tz_local), tzenv))
+ g_clear_pointer (&tz_local, g_time_zone_unref);
if (tz_local == NULL)
- {
- tz_local = g_time_zone_new (tzenv);
- tzenv_cached = g_strdup (tzenv);
- }
+ tz_local = g_time_zone_new (tzenv);
tz = g_time_zone_ref (tz_local);
--
2.28.0