Package: geoip-bin
Version: 1.6.12-4

I was trying out the fix for another issue, generating a fresh geoip-database package using the latest version of the tools (and lib and -dev).

It fails on interpreting the new (unofficial?) XK country code for Kosovo:

# Building geoip v4 country database.
/usr/lib/geoip/geoip-generator -v -4 \
--info="$(date -u +'GEO-106FREE %Y%m%d Build' -d 'Tue Sep 17 10:14:06 EDT 2019')" \
        -o /tmp/geoip-database-20190917/tmp/GeoIP.dat GeoIPCountryWhois.csv
/usr/lib/geoip/geoip-generator: Reading CSV and building the trie
/usr/lib/geoip/geoip-generator:GeoIPCountryWhois.csv:30816: Unrecognized country code: XK
make[1]: *** [debian/rules:16: override_dh_install] Error 65
make[1]: Leaving directory '/tmp/geoip-database-20190917'
make: *** [debian/rules:8: binary] Error 2

This seems odd to me, as the "Country-Locations" files do have the entry:

831053,en,EU,Europe,XK,Kosovo,0

/usr/share/geoip/countryInfo.txt from geoip-bin also contains the XK entry.

I assume geoip-csv-to-dat.cpp uses some other source for the country data that does not include it.

grepping out the handful of "831053" lines from GeoLite2-Country-Blocks-IPv4.csv allows the package to build.

Reply via email to