linuxmint / mintsources

53 stars 72 forks source link

Software Sources > Select a mirror: reporting very wrong server list #232

Closed derekmarcotte closed 3 weeks ago

derekmarcotte commented 2 years ago

Having trouble updating my system by default. The "Select a mirror" dialog is reporting very under-performing servers on the other side of the world.

I've verified that http://geoip.ubuntu.com/lookup is reporting a country code in that wrong part of a world for my IP, but there doesn't seem to be a way to override if the call to http://geoip.ubuntu.com/lookup succeeds?

It would seem that options include:

Does anyone know how to submit corrections to the (http://geoip.ubuntu.com/lookup) database?

Relevant code

xenopeek commented 2 years ago

Does anyone know how to submit corrections to the (http://geoip.ubuntu.com/lookup) database?

I can't find anything for that. The geoip-bin package on Ubuntu uses a database from MaxMind, maybe this service also uses MaxMind. If you enter your IP address here https://www.maxmind.com/en/geoip-demo/ does it show the same wrong country as https://geoip.ubuntu.com/lookup does? If so, there is a way on the MaxMind page to contact them about incorrect data.

derekmarcotte commented 2 years ago

MaxMind reports the correct information, just tested.

xenopeek commented 2 years ago

All I can find out the geoip service is running in Apache, on Ubuntu Server 18.04. Can't find any contact information. Maybe it is using the MaxMind database (as those are the geoip database packages I can find on Ubuntu) but isn't as up to date as the website.

dhohndorf commented 1 month ago

Since the mentioned service http://geoip.ubuntu.com/lookup seems to be broken constantly I would appreciate the possibility to choose manually from the complete list of mirrors. At the moment the list only shows mirrors in the Americas including Greenland. It's hard to believe that there aren't any mirrors in good old Europe. Maybe it also would be better to manually set a location and start the speedtest with mirrors that are located near the given location. As i can see it defaults to the System Language which isn't always the best choice (e.g. for me who is located in Germany but likes to have his User Interface in English).

fedcab commented 1 month ago

I just looked at the sources and actually, there is a fallback solution for failure of the geolocation. It looks for the environment variable LANG and derives the geolocation from the countrycode there. When I execute the whole procedure in a python interpreter it works. LANG is not set properly in the environment when executing mintsources as root!

billyswong commented 1 month ago

An idea from https://forums.linuxmint.com/viewtopic.php?p=2531811#p2531811

How about provide a fallback based on timezone, instead of system language? The UI language is usually about who the user is from, not necessarily where the user is now. Timezone will match geolocation better.

fedcab commented 1 month ago

An idea from https://forums.linuxmint.com/viewtopic.php?p=2531811#p2531811

How about provide a fallback based on timezone, instead of system language? The UI language is usually about who the user is from, not necessarily where the user is now. Timezone will match geolocation better.

The timezone may be more fitting than the language (of root). But a country selection option is the better option (IMHO).

The code as it is gets the adjacent countries to the detected country. So, if you are in Portugal, it would add Spain to the list of countries for mirrors. (Makes sense to me) Adding West African countries with the same timezone are slow to lookup, which the current code tries to prevent.

billyswong commented 1 month ago

@fedcab Timezone data is more than a number. Unless one set the timezone through specific terminal commands, what one can select through GUI is always pointing to a city in Linux Mint.

Therefore, there shall be no risk of Europe timezones getting Africa mirrors.

clefebvre commented 3 weeks ago

Fixed in 2.2.9.1 and 2.3.1.1.