Page MenuHomeLubuntu Development

GeoIP service in automirror module
Open, LowPublic


The GeoIP service was changed from to in version 20.10 Groovy Gorilla.

The automirror module is a downstream module, which is still using the url and JSON parsing.


  • The imported Python module logging does not log to the Calamares session.log file. Replace it with the logging functionality from libcalamares.utils.
  • It is not a good idea to use two different urls to do the lookup with two different parsing methods. Ideally, there is only one lookup and all the modules can use the result of this single lookup. This requires some upstream changes to consolidate the GeoIP lookup. Known modules which use GeoIP:
    • automirror
    • locale
    • welcome

Related Objects


Event Timeline

I don't have the time at the moment to work on this task.

No problem. It should be a trivial thing to resolve. Thanks so much for bringing it up!

I'm gonna pass on the consolidation. Given the modular nature of Calamares and the fact that not everyone is going to use every module AND the fact that automirror is solely ours, I don't think that it's going to be quite easy to implement a one time lookup sort of thing.

Using everywhere in the rCALASETTINGS instead of (and xml instead of json) should be trivial, though.

As for the logging, that shouldn't be too hard though fatal errors should be passed through.

Well, trivial, but not THAT trivial. It should be pointed out automirror is using a json parser, so we need an xml one. Looking at the docs and the vulnerabilities in XML, I'm inclined to use defusedxml.

wxl triaged this task as Low priority.Feb 26 2021, 5:24 PM
kc2bez added a subscriber: kc2bez.

Moving this to 21.10