Bug 124001 - Merge caching-nameserver into bind dns server
Summary: Merge caching-nameserver into bind dns server
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bind
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-05-22 19:27 UTC by Robert Scheck
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-08-12 21:02:53 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Robert Scheck 2004-05-22 19:27:41 UTC
Description of problem:
Well, it isn't a problem, but normally the caching-nameserver files
are always required to configure a bind server, so I personally would 
include them into the bind package, because caching-nameserver 
provides /etc/named.conf and the root server file for example.

So I would be happy, if the caching-nameserver could be merged into 
the bind dns server package.

Version-Release number of selected component (if applicable):
bind-9.2.3-13
caching-nameserver-7.2-12

Actual results:
A possible solution for that would be the diff below. Maybe you've
got a better solution for it... :-)

--- bind.spec       2004-03-30 15:55:14.000000000 +0200
+++ bind.spec.rsc   2004-05-22 21:25:44.000000000 +0200
@@ -12,6 +12,11 @@
 Source5: keygen.c
 Source6: rfc1912.txt
 Source7: bind-chroot.tar.gz
+Source50: ftp://ftp.networksolutions.com/domain/named.root
+Source51: named.local
+Source52: named.conf
+Source53: Copyright.caching-nameserver
+Source54: localhost.zone
 Patch: bind-9.2.0rc3-varrun.patch
 Patch1: bind-9.2.1-key.patch
 Patch2: bind-config.patch
@@ -218,6 +223,12 @@
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
 cp %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/named

+install -m 644 %{SOURCE50} $RPM_BUILD_ROOT/var/named/named.ca
+install -m 644 %{SOURCE51} $RPM_BUILD_ROOT/var/named/named.local
+install -m 644 %{SOURCE52} $RPM_BUILD_ROOT/var/named/localhost.zone
+install -m 644 %{SOURCE53} $RPM_BUILD_ROOT/etc/named.conf
+install -m 644 %{SOURCE54} $RPM_BUILD_DIR/%{name}-%{version}/COPYRIGHT.configfiles
+
 %if %server
 %pre
 /usr/sbin/useradd -c "Named" -u 25 \
@@ -246,6 +257,21 @@
        chown root:named /etc/rndc.conf etc/rndc.key
        /sbin/ldconfig
 fi
+
+if ! grep ^nameserver /etc/resolv.conf >/dev/null 2>&1 ; then
+    echo "nameserver 127.0.0.1" >> /etc/resolv.conf
+fi
+if [ $1 = 1 ]; then
+        if test -r /etc/sysconfig/named
+        then
+                . /etc/sysconfig/named
+                if [ ! -z $ROOTDIR ]; then
+                        cp -f /var/named/named.ca $ROOTDIR/var/named
+                        cp -f /var/named/named.local $ROOTDIR/var/named
+                        cp -f /var/named/localhost.zone $ROOTDIR/var/named
+                fi
+        fi
+fi
 exit 0

 %preun
@@ -278,13 +304,14 @@
 %if %server
 %files
 %defattr(-,root,root)
-%doc CHANGES COPYRIGHT README
+%doc CHANGES COPYRIGHT README COPYRIGHT.configfiles
 %doc doc/arm doc/draft doc/rfc doc/misc
 %config(noreplace) /etc/logrotate.d/named
 %config /etc/rc.d/init.d/named
 %config(noreplace) /etc/sysconfig/named
 %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.key
+%config(noreplace) /etc/named.conf

 %{_sbindir}/dnssec*
 %{_sbindir}/lwresd
@@ -307,6 +334,9 @@
 %attr(750,root,named) %dir /var/named
 %attr(770,named,named) %dir /var/named/slaves
 %attr(770,named,named) %dir /var/run/named
+%config %attr(0640,named,named) /var/named/named.ca
+%config(noreplace) %attr(0640,named,named) /var/named/named.local
+%config(noreplace) %attr(0640,named,named) /var/named/localhost.zone
 %endif

 %files libs

Expected results:
Merging of caching-nameserver's files into bind dns server package.

Comment 1 Jason Vas Dias 2004-08-12 21:02:53 UTC
The caching-nameserver installs ONLY the configuration for a 
caching-nameserver ; those who want to configure other types
of name server using BIND would not be helped by having the
caching nameserver files, nor by any existing configuration
files being overwritten. The root cache file needs to
be updated frequently from ftp://ftp.rs.internic.net/domain/named.root
so anyone setting up a nameserver would get it from there. 
New versions of bind will be updated to create an /etc/named.conf
if it does not exist which just includes the rndc.key file.



Note You need to log in before you can comment on or make changes to this bug.