Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DefaultDatabaseDirectory changed behaviour #222

Closed
dugwood opened this issue Apr 15, 2023 · 1 comment · Fixed by #223
Closed

DefaultDatabaseDirectory changed behaviour #222

dugwood opened this issue Apr 15, 2023 · 1 comment · Fixed by #223

Comments

@dugwood
Copy link

dugwood commented Apr 15, 2023

I've upgraded to 5.x but database has changed its location compared to 4.x. I'm under Linux Debian (stable).

I can see that DefaultDatabaseDirectory has always been /usr/local/share/GeoIP, even for 4.x: https://github.com/maxmind/geoipupdate/blob/v4.11.1/pkg/geoipupdate/defaults_notwin.go#L15

Running install for 4.x:

dpkg -i geoipupdate_4.11.1_linux_amd64.deb
[...]
geoipupdate version 4.11.1
Using config file /etc/GeoIP.conf
Using database directory /usr/share/GeoIP

Switching to 5.x (/etc/GeoIP.conf is exactly the same as for 4.x):

dpkg -i geoipupdate_5.0.2_linux_amd64.deb
[...]
geoipupdate version 5.0.2
Using config file /etc/GeoIP.conf
Using database directory /usr/local/share/GeoIP

Of course you can guess that my configuration has:
# The directory to store the database files. Defaults to /usr/share/GeoIP
# DatabaseDirectory /usr/share/GeoIP

As it's commented out, the default directory changed. As it always have been set to /usr/local/share (in the source code) but in fact used /usr/share when run, to me it's a major change.

I don't know why it happens, perhaps it's in the configuration of the package.

Of course the fix (in my case) is to declare the DatabaseDirectory in /etc/GeoIP.conf

@oschwald
Copy link
Member

Thank you for reporting this. This was an unintentional change that broke how the default database directory is set for the rpm and deb builds. I have released 5.0.3 with a fix.

oschwald added a commit that referenced this issue Apr 15, 2023
5.0.3

* On 5.0.0 through 5.0.2, the default database directory was not being
  correctly set for Debian and RPM package builds. The directory
  `/usr/local/share/GeoIP` was being used rather than `/usr/share/GeoIP`.
  This build restores `/usr/share/GeoIP` as the default directory for
  these builds. Reported by Yvan. GitHub #222.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants