Browse Source

Upgrade to BIND 9.2.0.

master
parent
commit
677f3f96c7
  1. 52
      bind/bind.patch
  2. 132
      bind/bind.spec
  3. 2
      bind/db.root
  4. 25
      bind/named.conf
  5. 12
      bind/rc.bind
  6. 16
      bind/rndc.conf

52
bind/bind.patch

@ -1,52 +0,0 @@
--- src/lib/isc/eventlib.c.orig Fri Feb 4 08:25:39 2000
+++ src/lib/isc/eventlib.c Wed Mar 7 11:51:38 2001
@@ -293,9 +293,15 @@
evPrintf(ctx, 4,
"pselect(%d, 0x%lx, 0x%lx, 0x%lx, %d.%09ld)\n",
ctx->fdMax+1,
+#if 0
(u_long)ctx->rdLast.fds_bits[0],
(u_long)ctx->wrLast.fds_bits[0],
(u_long)ctx->exLast.fds_bits[0],
+#else
+ (u_long)&(ctx->rdLast),
+ (u_long)&(ctx->wrLast),
+ (u_long)&(ctx->exLast),
+#endif
tp ? tp->tv_sec : -1,
tp ? tp->tv_nsec : -1);
--- src/lib/isc/ev_files.c.orig Thu Oct 7 22:44:04 1999
+++ src/lib/isc/ev_files.c Wed Mar 7 11:53:04 2001
@@ -140,9 +140,15 @@
evPrintf(ctx, 5,
"evSelectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n",
fd, eventmask,
+#if 0
(u_long)ctx->rdNext.fds_bits[0],
(u_long)ctx->wrNext.fds_bits[0],
(u_long)ctx->exNext.fds_bits[0]);
+#else
+ (u_long)&(ctx->rdNext),
+ (u_long)&(ctx->wrNext),
+ (u_long)&(ctx->exNext));
+#endif
return (0);
}
@@ -251,9 +257,15 @@
evPrintf(ctx, 5,
"evDeselectFD(fd %d, mask 0x%x): new masks: 0x%lx 0x%lx 0x%lx\n",
del->fd, eventmask,
+#if 0
(u_long)ctx->rdNext.fds_bits[0],
(u_long)ctx->wrNext.fds_bits[0],
(u_long)ctx->exNext.fds_bits[0]);
+#else
+ (u_long)&(ctx->rdNext),
+ (u_long)&(ctx->wrNext),
+ (u_long)&(ctx->exNext));
+#endif
/* Couldn't free it before now since we were using fields out of it. */
FREE(del);

132
bind/bind.spec

