From b4e74efbf2d3f53bfbd8fa252d3618efa70eaf51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Wed, 24 Jul 2019 14:28:06 +0200 Subject: [PATCH] Enable GeoLite2 support Make GeoIP support controlled by bcond, defaults to off now. Instead enable GeoLite2 support. --- bind.spec | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/bind.spec b/bind.spec index eb71b48..c41b426 100644 --- a/bind.spec +++ b/bind.spec @@ -20,6 +20,10 @@ %bcond_without DNSTAP %bcond_without DLZ %bcond_without EXPORT_LIBS +# Legacy GeoIP support +%bcond_with GEOIP +# New MaxMind GeoLite support +%bcond_without GEOIP2 %if 0%{?fedora} >= 28 %bcond_without UNITTEST %else @@ -171,7 +175,7 @@ Requires(post): ((selinux-policy and selinux-policy-base) if (selinux-policy-tar Recommends: bind-utils bind-dnssec-utils BuildRequires: gcc, make BuildRequires: openssl-devel, libtool, autoconf, pkgconfig, libcap-devel -BuildRequires: libidn2-devel, libxml2-devel, GeoIP-devel +BuildRequires: libidn2-devel, libxml2-devel BuildRequires: systemd BuildRequires: selinux-policy # needed for %%{__python3} macro @@ -202,6 +206,12 @@ BuildRequires: lmdb-devel %if %{with JSON} BuildRequires: json-c-devel %endif +%if %{with GEOIP} +BuildRequires: GeoIP-devel +%endif +%if %{with GEOIP2} +BuildRequires: libmaxminddb-devel +%endif %if %{with DNSTAP} BuildRequires: fstrm-devel protobuf-c-devel %endif @@ -355,7 +365,7 @@ required for development with ISC BIND 9 %package lite-devel Summary: Lite version of header files and libraries needed for BIND DNS development Requires: bind-libs-lite%{?_isa} = %{epoch}:%{version}-%{release} -Requires: openssl-devel%{?_isa} GeoIP-devel%{?_isa} libxml2-devel%{?_isa} +Requires: openssl-devel%{?_isa} libxml2-devel%{?_isa} %if %{with GSSTSIG} Requires: krb5-devel%{?_isa} %endif @@ -368,6 +378,12 @@ Requires: json-c-devel%{?_isa} %if %{with DNSTAP} Requires: fstrm-devel%{?_isa} protobuf-c-devel%{?_isa} %endif +%if %{with GEOIP} +Requires: GeoIP-devel%{?_isa} +%endif +%if %{with GEOIP2} +Requires: libmaxminddb-devel%{?_isa} +%endif %description lite-devel The bind-lite-devel package contains lite version of the header @@ -623,9 +639,14 @@ export LIBDIR_SUFFIX --disable-static \ --includedir=%{_includedir}/bind9 \ --with-tuning=large \ - --with-geoip \ --with-libidn2 \ --enable-openssl-hash \ +%if %{with GEOIP} + --with-geoip \ +%endif +%if %{with GEOIP2} + --with-geoip2 \ +%endif %if %{with PKCS11} --enable-native-pkcs11 \ --with-pkcs11=%{_libdir}/pkcs11/libsofthsm2.so \ @@ -1518,6 +1539,7 @@ fi; %changelog * Wed Jul 24 2019 Petr Menšík - 32:9.11.9-1 - Update to 9.11.9 +- Add GeoLite2 support * Wed Jul 24 2019 Petr Menšík - 32:9.11.8-2 - Use monotonic time in export library (#1732883)