fix bug 186577 - libbind.pc, more .spec file cleanup; add sample

configuration files to %doc; rebuild for new gcc and glibc
This commit is contained in:
jvdias 2006-03-30 00:35:52 +00:00
parent 99e330ef2a
commit 781dfac42c

230
bind.spec
View File

@ -17,7 +17,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind Name: bind
License: BSD-like License: BSD-like
Version: 9.3.2 Version: 9.3.2
Release: 12.FC6 Release: 14.FC6
Epoch: 30 Epoch: 30
Url: http://www.isc.org/products/BIND/ Url: http://www.isc.org/products/BIND/
Buildroot: %{_tmppath}/%{name}-root Buildroot: %{_tmppath}/%{name}-root
@ -84,26 +84,24 @@ Patch27: bind-9.3.1-dbus_restart.patch
Patch28: bind-9.3.2rc1-dbus-0.6.patch Patch28: bind-9.3.2rc1-dbus-0.6.patch
Patch29: bind-9.3.2-bz177854.patch Patch29: bind-9.3.2-bz177854.patch
# #
Requires: bind-libs = %{epoch}:%{version}-%{release}, glibc >= 2.2 Requires: bind-libs = %{epoch}:%{version}-%{release}, glibc >= 2.2
Requires(post): bash, textutils, fileutils, sed, grep Requires(post): bash, coreutils, sed, grep, chkconfig >= 1.3.26
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(post,preun): chkconfig >= 1.3.26 Requires(preun):chkconfig >= 1.3.26
%if %{selinux} %if %{selinux}
Requires(post): policycoreutils Requires(post): policycoreutils
%endif %endif
BuildRequires: gcc, glibc-devel >= 2.2.5-26, glibc-kernheaders >= 2.4-7.10, openssl-devel, libtool, pkgconfig, tar
%if %{SDB} %if %{SDB}
BuildRequires: openldap-devel, postgresql-devel
%endif
%if %{WITH_DBUS} %if %{WITH_DBUS}
BuildRequires: openssl-devel gcc dbus-devel glibc-devel >= 2.2.5-26 glibc-kernheaders >= 2.4-7.10 libtool pkgconfig tar openldap-devel postgresql-devel BuildRequires: dbus-devel
%else
BuildRequires: openssl-devel gcc glibc-devel >= 2.2.5-26 glibc-kernheaders >= 2.4-7.10 libtool pkgconfig tar openldap-devel postgresql-devel
%endif
%else
%if %{WITH_DBUS}
BuildRequires: openssl-devel gcc dbus-devel glibc-devel >= 2.2.5-26 glibc-kernheaders >= 2.4-7.10 libtool pkgconfig tar
%else
BuildRequires: openssl-devel gcc glibc-devel >= 2.2.5-26 glibc-kernheaders >= 2.4-7.10 libtool pkgconfig tar
%endif %endif
%if %{test}
BuildRequires: net-tools, perl
%endif %endif
#
# fix bug 176100: do not Require: perl just for namedGetForwarders ! # fix bug 176100: do not Require: perl just for namedGetForwarders !
%define __perl_requires %SOURCE15 %define __perl_requires %SOURCE15
%define __find_requires %SOURCE15 %define __find_requires %SOURCE15
@ -119,7 +117,7 @@ tools for verifying that the DNS server is operating properly.
%package libs %package libs
Summary: Libraries used by various DNS packages Summary: Libraries used by the BIND DNS packages
Group: Applications/System Group: Applications/System
%description libs %description libs
@ -143,14 +141,13 @@ servers.
%package devel %package devel
Summary: Include files and libraries needed for bind DNS development. Summary: Header files and libraries needed for BIND DNS development.
Group: Development/Libraries Group: Development/Libraries
Requires: bind-libs = %{epoch}:%{version}-%{release} Requires: bind-libs = %{epoch}:%{version}-%{release}
%description devel %description devel
The bind-devel package contains all the include files and the library The bind-devel package contains all the header files and libraries
required for DNS (Domain Name System) development for BIND versions required for DNS (Domain Name System) development with ISC BIND 9.x.x.
9.x.x.
%package config %package config
@ -159,7 +156,8 @@ Group: System Environment/Daemons
Obsoletes: caching-nameserver Obsoletes: caching-nameserver
Provides: caching-nameserver Provides: caching-nameserver
Requires: bind = %{epoch}:%{version}-%{release} Requires: bind = %{epoch}:%{version}-%{release}
Requires(post): bash, textutils, fileutils, sed, grep Requires(post): bash, coreutils, sed, grep
Requires(postun): bash, coreutils, sed, grep
%if %{selinux} %if %{selinux}
Requires(post): policycoreutils Requires(post): policycoreutils
%endif %endif
@ -181,7 +179,8 @@ Summary: A chroot runtime environment for the ISC BIND DNS server, named(8)
Group: System Environment/Daemons Group: System Environment/Daemons
Prefix: %{chroot_prefix} Prefix: %{chroot_prefix}
Requires: bind = %{epoch}:%{version}-%{release} Requires: bind = %{epoch}:%{version}-%{release}
Requires(post): bash, textutils, fileutils, sed, grep Requires(post): bash, coreutils, sed, grep
Requires(preun): bash, coreutils, sed, grep
%if %{selinux} %if %{selinux}
Requires(post): policycoreutils Requires(post): policycoreutils
%endif %endif
@ -213,7 +212,8 @@ necessary to develop software that uses it.
Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server with database backends. Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) server with database backends.
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: bind-libs = %{epoch}:%{version}-%{release}, bind-utils = %{epoch}:%{version}-%{release}, glibc >= 2.2 Requires: bind-libs = %{epoch}:%{version}-%{release}, bind-utils = %{epoch}:%{version}-%{release}, glibc >= 2.2
Requires(post): bash, textutils, fileutils, sed, grep, mktemp Requires(post): bash, coreutils, sed, grep, mktemp
Requires(preun): bash, coreutils, sed, grep
%if %{selinux} %if %{selinux}
Requires(post): policycoreutils Requires(post): policycoreutils
%endif %endif
@ -315,12 +315,18 @@ cp -fp bin/named/{dbus_mgr.c,dbus_service.c,log.c,server.c} bin/named_sdb
cp -fp bin/named/include/named/{dbus_mgr.h,dbus_service.h,globals.h,server.h,log.h,types.h} bin/named_sdb/include/named cp -fp bin/named/include/named/{dbus_mgr.h,dbus_service.h,globals.h,server.h,log.h,types.h} bin/named_sdb/include/named
%endif %endif
%endif %endif
:;
%build %build
libtoolize --copy --force; aclocal; autoconf libtoolize --copy --force; aclocal; autoconf
cp -f /usr/share/libtool/config.{guess,sub} . cp -f /usr/share/libtool/config.{guess,sub} .
export CFLAGS="$RPM_OPT_FLAGS" %if %{DEBUGINFO}
export CFLAGS="$RPM_OPT_FLAGS";
%else
export CFLAGS=`echo $RPM_OPT_FLAGS | sed 's/-O2 -g/-g3 -gdwarf-2/g'`;
%endif
export CPPFLAGS="$CFLAGS";
%if %{WITH_DBUS} %if %{WITH_DBUS}
%ifarch s390x x86_64 ppc64 %ifarch s390x x86_64 ppc64
# every 64-bit arch EXCEPT ia64 has dbus architecture dependant # every 64-bit arch EXCEPT ia64 has dbus architecture dependant
@ -333,28 +339,22 @@ if pkg-config openssl ; then
export CPPFLAGS="$CPPFLAGS `pkg-config --cflags-only-I openssl`" export CPPFLAGS="$CPPFLAGS `pkg-config --cflags-only-I openssl`"
export LDFLAGS="$LDFLAGS `pkg-config --libs-only-L openssl`" export LDFLAGS="$LDFLAGS `pkg-config --libs-only-L openssl`"
fi fi
#export CFLAGS="-g $CFLAGS"
%if %{efence} %if %{efence}
export LDFLAGS=-lefence export LDFLAGS=-lefence
%endif %endif
%if %{LIBBIND} %configure \
%configure --with-libtool --localstatedir=/var \ --with-libtool \
--localstatedir=/var \
--enable-threads \ --enable-threads \
--enable-ipv6 \ --enable-ipv6 \
--with-pic \ --with-pic \
--with-openssl=/usr \ --with-openssl=/usr \
--enable-libbind %if %{LIBBIND}
%else --enable-libbind \
%configure --with-libtool --localstatedir=/var \
--enable-threads \
--enable-ipv6 \
--with-pic \
--with-openssl=/usr
%endif %endif
CFLAGS="$CFLAGS" \
;
make %{?_smp_mflags} make %{?_smp_mflags}
if [ $? -ne 0 ]; then
exit $?;
fi;
%if !%{DEBUGINFO} %if !%{DEBUGINFO}
@ -362,7 +362,7 @@ fi;
%endif %endif
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf ${RPM_BUILD_ROOT}
cp %{SOURCE5} doc/rfc cp %{SOURCE5} doc/rfc
gzip -9 doc/rfc/* gzip -9 doc/rfc/*
mkdir -p ${RPM_BUILD_ROOT}/etc/{rc.d/init.d,logrotate.d} mkdir -p ${RPM_BUILD_ROOT}/etc/{rc.d/init.d,logrotate.d}
@ -383,40 +383,32 @@ touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/etc/rndc.key
touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/dev/null touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/dev/null
touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/dev/random touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/dev/random
#end chroot #end chroot
make DESTDIR=$RPM_BUILD_ROOT install make DESTDIR=${RPM_BUILD_ROOT} install
install -c -m 640 bin/rndc/rndc.conf $RPM_BUILD_ROOT%{_sysconfdir} touch ${RPM_BUILD_ROOT}%{_sysconfdir}/rndc.conf
install -c -m 755 contrib/named-bootconf/named-bootconf.sh $RPM_BUILD_ROOT%{_sbindir}/named-bootconf install -c -m 755 contrib/named-bootconf/named-bootconf.sh ${RPM_BUILD_ROOT}%{_sbindir}/named-bootconf
install -c -m 755 %SOURCE2 $RPM_BUILD_ROOT/etc/rc.d/init.d/named install -c -m 755 %SOURCE2 ${RPM_BUILD_ROOT}/etc/rc.d/init.d/named
install -c -m 644 %SOURCE3 $RPM_BUILD_ROOT/etc/logrotate.d/named install -c -m 644 %SOURCE3 ${RPM_BUILD_ROOT}/etc/logrotate.d/named
touch $RPM_BUILD_ROOT%{_sysconfdir}/rndc.key touch ${RPM_BUILD_ROOT}%{_sysconfdir}/rndc.key
cat << __EOF > $RPM_BUILD_ROOT%{_sysconfdir}/rndc.key %{__cc} $RPM_OPT_FLAGS -o ${RPM_BUILD_ROOT}%{_sbindir}/dns-keygen %{SOURCE4}
key "rndckey" { mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig
algorithm hmac-md5; cp %{SOURCE1} ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/named
secret "@KEY@";
};
__EOF
%{__cc} $RPM_OPT_FLAGS -o $RPM_BUILD_ROOT%{_sbindir}/dns-keygen %{SOURCE4}
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
cp %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/named
#mv $RPM_BUILD_ROOT/usr/share/man/man8/named.conf.* $RPM_BUILD_ROOT/usr/share/man/man5
%if %{SDB} %if %{SDB}
mkdir -p $RPM_BUILD_ROOT/etc/openldap/schema mkdir -p ${RPM_BUILD_ROOT}/etc/openldap/schema
install -c -m 644 %{SOURCE8} $RPM_BUILD_ROOT/etc/openldap/schema/dnszone.schema install -c -m 644 %{SOURCE8} ${RPM_BUILD_ROOT}/etc/openldap/schema/dnszone.schema
cp -fp %{SOURCE12} contrib/sdb/pgsql/ cp -fp %{SOURCE12} contrib/sdb/pgsql/
%endif %endif
%if %{LIBBIND} %if %{LIBBIND}
gunzip < %{SOURCE9} | (cd $RPM_BUILD_ROOT/usr/share; tar -xpf -) gunzip < %{SOURCE9} | (cd ${RPM_BUILD_ROOT}/usr/share; tar -xpf -)
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig mkdir -p ${RPM_BUILD_ROOT}/%{_libdir}/pkgconfig
cp -fp %{SOURCE28} $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libbind.pc install -m 644 %{SOURCE28} $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libbind.pc
chmod 644 $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libbind.pc
%endif %endif
%if %{WITH_DBUS} %if %{WITH_DBUS}
mkdir -p $RPM_BUILD_ROOT/etc/dbus-1/system.d mkdir -p ${RPM_BUILD_ROOT}/etc/dbus-1/system.d
mkdir -p $RPM_BUILD_ROOT/usr/share/dbus-1/services mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/dbus-1/services
cp -fp %{SOURCE10} $RPM_BUILD_ROOT/etc/dbus-1/system.d/named.conf cp -fp %{SOURCE10} ${RPM_BUILD_ROOT}/etc/dbus-1/system.d/named.conf
cp -fp %{SOURCE11} $RPM_BUILD_ROOT/usr/share/dbus-1/services/named.service cp -fp %{SOURCE11} ${RPM_BUILD_ROOT}%{_datadir}/dbus-1/services/named.service
cp -fp %{SOURCE13} $RPM_BUILD_ROOT%{_sbindir}/namedSetForwarders cp -fp %{SOURCE13} ${RPM_BUILD_ROOT}%{_sbindir}/namedSetForwarders
cp -fp %{SOURCE14} $RPM_BUILD_ROOT%{_sbindir}/namedGetForwarders cp -fp %{SOURCE14} ${RPM_BUILD_ROOT}%{_sbindir}/namedGetForwarders
%endif %endif
%if %{test} %if %{test}
if [ "`whoami`" = 'root' ]; then if [ "`whoami`" = 'root' ]; then
@ -439,38 +431,53 @@ if [ "`whoami`" = 'root' ]; then
else else
echo 'test==1 : only root can run the tests (they require an ifconfig).'; echo 'test==1 : only root can run the tests (they require an ifconfig).';
fi fi
:;
%endif %endif
# Files required to run test-suite outside of build tree: # Files required to run test-suite outside of build tree:
cp -fp config.h $RPM_BUILD_ROOT/%{_includedir}/bind9 cp -fp config.h ${RPM_BUILD_ROOT}/%{_includedir}/bind9
cp -fp lib/dns/include/dns/forward.h $RPM_BUILD_ROOT/%{_includedir}/dns cp -fp lib/dns/include/dns/forward.h ${RPM_BUILD_ROOT}/%{_includedir}/dns
cp -fp lib/isc/unix/include/isc/keyboard.h $RPM_BUILD_ROOT/%{_includedir}/isc cp -fp lib/isc/unix/include/isc/keyboard.h ${RPM_BUILD_ROOT}/%{_includedir}/isc
cp -fp lib/isc/include/isc/hash.h $RPM_BUILD_ROOT/%{_includedir}/isc cp -fp lib/isc/include/isc/hash.h ${RPM_BUILD_ROOT}/%{_includedir}/isc
# Remove libtool .la files: # Remove libtool .la files:
find $RPM_BUILD_ROOT/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';'; find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
# /usr/lib/rpm/brp-compress # /usr/lib/rpm/brp-compress
# #
# Ghost config files: # Ghost config files:
touch $RPM_BUILD_ROOT/etc/named.conf touch ${RPM_BUILD_ROOT}/etc/named.conf
# bind-config files: # bind-config files:
mkdir -p $RPM_BUILD_ROOT/{etc,var/named} mkdir -p ${RPM_BUILD_ROOT}/{etc,var/named}
install -m 644 %{SOURCE16} $RPM_BUILD_ROOT/etc/named.caching-nameserver.conf install -m 644 %{SOURCE16} ${RPM_BUILD_ROOT}/etc/named.caching-nameserver.conf
install -m 644 %{SOURCE27} $RPM_BUILD_ROOT/etc/named.rfc1912.zones install -m 644 %{SOURCE27} ${RPM_BUILD_ROOT}/etc/named.rfc1912.zones
install -m 644 %{SOURCE17} $RPM_BUILD_ROOT/var/named/named.ca install -m 644 %{SOURCE17} ${RPM_BUILD_ROOT}/var/named/named.ca
install -m 644 %{SOURCE18} $RPM_BUILD_ROOT/var/named/named.local install -m 644 %{SOURCE18} ${RPM_BUILD_ROOT}/var/named/named.local
install -m 644 %{SOURCE19} $RPM_BUILD_ROOT/var/named/localhost.zone install -m 644 %{SOURCE19} ${RPM_BUILD_ROOT}/var/named/localhost.zone
install -m 644 %{SOURCE20} $RPM_BUILD_ROOT/var/named/localdomain.zone install -m 644 %{SOURCE20} ${RPM_BUILD_ROOT}/var/named/localdomain.zone
install -m 644 %{SOURCE21} $RPM_BUILD_ROOT/var/named/named.ip6.local install -m 644 %{SOURCE21} ${RPM_BUILD_ROOT}/var/named/named.ip6.local
install -m 644 %{SOURCE22} $RPM_BUILD_ROOT/var/named/named.broadcast install -m 644 %{SOURCE22} ${RPM_BUILD_ROOT}/var/named/named.broadcast
install -m 644 %{SOURCE23} $RPM_BUILD_ROOT/var/named/named.zero install -m 644 %{SOURCE23} ${RPM_BUILD_ROOT}/var/named/named.zero
for f in /etc/named.caching-nameserver.conf /var/named/{named.ca,named.local,localhost.zone,localdomain.zone,named.ip6.local,named.broadcast,named.zero}; do for f in /etc/named.caching-nameserver.conf /var/named/{named.ca,named.local,localhost.zone,localdomain.zone,named.ip6.local,named.broadcast,named.zero}; do
touch $RPM_BUILD_ROOT/%{chroot_prefix}/$f; touch ${RPM_BUILD_ROOT}/%{chroot_prefix}/$f;
done done
install -m 644 %{SOURCE24} ./rfc1912.txt install -m 644 %{SOURCE24} ./rfc1912.txt
install -m 644 %{SOURCE25} ./Copyright install -m 644 %{SOURCE25} ./Copyright
# bind-chroot-admin script: # bind-chroot-admin script:
sed -e 's^@BIND_CHROOT_PREFIX@^'%{chroot_prefix}'^;s^@BIND_DIR@^'%{bind_dir}'^' < %SOURCE26 > bind-chroot-admin; sed -e 's^@BIND_CHROOT_PREFIX@^'%{chroot_prefix}'^;s^@BIND_DIR@^'%{bind_dir}'^' < %{SOURCE26} > bind-chroot-admin;
install -m 754 bind-chroot-admin $RPM_BUILD_ROOT/%{_sbindir} install -m 754 bind-chroot-admin ${RPM_BUILD_ROOT}/%{_sbindir}
# sample bind configuration files for %doc:
mkdir -p sample/etc sample/var/named/{data,slaves}
cp -fp %{_sourcedir}/named.conf.sample sample/etc/named.conf
cp -fp %{_sourcedir}/named.rfc1912.zones.sample sample/etc/named.rfc1912.zones
cp -fp %{_sourcedir}/named.root.hints sample/etc/
cp -fp %{_sourcedir}/{named.root,named.local,localhost.zone,localdomain.zone,named.ip6.local,named.broadcast,named.zero} sample/var/named
for f in my.internal.zone.db slaves/my.slave.internal.zone.db slaves/my.ddns.internal.zone.db my.external.zone.db; do
echo '@ in soa localhost. root 1 3H 15M 1W 1D
ns localhost.' > sample/var/named/$f;
done
/usr/bin/tail -n '+'`/bin/egrep -n '\\$Id: rndc.conf,v' bin/rndc/rndc.conf | sed 's/:.*$/+1/' | bc` bin/rndc/rndc.conf | sed '/Sample rndc configuration file./{p;i\
*\
* NOTE: you only need to create this file if it is to\
* differ from the following default contents:
;d}' > sample/etc/rndc.conf;
#
%if !%{DEBUGINFO} %if !%{DEBUGINFO}
echo 'WARNING - NOT generating debuginfo!' echo 'WARNING - NOT generating debuginfo!'
/usr/lib/rpm/brp-compress /usr/lib/rpm/brp-compress
@ -487,13 +494,16 @@ exit 0
%attr(770,named,named) %dir /var/run/named %attr(770,named,named) %dir /var/run/named
%attr(754,root,root) %config /etc/rc.d/init.d/named %attr(754,root,root) %config /etc/rc.d/init.d/named
%config(noreplace) /etc/sysconfig/named %config(noreplace) /etc/sysconfig/named
%verify(not size,not md5) %config(noreplace) %attr(0640,root,named) /etc/rndc.key %ghost %config(noreplace) %attr(0640,root,named) /etc/rndc.key
# ^- rndc.key now created on first install only if it does not exist
# %verify(not size,not md5) %config(noreplace) %attr(0640,root,named) /etc/rndc.conf # %verify(not size,not md5) %config(noreplace) %attr(0640,root,named) /etc/rndc.conf
# ^- Let the named internal default rndc.conf be used - # ^- Let the named internal default rndc.conf be used -
# rndc.conf not required unless it differs from default. # rndc.conf not required unless it differs from default.
%ghost %config(noreplace) /etc/named.conf %ghost %config(noreplace) /etc/named.conf
# ^- Ensure something owns named.conf, even though it may not be installed at all # ^- Ensure something owns named.conf, even though it may not be installed at all
%ghost %config(noreplace) /etc/rndc.conf %ghost %config(noreplace) /etc/rndc.conf
# ^- The default rndc.conf which uses rndc.key is in named's default internal config -
# so rndc.conf is not necessary.
%config(noreplace) /etc/logrotate.d/named %config(noreplace) /etc/logrotate.d/named
%{_sbindir}/dnssec* %{_sbindir}/dnssec*
%{_sbindir}/lwresd %{_sbindir}/lwresd
@ -514,6 +524,7 @@ exit 0
%{_mandir}/man8/rndc-confgen.8* %{_mandir}/man8/rndc-confgen.8*
%doc CHANGES COPYRIGHT README %doc CHANGES COPYRIGHT README
%doc doc/arm doc/misc %doc doc/arm doc/misc
%doc sample/
%if %{WITH_DBUS} %if %{WITH_DBUS}
%doc doc/README.DBUS %doc doc/README.DBUS
%attr(644,root,root) %config /etc/dbus-1/system.d/named.conf %attr(644,root,root) %config /etc/dbus-1/system.d/named.conf
@ -640,18 +651,16 @@ fi;
/sbin/ldconfig /sbin/ldconfig
/sbin/chkconfig --add named /sbin/chkconfig --add named
if [ "$1" -eq 1 ]; then if [ "$1" -eq 1 ]; then
if [ -f /etc/named.boot -a -x /usr/sbin/named-bootconf -a ! -f /etc/named.conf ]; then # no more named.boot autoconversion! No-one should be using BIND-4 anymore.
# Convert BIND 4 named.bootconf syntax to BIND 9 syntax (should never be used!) if [ ! -e /etc/rndc.key ]; then
cat /etc/named.boot | /usr/sbin/named-bootconf > /etc/named.bootconf-converted.conf # create the rndc.key file:
if [ "$?" -eq 0 ]; then echo 'key "rndckey" {
chmod 644 /etc/named.bootconf-converted.conf algorithm hmac-md5;
cp -fp /etc/named.bootconf-converted.conf /etc/named.conf; secret "'`/usr/sbin/dns-keygen`'";
fi; };' > /etc/rndc.key;
fi elif /bin/egrep -q '@KEY@' /etc/rndc.key; then
if /bin/egrep -q '@KEY@' /etc/rndc.key; then # fix potential problem with older versions
/bin/sed -i -e "s^@KEY@^`/usr/sbin/dns-keygen`^" /etc/rndc.key ; /bin/sed -i -e 's^@KEY@^'`/usr/sbin/dns-keygen`'^' /etc/rndc.key ;
chmod 0640 /etc/rndc.key
chown root:named /etc/rndc.key
fi fi
[ -e /selinux/enforce ] && [ -x /sbin/restorecon ] && /sbin/restorecon /etc/rndc.* /etc/named.* >/dev/null 2>&1 ; [ -e /selinux/enforce ] && [ -x /sbin/restorecon ] && /sbin/restorecon /etc/rndc.* /etc/named.* >/dev/null 2>&1 ;
fi fi
@ -667,7 +676,7 @@ fi
%postun %postun
/sbin/ldconfig /sbin/ldconfig
if [ "$1" -ge 1 ]; then if [ "$1" -ge 1 ]; then
/etc/rc.d/init.d/named condrestart >/dev/null 2>&1 || : /etc/rc.d/init.d/named condrestart >/dev/null 2>&1 || :;
fi; fi;
:; :;
@ -708,28 +717,20 @@ fi;
if [ "$1" -gt 0 ]; then if [ "$1" -gt 0 ]; then
/usr/bin/chcon system_u:object_r:named_conf_t /etc/named.caching-nameserver.conf >/dev/null 2>&1 || :; /usr/bin/chcon system_u:object_r:named_conf_t /etc/named.caching-nameserver.conf >/dev/null 2>&1 || :;
/usr/bin/chcon system_u:object_r:named_conf_t /etc/named.rfc1912.zones >/dev/null 2>&1 || :; /usr/bin/chcon system_u:object_r:named_conf_t /etc/named.rfc1912.zones >/dev/null 2>&1 || :;
fi . /usr/sbin/bind-chroot-admin --sync;
if [ "$1" -eq 1 ]; then
/usr/sbin/bind-chroot-admin --sync;
fi;
:;
%postun config
if [ "$1" -eq 0 ]; then
/usr/sbin/bind-chroot-admin --sync
fi; fi;
:; :;
%post chroot %post chroot
if [ "$1" -gt 0 ]; then if [ "$1" -gt 0 ]; then
/usr/sbin/bind-chroot-admin --enable; . /usr/sbin/bind-chroot-admin --enable;
fi; fi;
:; :;
%preun chroot %preun chroot
if [ "$1" = "0" ]; then if [ "$1" -eq 0 ]; then
/usr/sbin/bind-chroot-admin --disable; . /usr/sbin/bind-chroot-admin --disable;
fi fi
:; :;
@ -790,6 +791,11 @@ rm -rf ${RPM_BUILD_ROOT}
:; :;
%changelog %changelog
* Wed Mar 29 2006 Jason Vsa Dias <jvdias@redhat.com> - 30:9.3.2-14
- fix bug 186577: remove -L/usr/lib from libbind.pc and more .spec file cleanup
- add '%doc' sample configuration files in /usr/share/doc/bind*/sample
- rebuild with new gcc and glibc
* Wed Mar 22 2006 Jason Vas Dias <jvdias@redhat.com> - 30:9.3.2-12 * Wed Mar 22 2006 Jason Vas Dias <jvdias@redhat.com> - 30:9.3.2-12
- fix typo in initscript - fix typo in initscript
- fix Requires(post): policycoreutils in sub-packages - fix Requires(post): policycoreutils in sub-packages