tor/scripts/maint/geoip
Micah Elizabeth Scott 824e9c6e16 cargo: Move lockfile to root and update
Change 3f66ff9b00 added geoip-db-tool to
the main workspace, so it's no longer using a local lockfile. Move its
lock to the crate root, remove from gitignore, and update it.

(We could also choose to not keep the lockfiles checked in, but it seems
useful to have them in our test and maintenance tooling here.)
2023-08-15 09:52:30 -07:00
..
geoip-db-tool cargo: Move lockfile to root and update 2023-08-15 09:52:30 -07:00
README.geoip Rust tool to convert IPFire Location dump into CSV format. 2021-02-22 12:25:18 -05:00
update_and_commit_geoip.sh script to generate a commit for an updated geoip file 2021-02-22 12:41:03 -05:00
update_geoip.sh geoip: Fix cargo target directory 2023-08-04 10:04:36 -04:00

To generate new geoip files, you'll need to install the
libloc/"location" tool provided by https://location.ipfire.org/.
I personally build it with:

  ./configure CFLAGS='-g -O2' --disable-perl --without-systemd --prefix=/opt/libloc
  make
  make install

Then (after adjusting PATH and PYTHONPATH) you can get the latest
dump with:

  location update
  location dump geoip-dump.txt

And transform it into geoip files with

  cargo run --release -- -i geoip-dump.txt


==============================

Note that the current version "0.1.9" of rangemap has a performance
bug, making this tool quite slow.  Previous versions had a
correctness bug that made the output needlessly long.  With luck,
there will soon be a fast correct rangemap version.