Re: Deprecated Perl support from Maxmind
| Newsgroups | gmane.mail.spam.spamassassin.general |
|---|---|
| Message-ID | <[email protected]> |
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.
>
> I created the file MaxMind/DB/Reader.pm in my @INC path, which creates a subclass named MaxMind::DB::Reader. I've been using this work around for months with SpamAssassin:
>
> use IP::Geolocation::MMDB;
> @MaxMind::DB::Reader::ISA = qw(IP::Geolocation::MMDB);
> 1;
>
> Patching GeoDB.pm is also trivial:
>
> --- a/lib/Mail/SpamAssassin/GeoDB.pm
> +++ b/lib/Mail/SpamAssassin/GeoDB.pm
> @@ -218,4 +218,7 @@ sub load_geoip2 {
> eval {
> require MaxMind::DB::Reader;
> + } or eval {
> + require IP::Geolocation::MMDB;
> + @MaxMind::DB::Reader::ISA = qw(IP::Geolocation::MMDB);
> } or do {
> my $err = $@;
>
I think it would be better to add proper support for IP:Geolocation::MMDB and later deprecate MaxMind::DB::Reader instead.
Cheers
Giovanni
> SpamAssassin's test suite requires more work. IP:Geolocation::MMDB works with Perl 5.16 and above. I'm struggling with SpamAssassin's tests on Windows though. IP::Geolocation::MMDB is an XS module and most Perl releases for Windows before 5.34 have issues with linker library paths and libraries that are linked in the wrong order. I am also going to release a new version of Alien::libmaxminddb, which doesn't depend on Alien::Build.
OpenPGP_signature.asc
(application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEqg3TnG6R3qYMxl94+r7qCYlyWOUFAmfRdFYFAwAAAAAACgkQ+r7qCYlyWOWL KxAAq3Fbw01l8xp5f6VZYwby7mZ0aqeZVrgapqoozzS+4kGdX2BGZrPxzj3Ahz6X38dbqk/vjk78 6W4i0PGzpgQtI3WXq/5GEhqJwDcKY8HQKcMQjQAVKJtOXMjUDIlQWsEXn5sP69G90oRzmH/aLE76 fkplSTKXlgkf/2grv+uuXS5DkhG5WnuFQQ56pQFoZkmwTb8PfZ+sAWgBTf5lNTM2wz4IHyFO3Fbh anBbERFJUsKVOBKbVK5i2GMRDONh9L3f2QFE4Z/lfz5PP8JSC1EP9z5IlXdL4H/F5z6oezZoYIRm vV95s0h+eseglOKEY4o4UpD9YNkwL+mJI7JCMG5wQyhAO4m9clBkALcKLF9tfu7tl8hPUNqVrDLg 1dWGl1DAQvKE36+oTZME3vv+/QWDwuL0oLMWK+TGHtqtm2/dmNovTqvkRFDl+DET1HBoyRoAIBUr bptvlONcjgfVB+6cmZ+ZgZuSoaINGHOgNGiU7j1mwN0KCYzaQl1xYCtdS1DIFOADTObse8IaGp+0 AxS40VUDwnafmQKCECxamqB8NS2uGSRkc8uG9EcfFC34JgWzEKWI2fW0Voff5oIwUh5D5c7qBptU 0Gqzj2rbbxY3QWcHgL1ls5RfNRnkc8PjoIUCSBp5wQzb0SBjQ8zXRMbPOaNldaRtNOJ7IeMmD8/s 8gE= =lCLP -----END PGP SIGNATURE-----