Disable Berkeley DB support (#1779190)

Allow enabling it by build --with BDB, but keep it disabled by default.
This commit is contained in:
Petr Menšík 2019-12-03 17:52:44 +01:00
parent c44ebdeade
commit ccf1b03734

View File

@ -20,6 +20,7 @@
%bcond_without JSON
%bcond_without DNSTAP
%bcond_without DLZ
%bcond_with BDB
%bcond_with EXPORT_LIBS
# Legacy GeoIP support
%bcond_with GEOIP
@ -62,7 +63,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: MPLv2.0
Version: 9.11.13
Release: 3%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
Release: 4%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
Epoch: 32
Url: https://www.isc.org/downloads/bind/
#
@ -206,6 +207,8 @@ BuildRequires: findutils sed
BuildRequires: gnupg2
%if %{with SDB}
BuildRequires: openldap-devel, libpq-devel, sqlite-devel, mariadb-connector-c-devel
%endif
%if %{with BDB}
BuildRequires: libdb-devel
%endif
%if %{with UNITTEST}
@ -437,6 +440,7 @@ Based on the code from Jan "Yenya" Kasprzak <kas@fi.muni.cz>
%if %{with DLZ}
%if %{with BDB}
%package dlz-bdb
Summary: BIND server bdb DLZ module
Requires: bind%{?_isa} = %{epoch}:%{version}-%{release}
@ -444,6 +448,10 @@ Requires: bind%{?_isa} = %{epoch}:%{version}-%{release}
%description dlz-bdb
Dynamic Loadable Zones Berkeley DB module for BIND server.
%end
%endif
%package dlz-filesystem
Summary: BIND server filesystem DLZ module
Requires: bind%{?_isa} = %{epoch}:%{version}-%{release}
@ -685,9 +693,8 @@ export LIBDIR_SUFFIX
--with-dlz-postgres=yes \
--with-dlz-mysql=yes \
--with-dlz-filesystem=yes \
--with-dlz-bdb=yes \
%endif
%if %{with DLZ}
%if %{with BDB}
--with-dlz-bdb=yes \
%endif
%if %{with GSSTSIG}
@ -740,14 +747,19 @@ popd
%if %{with DLZ}
pushd contrib/dlz
pushd modules
for DIR in filesystem ldap mysql mysqldyn sqlite3; do
make -C $DIR CFLAGS="-fPIC -I../include $CFLAGS $LDFLAGS"
done
popd
%if %{with BDB}
pushd bin/dlzbdb
make
popd
pushd modules
for DIR in bdbhpt filesystem ldap mysql mysqldyn sqlite3; do
make -C $DIR CFLAGS="-fPIC -I../include $CFLAGS $LDFLAGS"
done
make -C bdbhpt CFLAGS="-fPIC -I../include $CFLAGS $LDFLAGS"
popd
%endif
popd
%endif
popd # build
@ -988,15 +1000,20 @@ install -m 644 %{SOURCE12} contrib/sdb/pgsql/
%if %{with DLZ}
pushd build
pushd contrib/dlz
pushd bin/dlzbdb
make DESTDIR=${RPM_BUILD_ROOT} install
popd
pushd modules
for DIR in bdbhpt filesystem ldap mysql mysqldyn sqlite3; do
for DIR in filesystem ldap mysql mysqldyn sqlite3; do
make -C $DIR DESTDIR=${RPM_BUILD_ROOT} libdir=%{_libdir}/bind install
done
mv mysqldyn/testing/README mysqldyn/testing/README.testing
%if %{with BDB}
make -C bdbhpt DESTDIR=${RPM_BUILD_ROOT} libdir=%{_libdir}/bind install
%endif
popd
%if %{with BDB}
pushd bin/dlzbdb
make DESTDIR=${RPM_BUILD_ROOT} install
popd
%endif
popd
popd
%endif
@ -1545,13 +1562,16 @@ fi;
%{_bindir}/bind9-export-config
%endif
%if %{with DLZ}
%if %{with DLZ} && %{with BDB}
%files dlz-bdb
%{_sbindir}/dlzbdb
%{_libdir}/bind/dlz_bdbhpt_dynamic.so
%doc contrib/dlz/modules/bdbhpt/testing/*
%doc contrib/dlz/modules/bdbhpt/README*
%endif
%if %{with DLZ}
%files dlz-filesystem
%{_libdir}/bind/dlz_filesystem_dynamic.so
@ -1580,6 +1600,9 @@ fi;
%changelog
* Tue Dec 03 2019 Petr Menšík <pemensik@redhat.com> - 32:9.11.13-4
- Disable Berkeley DB support (#1779190)
* Mon Dec 02 2019 Petr Menšík <pemensik@redhat.com> - 32:9.11.13-3
- Backport few thread safety related fixed from upstream (#1736762)