t-p-u upload for mxallowd
Hi release team,
as discussed earlier, mxallowd needs a tpu upload due to an uncoordinated
libnetfilter-queue sid upload.
The maintainer asked me to handle this, so here's the proposed debdiff(s).
The first, very short one is against the current sid version (1.6b-2)
already unblocked by Luk but invalidated by libnetfilter-queue.
The second one is the complete diff against the current lenny version
(1.6a-2).
Please ack and I'll upload.
Thanks,
--
Niko Tyni ntyni@debian.org
diff -u mxallowd-1.6b/debian/changelog mxallowd-1.6b/debian/changelog
--- mxallowd-1.6b/debian/changelog
+++ mxallowd-1.6b/debian/changelog
@@ -1,12 +1,18 @@
-mxallowd (1.6b-2) unstable; urgency=medium
+mxallowd (1.6b-2~lenny0.1) testing; urgency=medium
+ [ Michael Stapelberg ]
* Medium urgency as this version fixes an important bug (#503946)
* Remove default values from mxallowd.templates as they are
just guesses.
* initscript now fails when mxallowd doesn't start correctly
(Closes: #503946)
- -- Michael Stapelberg <michael+mxallowd@stapelberg.de> Wed, 29 Oct 2008 17:36:58 +0100
+ [ Niko Tyni ]
+ * Non-maintainer upload as requested by the maintainer.
+ * Upload through testing-proposed-updates to avoid a dependency on the
+ sid version of libnetfilter-queue1.
+
+ -- Niko Tyni <ntyni@debian.org> Sun, 16 Nov 2008 21:13:35 +0200
mxallowd (1.6b-1) unstable; urgency=low
diff -Nru mxallowd-1.6a/debian/changelog mxallowd-1.6b/debian/changelog
--- mxallowd-1.6a/debian/changelog 2008-11-16 21:32:50.000000000 +0200
+++ mxallowd-1.6b/debian/changelog 2008-11-16 21:32:52.000000000 +0200
@@ -1,3 +1,30 @@
+mxallowd (1.6b-2~lenny0.1) testing; urgency=medium
+
+ [ Michael Stapelberg ]
+ * Medium urgency as this version fixes an important bug (#503946)
+ * Remove default values from mxallowd.templates as they are
+ just guesses.
+ * initscript now fails when mxallowd doesn't start correctly
+ (Closes: #503946)
+
+ [ Niko Tyni ]
+ * Non-maintainer upload as requested by the maintainer.
+ * Upload through testing-proposed-updates to avoid a dependency on the
+ sid version of libnetfilter-queue1.
+
+ -- Niko Tyni <ntyni@debian.org> Sun, 16 Nov 2008 21:13:35 +0200
+
+mxallowd (1.6b-1) unstable; urgency=low
+
+ * Include spanish debconf translation (Closes: #501955)
+ * mxallowd now creates a pid-file so that start-stop-daemon can
+ detect errors on startup
+ * preserve local changes to /etc/mxallowd.conf (Closes: #503408)
+ * make config script not fail when non-interactive frontend
+ is used (Closes: #503409) (Closes: #502744)
+
+ -- Michael Stapelberg <michael+mxallowd@stapelberg.de> Tue, 28 Oct 2008 22:50:55 +0100
+
mxallowd (1.6a-2) unstable; urgency=low
* Enable workaround for kernels >= 2.6.23 with broken unbind
diff -Nru mxallowd-1.6a/debian/control mxallowd-1.6b/debian/control
--- mxallowd-1.6a/debian/control 2008-11-16 21:32:50.000000000 +0200
+++ mxallowd-1.6b/debian/control 2008-11-16 21:32:52.000000000 +0200
@@ -17,5 +17,5 @@
(http://nolisting.org). That means, you define two MX-servers in your
nameserver and mxallowd will block the access to any of these mailservers if
the client did not try the other one. This blocks non-RFC-compliant mailers,
- which are often in use by spammers and so-called direct-to- second-mx which is
+ which are often in use by spammers and so-called direct-to-second-mx which is
also a technique mainly used by spammers.
diff -Nru mxallowd-1.6a/debian/mxallowd.config mxallowd-1.6b/debian/mxallowd.config
--- mxallowd-1.6a/debian/mxallowd.config 2008-11-16 21:32:50.000000000 +0200
+++ mxallowd-1.6b/debian/mxallowd.config 2008-11-16 21:32:52.000000000 +0200
@@ -2,30 +2,35 @@
set -e
-. /usr/share/debconf/confmodule
-
-add_entry() {
- TMP=$(mktemp -d)
- cp /etc/mxallowd.conf ${TMP}/mxallowd.conf
- fgrep -v "$1" ${TMP}/mxallowd.conf > /etc/mxallowd.conf
- for server in $(echo "${2}")
+parse_conffile ()
+{
+ unset FAKE_SERVERS
+ unset REAL_SERVERS
+ while read key value rest
do
- echo "$1 ${server}" >> /etc/mxallowd.conf
- done
- rm -rf ${TMP}
+ case "$key" in
+ fake-mailserver)
+ FAKE_SERVERS="${FAKE_SERVERS} $value"
+ ;;
+ real-mailserver)
+ REAL_SERVERS="${REAL_SERVERS} $value"
+ ;;
+ esac
+ done < /etc/mxallowd.conf
}
-db_title "mxallowd"
-db_input high mxallowd/real_mailservers || true
-db_go
+. /usr/share/debconf/confmodule
-db_get mxallowd/real_mailservers
+if [ -f /etc/mxallowd.conf ]
+then
+ parse_conffile
+ [ -z "$REAL_SERVERS" ] || db_set mxallowd/real_mailservers "$REAL_SERVERS"
+ [ -z "$FAKE_SERVERS" ] || db_set mxallowd/fake_mailservers "$FAKE_SERVERS"
+fi
-[ ! -z "$RET" ] && add_entry "real-mailserver" "${RET}"
+db_title "mxallowd"
+db_input high mxallowd/real_mailservers || true
+db_go || true
db_input high mxallowd/fake_mailservers || true
-db_go
-
-db_get mxallowd/fake_mailservers
-
-[ ! -z "$RET" ] && add_entry "fake-mailserver" "${RET}"
+db_go || true
diff -Nru mxallowd-1.6a/debian/mxallowd.init mxallowd-1.6b/debian/mxallowd.init
--- mxallowd-1.6a/debian/mxallowd.init 2008-11-16 21:32:50.000000000 +0200
+++ mxallowd-1.6b/debian/mxallowd.init 2008-11-16 21:32:52.000000000 +0200
@@ -22,7 +22,7 @@
case "$1" in
start) log_daemon_msg "Starting anti-spam daemon" "mxallowd"
- start-stop-daemon --start --background --quiet --make-pidfile --pidfile /var/run/mxallowd.pid --name mxallowd --startas /usr/sbin/mxallowd -- -F
+ start-stop-daemon --start --quiet --pidfile /var/run/mxallowd.pid --name mxallowd --startas /usr/sbin/mxallowd
log_end_msg $?
;;
stop) log_daemon_msg "Stopping anti-spam daemon" "mxallowd"
@@ -31,7 +31,8 @@
;;
restart|reload|force-reload) log_daemon_msg "Restarting anti-spam daemon" "mxallowd"
start-stop-daemon --stop --retry 5 --quiet --pidfile /var/run/mxallowd.pid --name mxallowd
- start-stop-daemon --start --background --quiet --make-pidfile --pidfile /var/run/mxallowd.pid --name mxallowd --startas /usr/sbin/mxallowd -- -F
+ start-stop-daemon --start --quiet --pidfile /var/run/mxallowd.pid --name mxallowd --startas /usr/sbin/mxallowd
+ log_end_msg $?
;;
*) log_action_msg "Usage: $0 {start|stop|restart|reload|force-reload}"
exit 2
diff -Nru mxallowd-1.6a/debian/mxallowd.postinst mxallowd-1.6b/debian/mxallowd.postinst
--- mxallowd-1.6a/debian/mxallowd.postinst 2008-11-16 21:32:50.000000000 +0200
+++ mxallowd-1.6b/debian/mxallowd.postinst 2008-11-16 21:32:52.000000000 +0200
@@ -4,4 +4,37 @@
. /usr/share/debconf/confmodule
+add_entry() {
+ for server in $(echo "${2}")
+ do
+ echo "$1 ${server}" >> $TMP
+ done
+}
+
+if [ "$1" = "configure" ] && [ -z "$2" ]
+then
+ if [ ! -f /etc/mxallowd.conf ]
+ then
+ cp /usr/share/mxallowd/config.default /etc/mxallowd.conf
+ fi
+fi
+
+TMP=$(mktemp)
+if [ -f /etc/mxallowd.conf ]
+then
+ egrep -v "^ *(real|fake)-mailserver " /etc/mxallowd.conf > $TMP
+ db_get mxallowd/real_mailservers
+ [ -z "$RET" ] || add_entry "real-mailserver" "${RET}"
+
+ db_get mxallowd/fake_mailservers
+ [ -z "$RET" ] || add_entry "fake-mailserver" "${RET}"
+
+ cp $TMP /etc/mxallowd.conf
+fi
+
+rm -f ${TMP}
+
+# Call db_stop to avoid hangs when starting mxallowd from debconf
+db_stop
+
#DEBHELPER#
diff -Nru mxallowd-1.6a/debian/mxallowd.postrm mxallowd-1.6b/debian/mxallowd.postrm
--- mxallowd-1.6a/debian/mxallowd.postrm 1970-01-01 02:00:00.000000000 +0200
+++ mxallowd-1.6b/debian/mxallowd.postrm 2008-11-16 21:32:52.000000000 +0200
@@ -0,0 +1,8 @@
+#! /bin/sh
+set -e
+
+if [ "$1" = "purge" ]; then
+ rm -f /etc/mxallowd.conf
+fi
+
+#DEBHELPER#
diff -Nru mxallowd-1.6a/debian/po/es.po mxallowd-1.6b/debian/po/es.po
--- mxallowd-1.6a/debian/po/es.po 1970-01-01 02:00:00.000000000 +0200
+++ mxallowd-1.6b/debian/po/es.po 2008-11-16 21:32:52.000000000 +0200
@@ -0,0 +1,58 @@
+# mxallowd translation to spanish
+# Copyright (C) 2008 Software in the Public Interest
+# This file is distributed under the same license as the mxallowd package.
+# Changes:
+# - Initial translation
+# Ignacio Mondino <ignacio.mondino@gmail.com>, 2008
+# Traductores, si no conoce el formato PO, merece la pena leer la
+# documentación de gettext, especialmente las secciones dedicadas a este
+# formato, por ejemplo ejecutando:
+# info -n '(gettext)PO Files'
+# info -n '(gettext)Header Entry'
+# Equipo de traducción al español, por favor lean antes de traducir
+# los siguientes documentos:
+# - El proyecto de traducción de Debian al español
+# http://www.debian.org/intl/spanish
+# especialmente las notas de traducción en
+# http://www.debian.org/intl/spanish/notas
+# - La guía de traducción de po's de debconf:
+# /usr/share/doc/po-debconf/README-trans
+# o http://www.debian.org/intl/l10n/po-debconf/README-trans
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: mxallowd 1.6a-2\n"
+"Report-Msgid-Bugs-To: michael+mxallowd@stapelberg.de\n"
+"POT-Creation-Date: 2008-06-02 20:00+0200\n"
+"PO-Revision-Date: 2008-10-11 19:11-0300\n"
+"Last-Translator: Ignacio Mondino <ignacio.mondino@gmail.com>\n"
+"Language-Team: Debian Spanish team <debian-l10n-spanish@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit"
+
+#. Type: string
+#. Description
+#: ../mxallowd.templates:1001
+msgid "Real mailservers:"
+msgstr "Servidores de correo reales:"
+
+#. Type: string
+#. Description
+#: ../mxallowd.templates:1001
+msgid "Enter the IP addresses of the real mailservers."
+msgstr "Introduzca las direcciones IP de los servidores de correo reales."
+
+#. Type: string
+#. Description
+#: ../mxallowd.templates:2001
+msgid "Fake mailservers:"
+msgstr "Servidores de correo falsos:"
+
+#. Type: string
+#. Description
+#: ../mxallowd.templates:2001
+msgid "Enter the IP addresses of the fake mailservers."
+msgstr "Introduzca las direcciones IP de los servidores de correo falsos."
+
diff -Nru mxallowd-1.6a/debian/rules mxallowd-1.6b/debian/rules
--- mxallowd-1.6a/debian/rules 2008-11-16 21:32:50.000000000 +0200
+++ mxallowd-1.6b/debian/rules 2008-11-16 21:32:52.000000000 +0200
@@ -42,11 +42,12 @@
dh_testdir
dh_testroot
dh_clean -k
- dh_installdirs
+ dh_installdirs usr/share/mxallowd
# Add here commands to install the package into debian/mxallowd.
$(MAKE) DESTDIR=$(CURDIR)/debian/mxallowd/ install
-
+ mv debian/mxallowd/etc/mxallowd.conf \
+ debian/mxallowd/usr/share/mxallowd/config.default
# Build architecture-independent files here.
binary-indep: build install
diff -Nru mxallowd-1.6a/Makefile mxallowd-1.6b/Makefile
--- mxallowd-1.6a/Makefile 2008-07-07 17:11:06.000000000 +0300
+++ mxallowd-1.6b/Makefile 1970-01-01 02:00:00.000000000 +0200
@@ -1,47 +0,0 @@
-
-CC_FLAGS=-O2 -s
-V6DEF=-DIPV6
-LIBS=-lnetfilter_queue -lpthread
-PREFIX=/usr
-SYSCONFDIR=/etc
-MANDIR=/usr/share/man
-FILTERSRC=src/nfq.o
-QUEUEDEF=-DNFQUEUE
-CC=cc
-INSTALL=/usr/bin/install
-CC_STDFLAGS=-Wall -D_REENTRANT -DSYSCONFDIR="\"${SYSCONFDIR}\""
-
-mxallowd: src/log.o src/config.o src/resolve.o src/whitelist.o src/mxallowd.o ${FILTERSRC} Makefile
- ${CC} ${CC_STDFLAGS} ${QUEUEDEF} ${V6DEF} ${CC_FLAGS} ${LIBPATH} -o mxallowd src/*.o ${LIBS}
-
-src/%.o: src/%.c include/*.h Makefile
- ${CC} ${CC_STDFLAGS} ${QUEUEDEF} ${V6DEF} ${CC_FLAGS} ${LIBPATH} -Iinclude -c -o src/$$(basename $< .c).o $<
-
-doc: mxallowd.de.tex mxallowd.en.tex scheme1.png
- pdflatex mxallowd.de
- pdflatex mxallowd.de
- pdflatex mxallowd.en
- pdflatex mxallowd.en
-
-all: mxallowd
-
-install: mxallowd
- $(INSTALL) -m 755 -d $(DESTDIR)/${PREFIX}/sbin/
- $(INSTALL) -m 755 -d $(DESTDIR)/${PREFIX}/share/man/man1
- $(INSTALL) -m 755 -d $(DESTDIR)/${SYSCONFDIR}
- $(INSTALL) -m 755 mxallowd $(DESTDIR)/${PREFIX}/sbin/mxallowd
- $(INSTALL) -m 644 mxallowd.1 $(DESTDIR)/${MANDIR}/man1/mxallowd.1
- $(INSTALL) -m 644 mxallowd.conf $(DESTDIR)/${SYSCONFDIR}/mxallowd.conf
-
-uninstall:
- rm $(DESTDIR)/${PREFIX}/sbin/mxallowd
- rm $(DESTDIR)/${PREFIX}/share/man/man1/mxallowd.1
-
-clean:
- rm -f mxallowd src/*.o mxallowd.{de,en}.toc mxallowd.{de,en}.out mxallowd.{de,en}.pdf mxallowd.{de,en}.log mxallowd.{de,en}.aux
-
-distclean: clean
- rm Makefile
-
-lint:
- splint +unixlib +skipsysheaders -sysdirs /usr/include -hints -showfunc -showcolumn -Iinclude src/mxallowd.c
Binary files /tmp/0NLIoDglNa/mxallowd-1.6a/slides/GPN-05.07.2008/mxallowd.pdf and /tmp/ExP9ojOMUW/mxallowd-1.6b/slides/GPN-05.07.2008/mxallowd.pdf differ
diff -Nru mxallowd-1.6a/src/mxallowd.c mxallowd-1.6b/src/mxallowd.c
--- mxallowd-1.6a/src/mxallowd.c 2008-07-07 17:12:22.000000000 +0300
+++ mxallowd-1.6b/src/mxallowd.c 2008-10-28 23:55:49.000000000 +0200
@@ -48,6 +48,8 @@
#include <pthread.h>
#include <fcntl.h>
#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
#define _MXALLOWD_INTERNAL
#include "mxallowd.h"
@@ -281,6 +283,16 @@
diep("fork()");
else if (pid > 0)
return 0;
+
+ int fd;
+ if ((fd = open("/var/run/mxallowd.pid", O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0)
+ fprintf(stderr, "Error: Could not create /var/run/mxallowd.pid\n");
+ else {
+ char buffer[256];
+ snprintf(buffer, 255, "%d", getpid());
+ write(fd, buffer, strlen(buffer));
+ close(fd);
+ }
}
/* Setup signal handlers */
Reply to: