Bug 1371550

Summary: Switch to new weather forecasting service
Product: Red Hat Enterprise Linux 7 Reporter: Kalev Lember <klember>
Component: libgweatherAssignee: Matthias Clasen <mclasen>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact: Lucie Vařáková <lmanasko>
Priority: unspecified    
Version: 7.3CC: constantin_, don, hnr, lmiksik, mclasen, tpelka, vbenes, vbudikov
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libgweather-3.14.1-3.el7 Doc Type: Enhancement
Doc Text:
New weather service for *gnome-weather* Previously, the *gnome-weather* application used the METAR services provided by the National Oceanic and Atmospheric Administration (NOAA). However, NOAA stopped to provide the METAR service. This update introduces a new METAR service provided by the Aviation Weather Center (AWC) and *gnome-weather* now works as expected.
Story Points: ---
Clone Of:
: 1385478 (view as bug list) Environment:
Last Closed: 2016-11-04 01:52:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Kalev Lember 2016-08-30 12:58:48 UTC
In RHEL 7.3, gnome-weather's weather forecasting currently does not work. This is caused by weather.noaa.gov service shutting down unexpectedly. We would need to backport a simple patch to libgweather to make this work again:

https://git.gnome.org/browse/libgweather/commit/?id=283afc2d23355def1c1bab70a641f40cea52ba7f

Comment 4 Heinrich Kordewiner 2016-09-16 08:04:21 UTC
The same problem with weather-metar.c in libgweather-2.28.0-5.el6.src.rpm - but RH6 is using the broken http://weather.noaa.gov/cgi-bin/mgetmetar.pl - not the broken http://weather.noaa.gov/mgetmetar.php from RH7. We need a modified patch. 


RH6:

msg = soup_form_request_new (
        "GET", "http://weather.noaa.gov/cgi-bin/mgetmetar.pl",
        "cccc", loc->code,
        NULL);
   
From RH7 patch:

msg = soup_form_request_new (
-	"GET", "http://weather.noaa.gov/mgetmetar.php",
-	"cccc", loc->code,

Bug 1370961 - "noaa.gov change broke gnome-weather entirely - fix committed upstream" shoud be a duplicate?

NOAA says on http://www.nws.noaa.gov/om/notification/scn16-16wngccb.htm : "The NWS will eliminate the web service found at the following
address effective August 3, 2016".

Comment 7 Matthias Clasen 2016-10-10 14:23:56 UTC
* Feature: The METAR weather service that is used by the gnome-weather application was switched from the one provided by NOAA to www.aviationweather.gov.

* Reason: NOAA stopped providing the METAR service.

* Result: gnome-weather can show weather information again.

Comment 8 Constantin Dunayev 2016-10-16 20:12:07 UTC
EL6: 

--- libgweather-2.28.0/libgweather/weather-metar.c      2009-06-04 17:41:13.000000000 +0300
+++ libgweather-2.28.0./libgweather/weather-metar.c     2016-10-16 22:08:03.476670678 +0300
@@ -522,7 +522,7 @@
            metar = g_strdup (p);
        success = metar_parse (metar, info);
        g_free (metar);
-    } else if (!strstr (msg->response_body->data, "National Weather Service")) {
+    } else if (!strstr (msg->response_body->data, "AVIATION WEATHER CENTER")) {
        /* The response doesn't even seem to have come from NWS...
         * most likely it is a wifi hotspot login page. Call that a
         * network error.
@@ -550,8 +550,8 @@
     }

     msg = soup_form_request_new (
-       "GET", "http://weather.noaa.gov/cgi-bin/mgetmetar.pl",
-       "cccc", loc->code,
+       "GET", "http://aviationweather.gov/metar/data",
+       "ids", loc->code,
        NULL);
     soup_session_queue_message (info->session, msg, metar_finish, info);

Comment 10 errata-xmlrpc 2016-11-04 01:52:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2263.html