Opened 11 months ago

Closed 2 days ago

Last modified 2 days ago

#36272 closed Cleanup/optimization (fixed)

[MacOS] geoip aka libgeoip disabled on 2024-12-12

Reported by: Felipe Villegas Owned by: SnippyCodes
Component: Documentation Version: 5.1
Severity: Normal Keywords: geoip, libgeoip, geodjango
Cc: Felipe Villegas, Jan Tumpa Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

While following the GeoDjango installation instructions for MacOS, I encountered the following error regarding libgeoip, an alternative name for geoip per the Homebrew Formulae page.

$ brew install libgeoip
Error: geoip has been disabled because it has an archived upstream repository! It was disabled on 2024-12-12.

Django Project Docs:
https://docs.djangoproject.com/en/5.1/ref/contrib/gis/install/#homebrew

Django Source:
https://github.com/django/django/blob/922c1c732a47c02aa5ef28b0b1a2bd9bc9b92d87/docs/ref/contrib/gis/install/index.txt#L272C6-L272C28

Related Blog Post:
https://blog.maxmind.com/2020/06/retirement-of-geoip-legacy-downloadable-databases-in-may-2022/

Change History (9)

comment:1 by Claude Paroz, 11 months ago

Summary: geoip aka libgeoip disabled on 2024-12-12[MacOS] geoip aka libgeoip disabled on 2024-12-12

comment:2 by Sarah Boyce, 11 months ago

Triage Stage: UnreviewedAccepted

comment:3 by Jan Tumpa, 10 months ago

Cc: Jan Tumpa added

What exactly are we trying to accomplish here, a change in the documentation or something else?

From my testing, the library can still be normally installed with MacPorts, so maybe that should be the recommended way?

Additionally, you _can_ install it using HomeBrew by using the --force flag, but AFAIK that installs it ignoring any exceptions that come up, which might not be the best thing to recommend.

Finally, perhaps installing from source could be the recommended way?

Even with all that, the repository is archived, so I'm not sure how to move forward with this issue?

comment:4 by Jon Culver, 3 weeks ago

Best I can tell, geoip (aliased as libgeoip) just referred to a C extension, which read the now-deprecated .dat database format, but that repo was archived in June 2022, when MaxMind retired the legacy databases. For modern use with MaxMind's newer .mmdb file format, the relevant library is libmaxminddb, which can be installed via Homebrew. However:

  1. It's just an optional performance optimization. The geoip2 Python package falls back to a pure Python implementation if the C library isn't found;
  2. geoip2 depends on the Python package maxminddb; which, most importantly:
  3. libmaxminddb is compiled on install of maxminddb unless you intentionally opt out. See setup.py.

TL/DR: A documentation change looks to be the right call here, just so folks don't run into that error. Removing brew install libgeoip seems the most pragmatic, since it's already included.

I had to type this out to keep all my thinking in order :) additional reads or clarifications certainly welcome.

comment:5 by SnippyCodes, 3 days ago

Has patch: set
Owner: set to SnippyCodes
Status: newassigned

comment:6 by Jacob Walls, 3 days ago

Patch needs improvement: set

comment:7 by Jacob Walls, 2 days ago

Component: GISDocumentation
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin
Type: BugCleanup/optimization

comment:8 by GitHub <noreply@…>, 2 days ago

Resolution: fixed
Status: assignedclosed

In 6c2436f:

Fixed #36272 -- Removed obsolete libgeoip from GeoDjango installation docs.

comment:9 by Jacob Walls <jacobtylerwalls@…>, 2 days ago

In 7bc9d39f:

[6.0.x] Fixed #36272 -- Removed obsolete libgeoip from GeoDjango installation docs.

Backport of 6c2436fa8671cd41c6a5841493142308cd9541c8 from main.

Note: See TracTickets for help on using tickets.
Back to Top