[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#987164: marked as done (buster-pu: package xfce4-weather-plugin/0.8.10-2)



Your message dated Sat, 19 Jun 2021 10:56:39 +0100
with message-id <5c65c3ad2ac9b1b1f78bf73b1cf073041e619b51.camel@adam-barratt.org.uk>
and subject line Closing p-u requests for fixes included in 10.10 point release
has caused the Debian Bug report #987164,
regarding buster-pu: package xfce4-weather-plugin/0.8.10-2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
987164: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987164
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian.org@packages.debian.org
Usertags: pu


[ Reason ]
Hi,
the Xfce weather plugin in stable is broken (since quite a while
actually) because of an API deprecation at met.no.

There are two open bugs (#970259, #969747) by users. Upstream has
already ported newer version to the new API, but I did a smaller update
just to use the new API.

I've done a few test in stable and the plugin does seem to be fixed with
the update.

The new package also includes a d/gbp.conf addition in order to be able
to build the package in git (since we were previously using svn), I hope
that's not an issue.

The debdiff is attached for review. Since it's broken since quite a
while there's no specific urgency but it'd be nice if it was done for
the next point release.

Regards,
-- 
Yves-Alexis
diff -Nru xfce4-weather-plugin-0.8.10/debian/changelog xfce4-weather-plugin-0.8.10/debian/changelog
--- xfce4-weather-plugin-0.8.10/debian/changelog	2017-10-15 20:38:46.000000000 +0200
+++ xfce4-weather-plugin-0.8.10/debian/changelog	2021-04-18 19:23:36.000000000 +0200
@@ -1,3 +1,10 @@
+xfce4-weather-plugin (0.8.10-2) buster; urgency=medium
+
+  * d/patches: backport upstream port to 2.0 met.no API
+    (Closes: #970259, #969747)
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Sun, 18 Apr 2021 19:23:36 +0200
+
 xfce4-weather-plugin (0.8.10-1) unstable; urgency=medium
 
   [ Unit 193 ]
diff -Nru xfce4-weather-plugin-0.8.10/debian/patches/0001-port-weather-plugin-to-2.0-met.no-API.patch xfce4-weather-plugin-0.8.10/debian/patches/0001-port-weather-plugin-to-2.0-met.no-API.patch
--- xfce4-weather-plugin-0.8.10/debian/patches/0001-port-weather-plugin-to-2.0-met.no-API.patch	1970-01-01 01:00:00.000000000 +0100
+++ xfce4-weather-plugin-0.8.10/debian/patches/0001-port-weather-plugin-to-2.0-met.no-API.patch	2021-04-18 19:23:36.000000000 +0200
@@ -0,0 +1,67 @@
+From: Yves-Alexis Perez <corsac@debian.org>
+Date: Sun, 18 Apr 2021 19:12:09 +0200
+Subject: port weather plugin to 2.0 met.no API
+
+---
+ panel-plugin/weather.c | 29 ++++++++++++-----------------
+ 1 file changed, 12 insertions(+), 17 deletions(-)
+
+diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
+index c096795..55fe151 100644
+--- a/panel-plugin/weather.c
++++ b/panel-plugin/weather.c
+@@ -578,8 +578,8 @@ update_handler(plugin_data *data)
+ {
+     gchar *url;
+     gboolean night_time;
+-    time_t now_t, end_t;
+-    struct tm now_tm, end_tm;
++    time_t now_t;
++    struct tm now_tm;
+ 
+     g_assert(data != NULL);
+     if (G_UNLIKELY(data == NULL))
+@@ -614,22 +614,16 @@ update_handler(plugin_data *data)
+         data->astro_update->next = time_calc_hour(now_tm, 1);
+         data->astro_update->started = TRUE;
+ 
+-        /* calculate date range for request */
+-        end_t = time_calc_day(now_tm, ASTRODATA_MAX_DAYS);
+-        end_tm = *localtime(&end_t);
+-
+         /* build url */
+-        url = g_strdup_printf("https://api.met.no/weatherapi/sunrise/1.1/?";
+-                              "lat=%s;lon=%s;"
+-                              "from=%04d-%02d-%02d;"
+-                              "to=%04d-%02d-%02d",
++        url = g_strdup_printf("https://api.met.no/weatherapi";
++                              "/sunrise/2.0/?lat=%s&lon=%s&"
++                              "date=%04d-%02d-%02d&"
++                              "offset=00:00&days=%u",
+                               data->lat, data->lon,
+                               now_tm.tm_year + 1900,
+                               now_tm.tm_mon + 1,
+                               now_tm.tm_mday,
+-                              end_tm.tm_year + 1900,
+-                              end_tm.tm_mon + 1,
+-                              end_tm.tm_mday);
++                              data->forecast_days);
+ 
+         /* start receive thread */
+         g_message(_("getting %s"), url);
+@@ -645,10 +639,11 @@ update_handler(plugin_data *data)
+         data->weather_update->started = TRUE;
+ 
+         /* build url */
+-        url =
+-            g_strdup_printf("https://api.met.no/weatherapi";
+-                            "/locationforecastlts/1.3/?lat=%s;lon=%s;msl=%d",
+-                            data->lat, data->lon, data->msl);
++        url = g_strdup_printf("https://api.met.no";
++                              "/weatherapi/locationforecast/%s/"
++                              "classic?lat=%s&lon=%s&altitude=%d",
++                              "2.0",
++                              data->lat, data->lon, data->msl);
+ 
+         /* start receive thread */
+         g_message(_("getting %s"), url);
diff -Nru xfce4-weather-plugin-0.8.10/debian/patches/series xfce4-weather-plugin-0.8.10/debian/patches/series
--- xfce4-weather-plugin-0.8.10/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ xfce4-weather-plugin-0.8.10/debian/patches/series	2021-04-18 19:23:36.000000000 +0200
@@ -0,0 +1 @@
+0001-port-weather-plugin-to-2.0-met.no-API.patch

--- End Message ---
--- Begin Message ---
Package: release.debian.org
Version: 10.10

Hi,

Each of the updates referenced in these bugs was included in the 10.10
point release today.

Regards,

Adam

--- End Message ---

Reply to: