On 3/17/25 1:10 PM, Andreas Vögele wrote:
Giovanni Bechis wrote:On 3/11/25 2:51 PM, Andreas Vögele wrote:Philip Prindeville wrote:What are other people doing now that MaxMind has deprecated Perl support for their databases?I'm the author of IP:Geolocation::MMDB, which is an API-compatible replacement for MaxMind::DB::Reader. Packages are in Fedora, in SUSE's devel:languages:perl repository and hopefully soon in Debian. [...] Patching GeoDB.pm is also trivial: [...] + @MaxMind::DB::Reader::ISA = qw(IP::Geolocation::MMDB); [...]I think it would be better to add proper support for IP:Geolocation::MMDB and later deprecate MaxMind::DB::Reader instead.Proper support is needed for testing anyway. I'm testing SpamAssassin with the following patch: https://github.com/voegelas/spamassassin/commit/6a856743378af949f391d343e618bc5dedce169d?w=1&diff=split The patched SpamAssassin accepts IP::Geolocation::MMDB as a "geodb_module" option. Internally, "geoip2-mmdb" is passed to load_geoip2 in GeoDB.pm. If no module has been configured, load_geoip2 tries to load MaxMind::DB::Reader and then IP::Geolocation::MMDB. The files t/relaycountry.t and t/urilocalbl.t run the GeoIP2 tests with both modules. I've released new versions of IP::Geolocation::MMDB and Alien::libmaxminddb. Both modules now work with Perl 5.14. The dependency on Alien::Build is gone. From Perl 5.26 onward, only modules that are distributed with Perl are used. Older Perl versions need to update Math::BigInt, which is used for 128-bit integers. The operating system's libmaxminddb library is used if pkg-config and libmaxmindb-dev or libmaxminddb-devel are installed.
Thanks, could you open an improvement report on Bugzilla with your diff so that it can be tracked ? I will test your code soon. Thanks Giovanni
OpenPGP_signature.asc
Description: OpenPGP digital signature