[Pkg-telepathy-maintainers] Bug#1086079: telepathy-logger: diff for NMU version 0.8.2-4.2
Boyuan Yang
byang at debian.org
Sat Oct 26 17:45:56 BST 2024
Control: tags 1086079 + patch
Control: tags 1086079 + pending
Dear maintainer,
I've prepared an NMU for telepathy-logger (versioned as 0.8.2-4.2) and
uploaded it to DELAYED/5. Please feel free to tell me if I
should delay it longer.
Regards.
diff -Nru telepathy-logger-0.8.2/debian/changelog telepathy-logger-0.8.2/debian/changelog
--- telepathy-logger-0.8.2/debian/changelog 2024-10-11 15:09:20.000000000 -0400
+++ telepathy-logger-0.8.2/debian/changelog 2024-10-26 12:39:01.000000000 -0400
@@ -1,3 +1,13 @@
+telepathy-logger (0.8.2-4.2) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * debian/patches/:
+ + 0007-Workaround-on-type-mismatch-with-time_t-not-2038-saf.patch:
+ Add patch to workaround type mismatch problem due to using GTimeVal and
+ time_t in a 2038-unsafe way. (Closes: #1086079)
+
+ -- Boyuan Yang <byang at debian.org> Sat, 26 Oct 2024 12:39:01 -0400
+
telepathy-logger (0.8.2-4.1) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru telepathy-logger-0.8.2/debian/patches/0007-Workaround-on-type-mismatch-with-time_t-not-2038-saf.patch telepathy-logger-0.8.2/debian/patches/0007-Workaround-on-type-
mismatch-with-time_t-not-2038-saf.patch
--- telepathy-logger-0.8.2/debian/patches/0007-Workaround-on-type-mismatch-with-time_t-not-2038-saf.patch 1969-12-31 19:00:00.000000000 -0500
+++ telepathy-logger-0.8.2/debian/patches/0007-Workaround-on-type-mismatch-with-time_t-not-2038-saf.patch 2024-10-26 12:39:01.000000000 -0400
@@ -0,0 +1,79 @@
+From: Boyuan Yang <byang at debian.org>
+Date: Sat, 26 Oct 2024 12:36:21 -0400
+Subject: Workaround on type mismatch with time_t (not 2038-safe)
+
+Temporarily patch usage of time_t in struct timeval to cast
+the GTimeVal type variables to time_t to avoid FTBFS due to
+type mismatch.
+
+This does not fundamentally fix the 2038 problem, but the usage
+of 2038-unsafe GTimeVal is too common in telepathy-logger to
+completely patch out.
+
+Bug-Debian: https://bugs.debian.org/1086079
+---
+ src/telepathy-logger.c | 4 +++-
+ tests/dbus/test-log-manager.c | 4 +++-
+ tests/dbus/test-tpl-log-store-pidgin.c | 4 +++-
+ 3 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/src/telepathy-logger.c b/src/telepathy-logger.c
+index 9f63bdf..50112ea 100644
+--- a/src/telepathy-logger.c
++++ b/src/telepathy-logger.c
+@@ -62,12 +62,14 @@ log_handler (const gchar *log_domain,
+ if (stamp_logs)
+ {
+ GTimeVal now;
++ time_t now_time_t; // quick workaround, not 2038-safe
+ gchar now_str[32];
+ gchar *tmp;
+ struct tm tm;
+
+ g_get_current_time (&now);
+- localtime_r (&(now.tv_sec), &tm);
++ now_time_t = (time_t) now.tv_sec; // quick workaround, not 2038-safe
++ localtime_r (&now_time_t, &tm);
+ strftime (now_str, 32, "%Y-%m-%d %H:%M:%S", &tm);
+ tmp = g_strdup_printf ("%s.%06ld: %s",
+ now_str, now.tv_usec, message);
+diff --git a/tests/dbus/test-log-manager.c b/tests/dbus/test-log-manager.c
+index f4f5d29..b54cea7 100644
+--- a/tests/dbus/test-log-manager.c
++++ b/tests/dbus/test-log-manager.c
+@@ -65,12 +65,14 @@ log_handler (const gchar *log_domain,
+ if (stamp_logs)
+ {
+ GTimeVal now;
++ time_t now_time_t; // quick workaround; not 2038-safe
+ gchar now_str[32];
+ gchar *tmp;
+ struct tm tm;
+
+ g_get_current_time (&now);
+- localtime_r (&(now.tv_sec), &tm);
++ now_time_t = (time_t) now.tv_sec; // quick workaround; not 2038-safe
++ localtime_r (&now_time_t, &tm);
+ strftime (now_str, 32, "%Y-%m-%d %H:%M:%S", &tm);
+ tmp = g_strdup_printf ("%s.%06ld: %s",
+ now_str, now.tv_usec, message);
+diff --git a/tests/dbus/test-tpl-log-store-pidgin.c b/tests/dbus/test-tpl-log-store-pidgin.c
+index a15a87d..4fae133 100644
+--- a/tests/dbus/test-tpl-log-store-pidgin.c
++++ b/tests/dbus/test-tpl-log-store-pidgin.c
+@@ -71,12 +71,14 @@ log_handler (const gchar *log_domain,
+ if (stamp_logs)
+ {
+ GTimeVal now;
++ time_t now_time_t; // quick workaround; not 2038-safe
+ gchar now_str[32];
+ gchar *tmp;
+ struct tm tm;
+
+ g_get_current_time (&now);
+- localtime_r (&(now.tv_sec), &tm);
++ now_time_t = now.tv_sec; // quick workaround; not 2038-safe
++ localtime_r (&now_time_t, &tm);
+ strftime (now_str, 32, "%Y-%m-%d %H:%M:%S", &tm);
+ tmp = g_strdup_printf ("%s.%06ld: %s",
+ now_str, now.tv_usec, message);
diff -Nru telepathy-logger-0.8.2/debian/patches/series telepathy-logger-0.8.2/debian/patches/series
--- telepathy-logger-0.8.2/debian/patches/series 2024-10-11 15:09:20.000000000 -0400
+++ telepathy-logger-0.8.2/debian/patches/series 2024-10-26 12:39:01.000000000 -0400
@@ -4,3 +4,4 @@
sync_tools_with_tp-glib_master.patch
backport/2e50d1855b3395b622c768094ff2b617a0208724.patch
backport/5eaf8c99748b3d4e61afaba24ff6bf763f81695d.patch
+0007-Workaround-on-type-mismatch-with-time_t-not-2038-saf.patch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 858 bytes
Desc: This is a digitally signed message part
URL: <http://alioth-lists.debian.net/pipermail/pkg-telepathy-maintainers/attachments/20241026/8bfbe5e5/attachment.sig>
More information about the Pkg-telepathy-maintainers
mailing list