6 changed files with 213 additions and 0 deletions
@ -0,0 +1,18 @@
|
||||
; |
||||
; db.example -- zonefile for example.com zone |
||||
; |
||||
|
||||
$TTL 86400 |
||||
|
||||
@ IN SOA example.com. root.example.com. ( |
||||
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 127.0.0.1 |
||||
|
||||
www IN A 127.0.0.1 |
||||
|
||||
@ -0,0 +1,16 @@
|
||||
## |
||||
## fsl.nsd -- OSSP fsl configuration for NSD |
||||
## |
||||
|
||||
ident (nsd)/.+ q{ |
||||
prefix( |
||||
prefix="%b %d %H:%M:%S %N <%L> $1[%P]: " |
||||
) |
||||
-> { |
||||
debug: file( |
||||
path="@l_prefix@/var/nsd/nsd.log", |
||||
append=1, perm=0644 |
||||
) |
||||
} |
||||
}; |
||||
|
||||
@ -0,0 +1,141 @@
|
||||
## |
||||
## nsd.spec -- OpenPKG RPM Specification |
||||
## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH |
||||
## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/> |
||||
## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com> |
||||
## |
||||
## Permission to use, copy, modify, and distribute this software for |
||||
## any purpose with or without fee is hereby granted, provided that |
||||
## the above copyright notice and this permission notice appear in all |
||||
## copies. |
||||
## |
||||
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
||||
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
||||
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
||||
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
||||
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
||||
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
||||
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
||||
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
||||
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
||||
## SUCH DAMAGE. |
||||
## |
||||
|
||||
# FIXME rse: optional AXFR support via BIND8 named-xfer? |
||||
# FIXME rse: optional libwrap support via {tcp,socket}_wrappers for AXFR |
||||
|
||||
# package information |
||||
Name: nsd |
||||
Summary: Name Server Daemon |
||||
URL: http://www.nlnetlabs.nl/nsd/ |
||||
Vendor: NLNet Labs |
||||
Packager: The OpenPKG Project |
||||
Distribution: OpenPKG [EVAL] |
||||
Group: DNS |
||||
License: GPL |
||||
Version: 1.0.2 |
||||
Release: 20030227 |
||||
|
||||
# list of sources |
||||
Source0: http://www.nlnetlabs.nl/downloads/nsd/nsd-%{version}.tar.gz |
||||
Source1: rc.nsd |
||||
Source2: nsd.zones |
||||
Source3: nsdc.conf |
||||
Source4: example.com |
||||
Source5: fsl.nsd |
||||
|
||||
# build information |
||||
Prefix: %{l_prefix} |
||||
BuildRoot: %{l_buildroot} |
||||
BuildPreReq: OpenPKG, openpkg >= 20030103, fsl, make |
||||
PreReq: OpenPKG, openpkg >= 20030103, fsl |
||||
AutoReq: no |
||||
AutoReqProv: no |
||||
|
||||
%description |
||||
NSD is an authoritative only, high performance, simple name server. |
||||
It is especially intended to be run as a root nameserver and |
||||
actually is used for the Internet K-Root-Server driven by RIPE NCC. |
||||
It supports BIND-style zone files, but pre-compiles the DNS RRs into |
||||
packet format in a separate step. |
||||
|
||||
%prep |
||||
%setup -q |
||||
|
||||
%build |
||||
# build programs |
||||
%{l_make} %{l_mflags -O} \ |
||||
CC="%{l_cc}" \ |
||||
CFLAGS="%{l_cflags -O}" \ |
||||
NSDUSER="%{l_ruid}.%{l_rgid}" \ |
||||
NAMEDXFER="%{l_prefix}/libexec/bind/named-xfer" \ |
||||
NSDKEYSDIR="%{l_prefix}/etc/nsd/keys" \ |
||||
PREFIX="%{l_prefix}" \ |
||||
NSDZONESDIR="%{l_prefix}/etc/nsd" \ |
||||
NSDZONES="%{l_prefix}/etc/nsd/nsd.zones" \ |
||||
NSDDB="%{l_prefix}/var/nsd/nsd.db" \ |
||||
NSDPIDFILE="%{l_prefix}/var/nsd/nsd.pid" \ |
||||
FEATURES="-DLOG_NOTIFIES -DBIND8_STATS" \ |
||||
LIBWRAP="`%{l_prefix}/bin/fsl-config --all --ldflags --libs`" |
||||
|
||||
%install |
||||
rm -rf $RPM_BUILD_ROOT |
||||
|
||||
# pre-create installation hierarchy |
||||
%{l_shtool} mkdir -f -p -m 755 \ |
||||
$RPM_BUILD_ROOT%{l_prefix}/etc/rc.d \ |
||||
$RPM_BUILD_ROOT%{l_prefix}/etc/fsl \ |
||||
$RPM_BUILD_ROOT%{l_prefix}/etc/nsd/nsd.db \ |
||||
$RPM_BUILD_ROOT%{l_prefix}/sbin \ |
||||
$RPM_BUILD_ROOT%{l_prefix}/man/man8 \ |
||||
$RPM_BUILD_ROOT%{l_prefix}/var/nsd |
||||
|
||||
# perform default installation procedure |
||||
%{l_make} %{l_mflags} install \ |
||||
PREFIX="$RPM_BUILD_ROOT%{l_prefix}" \ |
||||
NSDZONESDIR="$RPM_BUILD_ROOT%{l_prefix}/etc/nsd" \ |
||||
NSDZONES="$RPM_BUILD_ROOT%{l_prefix}/etc/nsd/nsd.zones" \ |
||||
NSDDB="$RPM_BUILD_ROOT%{l_prefix}/var/nsd/nsd.db" \ |
||||
NSDPIDFILE="$RPM_BUILD_ROOT%{l_prefix}/var/nsd/nsd.pid" \ |
||||
INSTALL="%{l_shtool} install -c" |
||||
|
||||
# install default configuration |
||||
%{l_shtool} install -c -m 644 \ |
||||
%{SOURCE nsdc.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/nsd/ |
||||
%{l_shtool} install -c -m 644 \ |
||||
%{SOURCE nsd.zones} $RPM_BUILD_ROOT%{l_prefix}/etc/nsd/ |
||||
%{l_shtool} install -c -m 644 \ |
||||
%{SOURCE example.com} $RPM_BUILD_ROOT%{l_prefix}/etc/nsd/nsd.db/ |
||||
|
||||
# install run-command script |
||||
%{l_shtool} install -c -m 755 \ |
||||
-e 's;@l_prefix@;%{l_prefix};g' \ |
||||
-e 's;@l_susr@;%{l_susr};g' \ |
||||
%{SOURCE rc.nsd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
||||
|
||||
# install fsl configuration file |
||||
%{l_shtool} install -c -m 644 \ |
||||
-e 's;@l_prefix@;%{l_prefix};g' \ |
||||
%{SOURCE fsl.nsd} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/ |
||||
|
||||
# strip installation |
||||
strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true |
||||
|
||||
# determine installation files |
||||
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
||||
%{l_files_std} \ |
||||
'%not %dir %{l_prefix}/etc/rc.d' \ |
||||
'%not %dir %{l_prefix}/etc/fsl' \ |
||||
'%attr(755,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/nsd' |
||||
|
||||
%files -f files |
||||
|
||||
%clean |
||||
rm -rf $RPM_BUILD_ROOT |
||||
|
||||
%post |
||||
# update database |
||||
%{l_prefix}/sbin/nsdc rebuild |
||||
|
||||
@ -0,0 +1,9 @@
|
||||
;; |
||||
;; nsd.zones -- NSD Zones Configuration |
||||
;; |
||||
|
||||
;zone name filename [ masters/notify ip-address ] |
||||
zone example.com nsd.db/example.com |
||||
;zone example.org nsd.db/example.org notify 192.168.0.1 192.168.0.2 192.168.0.3 |
||||
;zone example.net nsd.db/example.net masters 192.168.0.4 |
||||
|
||||
@ -0,0 +1,6 @@
|
||||
## |
||||
## nsdc.conf -- nsd control configuration |
||||
## |
||||
|
||||
NSDFLAGS="-a 127.0.0.1 -p 53" |
||||
|
||||
@ -0,0 +1,23 @@
|
||||
#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc |
||||
## |
||||
## rc.nsd -- Run-Commands for NSD |
||||
## |
||||
|
||||
%config |
||||
nsd_enable="yes" |
||||
|
||||
%start -p 100 -u @l_susr@ |
||||
if opServiceEnabled nsd; then |
||||
@l_prefix@/sbin/nsdc start |
||||
fi |
||||
|
||||
%stop -p 200 -u @l_susr@ |
||||
if opServiceEnabled nsd; then |
||||
@l_prefix@/sbin/nsdc stop |
||||
fi |
||||
|
||||
%reload -p 200 -u @l_susr@ |
||||
if opServiceEnabled nsd; then |
||||
@l_prefix@/sbin/nsdc reload |
||||
fi |
||||
|
||||
Loading…
Reference in new issue