[25744] in Source-Commits

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

Re: /svn/athena r25210 -

daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Thu Jun 30 22:33:54 2011

Date: Thu, 30 Jun 2011 22:33:46 -0400 (EDT)
From: Geoffrey Thomas <geofft@MIT.EDU>
To: Jonathan D Reed <jdreed@mit.edu>
cc: source-commits@mit.edu
In-Reply-To: <201107010231.p612VcsG024813@drugstore.mit.edu>
Message-ID: <alpine.DEB.2.00.1106302233270.12393@tyger.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

Looks totally reasonable (including not changing the debconf key name). 
ACK.

-- 
Geoffrey Thomas
geofft@mit.edu

On Thu, 30 Jun 2011, Jonathan D Reed wrote:

> Author: jdreed
> Date: 2011-06-30 22:31:38 -0400 (Thu, 30 Jun 2011)
> New Revision: 25210
>
> Added:
>   trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.config
>   trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.postinst
>   trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.templates
> Removed:
>   trunk/debathena/config/msmtp-config/debian/debathena-msmtp-config.config
>   trunk/debathena/config/msmtp-config/debian/debathena-msmtp-config.postinst
>   trunk/debathena/config/msmtp-config/debian/debathena-msmtp-config.templates
> Modified:
>   trunk/debathena/config/msmtp-config/debian/changelog
> Log:
> In msmtp-config:
>  * Move debconf and aliases postinst stuff to debathena-msmtp-mta (Trac:
>    #953)
>    echo '# /etc/aliases' > /etc/aliases.tmp
>    echo '# Created by debathena-msmtp-mta postinst' > /etc/aliases.tmp
>    echo 'mailer-daemon: postmaster' >> /etc/aliases.tmp
>    for i in postmaster nobody hostmaster usenet news webmaster www ftp abuse noc security cron; do
>        echo "${i}: root"
>    done >> /etc/aliases.tmp
>    if [ -n "$1" ]; then
>    fi
>    mv /etc/aliases.tmp /etc/aliases
>    configure)
>    ;;
>    abort-upgrade|abort-remove|abort-deconfigure)
>    ;;
>    *)
>        echo "postinst called with unknown argument \`$1'" >&2
>        exit 1
>    ;;
>
>
> Modified: trunk/debathena/config/msmtp-config/debian/changelog
> ===================================================================
> --- trunk/debathena/config/msmtp-config/debian/changelog	2011-07-01 01:54:09 UTC (rev 25209)
> +++ trunk/debathena/config/msmtp-config/debian/changelog	2011-07-01 02:31:38 UTC (rev 25210)
> @@ -1,3 +1,10 @@
> +debathena-msmtp-config (1.9.0) unstable; urgency=low
> +
> +  * Move debconf and aliases postinst stuff to debathena-msmtp-mta (Trac:
> +    #953)
> +
> + -- Jonathan Reed <jdreed@mit.edu>  Thu, 30 Jun 2011 22:31:25 -0400
> +
> debathena-msmtp-config (1.8.9) unstable; urgency=low
>
>   * Strip off the instance of any principal in the tickets (Trac #806)
>
> Copied: trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.config (from rev 25159, trunk/debathena/config/msmtp-config/debian/debathena-msmtp-config.config)
> ===================================================================
> --- trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.config	                        (rev 0)
> +++ trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.config	2011-07-01 02:31:38 UTC (rev 25210)
> @@ -0,0 +1,8 @@
> +#!/bin/sh -e
> +
> +# Source debconf library.
> +. /usr/share/debconf/confmodule
> +
> +# Where should root's mail go?
> +db_input medium debathena-msmtp-config/root_addr || true
> +db_go || true
>
> Copied: trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.postinst (from rev 25159, trunk/debathena/config/msmtp-config/debian/debathena-msmtp-config.postinst)
> ===================================================================
> --- trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.postinst	                        (rev 0)
> +++ trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.postinst	2011-07-01 02:31:38 UTC (rev 25210)
> @@ -0,0 +1,65 @@
> +#!/bin/sh
> +# postinst script for debathena-msmtp-mta
> +#
> +# see: dh_installdeb(1)
> +
> +set -e
> +
> +# summary of how this script can be called:
> +#        * <postinst> `configure' <most-recently-configured-version>
> +#        * <old-postinst> `abort-upgrade' <new version>
> +#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
> +#          <new-version>
> +#        * <postinst> `abort-remove'
> +#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
> +#          <failed-install-package> <version> `removing'
> +#          <conflicting-package> <version>
> +# for details, see http://www.debian.org/doc/debian-policy/ or
> +# the debian-policy package
> +
> +# Source debconf library.
> +. /usr/share/debconf/confmodule
> +
> +# Mostly copied from exim4-config's postinst
> +writealiases() {
> +    echo '# /etc/aliases' > /etc/aliases.tmp
> +    echo '# Created by debathena-msmtp-mta postinst' > /etc/aliases.tmp
> +    echo 'mailer-daemon: postmaster' >> /etc/aliases.tmp
> +    for i in postmaster nobody hostmaster usenet news webmaster www ftp abuse noc security cron; do
> +        echo "${i}: root"
> +    done >> /etc/aliases.tmp
> +    if [ -n "$1" ]; then
> +	echo "root: $1" >> /etc/aliases.tmp
> +    fi
> +    mv /etc/aliases.tmp /etc/aliases
> +}
> +
> +case "$1" in
> +    configure)
> +	if [ ! -e /etc/aliases ]; then
> +	    db_get debathena-msmtp-config/root_addr
> +	    writealiases "$RET"
> +	else
> +	    # Whine at the user if it looks like root's mail will
> +	    # end up somewhere local
> +	    if ! expand-alias root | grep -q @; then
> +		echo "WARNING: Check /etc/aliases to ensure root's mail goes somewhere useful." >&2
> +	    fi
> +	fi
> +    ;;
> +
> +    abort-upgrade|abort-remove|abort-deconfigure)
> +    ;;
> +
> +    *)
> +        echo "postinst called with unknown argument \`$1'" >&2
> +        exit 1
> +    ;;
> +esac
> +
> +# dh_installdeb will replace this with shell code automatically
> +# generated by other debhelper scripts.
> +
> +#DEBHELPER#
> +
> +exit 0
>
> Copied: trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.templates (from rev 25159, trunk/debathena/config/msmtp-config/debian/debathena-msmtp-config.templates)
> ===================================================================
> --- trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.templates	                        (rev 0)
> +++ trunk/debathena/config/msmtp-config/debian/debathena-msmtp-mta.templates	2011-07-01 02:31:38 UTC (rev 25210)
> @@ -0,0 +1,5 @@
> +Template: debathena-msmtp-config/root_addr
> +Type: string
> +_Description: Address for root's mail:
> + Enter an e-mail address which should receive mail intended for
> + the local root user.
>
>

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