Commit b34f71b5 authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

powerdns: use GeoLite2-Country.mmdb as database

parent 8c68c69f
...@@ -11,6 +11,7 @@ extends = ...@@ -11,6 +11,7 @@ extends =
# For geoip backend # For geoip backend
# https://doc.powerdns.com/authoritative/backends/geoip.html # https://doc.powerdns.com/authoritative/backends/geoip.html
../geoip2/buildout.cfg
../yaml-cpp/buildout.cfg ../yaml-cpp/buildout.cfg
parts = parts =
...@@ -30,9 +31,9 @@ configure-options = ...@@ -30,9 +31,9 @@ configure-options =
--disable-lua-records --disable-lua-records
pkg_config_depends = ${yaml-cpp:location}/lib/pkgconfig pkg_config_depends = ${yaml-cpp:location}/lib/pkgconfig
environment = environment =
PATH=${autoconf:location}/bin:${automake:location}/bin:${libtool:location}/bin:${make:location}/bin:${pkgconfig:location}/bin:%(PATH)s PATH=${autoconf:location}/bin:${automake:location}/bin:${libmaxminddb:location}/bin:${libtool:location}/bin:${make:location}/bin:${pkgconfig:location}/bin:%(PATH)s
LDFLAGS=-L${boost-lib:location}/lib -Wl,-rpath=${boost-lib:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${yaml-cpp:location}/lib -Wl,-rpath=${yaml-cpp:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib LDFLAGS=-L${boost-lib:location}/lib -Wl,-rpath=${boost-lib:location}/lib -L${libmaxminddb:location}/lib -Wl,-rpath=${libmaxminddb:location}/lib -L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${yaml-cpp:location}/lib -Wl,-rpath=${yaml-cpp:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib
CPPFLAGS=-I${boost-lib:location}/include -I${yaml-cpp:location}/include CPPFLAGS=-I${boost-lib:location}/include -I${libmaxminddb:location}/include -I${yaml-cpp:location}/include
PKG_CONFIG_PATH=${:pkg_config_depends} PKG_CONFIG_PATH=${:pkg_config_depends}
# XXX: Override the default value "-Llib -lyaml-cpp"; "-Llib" is a problem # XXX: Override the default value "-Llib -lyaml-cpp"; "-Llib" is a problem
YAML_LIBS = -lyaml-cpp YAML_LIBS = -lyaml-cpp
......
...@@ -18,11 +18,11 @@ md5sum = 863fdbee998fd4f69fe359667768e33c ...@@ -18,11 +18,11 @@ md5sum = 863fdbee998fd4f69fe359667768e33c
[template-powerdns] [template-powerdns]
filename = instance-powerdns.cfg filename = instance-powerdns.cfg
md5sum = 681cd9564e491d1f7b7ccb810f8ca7df md5sum = 708e52e8161d64e6d826c630cfa70d5c
[template-pdns-configuration] [template-pdns-configuration]
_update_hash_filename_ = template/pdns.conf.jinja2 _update_hash_filename_ = template/pdns.conf.jinja2
md5sum = 7934b7037344678eff3031e1e73e0bb2 md5sum = 8f3e1bd21480f5e9d8cefa33d4527516
[template-dns-replicate] [template-dns-replicate]
_update_hash_filename_ = instance-powerdns-replicate.cfg.jinja2 _update_hash_filename_ = instance-powerdns-replicate.cfg.jinja2
......
...@@ -65,6 +65,7 @@ webserver-port = 8088 ...@@ -65,6 +65,7 @@ webserver-port = 8088
[geo] [geo]
ip-map-zonefile = ${iso-list:target} ip-map-zonefile = ${iso-list:target}
geo-maps = $${pdns-directory:geo-maps} geo-maps = $${pdns-directory:geo-maps}
database = ${geolite2-country:location}/GeoLite2-Country.mmdb
[pdns-directory] [pdns-directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
......
...@@ -88,4 +88,6 @@ geo-ip-map-zonefile={{ geo.get('ip-map-zonefile') }} ...@@ -88,4 +88,6 @@ geo-ip-map-zonefile={{ geo.get('ip-map-zonefile') }}
# assume you chose a directory. # assume you chose a directory.
geo-maps={{ geo.get('geo-maps') }} geo-maps={{ geo.get('geo-maps') }}
geoip-database-files={{ geo['database'] }}
# ------------------------------------------------------------------------- # -------------------------------------------------------------------------
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment