[PATCH 0/4] Add the geolocation module

Martin Kolman mkolman at gmail.com
Wed Apr 3 15:45:57 UTC 2013


This patch-set adds the geolocation module and hooks it up to Anaconda.

What the geolocation module does:
Using the Fedora MirrorManager API, it determines current territory code,
which is used to set the initial language and timezone.
If a given territory has more than one language listed (such as Switzerland),
default language is used and the country code is used only to set the timezone.
If no territory code is found or the lookup is still in progress when the
Welcome spoke is displayed, default language and timezone is used.

The MirrorManager API
The geolocation module uses an API meant for listing the nearest mirrors
(it also lists you most probably territory code).
A dedicated GeoIP API provided by the MirrorManager 
(so that public IP addresses of people installing Fedora don't leak out to a third party)
would be better suited and should not be difficult for the MirrorManager people to set up. 
It might also save some server resources as the geolocation module
only needs the territory code, not the mirror URLs.

Other backends
The geolocation module has two other backends:
* HostIP GeoIP backend
A third party GeoIP lookup service.
* Google WiFi location backend
This backend uses an API provided by Google to determine current coordinates
based on nearby WiFi access points. Then it uses the coordinates to get
a corresponding territory code using the Nominatim reverse geocoding API.
This backend can result in very accuracy on devices with WiFi hardware,
but leaks quite precise geographic coordinates of the user to two third-party
services at once. Therefore this backend should not be used for anything than
than testing.


By default, only the MirrorManager backend is used.

What the patches do:
PATCH 1/4 - adds the geolocation module
PATCH 2/4 - fixes an issue with kickstart default overriding initial language
value, preventing the initial value set by geolocation from being used
PATCH 3/4 - hooks-up the geolocation module with Anaconda
PATCH 4/4 - handles the one-territory-code-multiple-locales issue



Martin Kolman (4):
  Add geolocation module
  Don't directly set default language in kickstart.py
  Hook the Geolocation module to the Welcome spoke
  Handle territiories with more than one locale

 anaconda                            |   5 +
 pyanaconda/constants.py             |   1 +
 pyanaconda/geoloc.py                | 715 ++++++++++++++++++++++++++++++++++++
 pyanaconda/kickstart.py             |   5 -
 pyanaconda/ui/gui/spokes/welcome.py |  42 ++-
 5 files changed, 754 insertions(+), 14 deletions(-)
 create mode 100644 pyanaconda/geoloc.py

-- 
1.8.1.4



More information about the anaconda-patches mailing list