Message ID | 1403015963-27278-1-git-send-email-gustavo@zacarias.com.ar |
---|---|
State | Accepted |
Headers | show |
Dear Gustavo Zacarias, On Tue, 17 Jun 2014 11:39:22 -0300, Gustavo Zacarias wrote: > Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> > --- > package/Config.in | 1 + > package/geoip/Config.in | 11 +++++++++++ > package/geoip/geoip.mk | 15 +++++++++++++++ > 3 files changed, 27 insertions(+) > create mode 100644 package/geoip/Config.in > create mode 100644 package/geoip/geoip.mk Thanks, applied. One comment below. > + GeoIP is a C library that enables the user to find geographical > + and network information of an IP address. > + To use this library, you need to download MaxMind's free GeoLite or > + commercial GeoIP binary databases into the target's /usr/share/GeoIP > + directory in uncompressed form. Wouldn't it make sense to create a package for the free database, so that GeoIP can be useful out of the box? Thanks! Thomas
On 06/22/2014 04:54 PM, Thomas Petazzoni wrote: >> + GeoIP is a C library that enables the user to find geographical >> + and network information of an IP address. >> + To use this library, you need to download MaxMind's free GeoLite or >> + commercial GeoIP binary databases into the target's /usr/share/GeoIP >> + directory in uncompressed form. > > Wouldn't it make sense to create a package for the free database, so > that GeoIP can be useful out of the box? As the current infra is right now, not really, even with fixes i wouldn't go for it. That's because the tarball naming is fixed (no hash, timestamp or anything) and they change at least daily, so an old sources.buildroot.net copy/mirror could be really old. Even if we can say "don't mirror it" the same can happen to people with their local copy. Regards.
Gustavo, All, On 2014-06-22 19:34 -0300, Gustavo Zacarias spake thusly: > On 06/22/2014 04:54 PM, Thomas Petazzoni wrote: > > >> + GeoIP is a C library that enables the user to find geographical > >> + and network information of an IP address. > >> + To use this library, you need to download MaxMind's free GeoLite or > >> + commercial GeoIP binary databases into the target's /usr/share/GeoIP > >> + directory in uncompressed form. > > > > Wouldn't it make sense to create a package for the free database, so > > that GeoIP can be useful out of the box? > > As the current infra is right now, not really, even with fixes i > wouldn't go for it. > That's because the tarball naming is fixed (no hash, timestamp or > anything) and they change at least daily, so an old > sources.buildroot.net copy/mirror could be really old. > Even if we can say "don't mirror it" the same can happen to people with > their local copy. Then would it make sense to package geoipudate instead, either or both as a target and/or a host package: https://github.com/maxmind/geoipupdate The GeoIP Update program performs automatic updates of GeoIP2 and GeoIP Legacy binary databases. That way, the user can get it with a post-build script, and/or a cron-like job on the target, to be up-to-date. Regards, Yann E. MORIN.
On 06/22/2014 07:40 PM, Yann E. MORIN wrote: > Then would it make sense to package geoipudate instead, either or both > as a target and/or a host package: > https://github.com/maxmind/geoipupdate > > The GeoIP Update program performs automatic updates of GeoIP2 and > GeoIP Legacy binary databases. > > That way, the user can get it with a post-build script, and/or a > cron-like job on the target, to be up-to-date. Geoipupdate is for commercial users AFAIK, i have no such access/account to test the package. You need to configure a maxmind user/password to make it work, it's not an out-of-the-box experience. Someone who has might be interested to make it though. Regards.
Gustavo, All, On 2014-06-22 19:47 -0300, Gustavo Zacarias spake thusly: > On 06/22/2014 07:40 PM, Yann E. MORIN wrote: > > Then would it make sense to package geoipudate instead, either or both > > as a target and/or a host package: > > https://github.com/maxmind/geoipupdate > > > > The GeoIP Update program performs automatic updates of GeoIP2 and > > GeoIP Legacy binary databases. > > > > That way, the user can get it with a post-build script, and/or a > > cron-like job on the target, to be up-to-date. > > Geoipupdate is for commercial users AFAIK, i have no such access/account > to test the package. You need to configure a maxmind user/password to > make it work, it's not an out-of-the-box experience. Well, I don't see where the problem lies. There's nothing that prevents us from packaging geoipupdate, even if it requires a runtime configuration with a login+password. That's basically the same as for a webserver: we do package more than one webserver, but the user is still responsible for providing the content of the server-root. > Someone who has might be interested to make it though. I agree with you on that. ;-) Regards, Yann E. MORIN.
On 06/23/2014 01:38 PM, Yann E. MORIN wrote: >> Geoipupdate is for commercial users AFAIK, i have no such access/account >> to test the package. You need to configure a maxmind user/password to >> make it work, it's not an out-of-the-box experience. > > Well, I don't see where the problem lies. There's nothing that prevents > us from packaging geoipupdate, even if it requires a runtime > configuration with a login+password. > > That's basically the same as for a webserver: we do package more than > one webserver, but the user is still responsible for providing the > content of the server-root. I disagree a bit there, but then people are free to do what they like, like shipping a probably toughly-licensed user/pass combination in plaintext in a firmware which someone else can pick up and use let's say in shady terms :) It's mostly intended for servers where access is restricted and that wouldn't happen normally. >> Someone who has might be interested to make it though. > > I agree with you on that. ;-) I like to test new packages a bit, and getting the help just doesn't feel like a proper test, hence my reluctance ;) Regards.
diff --git a/package/Config.in b/package/Config.in index 9231c45..d9bd23d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -719,6 +719,7 @@ menu "Networking" source "package/czmq/Config.in" source "package/filemq/Config.in" source "package/fmlib/Config.in" + source "package/geoip/Config.in" source "package/glib-networking/Config.in" source "package/libcgi/Config.in" source "package/libcgicc/Config.in" diff --git a/package/geoip/Config.in b/package/geoip/Config.in new file mode 100644 index 0000000..a198a31 --- /dev/null +++ b/package/geoip/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_GEOIP + bool "geoip" + help + GeoIP is a C library that enables the user to find geographical + and network information of an IP address. + To use this library, you need to download MaxMind's free GeoLite or + commercial GeoIP binary databases into the target's /usr/share/GeoIP + directory in uncompressed form. + Note that GeoIP2 / GeoLite2 are not supported by this library. + + https://github.com/maxmind/geoip-api-c diff --git a/package/geoip/geoip.mk b/package/geoip/geoip.mk new file mode 100644 index 0000000..fde07cb --- /dev/null +++ b/package/geoip/geoip.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# geoip +# +################################################################################ + +GEOIP_VERSION = 1.6.0 +GEOIP_SOURCE = GeoIP-$(GEOIP_VERSION).tar.gz +GEOIP_SITE = $(call github,maxmind,geoip-api-c,v$(GEOIP_VERSION)) +GEOIP_AUTORECONF = YES +GEOIP_INSTALL_STAGING = YES +GEOIP_LICENSE = LGPLv2.1+ +GEOIP_LICENSE_FILES = COPYING + +$(eval $(autotools-package))
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> --- package/Config.in | 1 + package/geoip/Config.in | 11 +++++++++++ package/geoip/geoip.mk | 15 +++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 package/geoip/Config.in create mode 100644 package/geoip/geoip.mk