From fc7d3e2a7de9e159d35472ef3fe005346b819cd5 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 31 Jan 2012 13:52:16 +0100 Subject: [PATCH] New package: bind-9.8.1.P1. --- common/shlibs | 6 +++ srcpkgs/bind-devel | 1 + srcpkgs/bind-libs | 1 + srcpkgs/bind-utils | 1 + srcpkgs/bind/INSTALL | 17 ++++++++ srcpkgs/bind/bind-devel.template | 15 +++++++ srcpkgs/bind/bind-libs.rshlibs | 12 ++++++ srcpkgs/bind/bind-libs.template | 10 +++++ srcpkgs/bind/bind-utils.rshlibs | 7 ++++ srcpkgs/bind/bind-utils.template | 14 +++++++ srcpkgs/bind/bind.rshlibs | 12 ++++++ srcpkgs/bind/depends | 2 + srcpkgs/bind/files/127.0.0.zone | 11 ++++++ srcpkgs/bind/files/localhost.zone | 10 +++++ srcpkgs/bind/files/named.conf | 63 ++++++++++++++++++++++++++++++ srcpkgs/bind/files/named.logrotate | 6 +++ srcpkgs/bind/files/named.service | 18 +++++++++ srcpkgs/bind/template | 55 ++++++++++++++++++++++++++ 18 files changed, 261 insertions(+) create mode 120000 srcpkgs/bind-devel create mode 120000 srcpkgs/bind-libs create mode 120000 srcpkgs/bind-utils create mode 100644 srcpkgs/bind/INSTALL create mode 100644 srcpkgs/bind/bind-devel.template create mode 100644 srcpkgs/bind/bind-libs.rshlibs create mode 100644 srcpkgs/bind/bind-libs.template create mode 100644 srcpkgs/bind/bind-utils.rshlibs create mode 100644 srcpkgs/bind/bind-utils.template create mode 100644 srcpkgs/bind/bind.rshlibs create mode 100644 srcpkgs/bind/depends create mode 100644 srcpkgs/bind/files/127.0.0.zone create mode 100644 srcpkgs/bind/files/localhost.zone create mode 100644 srcpkgs/bind/files/named.conf create mode 100644 srcpkgs/bind/files/named.logrotate create mode 100644 srcpkgs/bind/files/named.service create mode 100644 srcpkgs/bind/template diff --git a/common/shlibs b/common/shlibs index 47974c7c2c..25a62b335f 100644 --- a/common/shlibs +++ b/common/shlibs @@ -949,3 +949,9 @@ libgssglue.so.1 libgssglue libgssglue-devel libtirpc.so.1 libtirpc libtirpc-devel librpcsecgss.so.3 librpcsecgss librpcsecgss-devel libnfsidmap.so.0 libnfsidmap libnfsidmap-devel +liblwres.so.80 bind-libs bind-devel +libdns.so.81 bind-libs bind-devel +libbind9.so.80 bind-libs bind-devel +libisccfg.so.82 bind-libs bind-devel +libisc.so.83 bind-libs bind-devel +libisccc.so.80 bind-libs bind-devel diff --git a/srcpkgs/bind-devel b/srcpkgs/bind-devel new file mode 120000 index 0000000000..2569fb0880 --- /dev/null +++ b/srcpkgs/bind-devel @@ -0,0 +1 @@ +bind \ No newline at end of file diff --git a/srcpkgs/bind-libs b/srcpkgs/bind-libs new file mode 120000 index 0000000000..2569fb0880 --- /dev/null +++ b/srcpkgs/bind-libs @@ -0,0 +1 @@ +bind \ No newline at end of file diff --git a/srcpkgs/bind-utils b/srcpkgs/bind-utils new file mode 120000 index 0000000000..2569fb0880 --- /dev/null +++ b/srcpkgs/bind-utils @@ -0,0 +1 @@ +bind \ No newline at end of file diff --git a/srcpkgs/bind/INSTALL b/srcpkgs/bind/INSTALL new file mode 100644 index 0000000000..7bf7f85829 --- /dev/null +++ b/srcpkgs/bind/INSTALL @@ -0,0 +1,17 @@ +case "${ACTION}" in +post) + touch var/log/named.log + chown root:named var/log/named.log + chmod 0770 var/log/named.log + + # create an rndc.key if it doesn't already exist + if [ ! -s etc/named/rndc.key ]; then + usr/sbin/rndc-confgen -r /dev/urandom -b 256 | \ + head -n 5 >> etc/named/rndc.key + chown root:named etc/named/rndc.key + chmod 644 etc/named/rndc.key + fi + chown root:named etc/named/named.conf + chown -R root:named var/named + ;; +esac diff --git a/srcpkgs/bind/bind-devel.template b/srcpkgs/bind/bind-devel.template new file mode 100644 index 0000000000..690804e00d --- /dev/null +++ b/srcpkgs/bind/bind-devel.template @@ -0,0 +1,15 @@ +# Template file for 'bind-devel'. +# +short_desc="${short_desc} - development files" +long_desc="${long_desc} + + This package contains development files, static files, headers, etc." + +Add_dependency run bind-libs + +do_install() { + vmove usr/bin/isc-config.sh usr/bin + vmove usr/share/man/man1/isc-config.sh.1 usr/share/man/man1 + vmove usr/include usr + vmove usr/share/man/man3 usr/share/man +} diff --git a/srcpkgs/bind/bind-libs.rshlibs b/srcpkgs/bind/bind-libs.rshlibs new file mode 100644 index 0000000000..fa83945ac9 --- /dev/null +++ b/srcpkgs/bind/bind-libs.rshlibs @@ -0,0 +1,12 @@ +libdl.so.2 +libpthread.so.0 +libxml2.so.2 +libz.so.1 +libm.so.6 +libc.so.6 +libgssapi_krb5.so.2 +libkrb5.so.3 +libk5crypto.so.3 +libcom_err.so.2 +libcrypto.so.1 +libcap.so.2 diff --git a/srcpkgs/bind/bind-libs.template b/srcpkgs/bind/bind-libs.template new file mode 100644 index 0000000000..5030082f4c --- /dev/null +++ b/srcpkgs/bind/bind-libs.template @@ -0,0 +1,10 @@ +# Template file for 'bind-libs'. +# +short_desc="${short_desc} - Runtime libraries" +long_desc="${long_desc} + + This package contains the runtime libraries." + +do_install() { + vmove "usr/lib/*.so*" usr/lib +} diff --git a/srcpkgs/bind/bind-utils.rshlibs b/srcpkgs/bind/bind-utils.rshlibs new file mode 100644 index 0000000000..f94f5d4958 --- /dev/null +++ b/srcpkgs/bind/bind-utils.rshlibs @@ -0,0 +1,7 @@ +liblwres.so.80 +libdns.so.81 +libbind9.so.80 +libisccfg.so.82 +libisc.so.83 +libpthread.so.0 +libc.so.6 diff --git a/srcpkgs/bind/bind-utils.template b/srcpkgs/bind/bind-utils.template new file mode 100644 index 0000000000..6b642fadb5 --- /dev/null +++ b/srcpkgs/bind/bind-utils.template @@ -0,0 +1,14 @@ +# Template file for 'bind-utils'. +# +short_desc="${short_desc} - DNS utils" +long_desc="${long_desc} + + This package contains dig(1), host(1) and nslookup(1) utilities + provided by bind, containing a set of useful DNS related applications." + +do_install() { + for f in dig host nslookup; do + vmove usr/bin/${f} usr/bin + vmove usr/share/man/man1/${f}.1 usr/share/man/man1 + done +} diff --git a/srcpkgs/bind/bind.rshlibs b/srcpkgs/bind/bind.rshlibs new file mode 100644 index 0000000000..5e1fd21d3b --- /dev/null +++ b/srcpkgs/bind/bind.rshlibs @@ -0,0 +1,12 @@ +libkrb5.so.3 +libdl.so.2 +libpthread.so.0 +libxml2.so.2 +libc.so.6 +liblwres.so.80 +libdns.so.81 +libbind9.so.80 +libisccfg.so.82 +libisccc.so.80 +libisc.so.83 +libcap.so.2 diff --git a/srcpkgs/bind/depends b/srcpkgs/bind/depends new file mode 100644 index 0000000000..8542c2dbd0 --- /dev/null +++ b/srcpkgs/bind/depends @@ -0,0 +1,2 @@ +abi_depends=">=9.8.1" +api_depends="${abi_depends}" diff --git a/srcpkgs/bind/files/127.0.0.zone b/srcpkgs/bind/files/127.0.0.zone new file mode 100644 index 0000000000..509c311f60 --- /dev/null +++ b/srcpkgs/bind/files/127.0.0.zone @@ -0,0 +1,11 @@ +$ORIGIN 0.0.127.in-addr.arpa. + +@ 1D IN SOA localhost. root.localhost. ( + 42 ; serial (yyyymmdd##) + 3H ; refresh + 15M ; retry + 1W ; expiry + 1D ) ; minimum ttl + + 1D IN NS localhost. +1 1D IN PTR localhost. diff --git a/srcpkgs/bind/files/localhost.zone b/srcpkgs/bind/files/localhost.zone new file mode 100644 index 0000000000..e3ff9641cf --- /dev/null +++ b/srcpkgs/bind/files/localhost.zone @@ -0,0 +1,10 @@ +$ORIGIN localhost. +@ 1D IN SOA @ root ( + 42 ; serial (yyyymmdd##) + 3H ; refresh + 15M ; retry + 1W ; expiry + 1D ) ; minimum ttl + + 1D IN NS @ + 1D IN A 127.0.0.1 diff --git a/srcpkgs/bind/files/named.conf b/srcpkgs/bind/files/named.conf new file mode 100644 index 0000000000..72ea3e4eeb --- /dev/null +++ b/srcpkgs/bind/files/named.conf @@ -0,0 +1,63 @@ +// +// /etc/named/named.conf +// + +options { + directory "/var/named"; + pid-file "/var/run/named/named.pid"; + auth-nxdomain yes; + datasize default; +// Uncomment these to enable IPv6 connections support +// IPv4 will still work: +// listen-on-v6 { any; }; +// Add this for no IPv4: +// listen-on { none; }; + + // Default security settings. + allow-recursion { 127.0.0.1; }; + allow-transfer { none; }; + allow-update { none; }; + version none; + hostname none; + server-id none; +}; + +zone "localhost" IN { + type master; + file "localhost.zone"; + allow-transfer { any; }; +}; + +zone "0.0.127.in-addr.arpa" IN { + type master; + file "127.0.0.zone"; + allow-transfer { any; }; +}; + +zone "." IN { + type hint; + file "root.hint"; +}; + +//zone "example.org" IN { +// type slave; +// file "example.zone"; +// masters { +// 192.168.1.100; +// }; +// allow-query { any; }; +// allow-transfer { any; }; +//}; + +logging { + channel xfer-log { + file "/var/log/named.log"; + print-category yes; + print-severity yes; + print-time yes; + severity info; + }; + category xfer-in { xfer-log; }; + category xfer-out { xfer-log; }; + category notify { xfer-log; }; +}; diff --git a/srcpkgs/bind/files/named.logrotate b/srcpkgs/bind/files/named.logrotate new file mode 100644 index 0000000000..ef1a2d0329 --- /dev/null +++ b/srcpkgs/bind/files/named.logrotate @@ -0,0 +1,6 @@ +/var/log/named.log { + missingok + postrotate + /bin/kill -HUP `cat /var/run/named/named.pid 2>/dev/null` 2>/dev/null || true + endscript +} diff --git a/srcpkgs/bind/files/named.service b/srcpkgs/bind/files/named.service new file mode 100644 index 0000000000..6c8454b239 --- /dev/null +++ b/srcpkgs/bind/files/named.service @@ -0,0 +1,18 @@ +[Unit] +Description=Berkeley Internet Name Domain (DNS) server +Wants=nss-lookup.target +Before=nss-lookup.target +After=network.target + +[Service] +Type=forking +PIDFile=/var/run/named/named.pid +ExecStartPre=/usr/sbin/named-checkconf -z /etc/named/named.conf +ExecStart=/usr/sbin/named -u named +ExecReload=/bin/sh -c '/usr/sbin/rndc reload > /dev/null 2>&1 || /bin/kill -HUP $MAINPID' +ExecStop=/bin/sh -c '/usr/sbin/rndc stop > /dev/null 2>&1 || /bin/kill -TERM $MAINPID' +PrivateTmp=true +TimeoutSec=25 + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/bind/template b/srcpkgs/bind/template new file mode 100644 index 0000000000..efb1b94335 --- /dev/null +++ b/srcpkgs/bind/template @@ -0,0 +1,55 @@ +# Template file for 'bind' +pkgname=bind +_distver=9.8.1 +_patchver=P1 +version=${_distver}.${_patchver} +wrksrc=${pkgname}-${_distver}-${_patchver} +homepage="http://www.isc.org/software/bind/" +distfiles="http://ftp.isc.org/isc/bind9/${_distver}-${_patchver}/bind-${_distver}-${_patchver}.tar.gz" +build_style=gnu-configure +configure_args="--disable-static --with-openssl --with-libxml2 +--enable-threads --enable-largefile --enable-ipv6 --with-libtool +--enable-atomic --sysconfdir=/etc/named" +short_desc="Berkeley Internet Name Domain server" +maintainer="Juan RP " +license="ISC" +checksum=867fdd52d3436c6ab6d357108d7f9eaaf03f1422652e6e61c742816ff7f87929 +long_desc=" + BIND is by far the most widely used DNS software on the Internet. It provides + a robust and stable platform on top of which organizations can build + distributed computing systems with the knowledge that those systems are fully + compliant with published DNS standards." + +subpackages="bind-libs bind-utils bind-devel" + +make_dirs=" +/var/named 0770 root named +/var/run/named 0770 root named" + +systemd_services="named.service true" +conf_files="/etc/named/named.conf" +system_accounts="named" +named_desc="BIND DNS server" +named_homedir="/var/named" +named_shell="/bin/false" + +Add_dependency build perl ">=0" +Add_dependency build openssl-devel +Add_dependency build mit-krb5-devel +Add_dependency build libxml2-devel +Add_dependency build libcap-devel + +pre_build() { + # temporary fix for issue reported upstream + ln -s .libs/driver.o bin/tests/system/dlzexternal/ +} + +post_install() { + vinstall ${FILESDIR}/named.service 644 lib/systemd/system + vinstall ${FILESDIR}/named.logrotate 600 etc/logrotate.d named + vinstall ${FILESDIR}/named.conf 640 etc/named + + vinstall bin/tests/system/common/root.hint 640 var/named + vinstall ${FILESDIR}/127.0.0.zone 640 var/named + vinstall ${FILESDIR}/localhost.zone 640 var/named +}