Evebox GeoLite2-City.mmdb


(Mark Verlinde) #1

You can probably gues where i’m coming from, testing evebox on arm bla bla…
Look at it from the bright side and see as an kind of 2nd round QA :grinning:

While checking how evebox behaved noticed /etc grew about 25MB. This is the GeoLite2-City.mmdb.gz downloaded by a weekly cron.

Two topics puzzle me:

  • Is /etc the right location for a database? the (existing) /var/lib/evebox comes in to mind.

  • After reading the evebox.yaml.example: Are we sure evebox can make use of the unziped db? Did not find something in the evebox changelog.

disabled: false
# Path to the MaxMind database. This must be the version 2 database
# (http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz)
# File must be ungzipped.
# This is temporary, EveBox will eventually support downloading and
# updateing the geo database itself.
database: /etc/evebox/GeoLite2-City.mmdb

(Mark Verlinde) #2

To Answer myself:

the evebox.yaml.example needs a update…

Yes unfortunately only in it is in /etc/evebox

Looks like possible locations are hard coded, it can be seen in the same (attached) commit which makes reading a gzip possible:

 var DbLocations = []string{
+	"/etc/evebox/GeoLite2-City.mmdb.gz",

Personally i would prefer using existing /usr/share/GeoIP/GeoLite2-City.mmdb, the db needs to be unzip for this location.

How do others feel about this?

  1. leave it as it is, who cares where data is stored
  2. store it unziped it in /usr/share/GeoIP/
  3. or even a PR up stream to make it possible to reed it a zip form other locations to?

Testing (2) this right now and encountered no problems so far, even if its owned by root:root

(think nethserver-phonehome uses GeoIP) not true, GeoIP seems to be installed by default.

Testing (2)

(Mark Verlinde) #3

Done with my evaluation of evebox so bump this up once, i gues no one is as autistic as me in this mater Here is my last plea. :sunglasses:

Recap: variable data such as an GeoLite2-City.mmdb are misplaced in /etc

evebox reads this database happily from (by default existing) /usr/share/GeoIP/ if is it stored unziped.

If you wish I can make a PR.

(Giacomo Sanchietti) #4

Agree, /etc/ is not a good directory to store data.

@filippo_carletti what do you think? Should we go with the proposed fix?

(Filippo Carletti) #5

The patch seems good to me.

(Giacomo Sanchietti) #6

@mark_nl would you mind opening the PR?

(Mark Verlinde) #7

Yes, no problem

have one question which kept me from doing it already:
What is the appropriate name / comment for/in this “fixx-script”

Should I open a issue to reference to it before opening a PR?
ie nethserver-evebox-fixx-geoipdb-#xxxx ?

and remind us it can be safely removed after a few update cycles? ie

# Aug 2018 : fix #0000
# you can safely remove me after a few update cycles.
# remove db in /etc/evebox/

Or will you fix this administrative topics before the actual merge?

(Mark Verlinde) #8

Will reference to this an submit my PR

(Giacomo Sanchietti) #9


I just updated the PR by adding the reference to the issue in the first command in the form: