[26647] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r25672 - trunk/debathena/config/dns-config/debian

daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Tue Jul 31 19:55:31 2012

Date: Tue, 31 Jul 2012 19:55:27 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201207301945.q6UJj126013094@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1207311938580.22690@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII

On Mon, 30 Jul 2012, Jonathan D Reed wrote:

> Author: jdreed
> Date: 2012-07-30 15:45:01 -0400 (Mon, 30 Jul 2012)
> New Revision: 25672
>
> Added:
>   trunk/debathena/config/dns-config/debian/99debathena
>   trunk/debathena/config/dns-config/debian/debathena-dns-config.install
> Removed:
>   trunk/debathena/config/dns-config/debian/transform_named.conf.options.debathena
> Modified:
>   trunk/debathena/config/dns-config/debian/changelog
>   trunk/debathena/config/dns-config/debian/control.in
>   trunk/debathena/config/dns-config/debian/debathena-dns-config.init
>   trunk/debathena/config/dns-config/debian/debathena-dns-config.postinst
>   trunk/debathena/config/dns-config/debian/rules
> Log:
> In dns-config:
>  * Switch to dnsmasq instead of bind9 (Trac: #1131)
>  * Don't add a mit.edu suffix if it's already there
>  * Use IFACE.PROG format for the resolvconf profile
>  * Bump Standards-Version
>  * Make initscript LSB-compliant
>
>
> Added: trunk/debathena/config/dns-config/debian/99debathena
> ===================================================================
> --- trunk/debathena/config/dns-config/debian/99debathena	                        (rev 0)
> +++ trunk/debathena/config/dns-config/debian/99debathena	2012-07-30 19:45:01 UTC (rev 25672)
> @@ -0,0 +1,8 @@
> +# debathena dnsmasq configuration
> +
> +# Only listen on lo
> +interface=lo
> +# And only on 127.0.0.1
> +listen-address=127.0.0.1

This bit will cause us to listen on the union of lo and 127.0.0.1, not the 
intersection (according to my reading of the manpage; I haven't tested). 
To get just 127.0.0.1, the listen-address should be sufficient; on the 
other hand, it's not clear that we need to restrict it that much.

We may also want to add 'bind-interfaces' (it's not really clear how this 
works in the configuration file, as it doesn't take an argument), though 
it's probably a no-op.

> +# DNS only, please
> +no-dhcp-interface=lo
>
> Modified: trunk/debathena/config/dns-config/debian/changelog
> ===================================================================
> --- trunk/debathena/config/dns-config/debian/changelog	2012-07-30 18:45:44 UTC (rev 25671)
> +++ trunk/debathena/config/dns-config/debian/changelog	2012-07-30 19:45:01 UTC (rev 25672)
> @@ -1,8 +1,13 @@
> -debathena-dns-config (1.7) UNRELEASED; urgency=low
> +debathena-dns-config (1.7) unstable; urgency=low
>
>   * Bump debian/compat to 6
> +  * Switch to dnsmasq instead of bind9 (Trac: #1131)
> +  * Don't add a mit.edu suffix if it's already there
> +  * Use IFACE.PROG format for the resolvconf profile
> +  * Bump Standards-Version
> +  * Make initscript LSB-compliant
>
> - -- Jonathan Reed <jdreed@mit.edu>  Sun, 01 Jul 2012 12:21:34 -0400
> + -- Jonathan Reed <jdreed@mit.edu>  Mon, 30 Jul 2012 15:35:07 -0400
>
> debathena-dns-config (1.6) unstable; urgency=low
>
>
> Modified: trunk/debathena/config/dns-config/debian/control.in
> ===================================================================
> --- trunk/debathena/config/dns-config/debian/control.in	2012-07-30 18:45:44 UTC (rev 25671)
> +++ trunk/debathena/config/dns-config/debian/control.in	2012-07-30 19:45:01 UTC (rev 25672)
> @@ -2,13 +2,13 @@
> Section: debathena-config/net
> Priority: extra
> Maintainer: Debathena Project <debathena@mit.edu>
> -Build-Depends: @cdbs@, bind9
> -Standards-Version: 3.7.2
> +Build-Depends: @cdbs@
> +Standards-Version: 3.9.1
>
> Package: debathena-dns-config
> Architecture: all
> -Depends: bind9, resolvconf
> -Description: Sets up a local caching named
> - This package sets up a local caching named for better DNS lookup
> +Depends: dnsmasq, resolvconf, ${misc:Depends}
> +Description: Sets up a local caching nameserver using dnsmasq
> + This package sets up a local caching nameserver for better DNS lookup
>  security and scalability than we can get by using the MIT resolvers
>  directly.
>
> Modified: trunk/debathena/config/dns-config/debian/debathena-dns-config.init
> ===================================================================
> --- trunk/debathena/config/dns-config/debian/debathena-dns-config.init	2012-07-30 18:45:44 UTC (rev 25671)
> +++ trunk/debathena/config/dns-config/debian/debathena-dns-config.init	2012-07-30 19:45:01 UTC (rev 25672)
> @@ -3,7 +3,9 @@
> ### BEGIN INIT INFO
> # Provides:          debathena-dns-config
> # Required-Start:    resolvconf
> +# Required-Stop:     resolvconf
> # Default-Start:     2 3 4 5
> +# Default-Stop:      0 1 6
> # Short-Description: Debathena DNS configuration for MIT
> # Description:       This service provides a mit.edu search path to
> #                    resolvconf.
> @@ -15,7 +17,15 @@
> [ -x /sbin/resolvconf ] || exit 0
>
> case "$1" in
> -start)
> -	echo "search mit.edu" | /sbin/resolvconf -a mit
> +restart|start)
> +	if ! egrep -qi '^[[:space:]]+dns-search mit.edu' /etc/network/interfaces; then
> +	    echo "search mit.edu" | /sbin/resolvconf -a lo.debathena-dns-config

I'm failing at finding documentation that the '-a lo.STUFF' is supposed to 
work (instead of just '-a lo').  Care to enlighten me?

I think everything else looks okay.

-Ben

> +	fi
> 	;;
> +
> +stop|reload|force-reload)
> +	;;
> +*)
> +	echo "Unknown action: $1"
> +	;;
> esac
>
> Added: trunk/debathena/config/dns-config/debian/debathena-dns-config.install
> ===================================================================
> --- trunk/debathena/config/dns-config/debian/debathena-dns-config.install	                        (rev 0)
> +++ trunk/debathena/config/dns-config/debian/debathena-dns-config.install	2012-07-30 19:45:01 UTC (rev 25672)
> @@ -0,0 +1 @@
> +debian/99debathena etc/dnsmasq.d
>
> Modified: trunk/debathena/config/dns-config/debian/debathena-dns-config.postinst
> ===================================================================
> --- trunk/debathena/config/dns-config/debian/debathena-dns-config.postinst	2012-07-30 18:45:44 UTC (rev 25671)
> +++ trunk/debathena/config/dns-config/debian/debathena-dns-config.postinst	2012-07-30 19:45:01 UTC (rev 25672)
> @@ -23,10 +23,10 @@
> case "$1" in
>     configure)
> 	if hash invoke-rc.d; then
> -	    invoke-rc.d bind9 restart
> +	    invoke-rc.d dnsmasq restart
> 	    invoke-rc.d debathena-dns-config restart
> 	else
> -	    /etc/init.d/bind9 restart
> +	    /etc/init.d/dnsmasq restart
> 	    /etc/init.d/debathena-dns-config restart
> 	fi
>     ;;
>
> Modified: trunk/debathena/config/dns-config/debian/rules
> ===================================================================
> --- trunk/debathena/config/dns-config/debian/rules	2012-07-30 18:45:44 UTC (rev 25671)
> +++ trunk/debathena/config/dns-config/debian/rules	2012-07-30 19:45:01 UTC (rev 25672)
> @@ -1,12 +1,9 @@
> #!/usr/bin/make -f
>
> +# We used to divert /etc/bind/named.conf
> DEB_DIVERT_EXTENSION = .debathena
> -DEB_TRANSFORM_FILES_debathena-dns-config += \
> +DEB_UNDIVERT_FILES_debathena-dns-config += \
> 	/etc/bind/named.conf.options.debathena
> -ifneq ($(wildcard /usr/share/bind9/named.conf.options),)
> -    DEB_CHECK_FILES_SOURCE_/etc/bind/named.conf.options.debathena = \
> -        /usr/share/bind9/named.conf.options
> -endif
>
> include /usr/share/cdbs/1/rules/debhelper.mk
> include /usr/share/cdbs/1/rules/config-package.mk
>
>

home help back first fref pref prev next nref lref last post