--- Begin Message ---
Package: libtimezonemap
Version: 0.4.6-6
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu noble ubuntu-patch
Hello,
This is a follow-up to bug #1037940 which is now archived.
With the move of webkit2gtk to libsoup3, this now becomes non-negotiable for
us in Ubuntu, as ubiquity requires both webkit and libtimezonemap.
I have taken a stab at fixing this patch up based on the feedback in the
other bug and have something that passes libtimezonemap's own build-time
tests, and ubiquity's tests, though it's hard to tell how much the latter
actually matters for verifying libtimezonemap correctness due to mocking.
Please consider this for inclusion in Debian as well.
Thanks,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
[email protected] [email protected]
diff -Nru libtimezonemap-0.4.6/debian/control
libtimezonemap-0.4.6/debian/control
--- libtimezonemap-0.4.6/debian/control 2024-03-07 21:30:43.000000000 -0800
+++ libtimezonemap-0.4.6/debian/control 2024-04-08 16:33:09.000000000 -0700
@@ -1,8 +1,7 @@
Source: libtimezonemap
Section: misc
Priority: optional
-Maintainer: Ubuntu Developers <[email protected]>
-XSBC-Original-Maintainer: Debian Cinnamon Team
<[email protected]>
+Maintainer: Debian Cinnamon Team <[email protected]>
Uploaders:
Maximiliano Curia <[email protected]>,
Margarita Manterola <[email protected]>,
@@ -20,7 +19,7 @@
libgtk-3-dev (>= 3.1.4),
libcairo2-dev (>= 1.10),
libjson-glib-dev,
- libsoup2.4-dev
+ libsoup-3.0-dev (>= 3.0.7)
Standards-Version: 4.6.2
Homepage: https://launchpad.net/timezonemap
Vcs-Browser: https://salsa.debian.org/cinnamon-team/libtimezonemap
diff -Nru libtimezonemap-0.4.6/debian/patches/port-to-libsoup3.patch
libtimezonemap-0.4.6/debian/patches/port-to-libsoup3.patch
--- libtimezonemap-0.4.6/debian/patches/port-to-libsoup3.patch 2023-06-20
23:54:22.000000000 -0700
+++ libtimezonemap-0.4.6/debian/patches/port-to-libsoup3.patch 2024-04-08
16:31:23.000000000 -0700
@@ -5,11 +5,11 @@
Forwarded: not-yet
Last-Update: 2022-08-06
---
-diff --git a/configure.ac b/configure.ac
-index 3f74dae..4e90e64 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -50,13 +50,13 @@ GDK_REQUIRED_VERSION=2.22
+Index: libtimezonemap/configure.ac
+===================================================================
+--- libtimezonemap.orig/configure.ac
++++ libtimezonemap/configure.ac
+@@ -50,13 +50,13 @@
GLIB_REQUIRED_VERSION=2.26
GTK3_REQUIRED_VERSION=3.1.4
GIO_REQUIRED_VERSION=2.5.11
@@ -25,23 +25,24 @@
json-glib-1.0)
LIBTIMEZONEMAP_LIBS="$LIBTIMEZONEMAP_LIBS $LIBM"
-diff --git a/src/timezone-completion.c b/src/timezone-completion.c
-index d310235..6971ae9 100644
---- a/src/timezone-completion.c
-+++ b/src/timezone-completion.c
-@@ -271,8 +271,10 @@ geonames_data_ready (GObject *object, GAsyncResult *res,
gpointer user_data)
+Index: libtimezonemap/src/timezone-completion.c
+===================================================================
+--- libtimezonemap.orig/src/timezone-completion.c
++++ libtimezonemap/src/timezone-completion.c
+@@ -270,9 +270,10 @@
+ CcTimezoneCompletionPrivate * priv = completion->priv;
GError * error = NULL;
GInputStream * stream;
- SoupMessage *message;
+- SoupMessage *message;
+ const gchar * reason_phrase;
+ SoupStatus status_code;
- stream = soup_request_send_finish (SOUP_REQUEST (object), res, &error);
-+ stream = soup_session_send_finish (SOUP_SESSION (object), res, &error);
++ stream = soup_session_send_finish (priv->soup_session, res, &error);
if (stream == NULL)
{
if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-@@ -283,8 +285,9 @@ geonames_data_ready (GObject *object, GAsyncResult *res,
gpointer user_data)
+@@ -283,8 +284,9 @@
return;
}
@@ -53,7 +54,7 @@
{
JsonParser *parser;
-@@ -296,7 +299,7 @@ geonames_data_ready (GObject *object, GAsyncResult *res,
gpointer user_data)
+@@ -296,10 +298,10 @@
else
{
g_warning ("Unable to fetch geonames (server responded with: %u %s)",
@@ -61,8 +62,12 @@
+ status_code, reason_phrase);
}
- g_object_unref (message);
-@@ -362,7 +365,7 @@ static gboolean
+- g_object_unref (message);
++ g_object_unref (object);
+ g_object_unref (stream);
+ }
+
+@@ -362,7 +364,7 @@
request_zones (CcTimezoneCompletion * completion)
{
CcTimezoneCompletionPrivate * priv = completion->priv;
@@ -71,28 +76,17 @@
GError *error = NULL;
priv->queued_request = 0;
-@@ -388,13 +391,14 @@ request_zones (CcTimezoneCompletion * completion)
- gchar * version = get_version ();
- gchar * locale = get_locale ();
- gchar * url = g_strdup_printf (GEONAME_URL, escaped, version, locale);
-+ GAsyncResult * res;
+@@ -391,10 +393,11 @@
g_free (locale);
g_free (escaped);
- req = soup_session_request (priv->soup_session, url, &error);
-+ req = soup_message_new_from_uri (NULL, (GUri *) url);
++ req = soup_message_new (NULL, url);
if (req)
{
- soup_request_send_async (req, priv->cancel, geonames_data_ready,
completion);
-+ soup_session_get_async_result_message (SOUP_SESSION (req), res);
++ soup_session_send_async (priv->soup_session, req, G_PRIORITY_DEFAULT,
++ priv->cancel, geonames_data_ready, completion);
g_object_unref (req);
}
else
-@@ -403,6 +407,7 @@ request_zones (CcTimezoneCompletion * completion)
- g_error_free (error);
- }
-
-+ g_free (res);
- g_free (url);
- return FALSE;
- }
diff -Nru libtimezonemap-0.4.6/debian/patches/series
libtimezonemap-0.4.6/debian/patches/series
--- libtimezonemap-0.4.6/debian/patches/series 2023-06-20 23:54:22.000000000
-0700
+++ libtimezonemap-0.4.6/debian/patches/series 2024-04-08 14:26:38.000000000
-0700
@@ -1,3 +1,3 @@
+port-to-libsoup3.patch
tz-Include-UI-files-from-installed-path.patch
timezone-map-Never-try-to-access-to-free-d-or-null-values.patch
-#port-to-libsoup3.patch - need fixes, see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1037940
--- End Message ---