From cf42c42e506dd5817fd1692ae3e0384b58ce6fc6 Mon Sep 17 00:00:00 2001 From: Tomas Krizek Date: Feb 09 2017 14:44:51 +0000 Subject: Added named.conf API transformation to post action --- diff --git a/bind-dyndb-ldap.spec b/bind-dyndb-ldap.spec index 09d108d..4f57fb6 100644 --- a/bind-dyndb-ldap.spec +++ b/bind-dyndb-ldap.spec @@ -2,7 +2,7 @@ Name: bind-dyndb-ldap Version: 11.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: LDAP back-end plug-in for BIND Group: System Environment/Libraries @@ -45,16 +45,55 @@ rm %{buildroot}%{_libdir}/bind/ldap.la rm -r %{buildroot}%{_datadir}/doc/%{name} +%post # SELinux boolean named_write_master_zones has to be enabled # otherwise the plugin will not be able to write to /var/named. # This scriptlet enables the boolean after installation or upgrade. # SELinux is sensitive area so I want to inform user about the change. -%post if [ -x "/usr/sbin/setsebool" ] ; then echo "Enabling SELinux boolean named_write_master_zones" /usr/sbin/setsebool -P named_write_master_zones=1 || : fi +# 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 < - 11.0-2 +- Added named.conf transformation script as post action + * Thu Dec 15 2016 Tomas Krizek - 11.0-1 - Update to 11.0