OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 05-Oct-2007 17:36:23
Branch: HEAD Handle: 2007100516362101
Added files:
openpkg-src/bind bind.txt
Modified files:
openpkg-src/bind bind.spec
Removed files:
openpkg-src/bind db.localhost db.localhost.ipv4 db.localhost.ipv6
db.root db.root.sh named.conf rndc.conf
Log:
finally make BIND packaging as concise as other by shrinking the
various text snippets into a single bind.txt
Summary:
Revision Changes Path
1.126 +10 -21 openpkg-src/bind/bind.spec
1.1 +229 -0 openpkg-src/bind/bind.txt
1.5 +0 -17 openpkg-src/bind/db.localhost
1.4 +0 -17 openpkg-src/bind/db.localhost.ipv4
1.4 +0 -17 openpkg-src/bind/db.localhost.ipv6
1.11 +0 -32 openpkg-src/bind/db.root
1.8 +0 -32 openpkg-src/bind/db.root.sh
1.9 +0 -84 openpkg-src/bind/named.conf
1.4 +0 -16 openpkg-src/bind/rndc.conf
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/bind/bind.spec
============================================================================
$ cvs diff -u -r1.125 -r1.126 bind.spec
--- openpkg-src/bind/bind.spec 5 Oct 2007 15:11:05 -0000 1.125
+++ openpkg-src/bind/bind.spec 5 Oct 2007 15:36:21 -0000 1.126
@@ -48,13 +48,7 @@
# list of sources
Source0: ftp://ftp.isc.org/isc/bind9/%{V_dist}/bind-%{V_dist}.tar.gz
-Source2: db.root
-Source3: db.root.sh
-Source4: db.localhost
-Source5: db.localhost.ipv4
-Source6: db.localhost.ipv6
-Source7: named.conf
-Source8: rndc.conf
+Source1: bind.txt
Source9: rc.bind
# build information
@@ -174,22 +168,17 @@
%{SOURCE rc.bind} \
$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} install -c -m 644 %{l_value -s -a} \
- %{SOURCE named.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/bind/
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE rndc.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/bind/
+ # install default configuration
%{l_shtool} mkdir -f -p -m 755 \
+ $RPM_BUILD_ROOT%{l_prefix}/etc/bind \
$RPM_BUILD_ROOT%{l_prefix}/etc/bind/named.db
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE db.localhost} \
- %{SOURCE db.localhost.ipv4} \
- %{SOURCE db.localhost.ipv6} \
- %{SOURCE db.root} \
- %{SOURCE db.root.sh} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/bind/named.db/
+ for name in `grep "^<file" %{SOURCE bind.txt} | sed -e 's;^.*name=";;'
-e 's;".*$;;'`; do
+ name_escaped=`echo "$name" | sed -e 's;/;\\\\/;g'`
+ (echo ""; cat %{SOURCE bind.txt}; echo "") |\
+ sed -e "1,/^<file name=\"$name_escaped\">/d" -e "/<\/file>/,\$d"
>tmp.txt
+ %{l_shtool} install -c -m 644 %{l_value -s -a} \
+ tmp.txt $RPM_BUILD_ROOT%{l_prefix}/etc/bind/$name
+ done
# create an empty var directory
%{l_shtool} mkdir -f -p -m 755 \
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/bind/bind.txt
============================================================================
$ cvs diff -u -r0 -r1.1 bind.txt
--- /dev/null 2007-10-05 17:36:07 +0200
+++ bind.txt 2007-10-05 17:36:22 +0200
@@ -0,0 +1,229 @@
+<file name="named.conf">
+##
+## @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";
+ severity info;
+ print-category yes;
+ print-severity no;
+ print-time yes;
+ };
+ category "default" { "logfile"; };
+ category "general" { "logfile"; };
+ category "security" { "logfile"; };
+ category "config" { "logfile"; };
+ category "queries" { "logfile"; };
+ category "update" { "logfile"; };
+ category "notify" { "logfile"; };
+ category "database" { "logfile"; };
+ category "dnssec" { "logfile"; };
+ category "resolver" { "logfile"; };
+ category "xfer-in" { "logfile"; };
+ category "xfer-out" { "logfile"; };
+ category "dispatch" { "logfile"; };
+ category "lame-servers" { "logfile"; };
+ category "delegation-only" { "logfile"; };
+};
+
+options {
+ pid-file "@l_prefix@/var/bind/named.pid";
+ directory "@l_prefix@/etc/bind/named.db";
+ statistics-file "@l_prefix@/var/bind/named.stats";
+ allow-query { any; };
+ allow-transfer { any; };
+ transfers-in 10;
+ transfers-per-ns 2;
+ max-transfer-time-in 120;
+ transfer-format one-answer;
+ cleaning-interval 60;
+ interface-interval 60;
+ 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 {
+ type hint;
+ file "db.root";
+};
+
+zone "localhost" IN {
+ type master;
+ file "db.localhost";
+ notify no;
+ allow-update { none; };
+ allow-transfer { any; };
+};
+
+zone "0.0.127.in-addr.arpa" IN {
+ type master;
+ file "db.localhost.ipv4";
+ notify no;
+ allow-update { none; };
+ allow-transfer { any; };
+};
+
+zone
"1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" {
+ type master;
+ file "db.localhost.ipv6";
+ notify no;
+ allow-update { none; };
+ allow-transfer { any; };
+};
+
+</file>
+<file name="rndc.conf">
+##
+## @l_prefix@/etc/bind/rndc.conf -- BIND rndc configuration
+##
+
+options {
+ default-server 127.0.0.1;
+ default-port 953;
+ default-key "rndc-key";
+};
+
+server localhost {
+ key "rndc-key";
+};
+
+include "@l_prefix@/etc/bind/rndc.key";
+
+</file>
+<file name="named.db/db.root">
+;;
+;; db.root -- Internet Root Nameservers
+;; DO NOT EDIT, IT WAS AUTOMATICALLY CREATED ON 2007-10-05 BY db.root.sh!
+;;
+
+. 99999999 IN NS A.ROOT-SERVERS.NET.
+. 99999999 IN NS B.ROOT-SERVERS.NET.
+. 99999999 IN NS C.ROOT-SERVERS.NET.
+. 99999999 IN NS D.ROOT-SERVERS.NET.
+. 99999999 IN NS E.ROOT-SERVERS.NET.
+. 99999999 IN NS F.ROOT-SERVERS.NET.
+. 99999999 IN NS G.ROOT-SERVERS.NET.
+. 99999999 IN NS H.ROOT-SERVERS.NET.
+. 99999999 IN NS I.ROOT-SERVERS.NET.
+. 99999999 IN NS J.ROOT-SERVERS.NET.
+. 99999999 IN NS K.ROOT-SERVERS.NET.
+. 99999999 IN NS L.ROOT-SERVERS.NET.
+. 99999999 IN NS M.ROOT-SERVERS.NET.
+A.ROOT-SERVERS.NET. 99999999 IN A 198.41.0.4
+B.ROOT-SERVERS.NET. 99999999 IN A 192.228.79.201
+C.ROOT-SERVERS.NET. 99999999 IN A 192.33.4.12
+D.ROOT-SERVERS.NET. 99999999 IN A 128.8.10.90
+E.ROOT-SERVERS.NET. 99999999 IN A 192.203.230.10
+F.ROOT-SERVERS.NET. 99999999 IN A 192.5.5.241
+G.ROOT-SERVERS.NET. 99999999 IN A 192.112.36.4
+H.ROOT-SERVERS.NET. 99999999 IN A 128.63.2.53
+I.ROOT-SERVERS.NET. 99999999 IN A 192.36.148.17
+J.ROOT-SERVERS.NET. 99999999 IN A 192.58.128.30
+K.ROOT-SERVERS.NET. 99999999 IN A 193.0.14.129
+L.ROOT-SERVERS.NET. 99999999 IN A 198.32.64.12
+M.ROOT-SERVERS.NET. 99999999 IN A 202.12.27.33
+
+</file>
+<file name="named.db/db.root.sh">
+#!/bin/sh
+
+ROOTFILE=./db.root
+
+echo '@l_prefix@' | egrep '[EMAIL PROTECTED]' | egrep '[EMAIL PROTECTED]'
>/dev/null
+if [ $? -eq 0 ]; then
+ DIG='dig'
+else
+ DIG='@l_prefix@/bin/dig'
+fi
+
+date=`date '+%Y-%m-%d'`
+cat >$ROOTFILE <<EOT
+;;
+;; db.root -- Internet Root Nameservers
+;; DO NOT EDIT, IT WAS AUTOMATICALLY CREATED ON $date BY db.root.sh!
+;;
+
+EOT
+for i in A B C D E F G H I J K L M; do
+ ${DIG} @$i.ROOT-SERVERS.NET . NS >$ROOTFILE.raw && break
+done
+[ -f $ROOTFILE.raw ] || exit 1
+awk <$ROOTFILE.raw '
+ /IN[ ]NS/ { printf("%-20s 99999999 IN NS %s\n", $1, $NF); }
+ /IN[ ]A/ { printf("%-20s 99999999 IN A %s\n", $1, $NF); }
+' |\
+egrep -v '^;' |\
+sort >>$ROOTFILE
+echo "" >>$ROOTFILE
+rm $ROOTFILE.raw
+
+</file>
+<file name="named.db/db.localhost">
+;;
+;; db.localhost -- zonefile for the forward mapping of the loopback network
+;;
+
+$TTL 86400
+
+@ IN SOA localhost. root.localhost. (
+ 2001010101 ; SERIAL
+ 6H ; REFRESH: Secondaries refresh
+ 60M ; RETRY: Secondaries retry
+ 1W ; EXPIRE: Maximum TTL of data (expiry)
+ 1D ; MINTTL: Minimum TTL of data (expiry)
+ )
+
+ IN NS @
+ IN A 127.0.0.1
+
+</file>
+<file name="named.db/db.localhost.ipv4">
+;;
+;; db.localhost.ipv4 -- zonefile for the IPv4 reverse mapping of the
loopback network
+;;
+
+$TTL 86400
+
+@ IN SOA localhost. root.localhost. (
+ 2001010101 ; SERIAL
+ 6H ; REFRESH: Secondaries refresh
+ 60M ; RETRY: Secondaries retry
+ 1W ; EXPIRE: Maximum TTL of data (expiry)
+ 1D ; MINTTL: Minimum TTL of data (expiry)
+ )
+
+ IN NS @
+1 IN PTR localhost.
+
+</file>
+<file name="named.db/db.localhost.ipv6">
+;;
+;; db.localhost.ipv6 -- zonefile for the IPv6 reverse mapping of the
loopback network
+;;
+
+$TTL 86400
+
+@ IN SOA localhost. root.localhost. (
+ 2001010101 ; SERIAL
+ 6H ; REFRESH: Secondaries refresh
+ 60M ; RETRY: Secondaries retry
+ 1W ; EXPIRE: Maximum TTL of data (expiry)
+ 1D ; MINTTL: Minimum TTL of data (expiry)
+ )
+
+ IN NS @
+ IN PTR localhost.
+
+</file>
@@ .
rm -f openpkg-src/bind/db.localhost <<'@@ .'
Index: openpkg-src/bind/db.localhost
============================================================================
[NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
@@ .
rm -f openpkg-src/bind/db.localhost.ipv4 <<'@@ .'
Index: openpkg-src/bind/db.localhost.ipv4
============================================================================
[NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
@@ .
rm -f openpkg-src/bind/db.localhost.ipv6 <<'@@ .'
Index: openpkg-src/bind/db.localhost.ipv6
============================================================================
[NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
@@ .
rm -f openpkg-src/bind/db.root <<'@@ .'
Index: openpkg-src/bind/db.root
============================================================================
[NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
@@ .
rm -f openpkg-src/bind/db.root.sh <<'@@ .'
Index: openpkg-src/bind/db.root.sh
============================================================================
[NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
@@ .
rm -f openpkg-src/bind/named.conf <<'@@ .'
Index: openpkg-src/bind/named.conf
============================================================================
[NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
@@ .
rm -f openpkg-src/bind/rndc.conf <<'@@ .'
Index: openpkg-src/bind/rndc.conf
============================================================================
[NO CHANGE SUMMARY BECAUSE FILE AS A WHOLE IS JUST REMOVED]
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]