@ -27,30 +27,29 @@
Name: bind
Summary: Berkeley Internet Name Domain (BIND)
URL: http://www.isc.org/products/BIND/
Vendor: Free Software Foundation
Vendor: Internet Software Foundation
Packager: The OpenPKG Project
Distribution: OpenPKG [REL]
Group: DNS
License: GPL
Version: 8.2.5
Release: 20011201
License: ISC
Version: 9.2.0
Release: 20020206
# list of sources
Source0: ftp://ftp.isc.org/isc/bind/src/%{version}/bind-src.tar.gz
Source1: ftp://ftp.isc.org/isc/bind/src/%{version}/bind-doc.tar.gz
Source0: ftp://ftp.isc.org/isc/bind/%{version}/bind-%{version}.tar.gz
Source2: db.root
Source3: db.root.sh
Source4: db.localhost
Source5: db.127.0.0
Source6: named.conf
Source7: rc.bind
Patch0: bind.patch
Source7: rndc.conf
Source8: rc.bind
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20011227, make, flex, bison
PreReq: OpenPKG, openpkg >= 20011227
BuildPreReq: OpenPKG, openpkg >= 20020206, make, openssl
PreReq: OpenPKG, openpkg >= 20020206
AutoReq: no
AutoReqProv: no
@ -62,75 +61,47 @@ AutoReqProv: no
(named)
%prep
%setup0 -q -c -n bind-%{version}
%setup1 -q -T -D -a 1
%patch0 -p0
%setup -q
%build
PATH="%{l_prefix}/bin:$PATH"; export PATH
cd src
# make sure BIND accepts our overriding parameters later
systype=`sh ./port/systype`
rm -f .settings .systype
echo "'DESTINC=/dummy'" >>port/$systype/Makefile.set
echo "'DESTLIB=/dummy'" >>port/$systype/Makefile.set
# find a reasonable compiler, but because of BIND v8's
# system dependend linking stuff, we have to use the vendor
# version on some platforms.
cc="%{l_cc}"
case $systype in
freebsd ) cc="/usr/bin/cc" ;;
esac
cc="$cc -I%{l_prefix}/include -L%{l_prefix}/lib";
# now configure and build the package
%{l_make} %{l_mflags} \
CC="$cc" \
DESTDIR="$RPM_BUILD_ROOT" \
DESTBIN="%{l_prefix}/bin" \
DESTSBIN="%{l_prefix}/sbin" \
DESTEXEC="%{l_prefix}/libexec/bind" \
DESTHELP="%{l_prefix}/etc/bind" \
DESTETC="%{l_prefix}/etc/bind" \
DESTINC="%{l_prefix}/include/bind" \
DESTLIB="%{l_prefix}/lib" \
DESTRUN="%{l_prefix}/var/bind"
CC="%{l_cc}" \
CFLAGS="%{l_cflags -O}" \
./configure \
--prefix=%{l_prefix} \
--sysconfdir=%{l_prefix}/etc/bind \
--localstatedir=%{l_prefix}/var/bind \
--with-openssl=%{l_prefix} \
--with-libtool \
--without-libbind \
--disable-threads \
--disable-shared \
--disable-nls
%{l_make} %{l_mflags}
%install
rm -rf $RPM_BUILD_ROOT
PATH="%{l_prefix}/bin:$PATH"; export PATH
# install the standard stuff
( cd src
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT INSTALL_LIB=""
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
)
# perform standard install procedure
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
# strip down installation
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/mkservdb
rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/bind/nslookup.help
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/isc-config.sh
rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib
rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/irpd
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* > /dev/null 2>&1 || true
strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* > /dev/null 2>&1 || true
strip $RPM_BUILD_ROOT%{l_prefix}/libexec/bind/* > /dev/null 2>&1 || true
# install manual pages
( cd doc/man
for i in 1 8; do
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/man/man$i
%{l_shtool} install -c *.$i $RPM_BUILD_ROOT%{l_prefix}/man/man$i/
done
)
# remove superfluous manual pages
rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/mkdep.1
rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3
# install BIND9 ARM
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/share/bind/
%{l_shtool} install -c -m 644 \
doc/arm/*.html $RPM_BUILD_ROOT%{l_prefix}/share/bind/
# install run-command script
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
%{l_shtool} install -c -m 755 \
-e 's;@l_prefix@;%{l_prefix};g' \
-e 's;@l_fsusr@;%{l_fsusr};g' \
@ -139,11 +110,14 @@ AutoReqProv: no
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
# install a reasonable default configuration
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/bind
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/bind
%{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
%{SOURCE named.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/bind/
%{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
%{SOURCE named.conf} \
$RPM_BUILD_ROOT%{l_prefix}/etc/bind/
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/bind/named.db
%{SOURCE rndc.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/bind/
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/bind/named.db
%{l_shtool} install -c -m 644 \
%{SOURCE db.127.0.0} \
%{SOURCE db.localhost} \
@ -152,7 +126,8 @@ AutoReqProv: no
$RPM_BUILD_ROOT%{l_prefix}/etc/bind/named.db/
# create an empty var directory
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/var/bind
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/var/bind
# determine the installed files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
@ -165,17 +140,22 @@ AutoReqProv: no
%clean
rm -rf $RPM_BUILD_ROOT
%pre
if [ $1 -gt 1 ]; then
# stop daemon before any upgrade
$RPM_INSTALL_PREFIX/sbin/ndc stop >/dev/null 2>&1
%post
if [ $1 -eq 1 ]; then
# generate local rndc key
$RPM_INSTALL_PREFIX/sbin/rndc-confgen -a
chown %{l_musr}:%{l_mgrp} $RPM_INSTALL_PREFIX/etc/bind/rndc.key
elif [ $1 -gt 1 ]; then
# reload daemon
$RPM_INSTALL_PREFIX/sbin/rndc reload >/dev/null 2>&1 || true
fi
%preun
if [ $1 -eq 0 ]; then
# stop daemon before removing package
$RPM_INSTALL_PREFIX/sbin/ndc stop >/dev/null 2>&1
# stop daemon
$RPM_INSTALL_PREFIX/sbin/rndc stop >/dev/null 2>&1 || true
# remove dynamically generated files
rm -f $RPM_INSTALL_PREFIX/etc/bind/rndc.key
rm -f $RPM_INSTALL_PREFIX/var/bind/*
fi

2
bind/db.root

@ -1,6 +1,6 @@
;
; db.root -- BIND "hint" file
; [automatically created on Wed Jan 17 10:27:26 CET 2001 by db.root.sh]
; [automatically created on Wed Feb 6 13:52:40 CET 2002 by db.root.sh]
;
; Notice: Although this file officially is only used to initially load
; the cache of the BIND nameserver, it is actually used to specify the

25
bind/named.conf

@ -1,7 +1,15 @@
##
##
## @l_prefix@/etc/bind/named.conf -- BIND configuration
##
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; }
keys { "rndc-key"; };
};
include "@l_prefix@/etc/bind/rndc.key";
logging {
channel logfile {
file "@l_prefix@/var/bind/named.log";
@ -10,17 +18,14 @@ logging {
print-severity no;
print-time yes;
};
category default { logfile; };
category security { logfile; default_syslog; };
category panic { logfile; default_syslog; };
category packet { null; };
category eventlib { null; };
category "default" { "logfile"; };
category "general" { "logfile"; };
category "security" { "logfile"; "default_syslog"; };
};
options {
pid-file "@l_prefix@/var/bind/named.pid";
directory "@l_prefix@/etc/bind/named.db";
check-names master warn;
host-statistics no;
allow-query { any; };
allow-transfer { any; };
transfers-in 10;
@ -29,10 +34,10 @@ options {
transfer-format one-answer;
cleaning-interval 60;
interface-interval 60;
statistics-interval 59;
#listen-on port 53 { 127.0.0.1; };
#query-source address 127.0.0.1 port *;
#transfer-source 127.0.0.1;
#notify-source 127.0.0.1;
};
zone "." IN {
@ -44,7 +49,6 @@ zone "localhost" IN {
type master;
file "db.localhost";
notify no;
check-names fail;
allow-update { none; };
allow-transfer { any; };
};
@ -53,7 +57,6 @@ zone "0.0.127.in-addr.arpa" IN {
type master;
file "db.127.0.0";
notify no;
check-names fail;
allow-update { none; };
allow-transfer { any; };
};

12
bind/rc.bind

@ -11,22 +11,24 @@
%start -p 200 -u root
if opServiceEnabled bind; then
@l_prefix@/sbin/ndc start
@l_prefix@/sbin/named
fi
%stop -p 200 -u root
if opServiceEnabled bind; then
@l_prefix@/sbin/ndc stop
@l_prefix@/sbin/rndc stop
fi
%restart -u root
if opServiceEnabled bind; then
@l_prefix@/sbin/ndc restart
@l_prefix@/sbin/rndc stop
sleep 1
@l_prefix@/sbin/named
fi
%reload -u root
if opServiceEnabled bind; then
@l_prefix@/sbin/ndc reload
@l_prefix@/sbin/rndc reload
fi
%daily -u root
@ -34,7 +36,7 @@
shtool rotate -f \
-n${bind_log_numfiles} -s${bind_log_minsize} \
-d -z${bind_log_complevel} -o@l_fsusr@ -g@l_fsgrp@ -m644 \
-E '@l_prefix@/sbin/ndc restart' \
-E '@l_prefix@/sbin/rndc reload' \
@l_prefix@/var/bind/named.log
fi

16
bind/rndc.conf

@ -0,0 +1,16 @@
##
## @l_prefix@/etc/bind/rndc.conf -- BIND rndc configuration
##
options {
default-server localhost;
default-port 953;
default-key "rndc-key";
};
server localhost {
key "rndc-key";
};
include "@l_prefix@/etc/bind/rndc.key";
Loading…
Cancel
Save