Created attachment 203810 [details] First patch file needed to correct METAR URL Flightgear connects to a NOAA web site to get weather data. This site switched to HTTPS-only, but only after the most recent release of flightgear had hard-coded the HTTP version of the URL into the program. Two one-line patches restore correct function to this feature of flightgear, which is also being addressed by the flightgear developers (so this patch almost certainly will be made obsolete by the next release). Steps to reproduce: Run flightgear and start it at any airport. Enable detailed weather by selecting Environment->Weather, then clicking the "Detailed Weather" button and selecting "Live Weather" in pulldown box. Expected results: live weather data for the selected airport will appear in the dialog box and the "data is valid" box will be selected. Actual results: It will report that no METAR data is available. Adding the two files attached to the /usr/ports/games/flightgear/files directory fixes the problem and restores METAR capability.
Created attachment 203811 [details] Second required patch file to correct METAR URL
See also https://forum.flightgear.org/viewtopic.php?f=20&t=35217 for details of where I got this patch.
I have also reviewed Flightgear's git repo, and find that they have revamped this feature a few weeks ago so it is no longer hard-coded. The next release won't need these two patches, and in fact the patches won't work in the next release. But they are required to get full functionality back in today's port pending whatever that next release will be.
@Russo Thank you for the report and patch. Could you generate a diff against the port using the `make makepatch` process outlined here please: https://www.freebsd.org/doc/en/books/porters-handbook/book.html#slow-patch Also, is the quarterly version of the port affected?
Created attachment 203815 [details] Regenerated patch #1 made with make makepatch This patch replaces the original one, and was created using make makepatch as requested.
Created attachment 203816 [details] Regenerated patch #2 made with make makepatch This patch replaces the second original patch file, and was regenerated using make makepatch as requested.
Done. I have replaced the attachments with the files that were created by make makepatch. These should now have the correct names for FreeBSD ports (I had created the other files by hand). The content of the patches are identical to the previously attached files. I have no idea what will happen in the next release --- all I can say is that the port (which contains the 2018.3.2 release of Flightgear from January) is currently broken with respect to metar downloads, the patches fix it, and the current git repository has commits that show that this exact change was made back in February, but then was superceded by an alternate approach in mid-March that replaces the hard-coded URL with a user-configurable URL. see commits [2fdc24](https://sourceforge.net/p/flightgear/flightgear/ci/2fdc24c1097955c5d2c88a9cc0be66069b22eebe/), [c2fb01](https://sourceforge.net/p/flightgear/flightgear/ci/c2fb01ccb7df6fc893ab79850654cb39153cea3d/), and [c686f6](https://sourceforge.net/p/flightgear/flightgear/ci/c686f6181742ee9c1112937fdca5d37b70868435/) Presumably the next release will be made off of the git master branch when the time comes, and so these two patch files will be obsolete and can simply be removed when that release is brought into the port.
I also cannot answer your question about the "quarterly version of the port." I only know about the current version.
Created attachment 203819 [details] flightgear fix METAR data download The quarterly (2019Q2) version of the port is the same as head, so it is affected too and these changes should be merged to the quarterly branch. @Russo Thank you for additional upstream information. The updated patches provided are correct in content, but the diff should be a single file, created using svn diff against the port directory after make makepatch generates patches in the ports files/ dir. I've generated that patch here for you
SVN diff in my ports directory shows NO differences after the make makepatch process: > cd /usr/ports/games/flightgear > svn diff > svn status ? files/patch-src_Environment_realwx__ctrl.cxx ? files/patch-src_Main_metar__main.cxx > I had expected it to show a diff against the current ports tree, but it didn't, which is why I attached the files that it produced.
(In reply to russo from comment #10) `svn add files/*` will add the new files (? in svn status signifies untracked files), so svn diff will then include the content of the newly tracked (added) files. Using svn diff saves one from having to create a copy of the port dir and using diff -ruN, etc
Hi Russo, Thanks a lot for your patch, I'll look at it ASAP. Best regards, Ganael.
A commit references this bug: Author: martymac Date: Tue Apr 23 10:02:22 UTC 2019 New revision: 499741 URL: https://svnweb.freebsd.org/changeset/ports/499741 Log: Fix METAR data download PR: 237400 Submitted by: russo@bogodyn.org MFH: 2019Q2 Changes: head/games/flightgear/Makefile head/games/flightgear/files/patch-src_Environment_realwx__ctrl.cxx head/games/flightgear/files/patch-src_Main_metar__main.cxx
I've just committed your patch, thanks to both of you! Best regards, Ganael.
A commit references this bug: Author: martymac Date: Wed Apr 24 10:13:49 UTC 2019 New revision: 499828 URL: https://svnweb.freebsd.org/changeset/ports/499828 Log: MFH: r499741 Fix METAR data download PR: 237400 Submitted by: russo@bogodyn.org Approved by: portmgr (miwi) Changes: _U branches/2019Q2/ branches/2019Q2/games/flightgear/Makefile branches/2019Q2/games/flightgear/files/patch-src_Environment_realwx__ctrl.cxx branches/2019Q2/games/flightgear/files/patch-src_Main_metar__main.cxx