Use mysql_config for SDB variant
This commit is contained in:
parent
e42c700db9
commit
f2fb8b7545
|
@ -0,0 +1,93 @@
|
||||||
|
diff --git a/contrib/dlz/config.dlz.in b/contrib/dlz/config.dlz.in
|
||||||
|
index 9b1464c..d1fe16e 100644
|
||||||
|
--- a/contrib/dlz/config.dlz.in
|
||||||
|
+++ b/contrib/dlz/config.dlz.in
|
||||||
|
@@ -135,38 +135,48 @@ AC_ARG_WITH(dlz_mysql,
|
||||||
|
(Required to use MySQL with DLZ)],
|
||||||
|
use_dlz_mysql="$withval", use_dlz_mysql="no")
|
||||||
|
|
||||||
|
+AC_CHECK_PROGS(MYSQL_CONFIG, mysql_config)
|
||||||
|
+
|
||||||
|
mysql_include=""
|
||||||
|
mysql_lib=""
|
||||||
|
if test "$use_dlz_mysql" = "yes"
|
||||||
|
then
|
||||||
|
- # User did not specify a path - guess it
|
||||||
|
- mysqldirs="/usr /usr/local /usr/local/mysql /usr/pkg"
|
||||||
|
- for d in $mysqldirs
|
||||||
|
- do
|
||||||
|
- if test -f $d/include/mysql/mysql.h
|
||||||
|
- then
|
||||||
|
- use_dlz_mysql=$d
|
||||||
|
- mysql_include=$d/include/mysql
|
||||||
|
- if test -d $d/${target_lib}/mysql
|
||||||
|
+ if test -n "$MYSQL_CONFIG"
|
||||||
|
+ then
|
||||||
|
+ mysql_include=`${MYSQL_CONFIG} --include`
|
||||||
|
+ mysql_lib=`${MYSQL_CONFIG} --libs`
|
||||||
|
+ use_dlz_mysql="config"
|
||||||
|
+
|
||||||
|
+ else
|
||||||
|
+ # User did not specify a path - guess it
|
||||||
|
+ mysqldirs="/usr /usr/local /usr/local/mysql /usr/pkg"
|
||||||
|
+ for d in $mysqldirs
|
||||||
|
+ do
|
||||||
|
+ if test -f $d/include/mysql/mysql.h
|
||||||
|
then
|
||||||
|
- mysql_lib=$d/${target_lib}/mysql
|
||||||
|
- else
|
||||||
|
- mysql_lib=$d/lib
|
||||||
|
- fi
|
||||||
|
- break
|
||||||
|
- elif test -f $d/include/mysql.h
|
||||||
|
- then
|
||||||
|
- use_dlz_mysql=$d
|
||||||
|
- mysql_include=$d/include
|
||||||
|
- if test -d $d/lib/mysql
|
||||||
|
+ use_dlz_mysql=$d
|
||||||
|
+ mysql_include=$d/include/mysql
|
||||||
|
+ if test -d $d/${target_lib}/mysql
|
||||||
|
+ then
|
||||||
|
+ mysql_lib=$d/${target_lib}/mysql
|
||||||
|
+ else
|
||||||
|
+ mysql_lib=$d/lib
|
||||||
|
+ fi
|
||||||
|
+ break
|
||||||
|
+ elif test -f $d/include/mysql.h
|
||||||
|
then
|
||||||
|
- mysql_lib=$d/lib/mysql
|
||||||
|
- else
|
||||||
|
- mysql_lib=$d/lib
|
||||||
|
+ use_dlz_mysql=$d
|
||||||
|
+ mysql_include=$d/include
|
||||||
|
+ if test -d $d/lib/mysql
|
||||||
|
+ then
|
||||||
|
+ mysql_lib=$d/lib/mysql
|
||||||
|
+ else
|
||||||
|
+ mysql_lib=$d/lib
|
||||||
|
+ fi
|
||||||
|
+ break
|
||||||
|
fi
|
||||||
|
- break
|
||||||
|
- fi
|
||||||
|
- done
|
||||||
|
+ done
|
||||||
|
+ fi
|
||||||
|
elif test "$use_dlz_mysql" != "no"
|
||||||
|
then
|
||||||
|
d=$use_dlz_mysql
|
||||||
|
@@ -202,6 +212,14 @@ case "$use_dlz_mysql" in
|
||||||
|
no)
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
;;
|
||||||
|
+ config)
|
||||||
|
+ DLZ_ADD_DRIVER(MYSQL, dlz_mysql_driver,
|
||||||
|
+ [${mysql_include}],
|
||||||
|
+ [${mysql_lib}])
|
||||||
|
+
|
||||||
|
+ AC_MSG_RESULT(
|
||||||
|
+[using mysql with libs ${mysql_lib} and includes ${mysql_include}])
|
||||||
|
+ ;;
|
||||||
|
*)
|
||||||
|
DLZ_ADD_DRIVER(MYSQL, dlz_mysql_driver,
|
||||||
|
[-I${mysql_include}],
|
|
@ -25,7 +25,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
|
||||||
Name: bind
|
Name: bind
|
||||||
License: MPLv2.0
|
License: MPLv2.0
|
||||||
Version: 9.11.1
|
Version: 9.11.1
|
||||||
Release: 2%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
Release: 3%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
||||||
Epoch: 32
|
Epoch: 32
|
||||||
Url: http://www.isc.org/products/BIND/
|
Url: http://www.isc.org/products/BIND/
|
||||||
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot:%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
@ -81,6 +81,7 @@ Patch136:bind-9.10-dist-native-pkcs11.patch
|
||||||
Patch137:bind-9.10-use-of-strlcat.patch
|
Patch137:bind-9.10-use-of-strlcat.patch
|
||||||
Patch140:bind-9.11-rh1410433.patch
|
Patch140:bind-9.11-rh1410433.patch
|
||||||
Patch141:bind-9.11-rh1236087.patch
|
Patch141:bind-9.11-rh1236087.patch
|
||||||
|
Patch142: bind-9.11-dlz-mysql.patch
|
||||||
|
|
||||||
# SDB patches
|
# SDB patches
|
||||||
Patch11: bind-9.3.2b2-sdbsrc.patch
|
Patch11: bind-9.3.2b2-sdbsrc.patch
|
||||||
|
@ -112,7 +113,7 @@ BuildRequires: systemd
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-ply
|
BuildRequires: python3-ply
|
||||||
%if %{SDB}
|
%if %{SDB}
|
||||||
BuildRequires: openldap-devel, postgresql-devel, sqlite-devel, mysql-devel
|
BuildRequires: openldap-devel, postgresql-devel, sqlite-devel, mariadb-devel
|
||||||
BuildRequires: libdb-devel
|
BuildRequires: libdb-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{test}
|
%if %{test}
|
||||||
|
@ -322,6 +323,7 @@ This package provides a module which allows commands to be sent to rndc directly
|
||||||
%patch131 -p1 -b .multlib-conflict
|
%patch131 -p1 -b .multlib-conflict
|
||||||
%patch140 -p1 -b .rh1410433
|
%patch140 -p1 -b .rh1410433
|
||||||
%patch141 -p1 -b .rh1236087
|
%patch141 -p1 -b .rh1236087
|
||||||
|
%patch142 -p1 -b .mysql_config
|
||||||
|
|
||||||
%if %{PKCS11}
|
%if %{PKCS11}
|
||||||
cp -r bin/named{,-pkcs11}
|
cp -r bin/named{,-pkcs11}
|
||||||
|
@ -1024,6 +1026,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||||
%{python3_sitelib}/isc/__pycache__/*py*
|
%{python3_sitelib}/isc/__pycache__/*py*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 13 2017 Petr Menšík <pemensik@redhat.com> - 32:9.11.1-3.P3
|
||||||
|
- Use mysql_config for SDB variant, build against mariadb-devel
|
||||||
|
|
||||||
* Mon Jul 10 2017 Petr Menšík <pemensik@redhat.com> - 32:9.11.1-2.P3
|
* Mon Jul 10 2017 Petr Menšík <pemensik@redhat.com> - 32:9.11.1-2.P3
|
||||||
- Update to 9.11.1-P3
|
- Update to 9.11.1-P3
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue