Import package vendor original specs for necessary manipulations.

Tue, 28 Aug 2012 18:33:15 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:33:15 +0200
changeset 556
d927b76d07e3
parent 555
434e5cc73d47
child 557
00e3ab20fe25

Import package vendor original specs for necessary manipulations.

bind/bind.patch file | annotate | diff | comparison | revisions
bind/bind.spec file | annotate | diff | comparison | revisions
bind/bind.txt file | annotate | diff | comparison | revisions
bind/rc.bind file | annotate | diff | comparison | revisions
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/bind/bind.patch	Tue Aug 28 18:33:15 2012 +0200
     1.3 @@ -0,0 +1,56 @@
     1.4 +Index: bin/named/unix/os.c
     1.5 +--- bin/named/unix/os.c.orig	2008-05-06 03:32:51 +0200
     1.6 ++++ bin/named/unix/os.c	2008-07-25 07:47:14 +0200
     1.7 +@@ -261,6 +261,13 @@
     1.8 + 	SET_CAP(CAP_SETGID);
     1.9 + 
    1.10 + 	/*
    1.11 ++	 * Since we call chown, we need this.
    1.12 ++	 */
    1.13 ++#if defined(CAP_CHOWN)
    1.14 ++	SET_CAP(CAP_CHOWN);
    1.15 ++#endif
    1.16 ++
    1.17 ++	/*
    1.18 + 	 * Without this, we run into problems reading a configuration file
    1.19 + 	 * owned by a non-root user and non-world-readable on startup.
    1.20 + 	 */
    1.21 +
    1.22 +-----------------------------------------------------------------------------
    1.23 +
    1.24 +As mentionned in http://groups.google.com/group/comp.protocols.dns.bind/browse_thread/thread/5a6cb9a54b56b199
    1.25 +"Assertion debug information" without this patch BIND+dlz crashes when
    1.26 +doing zone transfer request ("host -la domain server")
    1.27 +
    1.28 +Index: bin/named/xfrout.c
    1.29 +--- bin/named/xfrout.c.orig	2008-04-03 08:20:33.000000000 +0200
    1.30 ++++ bin/named/xfrout.c	2008-11-27 08:58:20.000000000 +0100
    1.31 +@@ -1744,6 +1745,7 @@ xfrout_senddone(isc_task_t *task, isc_ev
    1.32 + 		sendstream(xfr);
    1.33 + 	} else {
    1.34 + 		/* End of zone transfer stream. */
    1.35 ++               if (xfr->zone != NULL)
    1.36 + 		inc_stats(xfr->zone, dns_nsstatscounter_xfrdone);
    1.37 + 		xfrout_log(xfr, ISC_LOG_INFO, "%s ended", xfr->mnemonic);
    1.38 + 		ns_client_next(xfr->client, ISC_R_SUCCESS);
    1.39 +
    1.40 +-----------------------------------------------------------------------------
    1.41 +
    1.42 +OpenPKG intentionally uses a reused "rdnc.key" and a "rdnc.conf"
    1.43 +and hence we don't want to see those warning messages.
    1.44 +
    1.45 +Index: bin/rndc/rndc.c
    1.46 +--- bin/rndc/rndc.c.orig	2010-07-11 02:12:18.000000000 +0200
    1.47 ++++ bin/rndc/rndc.c	2011-02-06 17:08:38.000000000 +0100
    1.48 +@@ -468,9 +468,11 @@
    1.49 + 			      admin_conffile, admin_keyfile);
    1.50 + 		key_only = ISC_TRUE;
    1.51 + 	} else if (! c_flag && isc_file_exists(admin_keyfile)) {
    1.52 ++		/*
    1.53 + 		fprintf(stderr, "WARNING: key file (%s) exists, but using "
    1.54 + 			"default configuration file (%s)\n",
    1.55 + 			admin_keyfile, admin_conffile);
    1.56 ++		*/
    1.57 + 	}
    1.58 + 
    1.59 + 	DO("create parser", cfg_parser_create(mctx, log, pctxp));
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/bind/bind.spec	Tue Aug 28 18:33:15 2012 +0200
     2.3 @@ -0,0 +1,244 @@
     2.4 +##
     2.5 +##  bind.spec -- OpenPKG RPM Package Specification
     2.6 +##  Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
     2.7 +##
     2.8 +##  Permission to use, copy, modify, and distribute this software for
     2.9 +##  any purpose with or without fee is hereby granted, provided that
    2.10 +##  the above copyright notice and this permission notice appear in all
    2.11 +##  copies.
    2.12 +##
    2.13 +##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    2.14 +##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
    2.15 +##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
    2.16 +##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
    2.17 +##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    2.18 +##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    2.19 +##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    2.20 +##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    2.21 +##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    2.22 +##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    2.23 +##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    2.24 +##  SUCH DAMAGE.
    2.25 +##
    2.26 +
    2.27 +#   package version
    2.28 +%define       V_opkg  9.9.1p1
    2.29 +%define       V_dist  9.9.1-P1
    2.30 +
    2.31 +#   package information
    2.32 +Name:         bind
    2.33 +Summary:      Berkeley Internet Name Domain (BIND)
    2.34 +URL:          https://www.isc.org/software/bind
    2.35 +Vendor:       Internet Software Foundation
    2.36 +Packager:     OpenPKG Foundation e.V.
    2.37 +Distribution: OpenPKG Community
    2.38 +Class:        BASE
    2.39 +Group:        DNS
    2.40 +License:      ISC
    2.41 +Version:      %{V_opkg}
    2.42 +Release:      20120707
    2.43 +
    2.44 +#   package options
    2.45 +%option       with_dnssec    yes
    2.46 +%option       with_threads   no
    2.47 +%option       with_pgsql     no
    2.48 +%option       with_mysql     no
    2.49 +%option       with_odbc      no
    2.50 +%option       with_bdb       no
    2.51 +%option       with_fs        no
    2.52 +%option       with_ldap      no
    2.53 +
    2.54 +#   list of sources
    2.55 +Source0:      ftp://ftp.isc.org/isc/bind9/%{V_dist}/bind-%{V_dist}.tar.gz
    2.56 +Source1:      bind.txt
    2.57 +Source2:      rc.bind
    2.58 +Patch0:       bind.patch
    2.59 +
    2.60 +#   build information
    2.61 +BuildPreReq:  OpenPKG, openpkg >= 20100101, make, pkgconfig
    2.62 +PreReq:       OpenPKG, openpkg >= 20100101
    2.63 +%if "%{with_dnssec}" == "yes"
    2.64 +BuildPreReq:  openssl
    2.65 +PreReq:       openssl
    2.66 +%endif
    2.67 +%if "%{with_pgsql}" == "yes"
    2.68 +BuildPreReq:  postgresql, openssl
    2.69 +PreReq:       postgresql, openssl
    2.70 +%endif
    2.71 +%if "%{with_mysql}" == "yes"
    2.72 +BuildPreReq:  mysql
    2.73 +PreReq:       mysql
    2.74 +%endif
    2.75 +%if "%{with_odbc}" == "yes"
    2.76 +BuildPreReq:  ODBC
    2.77 +PreReq:       ODBC
    2.78 +%endif
    2.79 +%if "%{with_bdb}" == "yes"
    2.80 +BuildPreReq:  db
    2.81 +PreReq:       db
    2.82 +%endif
    2.83 +%if "%{with_ldap}" == "yes"
    2.84 +BuildPreReq:  openldap, openssl
    2.85 +PreReq:       openldap, openssl
    2.86 +%endif
    2.87 +Conflicts:    powerdns
    2.88 +
    2.89 +%description
    2.90 +    Berkeley Internet Name Domain (BIND) is an implementation of
    2.91 +    the Domain Name System (DNS) protocols and provides an openly
    2.92 +    redistributable reference implementation of the major components
    2.93 +    of the Domain Name System, including a Domain Name System server
    2.94 +    (named)
    2.95 +
    2.96 +%track
    2.97 +    prog bind = {
    2.98 +        version   = %{V_dist}
    2.99 +        url       = ftp://ftp.isc.org/isc/bind9/
   2.100 +        regex     = (\d+\.\d+\.\d+(?:-P\d+)?)
   2.101 +        url       = ftp://ftp.isc.org/isc/bind9/__NEWVER__/
   2.102 +        regex     = bind-(\d+\.\d+\.\d+(?:-P\d+)?)\.tar\.gz
   2.103 +    }
   2.104 +
   2.105 +%prep
   2.106 +    %setup -q -n bind-%{V_dist}
   2.107 +    %patch -p0
   2.108 +
   2.109 +%build
   2.110 +    #   configure program
   2.111 +    %{l_shtool} subst \
   2.112 +        -e '/LINENO: error: C[+]* preprocessor/{N;N;N;N;s/.*/:/;}' \
   2.113 +        configure
   2.114 +    export CC="%{l_cc}"
   2.115 +    export CFLAGS="%{l_cflags -O} %{l_cppflags}"
   2.116 +    export LDFLAGS="%{l_ldflags}"
   2.117 +    export LIBS=""
   2.118 +%if "%{with_pgsql}" == "yes"
   2.119 +    CFLAGS="$CFLAGS %{l_cppflags postgresql .}"
   2.120 +%endif
   2.121 +%if "%{with_dnssec}" == "yes"
   2.122 +    LIBS="$LIBS `pkg-config openssl --libs`"
   2.123 +%endif
   2.124 +    GREP="grep" \
   2.125 +    ./configure \
   2.126 +        --prefix=%{l_prefix} \
   2.127 +        --mandir=%{l_prefix}/man \
   2.128 +        --sysconfdir=%{l_prefix}/etc/bind \
   2.129 +        --localstatedir=%{l_prefix}/var/bind \
   2.130 +%if "%{with_dnssec}" == "yes"
   2.131 +        --with-openssl=%{l_prefix} \
   2.132 +%else
   2.133 +        --without-openssl \
   2.134 +%endif
   2.135 +%if "%{with_threads}" == "yes"
   2.136 +        --enable-threads \
   2.137 +%else
   2.138 +        --disable-threads \
   2.139 +%endif
   2.140 +%if "%{with_pgsql}" == "yes"
   2.141 +        --with-dlz-postgres=%{l_prefix} \
   2.142 +%endif
   2.143 +%if "%{with_mysql}" == "yes"
   2.144 +        --with-dlz-mysql=%{l_prefix} \
   2.145 +%endif
   2.146 +%if "%{with_odbc}" == "yes"
   2.147 +        --with-dlz-odbc=%{l_prefix} \
   2.148 +%endif
   2.149 +%if "%{with_bdb}" == "yes"
   2.150 +        --with-dlz-bdb=%{l_prefix} \
   2.151 +%endif
   2.152 +%if "%{with_fs}" == "yes"
   2.153 +        --with-dlz-filesystem \
   2.154 +%endif
   2.155 +%if "%{with_ldap}" == "yes"
   2.156 +        --with-dlz-ldap=%{l_prefix} \
   2.157 +%endif
   2.158 +        --without-libbind \
   2.159 +        --without-libxml2 \
   2.160 +        --without-gssapi \
   2.161 +        --with-libtool \
   2.162 +        --disable-shared \
   2.163 +        --disable-nls
   2.164 +
   2.165 +    #   build program
   2.166 +    %{l_make} %{l_mflags}
   2.167 +
   2.168 +%install
   2.169 +
   2.170 +    #   perform standard install procedure
   2.171 +    %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
   2.172 +
   2.173 +    #   strip down installation
   2.174 +    strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
   2.175 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   2.176 +    rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/isc-config.sh
   2.177 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/include
   2.178 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib
   2.179 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man3
   2.180 +    rm -rf $RPM_BUILD_ROOT%{l_prefix}/var/bind/run
   2.181 +
   2.182 +    #   install BIND9 ARM
   2.183 +    %{l_shtool} mkdir -f -p -m 755 \
   2.184 +        $RPM_BUILD_ROOT%{l_prefix}/share/bind
   2.185 +    %{l_shtool} install -c -m 644 \
   2.186 +        doc/arm/*ARM*.html $RPM_BUILD_ROOT%{l_prefix}/share/bind/
   2.187 +
   2.188 +    #   install run-command script
   2.189 +    %{l_shtool} mkdir -f -p -m 755 \
   2.190 +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
   2.191 +    %{l_shtool} install -c -m 755 %{l_value -s -a} \
   2.192 +        %{SOURCE rc.bind} \
   2.193 +        $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   2.194 +
   2.195 +    #   install default configuration
   2.196 +    %{l_shtool} mkdir -f -p -m 755 \
   2.197 +        $RPM_BUILD_ROOT%{l_prefix}/etc/bind \
   2.198 +        $RPM_BUILD_ROOT%{l_prefix}/etc/bind/named.db
   2.199 +    for name in `grep "^<file" %{SOURCE bind.txt} | sed -e 's;^.*name=";;' -e 's;".*$;;'`; do
   2.200 +        name_escaped=`echo "$name" | sed -e 's;/;\\\\/;g'`
   2.201 +        (echo ""; cat %{SOURCE bind.txt}; echo "") |\
   2.202 +            sed -e "1,/^<file name=\"$name_escaped\">/d" -e "/<\/file>/,\$d" >tmp.txt
   2.203 +        %{l_shtool} install -c -m 644 %{l_value -s -a} \
   2.204 +            tmp.txt $RPM_BUILD_ROOT%{l_prefix}/etc/bind/$name
   2.205 +    done
   2.206 +
   2.207 +    #   create an empty var directory
   2.208 +    %{l_shtool} mkdir -f -p -m 755 \
   2.209 +        $RPM_BUILD_ROOT%{l_prefix}/var/bind
   2.210 +
   2.211 +    #   determine the installed files
   2.212 +    %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
   2.213 +        %{l_files_std} \
   2.214 +        '%config %attr(640,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/bind/*.conf' \
   2.215 +        '%config %attr(775,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/bind/named.db' \
   2.216 +        '%config %attr(644,%{l_musr},%{l_rgrp}) %{l_prefix}/etc/bind/named.db/*' \
   2.217 +        '%dir %attr(775,%{l_rusr},%{l_rgrp}) %{l_prefix}/var/bind'
   2.218 +
   2.219 +%files -f files
   2.220 +
   2.221 +%clean
   2.222 +
   2.223 +%post
   2.224 +    if [ ! -f $RPM_INSTALL_PREFIX/etc/bind/rndc.key ]; then
   2.225 +        #   generate local rndc(8) key
   2.226 +        ( echo "Generating RSA key for RNDC operation in $RPM_INSTALL_PREFIX/etc/bind/rndc.key."
   2.227 +          echo "Please be patient, this takes a non-deterministic amount of time."
   2.228 +        ) | %{l_rpmtool} msg -b -t notice
   2.229 +        $RPM_INSTALL_PREFIX/sbin/rndc-confgen -a
   2.230 +        chown %{l_musr}:%{l_rgrp} $RPM_INSTALL_PREFIX/etc/bind/rndc.key
   2.231 +        chmod 640 $RPM_INSTALL_PREFIX/etc/bind/rndc.key
   2.232 +    fi
   2.233 +
   2.234 +    #   after upgrade, restart service
   2.235 +    [ $1 -eq 2 ] || exit 0
   2.236 +    eval `%{l_rc} bind status 2>/dev/null`
   2.237 +    [ ".$bind_active" = .yes ] && %{l_rc} bind restart
   2.238 +    exit 0
   2.239 +
   2.240 +%preun
   2.241 +    #   before erase, stop service and remove log files
   2.242 +    [ $1 -eq 0 ] || exit 0
   2.243 +    %{l_rc} bind stop 2>/dev/null
   2.244 +    rm -f $RPM_INSTALL_PREFIX/etc/bind/rndc.key
   2.245 +    rm -f $RPM_INSTALL_PREFIX/var/bind/*
   2.246 +    exit 0
   2.247 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/bind/bind.txt	Tue Aug 28 18:33:15 2012 +0200
     3.3 @@ -0,0 +1,255 @@
     3.4 +<file name="named.conf">
     3.5 +##
     3.6 +##  @l_prefix@/etc/bind/named.conf -- BIND configuration
     3.7 +##
     3.8 +
     3.9 +controls {
    3.10 +    unix "@l_prefix@/var/bind/named.ctl"
    3.11 +         perm 0600 owner @l_ruid@ group @l_rgid@
    3.12 +         keys { "rndc-key"; };
    3.13 +    #inet 127.0.0.1 port 953
    3.14 +         #allow { 127.0.0.1;  }
    3.15 +         #keys  { "rndc-key"; };
    3.16 +};
    3.17 +
    3.18 +include "@l_prefix@/etc/bind/rndc.key";
    3.19 +
    3.20 +logging {
    3.21 +    channel logfile {
    3.22 +        file "@l_prefix@/var/bind/named.log";
    3.23 +        severity info;
    3.24 +        print-category yes;
    3.25 +        print-severity no;
    3.26 +        print-time yes;
    3.27 +    };
    3.28 +    category "default"         { "logfile"; };
    3.29 +    category "client"          { "logfile"; };
    3.30 +    category "config"          { "logfile"; };
    3.31 +    category "database"        { "logfile"; };
    3.32 +    category "delegation-only" { "logfile"; };
    3.33 +    category "dispatch"        { "logfile"; };
    3.34 +    category "dnssec"          { "logfile"; };
    3.35 +    category "general"         { "logfile"; };
    3.36 +    category "lame-servers"    { "logfile"; };
    3.37 +    category "network"         { "logfile"; };
    3.38 +    category "notify"          { "logfile"; };
    3.39 +    category "queries"         { "logfile"; };
    3.40 +    category "resolver"        { "logfile"; };
    3.41 +    category "security"        { "logfile"; };
    3.42 +    category "update"          { "logfile"; };
    3.43 +    category "xfer-in"         { "logfile"; };
    3.44 +    category "xfer-out"        { "logfile"; };
    3.45 +    category "unmatched"       { "null";    };
    3.46 +};
    3.47 +
    3.48 +options {
    3.49 +    pid-file             "@l_prefix@/var/bind/named.pid";
    3.50 +    directory            "@l_prefix@/etc/bind/named.db";
    3.51 +    statistics-file      "@l_prefix@/var/bind/named.stats";
    3.52 +    allow-query          { any; };
    3.53 +    allow-transfer       { any; };
    3.54 +    allow-recursion      { 127.0.0.0/8; };
    3.55 +    recursion            yes;
    3.56 +    transfers-in         10;
    3.57 +    transfers-per-ns     2;
    3.58 +    max-transfer-time-in 120;
    3.59 +    transfer-format      one-answer;
    3.60 +    cleaning-interval    60;
    3.61 +    interface-interval   60;
    3.62 +    listen-on            port 53 { 127.0.0.1; };
    3.63 +    #query-source        address 127.0.0.1 port *;
    3.64 +    #transfer-source     127.0.0.1;
    3.65 +    #notify-source       127.0.0.1;
    3.66 +};
    3.67 +
    3.68 +zone "." IN {
    3.69 +    type hint;
    3.70 +    file "db.root";
    3.71 +};
    3.72 +
    3.73 +zone "localhost" IN {
    3.74 +    type           master;
    3.75 +    file           "db.localhost";
    3.76 +    notify         no;
    3.77 +    allow-update   { none; };
    3.78 +    allow-transfer { any;  };
    3.79 +};
    3.80 +
    3.81 +zone "0.0.127.in-addr.arpa" IN {
    3.82 +    type           master;
    3.83 +    file           "db.localhost.ipv4";
    3.84 +    notify         no;
    3.85 +    allow-update   { none; };
    3.86 +    allow-transfer { any;  };
    3.87 +};
    3.88 +
    3.89 +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" {
    3.90 +    type           master;
    3.91 +    file           "db.localhost.ipv6";
    3.92 +    notify         no;
    3.93 +    allow-update   { none; };
    3.94 +    allow-transfer { any;  };
    3.95 +};
    3.96 +
    3.97 +</file>
    3.98 +<file name="rndc.conf">
    3.99 +##
   3.100 +##  @l_prefix@/etc/bind/rndc.conf -- BIND rndc configuration
   3.101 +##
   3.102 +
   3.103 +options {
   3.104 +    default-server localhost-unix;
   3.105 +};
   3.106 +
   3.107 +server localhost-unix {
   3.108 +    addresses { "@l_prefix@/var/bind/named.ctl"; };
   3.109 +    key "rndc-key";
   3.110 +};
   3.111 +
   3.112 +server localhost-inet {
   3.113 +    addresses { 127.0.0.1; };
   3.114 +    port 953;
   3.115 +    key "rndc-key";
   3.116 +};
   3.117 +
   3.118 +include "@l_prefix@/etc/bind/rndc.key";
   3.119 +
   3.120 +</file>
   3.121 +<file name="named.db/db.root">
   3.122 +;;
   3.123 +;;  db.root -- Internet Root Nameservers
   3.124 +;;  DO NOT EDIT, IT WAS AUTOMATICALLY CREATED ON 2011-02-06 BY db.root.sh!
   3.125 +;;
   3.126 +
   3.127 +.                    99999999  IN  NS   A.ROOT-SERVERS.NET.
   3.128 +.                    99999999  IN  NS   B.ROOT-SERVERS.NET.
   3.129 +.                    99999999  IN  NS   C.ROOT-SERVERS.NET.
   3.130 +.                    99999999  IN  NS   D.ROOT-SERVERS.NET.
   3.131 +.                    99999999  IN  NS   E.ROOT-SERVERS.NET.
   3.132 +.                    99999999  IN  NS   F.ROOT-SERVERS.NET.
   3.133 +.                    99999999  IN  NS   G.ROOT-SERVERS.NET.
   3.134 +.                    99999999  IN  NS   H.ROOT-SERVERS.NET.
   3.135 +.                    99999999  IN  NS   I.ROOT-SERVERS.NET.
   3.136 +.                    99999999  IN  NS   J.ROOT-SERVERS.NET.
   3.137 +.                    99999999  IN  NS   K.ROOT-SERVERS.NET.
   3.138 +.                    99999999  IN  NS   L.ROOT-SERVERS.NET.
   3.139 +.                    99999999  IN  NS   M.ROOT-SERVERS.NET.
   3.140 +A.ROOT-SERVERS.NET.  99999999  IN  A    198.41.0.4
   3.141 +A.ROOT-SERVERS.NET.  99999999  IN  AAAA 2001:503:ba3e::2:30
   3.142 +B.ROOT-SERVERS.NET.  99999999  IN  A    192.228.79.201
   3.143 +C.ROOT-SERVERS.NET.  99999999  IN  A    192.33.4.12
   3.144 +D.ROOT-SERVERS.NET.  99999999  IN  A    128.8.10.90
   3.145 +E.ROOT-SERVERS.NET.  99999999  IN  A    192.203.230.10
   3.146 +F.ROOT-SERVERS.NET.  99999999  IN  A    192.5.5.241
   3.147 +F.ROOT-SERVERS.NET.  99999999  IN  AAAA 2001:500:2f::f
   3.148 +G.ROOT-SERVERS.NET.  99999999  IN  A    192.112.36.4
   3.149 +H.ROOT-SERVERS.NET.  99999999  IN  A    128.63.2.53
   3.150 +H.ROOT-SERVERS.NET.  99999999  IN  AAAA 2001:500:1::803f:235
   3.151 +I.ROOT-SERVERS.NET.  99999999  IN  A    192.36.148.17
   3.152 +I.ROOT-SERVERS.NET.  99999999  IN  AAAA 2001:7fe::53
   3.153 +J.ROOT-SERVERS.NET.  99999999  IN  A    192.58.128.30
   3.154 +J.ROOT-SERVERS.NET.  99999999  IN  AAAA 2001:503:c27::2:30
   3.155 +K.ROOT-SERVERS.NET.  99999999  IN  A    193.0.14.129
   3.156 +K.ROOT-SERVERS.NET.  99999999  IN  AAAA 2001:7fd::1
   3.157 +L.ROOT-SERVERS.NET.  99999999  IN  A    199.7.83.42
   3.158 +L.ROOT-SERVERS.NET.  99999999  IN  AAAA 2001:500:3::42
   3.159 +M.ROOT-SERVERS.NET.  99999999  IN  A    202.12.27.33
   3.160 +M.ROOT-SERVERS.NET.  99999999  IN  AAAA 2001:dc3::35
   3.161 +
   3.162 +</file>
   3.163 +<file name="named.db/db.root.sh">
   3.164 +#!/bin/sh
   3.165 +
   3.166 +ROOTFILE=./db.root
   3.167 +
   3.168 +echo '@l_prefix@' | egrep '^@l_' | egrep 'prefix@$' >/dev/null
   3.169 +if [ $? -eq 0 ]; then
   3.170 +    CURL='curl'
   3.171 +    DIG='dig'
   3.172 +else
   3.173 +    CURL='@l_prefix@/bin/openpkg curl'
   3.174 +    DIG='@l_prefix@/bin/dig'
   3.175 +fi
   3.176 +
   3.177 +date=`date '+%Y-%m-%d'`
   3.178 +cat >$ROOTFILE <<EOT
   3.179 +;;
   3.180 +;;  db.root -- Internet Root Nameservers
   3.181 +;;  DO NOT EDIT, IT WAS AUTOMATICALLY CREATED ON $date BY db.root.sh!
   3.182 +;;
   3.183 +
   3.184 +EOT
   3.185 +
   3.186 +$CURL -s -L ftp://ftp.internic.net/domain/named.root >$ROOTFILE.raw
   3.187 +for i in A B C D E F G H I J K L M; do
   3.188 +    ${DIG} @$i.ROOT-SERVERS.NET . NS >>$ROOTFILE.raw
   3.189 +done
   3.190 +[ -f $ROOTFILE.raw ] || exit 1
   3.191 +awk <$ROOTFILE.raw '
   3.192 +  /[ 	]NS[ 	]/ { printf("%-20s 99999999  IN  NS   %s\n", $1, toupper($NF)); }
   3.193 +  /[ 	]AAAA[ 	]/ { printf("%-20s 99999999  IN  AAAA %s\n", toupper($1), tolower($NF)); }
   3.194 +  /[ 	]A[ 	]/ { printf("%-20s 99999999  IN  A    %s\n", toupper($1), tolower($NF)); }
   3.195 +' |\
   3.196 +egrep -v '^;' |\
   3.197 +sort -u >>$ROOTFILE
   3.198 +echo "" >>$ROOTFILE
   3.199 +rm $ROOTFILE.raw
   3.200 +
   3.201 +</file>
   3.202 +<file name="named.db/db.localhost">
   3.203 +;;
   3.204 +;;  db.localhost -- zonefile for the forward mapping of the loopback network
   3.205 +;;
   3.206 +
   3.207 +$TTL    86400
   3.208 +
   3.209 +@       IN  SOA     localhost. root.localhost. (
   3.210 +                        2001010101 ; SERIAL
   3.211 +                        6H         ; REFRESH: Secondaries refresh
   3.212 +                        60M        ; RETRY:   Secondaries retry
   3.213 +                        1W         ; EXPIRE:  Maximum TTL of data (expiry)
   3.214 +                        1D         ; MINTTL:  Minimum TTL of data (expiry)
   3.215 +                    )
   3.216 +
   3.217 +        IN  NS      @
   3.218 +        IN  A       127.0.0.1
   3.219 +
   3.220 +</file>
   3.221 +<file name="named.db/db.localhost.ipv4">
   3.222 +;;
   3.223 +;;  db.localhost.ipv4 -- zonefile for the IPv4 reverse mapping of the loopback network
   3.224 +;;
   3.225 +
   3.226 +$TTL    86400
   3.227 +
   3.228 +@       IN  SOA     localhost. root.localhost. (
   3.229 +                        2001010101 ; SERIAL
   3.230 +                        6H         ; REFRESH: Secondaries refresh
   3.231 +                        60M        ; RETRY:   Secondaries retry
   3.232 +                        1W         ; EXPIRE:  Maximum TTL of data (expiry)
   3.233 +                        1D         ; MINTTL:  Minimum TTL of data (expiry)
   3.234 +                    )
   3.235 +
   3.236 +        IN  NS      @
   3.237 +1       IN  PTR     localhost.
   3.238 +
   3.239 +</file>
   3.240 +<file name="named.db/db.localhost.ipv6">
   3.241 +;;
   3.242 +;;  db.localhost.ipv6 -- zonefile for the IPv6 reverse mapping of the loopback network
   3.243 +;;
   3.244 +
   3.245 +$TTL    86400
   3.246 +
   3.247 +@       IN  SOA     localhost. root.localhost. (
   3.248 +                        2001010101 ; SERIAL
   3.249 +                        6H         ; REFRESH: Secondaries refresh
   3.250 +                        60M        ; RETRY:   Secondaries retry
   3.251 +                        1W         ; EXPIRE:  Maximum TTL of data (expiry)
   3.252 +                        1D         ; MINTTL:  Minimum TTL of data (expiry)
   3.253 +                    )
   3.254 +
   3.255 +        IN  NS      @
   3.256 +        IN  PTR     localhost.
   3.257 +
   3.258 +</file>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/bind/rc.bind	Tue Aug 28 18:33:15 2012 +0200
     4.3 @@ -0,0 +1,64 @@
     4.4 +#!@l_prefix@/bin/openpkg rc
     4.5 +##
     4.6 +##  rc.bind -- Run-Commands
     4.7 +##
     4.8 +
     4.9 +%config
    4.10 +    bind_enable="$openpkg_rc_def"
    4.11 +    bind_flags=""
    4.12 +    bind_log_prolog="true"
    4.13 +    bind_log_epilog="true"
    4.14 +    bind_log_numfiles="10"
    4.15 +    bind_log_minsize="1M"
    4.16 +    bind_log_complevel="9"
    4.17 +    bind_stats_prolog="true"
    4.18 +    bind_stats_epilog="true"
    4.19 +    bind_stats_numfiles="10"
    4.20 +    bind_stats_minsize="1M"
    4.21 +    bind_stats_complevel="9"
    4.22 +
    4.23 +%status -u @l_susr@ -o
    4.24 +    bind_usable="no"
    4.25 +    bind_active="no"
    4.26 +    @l_prefix@/sbin/named-checkconf >/dev/null && bind_usable="yes"
    4.27 +    @l_prefix@/sbin/rndc status >/dev/null 2>&1 && bind_active="yes"
    4.28 +    echo "bind_enable=\"$bind_enable\""
    4.29 +    echo "bind_usable=\"$bind_usable\""
    4.30 +    echo "bind_active=\"$bind_active\""
    4.31 +
    4.32 +%start -p 100 -u @l_susr@
    4.33 +    rcService bind enable yes || exit 0
    4.34 +    rcService bind active yes && exit 0
    4.35 +    @l_prefix@/sbin/named -u @l_rusr@ ${bind_flags}
    4.36 +
    4.37 +%stop -p 900 -u @l_susr@
    4.38 +    rcService bind enable yes || exit 0
    4.39 +    rcService bind active no  && exit 0
    4.40 +    @l_prefix@/sbin/rndc stop
    4.41 +    sleep 2
    4.42 +
    4.43 +%restart -p 100 -u @l_susr@
    4.44 +    rcService bind enable yes || exit 0
    4.45 +    rcService bind active no  && exit 0
    4.46 +    rc bind stop start
    4.47 +
    4.48 +%reload -p 100 -u @l_susr@
    4.49 +    rcService bind enable yes || exit 0
    4.50 +    rcService bind active no  && exit 0
    4.51 +    @l_prefix@/sbin/rndc reload
    4.52 +
    4.53 +%daily -u @l_susr@
    4.54 +    rcService bind enable yes || exit 0
    4.55 +    shtool rotate -f \
    4.56 +        -n $bind_stats_numfiles -s $bind_stats_minsize -d \
    4.57 +        -z $bind_stats_complevel -m 644 -o @l_rusr@ -g @l_rgrp@ \
    4.58 +        -P "$bind_stats_prolog" \
    4.59 +        -E "$bind_stats_epilog" \
    4.60 +        @l_prefix@/var/bind/named.stats
    4.61 +    shtool rotate -f \
    4.62 +        -n $bind_log_numfiles -s $bind_log_minsize -d \
    4.63 +        -z $bind_log_complevel -m 644 -o @l_rusr@ -g @l_rgrp@ \
    4.64 +        -P "$bind_log_prolog" \
    4.65 +        -E "$bind_log_epilog; rc bind reload" \
    4.66 +        @l_prefix@/var/bind/named.log
    4.67 +

mercurial