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

Bug#822481: marked as done (jessie-pu: package wmforecast/0.8-1)



Your message dated Sat, 04 Jun 2016 14:57:25 +0100
with message-id <1465048645.7545.11.camel@adam-barratt.org.uk>
and subject line Closing bugs for fixes included in 8.5
has caused the Debian Bug report #822481,
regarding jessie-pu: package wmforecast/0.8-1
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.)


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

Hello!

In March 2016, Yahoo! changed their weather API in a non-backwards compatible
way.  This made wmforecast, a Window Maker dockapp which relies on this API
to display weather information, nonfunctional.

A new release, version 0.10, was prepared to fix this problem, and additional
improvements were made in 0.11, now available in stretch.

However, jessie still has version 0.8.  I have backported the appropriate
changes from 0.10 and 0.11 into a small patch which makes version 0.8
functional.  I would like to propose that the jessie wmforecast package be
updated with these changes.

Thank you!
Doug Torrance
diff -Nru wmforecast-0.8/debian/changelog wmforecast-0.8/debian/changelog
--- wmforecast-0.8/debian/changelog	2014-10-21 12:47:35.000000000 -0400
+++ wmforecast-0.8/debian/changelog	2016-04-24 17:34:10.000000000 -0400
@@ -1,3 +1,13 @@
+wmforecast (0.8-1+deb8u1) jessie; urgency=medium
+
+  * debian/control
+    - Update Maintainer and add Uploaders.
+  * debian/patches/new_yahoo_api.patch
+    - New patch; modifications to work with new Yahoo! weather API.
+      Backported from upstream.
+
+ -- Doug Torrance <dtorrance@piedmont.edu>  Sun, 24 Apr 2016 17:32:19 -0400
+
 wmforecast (0.8-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru wmforecast-0.8/debian/control wmforecast-0.8/debian/control
--- wmforecast-0.8/debian/control	2014-10-21 12:44:33.000000000 -0400
+++ wmforecast-0.8/debian/control	2016-04-24 17:28:25.000000000 -0400
@@ -1,7 +1,8 @@
 Source: wmforecast
 Section: utils
 Priority: extra
-Maintainer: Doug Torrance <dtorrance@monmouthcollege.edu>
+Maintainer: Debian Window Maker Team <pkg-wmaker-devel@lists.alioth.debian.org>
+Uploaders: Doug Torrance <dtorrance@piedmont.edu>
 Build-Depends: debhelper (>= 9), libxml2-dev, libcurl4-gnutls-dev, libwings-dev, help2man, dh-autoreconf
 Standards-Version: 3.9.6
 Homepage: https://github.com/d-torrance/wmforecast
diff -Nru wmforecast-0.8/debian/patches/new_yahoo_api.patch wmforecast-0.8/debian/patches/new_yahoo_api.patch
--- wmforecast-0.8/debian/patches/new_yahoo_api.patch	1969-12-31 19:00:00.000000000 -0500
+++ wmforecast-0.8/debian/patches/new_yahoo_api.patch	2016-04-24 17:23:15.000000000 -0400
@@ -0,0 +1,72 @@
+Description: Update to work with new Yahoo! weather API
+ Backported from upstream versions 0.10 and 0.11.
+Origin: https://github.com/d-torrance/wmforecast/commit/720f907
+Origin: https://github.com/d-torrance/wmforecast/commit/dcf081f
+Origin: https://github.com/d-torrance/wmforecast/commit/f19e666
+Last-Update: 2016-04-24
+
+--- a/wmforecast.c
++++ b/wmforecast.c
+@@ -296,7 +296,7 @@
+ 	text = wstrappend(text, ", ");
+ 	text = wstrappend(text, weather->temp);
+ 	text = wstrappend(text, "°\n\nForecast:\n");
+-	for (i = 0; i < weather->forecasts->length; i++) {
++	for (i = 0; i < weather->forecasts->length && i < 7; i++) {
+ 		text = wstrappend(text,weather->forecasts->forecasts[i].day);
+ 		text = wstrappend(text," - ");
+ 		text = wstrappend(text,weather->forecasts->forecasts[i].text);
+@@ -348,16 +348,23 @@
+ 	Weather *weather;
+ 	xmlDocPtr doc;
+ 	xmlNodePtr cur;
++	int i;
+ 
+-	url = wstrconcat("http://weather.yahooapis.com/forecastrss?u=",prefs->units);
++	url = wstrdup("https://query.yahooapis.com/v1/public/yql?q=";
++		      "select%20*%20from%20weather.forecast%20where%20woeid");
+ 	if (strcmp(prefs->woeid_or_zip,"w") == 0) {
+-		url = wstrappend(url,"&w=");
++		url = wstrappend(url, "%20%3D%20");
+ 		url = wstrappend(url, prefs->woeid);
+ 	}
+ 	else {
+-		url = wstrappend(url,"&p=");
++		url = wstrappend(url, "%20in%20(select%20woeid%20from%20"
++				 "geo.places(1)%20where%20text%3D%22");
+ 		url = wstrappend(url, prefs->zip);
+-	}
++		url = wstrappend(url, "%22)");
++ 	}
++	url = wstrappend(url, "%20and%20u%3D'");
++	url = wstrappend(url, prefs->units);
++	url = wstrappend(url, "'&format=xml");
+ 
+ 	weather = newWeather();
+ 	chunk.memory = wmalloc(1);
+@@ -394,17 +401,16 @@
+ 		return weather;
+ 	}
+ 
+-	if (xmlStrcmp(cur->name, (const xmlChar *) "rss")) {
+-		setError(weather, screen,"Empty document");
+-		fprintf(stderr,"document of the wrong type, root node != rss");
+-		xmlFreeDoc(doc);
+-		return weather;
++	for (i = 0; i < 3; i++) {
++		cur = cur->children;
++		if (cur == NULL) {
++			setError(weather, screen,
++				 "Document not parsed successfully");
++			xmlFreeDoc(doc);
++			return weather;
++		}
+ 	}
+ 
+-	cur = cur->children;
+-	cur = cur->next;
+-	cur = cur->children;
+-
+ 	while (cur != NULL) {
+ 		if ((!xmlStrcmp(cur->name, (const xmlChar *)"item"))) {
+ 			cur = cur->children;
diff -Nru wmforecast-0.8/debian/patches/series wmforecast-0.8/debian/patches/series
--- wmforecast-0.8/debian/patches/series	1969-12-31 19:00:00.000000000 -0500
+++ wmforecast-0.8/debian/patches/series	2016-04-24 17:17:45.000000000 -0400
@@ -0,0 +1 @@
+new_yahoo_api.patch

--- End Message ---
--- Begin Message ---
Version: 8.5

Hi,

The fixes referred to by each of these bugs were included in today's 8.5
point release.

Regards,

Adam

--- End Message ---

Reply to: