From f1028150504049a64b6c34c785c6a20e2a7ca76a Mon Sep 17 00:00:00 2001 From: Tomas Krizek Date: Feb 09 2017 12:15:53 +0000 Subject: Added named.conf API transformation script to spec A script that converts old-style configuration API of named.conf to the new-style API after rpm isntallation was added to contrib specfile. Required version of BIND was also bumped to 9.11. Reviewed-By: Martin Basti --- diff --git a/contrib/bind-dyndb-ldap.spec b/contrib/bind-dyndb-ldap.spec index 6f5b1f3..5f6621d 100644 --- a/contrib/bind-dyndb-ldap.spec +++ b/contrib/bind-dyndb-ldap.spec @@ -11,13 +11,13 @@ URL: https://fedorahosted.org/bind-dyndb-ldap Source0: https://fedorahosted.org/released/%{name}/%{name}-%{VERSION}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: bind-devel >= 32:9.9.0, bind-lite-devel >= 32:9.9.0 +BuildRequires: bind-devel >= 32:9.11.0-6.P2, bind-lite-devel >= 32:9.11.0-6.P2 BuildRequires: krb5-devel BuildRequires: openldap-devel BuildRequires: libuuid-devel BuildRequires: automake, autoconf, libtool -Requires: bind >= 32:9.9.0 +Requires: bind >= 32:9.11.0-6.P2 %description This package provides an LDAP back-end plug-in for BIND. It features @@ -42,6 +42,46 @@ mkdir -m 770 -p %{buildroot}/%{_localstatedir}/named/dyndb-ldap rm %{buildroot}%{_libdir}/bind/ldap.la rm -r %{buildroot}%{_datadir}/doc/%{name} +%post +# Transform named.conf if it still has old-style API. +PLATFORM=$(uname -m) + +if [ $PLATFORM == "x86_64" ] ; then + LIBPATH=/usr/lib64 +else + LIBPATH=/usr/lib +fi + +# The following sed script: +# - scopes the named.conf changes to dynamic-db +# - replaces arg "name value" syntax with name "value" +# - changes dynamic-db header to dyndb +# - uses the new way the define path to the library +# - removes no longer supported arguments (library, cache_ttl, +# psearch, serial_autoincrement, zone_refresh) +while read -r PATTERN +do + SEDSCRIPT+="$PATTERN" +done < +- Added named.conf API transofrmation script +- Bumped the required BIND version to 9.11.0-6.P2 + * Tue Jan 28 2014 Petr Spacek - package /var/named/dyndb-ldap directory