--- unbound-1.4.6.orig/debian/rules
+++ unbound-1.4.6/debian/rules
@@ -0,0 +1,33 @@
+#!/usr/bin/make -f
+#export DH_VERBOSE=1
+%:
+	dh $@
+
+include /usr/share/quilt/quilt.make
+
+build: patch build-stamp
+build-stamp:
+	dh build --before configure
+	dh_auto_configure -- \
+		--disable-rpath \
+		--with-chroot-dir=/var/lib/unbound \
+		--with-pidfile=/var/run/unbound.pid \
+		--without-pythonmodule \
+		--with-ldns-builtin
+	dh_auto_build
+	dh build --after test
+	touch $@
+
+clean: unpatch
+	dh clean
+
+install: build
+	dh install --before dh_installinit
+	dh_installinit --error-handler=true --restart-after-upgrade
+	dh install --after dh_installinit
+	install -m 0644 doc/example.conf debian/unbound/etc/unbound/unbound.conf
+
+binary-arch: install
+	dh binary-arch
+
+binary: binary-arch binary-indep
--- unbound-1.4.6.orig/debian/unbound.install
+++ unbound-1.4.6/debian/unbound.install
@@ -0,0 +1,8 @@
+usr/sbin/unbound usr/sbin
+usr/sbin/unbound-control usr/sbin
+usr/sbin/unbound-control-setup usr/sbin
+usr/sbin/unbound-checkconf usr/sbin
+usr/share/man/man5/unbound.conf.5 usr/share/man/man5
+usr/share/man/man8/unbound-checkconf.8 usr/share/man/man8
+usr/share/man/man8/unbound-control.8 usr/share/man/man8
+usr/share/man/man8/unbound.8 usr/share/man/man8
--- unbound-1.4.6.orig/debian/changelog
+++ unbound-1.4.6/debian/changelog
@@ -0,0 +1,165 @@
+unbound (1.4.6-1~lenny1) oldstable-security; urgency=medium
+
+  * Rebuild for lenny.
+  * Switch to supplied ldns copy.
+
+ -- Florian Weimer <fw@deneb.enyo.de>  Wed, 25 May 2011 20:40:16 +0200
+
+unbound (1.4.6-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Sun, 15 Aug 2010 18:26:43 -0400
+
+unbound (1.4.5-1) unstable; urgency=low
+
+  * New upstream release.
+  * Add dependency on openssl to the unbound binary package; closes: #585808.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Sun, 20 Jun 2010 16:50:42 -0400
+
+unbound (1.4.4-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Thu, 22 Apr 2010 15:24:06 -0400
+
+unbound (1.4.3-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Thu, 11 Mar 2010 15:55:33 -0500
+
+unbound (1.4.2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Tue, 09 Mar 2010 14:13:31 -0500
+
+unbound (1.4.1-2) unstable; urgency=low
+
+  * Invoke dh_installinit with --restart-after-upgrade; closes: #563033.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Tue, 29 Dec 2009 21:54:26 -0500
+
+unbound (1.4.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Document copyright status of util/configparser.c, util/configparser.h;
+    closes: #552066.
+  * Enable libev support; closes: #552424.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Sat, 26 Dec 2009 17:19:10 -0500
+
+unbound (1.4.0-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Fri, 04 Dec 2009 20:32:52 -0800
+
+unbound (1.3.4-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Wed, 07 Oct 2009 12:59:21 -0400
+
+unbound (1.3.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * Drop .la file from libunbound-dev; closes: #541640.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Sun, 23 Aug 2009 13:25:53 -0400
+
+unbound (1.3.2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Mon, 13 Jul 2009 05:50:47 -0400
+
+unbound (1.3.0-1) unstable; urgency=low
+
+  * New upstream release; closes: #533613.
+  * Move pid file to /var/run; closes: #533611.
+  * Use "unbound-checkconf -o pidfile" in init script to determine pid file
+    location (thanks Michael Tokarev).
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Mon, 29 Jun 2009 01:10:00 -0400
+
+unbound (1.2.1-2) unstable; urgency=low
+
+  * Closes: #527753, #509535.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Sat, 09 May 2009 16:46:32 -0400
+
+unbound (1.2.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Remove init script chroot setup.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Sat, 28 Feb 2009 19:46:09 -0500
+
+unbound (1.0.2-1.2) unstable; urgency=low
+
+  * Enable unbound by default (Closes: #508884)
+  * Call dh_installinit with --error-handler=true (Closes: #500176)
+
+ -- Ondřej Surý <ondrej@debian.org>  Tue, 16 Dec 2008 11:54:15 +0100
+
+unbound (1.0.2-1.1) unstable; urgency=low
+
+  [ Hideki Yamane (Debian-JP) ]
+  * debian/{unbound.init,unbound.default}
+    + set not start by default, to avoid that port 53 blocking by other name
+      servers will cause install problems
+  * debian/unbound.prerm
+    + fix lintian "unbound: maintainer-script-hides-init-failure prerm:5" error
+
+  [ Ondřej Surý ]
+  * Non-maintainer upload.
+  * Minor tweaks to patched init.d file to make it work.
+
+ -- Ondřej Surý <ondrej@debian.org>  Mon, 15 Dec 2008 19:54:44 +0100
+
+unbound (1.0.2-1) unstable; urgency=low
+
+  * New upstream release;
+    + stricter filtering of DNS messages to combat cache poisoning
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Mon, 25 Aug 2008 01:03:59 -0400
+
+unbound (1.0.1-2) unstable; urgency=low
+
+  * unbound tries too hard to chroot(); ship a default config that doesn't
+    fail to start on new installs; closes: #492243.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Sat, 02 Aug 2008 17:46:24 -0400
+
+unbound (1.0.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Drop 'return' from init script; closes: #488650.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Wed, 16 Jul 2008 12:38:55 -0400
+
+unbound (1.0.0-3) unstable; urgency=low
+
+  * Lintian clean; closes: #485438.
+  * Don't chroot by default; note manual syslog configuration in
+    README.Debian; closes: #486303.
+  * Update to policy 3.8.0.0.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Sun, 15 Jun 2008 17:25:04 -0400
+
+unbound (1.0.0-2) unstable; urgency=low
+
+  * Fix Build-Deps.
+  * Split unbound-host into a separate package.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Sun, 25 May 2008 16:12:21 -0400
+
+unbound (1.0.0-1) unstable; urgency=low
+
+  * Initial release; closes: #482277.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Wed, 21 May 2008 14:13:28 -0400
+
--- unbound-1.4.6.orig/debian/libunbound2.dirs
+++ unbound-1.4.6/debian/libunbound2.dirs
@@ -0,0 +1 @@
+usr/lib
--- unbound-1.4.6.orig/debian/unbound.prerm
+++ unbound-1.4.6/debian/unbound.prerm
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+
+#DEBHELPER#
+
+exit 0
--- unbound-1.4.6.orig/debian/libunbound2.symbols
+++ unbound-1.4.6/debian/libunbound2.symbols
@@ -0,0 +1,29 @@
+libunbound.so.2 libunbound2 #MINVER#
+ ub_cancel@Base 1.4.1
+ ub_ctx_add_ta@Base 1.4.1
+ ub_ctx_add_ta_file@Base 1.4.1
+ ub_ctx_async@Base 1.4.1
+ ub_ctx_config@Base 1.4.1
+ ub_ctx_create@Base 1.4.1
+ ub_ctx_data_add@Base 1.4.1
+ ub_ctx_data_remove@Base 1.4.1
+ ub_ctx_debuglevel@Base 1.4.1
+ ub_ctx_debugout@Base 1.4.1
+ ub_ctx_delete@Base 1.4.1
+ ub_ctx_get_option@Base 1.4.2
+ ub_ctx_hosts@Base 1.4.1
+ ub_ctx_print_local_zones@Base 1.4.1
+ ub_ctx_resolvconf@Base 1.4.1
+ ub_ctx_set_fwd@Base 1.4.1
+ ub_ctx_set_option@Base 1.4.1
+ ub_ctx_trustedkeys@Base 1.4.1
+ ub_ctx_zone_add@Base 1.4.1
+ ub_ctx_zone_remove@Base 1.4.1
+ ub_fd@Base 1.4.1
+ ub_poll@Base 1.4.1
+ ub_process@Base 1.4.1
+ ub_resolve@Base 1.4.1
+ ub_resolve_async@Base 1.4.1
+ ub_resolve_free@Base 1.4.1
+ ub_strerror@Base 1.4.1
+ ub_wait@Base 1.4.1
--- unbound-1.4.6.orig/debian/copyright
+++ unbound-1.4.6/debian/copyright
@@ -0,0 +1,208 @@
+This package was debianized by Robert S. Edmonds <edmonds@debian.org> on
+Wed, 21 May 2008 14:13:28 -0400.
+
+It was downloaded from
+    http://unbound.net/download.html
+
+Upstream Author:
+    Wouter Wijngaards, NLnet Labs
+
+Copyright: 
+    Copyright (C) 2008 Wouter Wijngaards
+    Copyright (C) 2008 NLnet Labs
+
+License:
+    This software is open source.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+    Redistributions of source code must retain the above copyright notice,
+    this list of conditions and the following disclaimer.
+
+    Redistributions in binary form must reproduce the above copyright notice,
+    this list of conditions and the following disclaimer in the documentation
+    and/or other materials provided with the distribution.
+
+    Neither the name of the NLNET LABS nor the names of its contributors may
+    be used to endorse or promote products derived from this software without
+    specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+    "AS IS" AND ANY EXPRESS 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 REGENTS OR 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.
+
+The Debian packaging is (C) 2008, Robert S. Edmonds <edmonds@debian.org> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
+Files: compat/fake-rfc2553.c, compat/fake-rfc2553.h
+Copyright: 2000-2003 Damien Miller, 1999 WIDE Project
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the project nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS 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 PROJECT OR 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.
+
+Files: compat/inet_aton.c
+Copyright: 1983, 1990, 1993 The Regents of the University of California
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the University nor the names of its contributors
+    may be used to endorse or promote products derived from this software
+    without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS 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 REGENTS OR 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.
+
+Files: compat/inet_aton.c
+Copyright: 1993 Digital Equipment Corporation
+License: other
+ 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, and that
+ the name of Digital Equipment Corporation not be used in advertising or
+ publicity pertaining to distribution of the document or software without
+ specific, written prior permission.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+ WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
+ CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ SOFTWARE.
+
+Files: compat/inet_ntop.c, compat/inet_pton.c
+Copyright: 1996 Internet Software Consortium
+License: ISC
+ 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.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ SOFTWARE.
+
+Files: compat/strlcpy.c
+Copyright: 1998 Todd C. Miller <Todd.Miller@courtesan.com>
+License: ISC
+ 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.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Files: acx_pthread.m4
+Copyright: 2006 Steven G. Johnson <stevenj@alum.mit.edu>
+License: GPL-2+ | other
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+ .
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+ .
+ As a special exception, the respective Autoconf Macro's copyright
+ owner gives unlimited permission to copy, distribute and modify the
+ configure scripts that are the output of Autoconf when processing
+ the Macro. You need not follow the terms of the GNU General Public
+ License when using or distributing such scripts, even though
+ portions of the text of the Macro appear in them. The GNU General
+ Public License (GPL) does govern all other use of the material that
+ constitutes the Autoconf Macro.
+ .
+ This special exception to the GPL applies to versions of the
+ Autoconf Macro released by the Autoconf Macro Archive. When you
+ make and distribute a modified version of the Autoconf Macro, you
+ may extend this special exception to the GPL to apply to your
+ modified version as well.
+
+Files: util/configparser.h, util/configparser.c
+Copyright:  (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+License: GPL-3+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+/* As a special exception, you may create a larger work that contains
+   part or all of the Bison parser skeleton and distribute that work
+   under terms of your choice, so long as that work isn't itself a
+   parser generator using the skeleton or a modified version thereof
+   as a parser skeleton.  Alternatively, if you modify or redistribute
+   the parser skeleton itself, you may (at your option) remove this
+   special exception, which will cause the skeleton and the resulting
+   Bison output files to be licensed under the GNU General Public
+   License without this special exception.
+
+   This special exception was added by the Free Software Foundation in
+   version 2.2 of Bison.  */
+
--- unbound-1.4.6.orig/debian/libunbound-dev.install
+++ unbound-1.4.6/debian/libunbound-dev.install
@@ -0,0 +1,4 @@
+usr/include/unbound.h usr/include
+usr/lib/libunbound.a usr/lib
+usr/lib/libunbound.so usr/lib
+usr/share/man/man3/libunbound.3 usr/share/man/man3
--- unbound-1.4.6.orig/debian/unbound-host.dirs
+++ unbound-1.4.6/debian/unbound-host.dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/man/man1
--- unbound-1.4.6.orig/debian/libunbound2.install
+++ unbound-1.4.6/debian/libunbound2.install
@@ -0,0 +1 @@
+usr/lib/libunbound.so.2* usr/lib
--- unbound-1.4.6.orig/debian/control
+++ unbound-1.4.6/debian/control
@@ -0,0 +1,48 @@
+Source: unbound
+Section: net
+Priority: optional
+Maintainer: Robert S. Edmonds <edmonds@debian.org>
+Build-Depends: dpkg-dev (>= 1.14.9), debhelper (>= 7), quilt, doxygen,
+ autoconf, automake, autotools-dev, libtool, flex, bison, libssl-dev
+Standards-Version: 3.8.4
+Homepage: http://www.unbound.net/
+
+Package: unbound
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, adduser, openssl
+Description: validating, recursive, caching DNS resolver
+ Unbound is a recursive-only caching DNS server which can perform DNSSEC
+ validation of results. It implements only a minimal amount of authoritative
+ service to prevent leakage to the root nameservers: forward lookups for
+ localhost, reverse for 127.0.0.1 and ::1, and NXDOMAIN for zones served by
+ AS112. Stub and forward zones are supported.
+ .
+ This package contains the unbound daemon.
+
+Package: unbound-host
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: reimplementation of the 'host' command
+ This package provides the 'unbound-host' program that is bundled with the
+ Unbound domain name server. This version differs from the one provided in the
+ package called host, which is from NIKHEF, and bind9-host, which is from ISC,
+ and has a similar but different set of features and options.
+
+Package: libunbound2
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: library implementing DNS resolution and validation
+ libunbound performs and validates DNS lookups; it can be used to convert
+ hostnames to IP addresses and back and obtain other information from the
+ DNS. Cryptographic validation of results is performed with DNSSEC.
+
+Package: libunbound-dev
+Section: libdevel
+Architecture: any
+Depends: ${misc:Depends}, libunbound2 (= ${binary:Version})
+Description: static library, header files, and docs for libunbound
+ Static library, header files, and documentation for libunbound.
+ .
+ libunbound performs and validates DNS lookups; it can be used to convert
+ hostnames to IP addresses and back and obtain other information from the
+ DNS. Cryptographic validation of results is performed with DNSSEC.
--- unbound-1.4.6.orig/debian/unbound.postrm
+++ unbound-1.4.6/debian/unbound.postrm
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+if [ "$1" = remove ]; then
+    rm -rf /var/lib/unbound
+    deluser --quiet unbound >/dev/null || true
+fi
+
+#DEBHELPER#
--- unbound-1.4.6.orig/debian/unbound.postinst
+++ unbound-1.4.6/debian/unbound.postinst
@@ -0,0 +1,10 @@
+#!/bin/sh -e
+
+if [ "$1" = configure ]; then
+    if ! getent passwd unbound >/dev/null; then
+        adduser --quiet --system --group --no-create-home --home /var/lib/unbound unbound
+        chown unbound:unbound /var/lib/unbound
+    fi
+fi
+
+#DEBHELPER#
--- unbound-1.4.6.orig/debian/unbound.default
+++ unbound-1.4.6/debian/unbound.default
@@ -0,0 +1,3 @@
+UNBOUND_ENABLE=true
+
+#DAEMON_OPTS="-c /etc/unbound/unbound.conf"
--- unbound-1.4.6.orig/debian/watch
+++ unbound-1.4.6/debian/watch
@@ -0,0 +1,3 @@
+version=3
+http://www.unbound.net/download.html \
+ downloads/unbound-(.+)\.tar\.gz
--- unbound-1.4.6.orig/debian/libunbound-dev.dirs
+++ unbound-1.4.6/debian/libunbound-dev.dirs
@@ -0,0 +1,3 @@
+usr/include
+usr/lib
+usr/share/man/man3
--- unbound-1.4.6.orig/debian/compat
+++ unbound-1.4.6/debian/compat
@@ -0,0 +1 @@
+7
--- unbound-1.4.6.orig/debian/unbound.init
+++ unbound-1.4.6/debian/unbound.init
@@ -0,0 +1,80 @@
+#!/bin/sh
+
+### BEGIN INIT INFO
+# Provides:          unbound
+# Required-Start:    $network $remote_fs $syslog
+# Required-Stop:     $network $remote_fs $syslog
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+### END INIT INFO
+
+NAME=unbound
+UNBOUND_ENABLE=false
+DESC="recursive DNS server"
+DAEMON=/usr/sbin/unbound
+
+test -x $DAEMON || exit 0
+test -x ${DAEMON}-checkconf || exit 0
+
+. /lib/lsb/init-functions
+
+if [ -f /etc/default/$NAME ]; then
+    . /etc/default/$NAME
+    case "x$UNBOUND_ENABLE" in
+        xtrue|x1|xyes)
+            UNBOUND_ENABLE=true
+            ;;
+        *)
+            UNBOUND_ENABLE=false
+            exit 1;
+            ;;
+    esac
+fi
+
+PIDFILE=$(${DAEMON}-checkconf -o pidfile)
+
+case "$1" in
+    start)
+        if $UNBOUND_ENABLE; then
+            log_daemon_msg "Starting $DESC" "$NAME"
+            if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --name $NAME --startas $DAEMON -- $DAEMON_OPTS; then
+                log_end_msg 0
+            else
+                log_end_msg 1
+            fi
+        else
+            log_warning_msg "Not starting $DESC $NAME, disabled via /etc/default/$NAME"
+        fi
+        ;;
+
+    stop)
+        if $UNBOUND_ENABLE; then
+            log_daemon_msg "Stopping $DESC" "$NAME"
+            if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --name $NAME; then
+                log_end_msg 0
+            else
+                log_end_msg 1
+            fi
+        fi
+        ;;
+
+    restart|force-reload)
+        if $UNBOUND_ENABLE; then
+            log_daemon_msg "Restarting $DESC" "$NAME"
+            start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME --retry 5
+            if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --name $NAME --startas $DAEMON -- $DAEMON_OPTS; then
+                log_end_msg 0
+            else
+                log_end_msg 1
+            fi
+        fi
+        ;;
+
+    *)
+        N=/etc/init.d/$NAME
+        echo "Usage: $N {start|stop|restart|force-reload}" >&2
+        exit 1
+        ;;
+esac
+
+exit 0;
--- unbound-1.4.6.orig/debian/unbound-host.install
+++ unbound-1.4.6/debian/unbound-host.install
@@ -0,0 +1,2 @@
+usr/sbin/unbound-host usr/bin
+usr/share/man/man1/unbound-host.1 usr/share/man/man1
--- unbound-1.4.6.orig/debian/unbound.doc
+++ unbound-1.4.6/debian/unbound.doc
@@ -0,0 +1,4 @@
+doc/CREDITS
+doc/FEATURES
+doc/README
+doc/TODO
--- unbound-1.4.6.orig/debian/unbound.dirs
+++ unbound-1.4.6/debian/unbound.dirs
@@ -0,0 +1,6 @@
+etc/default
+etc/unbound
+usr/sbin
+usr/share/man/man5
+usr/share/man/man8
+var/lib/unbound
--- unbound-1.4.6.orig/debian/patches/series
+++ unbound-1.4.6/debian/patches/series
@@ -0,0 +1,2 @@
+20_example_conf_default_chroot
+10_libev_library
--- unbound-1.4.6.orig/debian/patches/20_example_conf_default_chroot
+++ unbound-1.4.6/debian/patches/20_example_conf_default_chroot
@@ -0,0 +1,12 @@
+Index: unbound-1.4.4/doc/example.conf.in
+===================================================================
+--- unbound-1.4.4.orig/doc/example.conf.in	2010-04-22 15:30:13.917232547 -0400
++++ unbound-1.4.4/doc/example.conf.in	2010-04-22 15:30:24.285232063 -0400
+@@ -186,6 +186,7 @@
+ 	#
+ 	# If you give "" no chroot is performed. The path must not end in a /.
+ 	# chroot: "@UNBOUND_CHROOT_DIR@"
++	chroot: ""
+ 
+ 	# if given, user privileges are dropped (after binding port),
+ 	# and the given username is assumed. Default is user "unbound".
--- unbound-1.4.6.orig/debian/patches/10_libev_library
+++ unbound-1.4.6/debian/patches/10_libev_library
@@ -0,0 +1,12 @@
+Index: unbound-1.4.5/configure.ac
+===================================================================
+--- unbound-1.4.5.orig/configure.ac	2010-06-02 04:43:29.000000000 -0400
++++ unbound-1.4.5/configure.ac	2010-06-20 16:51:51.417287502 -0400
+@@ -510,6 +510,7 @@
+ 	AC_CHECK_FUNCS([event_base_once]) # only in libevent 1.4.1 and later
+ 	AC_CHECK_FUNCS([event_base_new]) # only in libevent 1.4.1 and later
+ 	AC_CHECK_FUNCS([event_base_get_method]) # only in libevent 1.4.3 and later
++    AC_SEARCH_LIBS(ev_loop, [ev])
+ 	AC_CHECK_FUNCS([ev_loop]) # only in libev. (tested on 3.51)
+ 	if test -n "$BAK_LDFLAGS_SET"; then
+ 		LDFLAGS="$BAK_LDFLAGS"
