Bug 258400 - net-mgmt/gnu-ipcalc: GeoIP info not displayed
Summary: net-mgmt/gnu-ipcalc: GeoIP info not displayed
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Emanuel Haupt
Depends on:
Reported: 2021-09-10 11:22 UTC by Rob LA LAU
Modified: 2021-09-10 17:22 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (ehaupt)

Fix hardcoded path to geoip db (1.53 KB, patch)
2021-09-10 16:37 UTC, Emanuel Haupt
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob LA LAU 2021-09-10 11:22:36 UTC

GeoIP information is not displayed. I guess this is because in the file ipcalc-maxmind.c the paths to the MaxMind databases are hardcoded as /usr/share/GeoIP, while `geoipupdate' on FreeBSD stores the databases in /usr/local/share/GeoIP.
See also /usr/local/etc/GeoIP.conf, which is part of net/geoipupdate.

Comment 1 Emanuel Haupt freebsd_committer 2021-09-10 16:37:53 UTC
Created attachment 227810 [details]
Fix hardcoded path to geoip db

Thanks again for the report. As I don't have an account, could you please test the attached patch? I'm also displaying a message on how to update the database. I've checked other ports and it seems to be the preferred way to handle this instead of registering it as a dependency.
Comment 2 Emanuel Haupt freebsd_committer 2021-09-10 17:02:44 UTC
I've just got myself an account and it seems to work as expected:

root@portjail:/usr/ports/net-mgmt/gnu-ipcalc # ipcalc -g

But I still appreciate your feedback :-)
Comment 3 Rob LA LAU 2021-09-10 17:06:46 UTC
Works like a charm.
Thanks again, Emanuel!
Comment 4 commit-hook freebsd_committer 2021-09-10 17:21:46 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1817b81260d995086bbb8dafed2b7a8b168a449d

commit 1817b81260d995086bbb8dafed2b7a8b168a449d
Author:     Emanuel Haupt <ehaupt@FreeBSD.org>
AuthorDate: 2021-09-10 16:32:39 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2021-09-10 16:32:39 +0000

    net-mgmt/gnu-ipcalc: Fix hardcoded path to geoip database

    PR:             258400
    Reported by:    freebsd@ohreally.nl

 net-mgmt/gnu-ipcalc/Makefile                   | 6 ++++++
 net-mgmt/gnu-ipcalc/files/pkg-message.in (new) | 8 ++++++++
 2 files changed, 14 insertions(+)
Comment 5 Emanuel Haupt freebsd_committer 2021-09-10 17:22:18 UTC
Committed, thanks Rob.