- build with O2

- removed "autotools" patch
- bugfixing in bind-chroot-admin (#279901)
This commit is contained in:
Adam Tkac 2007-09-20 11:07:30 +00:00
parent 89803af2ce
commit 19fe83500b
5 changed files with 20 additions and 23 deletions

View File

@ -2,4 +2,3 @@ bind-9.5.0a6.tar.gz
bind-chroot.tar.bz2
config.tar
libbind-man.tar.gz
bind-9.5.0a6-2.autotools.tar.bz2

View File

@ -1,5 +1,5 @@
--- bind-9.4.0/configure.ac.sdb 2007-03-06 12:59:32.000000000 +0100
+++ bind-9.4.0/configure.ac 2007-03-06 12:59:32.000000000 +0100
--- bind-9.4.0/configure.in.sdb 2007-03-06 12:59:32.000000000 +0100
+++ bind-9.4.0/configure.in 2007-03-06 12:59:32.000000000 +0100
@@ -2478,6 +2478,7 @@
bin/tests/system/tkey/Makefile
bin/tests/headerdep_test.sh

View File

@ -217,10 +217,10 @@ function sync_files()
changed=`/bin/mktemp /tmp/XXXXXX`;
rm -f $changed
if [ $ENABLED -eq 0 ] ; then # chroot is enabled
/usr/bin/find /{etc/{named.*,rndc.*},${BIND_DIR#/}{/*,/data/*,/slaves/*,/dynamic/*}} -maxdepth 0 -type f |
/usr/bin/find /{etc/{named.*,rndc.*},${BIND_DIR#/}{/*,/data/*,/slaves/*,/dynamic/*}} /var/log/named.log -maxdepth 0 -type f |
while read f;
do
replace_with_link ${BIND_CHROOT_PREFIX}/$f $f;
replace_with_link ${BIND_CHROOT_PREFIX}$f $f;
[ ! -e $changed ] && touch $changed;
done;
/usr/bin/find /etc/{named.*,rndc.*}.rpmsave ${BIND_DIR}/*.rpmsave -maxdepth 0 -type l 2>/dev/null |
@ -228,7 +228,6 @@ function sync_files()
do
/bin/rm -f $f >/dev/null 2>&1;
done
ln -sf ${BIND_CHROOT_PREFIX}/var/log/named.log /var/log/named.log
pfx=${BIND_CHROOT_PREFIX}
else # chroot is disabled
/usr/bin/find /var/named/chroot/{etc/{named.*,rndc.*},var/named{/*,/data/*,/slaves/*,/dynamic/*}} -maxdepth 0 |
@ -254,9 +253,12 @@ function sync_files()
chown -h root:named ${BIND_CHROOT_PREFIX}/var/named/* >/dev/null 2>&1;
chown -h root:named /etc/{named,rndc}.* >/dev/null 2>&1;
chown -h root:named ${BIND_CHROOT_PREFIX}/etc/{named,rndc}.* >/dev/null 2>&1;
chown -h named:named /var/log/named.log >/dev/null 2>&1;
chown -h named:named ${BIND_CHROOT_PREFIX}/var/log/named.log >/dev/null 2>&1;
chmod 750 ${pfx}/var/named >/dev/null 2>&1;
chmod 640 ${pfx}/var/named/* >/dev/null 2>&1;
chmod 750 ${pfx}/var/named/*/. >/dev/null 2>&1;
chmod 660 ${pfx}/var/log/named.log >/dev/null 2>&1;
chown -h named:named /var/named/{data{,/*},slaves{,/*},dynamic{,/*}} >/dev/null 2>&1;
chown -h named:named ${BIND_CHROOT_PREFIX}/var/named/{data{,/*},slaves{,/*},dynamic{,/*}} >/dev/null 2>&1;
chmod 770 ${pfx}/var/named/{data,slaves,dynamic} >/dev/null 2>&1;
@ -264,18 +266,11 @@ function sync_files()
chmod 770 ${pfx}/var/named/{data/*/.,slaves/*/.,dynamic/*/.} >/dev/null 2>&1;
if [ -e $changed ]; then
if selinux_enabled && [ -x /sbin/restorecon ]; then
/sbin/restorecon -R ${BIND_CHROOT_PREFIX}/etc ${BIND_CHROOT_PREFIX}/var/named ${BIND_CHROOT_PREFIX}/var/run/named >/dev/null 2>&1;
if [ -e ${BIND_CHROOT_PREFIX}/etc/localtime ] && [ -e /etc/localtime ] ; then
/usr/bin/restorecon ${BIND_CHROOT_PREFIX}/etc/localtime >/dev/null 2>&1;
fi;
/sbin/restorecon -R ${BIND_CHROOT_PREFIX} >/dev/null 2>&1;
/sbin/restorecon /etc/named.* >/dev/null 2>&1;
/sbin/restorecon /etc/rndc.key >/dev/null 2>&1;
/sbin/restorecon /etc/rndc.conf >/dev/null 2>&1;
/sbin/restorecon /var/named{/,/*} >/dev/null 2>&1;
/sbin/restorecon /var/named/{slaves,data,dynamic}{/,/*} >/dev/null 2>&1;
/sbin/restorecon /var/named/named.ca ${BIND_CHROOT_PREFIX}/var/named/named.ca >/dev/null 2>&1;
/sbin/restorecon ${BIND_CHROOT_PREFIX} >/dev/null 2>&1;
/sbin/restorecon /var/named/named.ca >/dev/null 2>&1;
/sbin/restorecon -R /var/named >/dev/null 2>&1;
fi;
/sbin/service named try-restart
rm -f $changed;

View File

@ -21,7 +21,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
Name: bind
License: ISC
Version: 9.5.0
Release: 12.%{RELEASEVER}%{?dist}
Release: 12.4.%{RELEASEVER}%{?dist}
Epoch: 32
Url: http://www.isc.org/products/BIND/
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -47,7 +47,6 @@ Source22: bind-chroot-admin.in
Source24: libbind.pc
Source25: named.conf.sample
Source28: config.tar
Source29: bind-%{version}%{RELEASEVER}-2.autotools.tar.bz2
Source30: ldap2zone.c
# Common patches
@ -185,9 +184,6 @@ Based on the code from Jan "Yenya" Kasprzak <kas@fi.muni.cz>
%prep
%setup -q -n %{name}-%{version}%{RELEASEVER}
tar -xvf %{SOURCE29}
patch -p1 -b < patch
# Common patches
%patch -p1 -b .varrun
%patch1 -p1 -b .key
@ -254,7 +250,7 @@ cp -fp contrib/dbus/{dbus_mgr.h,dbus_service.h} bin/named/include/named
%build
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS -O0"
export CFLAGS="$CFLAGS $RPM_OPT_FLAGS"
libtoolize --copy --force; aclocal; autoconf
cp -f /usr/share/libtool/config.{guess,sub} .
@ -312,6 +308,7 @@ mkdir -p ${RPM_BUILD_ROOT}/var/named/data
mkdir -p ${RPM_BUILD_ROOT}/var/named/dynamic
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/{man1,man5,man8}
mkdir -p ${RPM_BUILD_ROOT}/var/run/named
mkdir -p ${RPM_BUILD_ROOT}/var/log
#chroot
mkdir -p ${RPM_BUILD_ROOT}/%{chroot_prefix}
tar --no-same-owner -jxvf %{SOURCE6} --directory ${RPM_BUILD_ROOT}/%{chroot_prefix}
@ -384,7 +381,8 @@ find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';';
# /usr/lib/rpm/brp-compress
#
# Ghost config files:
touch ${RPM_BUILD_ROOT}/etc/named.conf
touch ${RPM_BUILD_ROOT}%{_sysconfdir}/named.conf
touch ${RPM_BUILD_ROOT}%{_localstatedir}/log/named.log
# configuration files:
tar -C ${RPM_BUILD_ROOT} -xf %{SOURCE28}
for f in /etc/named.conf /var/named/{named.ca,named.localhost,named.loopback,named.empty}; do
@ -512,6 +510,7 @@ rm -rf ${RPM_BUILD_ROOT}
%dir %{_localstatedir}/named/data
%dir %{_localstatedir}/named/dynamic
%dir %{_localstatedir}/run/named
%ghost %{_localstatedir}/log/named.log
%defattr(0754,root,root,0750)
%config %{_sysconfdir}/rc.d/init.d/named
%defattr(0640,root,named,0750)
@ -646,6 +645,11 @@ rm -rf ${RPM_BUILD_ROOT}
%{_sbindir}/bind-chroot-admin
%changelog
* Thu Sep 20 2007 Adam Tkac <atkac redhat com> 32:9.5.0-12.4.a6
- build with O2
- removed "autotools" patch
- bugfixing in bind-chroot-admin (#279901)
* Thu Sep 06 2007 Adam Tkac <atkac redhat com> 32:9.5.0-12.a6
- bind-9.5-2119_revert.patch and bind-9.5-fix_h_errno.patch are
obsoleted by upstream bind-9.5-_res_errno.patch

View File

@ -2,4 +2,3 @@ c5e5434487c69841c868bbbeb5cf2dec bind-9.5.0a6.tar.gz
4faa4395b955e5f8a3d50f308b9fabc8 bind-chroot.tar.bz2
bdea8168751a29e61525f11e8195ad48 config.tar
13fef79f99fcefebb51d84b08805de51 libbind-man.tar.gz
ae1b6fde3133a8dad425e0ec9dc6d576 bind-9.5.0a6-2.autotools.tar.bz2