reopen 351394
tag 351394 patch
thanks

Hi,

Jon Marler <[EMAIL PROTECTED]> (01/11/2006):
> Go and get the latest qmail-src package.  That patch won't even apply to it. 
> Check qmail-src version -40.  Most of that has already been done.  I can
> probably close those bugs without any additional modifications even necessary.

I don't see any reason to close this bug. If you don't want to fix this
issue, please tag it as wontfix.

In order to have this bug fixed, I wrote a full patch. Here are my
comments on the debconf templates, as the rest just depends on these
fixes:

>-Template: qmail/readme
>-Type: note
>-Description: README
>- Before making any changes to your qmail configuration, please read
>- /usr/share/doc/qmail/README.Debian.gz.  This contains a description of the 
>- differences bewtween other mailers on Debian, qmail on Debian, and qmail on 
>- other systems.
>- .
>- If you were using sendmail (or smail) previously, you will also want to read
>- the "qmail-upgrade" manpage, which details user-visible differences between
>- sendmail and qmail.
>- .
>- If you are new to qmail, you will want to at least peruse the qmail FAQ, 
>which
>- can be found in /usr/doc/qmail

This one should go to the inline documentation.

> Template: qmail/start
>-Type: select
>-Choices: yes, no
>-Description: Do you want to start qmail now?
>-
>-Template: qmail/reboot
>-Type: note
>-Description: Qmail will be started at the next reboot.
>- Or you can start qmail manually when
>- you are ready by typing (as root) "/etc/init.d/qmail start" at a shell 
>prompt.
>+Type: boolean
>+Default: true
>+_Description: Do you want to start qmail now?
>+ If you do not want to start qmail now, it will be started at the next
>+ reboot.  You can also start qmail manually when you are ready by typing
>+ (as root) "/etc/init.d/qmail start" at a shell prompt.

These two templates should be merged so that the user knows what will
happen if he/she chooses "no".
A yes/no select choice is a boolean template.

> Template: qmail/userpurge
>-Type: select
>-Choices: yes, no
>-Description: Remove qmail users during a purge?
>+Type: boolean
>+Default: true
>+_Description: Remove qmail users during a purge?

A yes/no select choice is a boolean template.

>-Template: qmail/recipientmap
>-Type: note
>-Description: WARNING!
>- recipientmap is gone from qmail-1.03. The virtualdomains mechanism
>- has been expanded to support virtual users.  You will need to fix your setup.
>-
>-Template: qmail/qlist
>-Type: note
>-Description: WARNING!
>- qlist has been split into a separate package by Dan Bernstein (the
>- author of qmail) since qmail-1.02.
>- .
>- I was not planning on debianising qlist, because ezmlm does a better job,
>- so if you still want qlist, you can either get it direct from
>- http://pobox.com/~djb/qlist.html
>- .
>- Please check in /usr/doc/qmail and the man pages for changes since qmail 1.01

These templates should go to a NEWS.Debian file. However, as 1.03
appears with Potato, they can simply be removed (Slink -> Etch
transitions are of course not supported).

> Template: qmail/inetd
>-Type: note
>-Description: inetd.conf changes
>- inetd does not handle qmail terribly effectively, so I have decided
>- to make the default instalation use tcpserver from ucspi-tcp instead.
>+Type: error
>+_Description: SMTP entry in /etc/inetd.conf
>+ The /etc/inetd.conf file of your system contains an smtp entry.
>+ .
>+ inetd does not handle qmail terribly effectively, so the default
>+ installation uses tcpserver from ucspi-tcp instead.
>  .
>- For this reason, I have disabled the smtp line in /etc/inetd.conf.
>+ For this reason, the smtp line in /etc/inetd.conf was disabled.
>  .
>  This means that you must configure things such as RELAYCLIENT using
>- /etc/tcp.smtp, rather than hosts allow (see /usr/doc/qmail/README for 
>details)
>+ /etc/tcp.smtp, rather than hosts allow (see /usr/doc/qmail/README for
>+ details).

This one should use the error type and should be rephrased to fit the
dev-ref.

>-Template: qmail/tcpupdate
>-Type: note
>-Description: Updating /etc/tcp.smtp database for tcpserver

I don't see any reason to stop the installation to display this
information.

>-Template: qmail/override
>-Type: select
>-Choices: yes, no
>-Description: Pre-existing qmail installation detected.  Override?

This template is not use anywhere.


I hope this help.


Cheers,

-- 
Thomas Huriaux
diff -Nur qmail-1.03/debian/control qmail-1.03.fixed/debian/control
--- qmail-1.03/debian/control	2007-01-15 22:28:00.000000000 +0100
+++ qmail-1.03.fixed/debian/control	2007-01-15 22:28:14.000000000 +0100
@@ -6,7 +6,7 @@
 
 Package: qmail-src
 Architecture: all
-Depends: dpkg-dev (>= 1.4.0.20), patch (>= 2.5-0bo1), gcc, make, fakeroot | sudo, groff-base, adduser
+Depends: dpkg-dev (>= 1.4.0.20), patch (>= 2.5-0bo1), gcc, make, fakeroot | sudo, groff-base, adduser, po-debconf
 Build-Depends: dpkg-dev (>= 1.4.0.20), patch (>= 2.5-0bo1), gcc, make, fakeroot | sudo, groff-base, adduser
 Conflicts: qmail-run, qmail-uids-gids
 Section: non-free/mail
diff -Nur qmail-1.03/debian/po/POTFILES.in qmail-1.03.fixed/debian/po/POTFILES.in
--- qmail-1.03/debian/po/POTFILES.in	1970-01-01 01:00:00.000000000 +0100
+++ qmail-1.03.fixed/debian/po/POTFILES.in	2006-12-30 11:37:05.000000000 +0100
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] qmail.templates
diff -Nur qmail-1.03/debian/po/templates.pot qmail-1.03.fixed/debian/po/templates.pot
--- qmail-1.03/debian/po/templates.pot	1970-01-01 01:00:00.000000000 +0100
+++ qmail-1.03.fixed/debian/po/templates.pot	2006-12-30 11:40:18.000000000 +0100
@@ -0,0 +1,72 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <[EMAIL PROTECTED]>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: [EMAIL PROTECTED]"
+"POT-Creation-Date: 2006-12-30 11:37+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <[EMAIL PROTECTED]>\n"
+"Language-Team: LANGUAGE <[EMAIL PROTECTED]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../qmail.templates:1001
+msgid "Do you want to start qmail now?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../qmail.templates:1001
+msgid ""
+"If you do not want to start qmail now, it will be started at the next "
+"reboot.  You can also start qmail manually when you are ready by typing (as "
+"root) \"/etc/init.d/qmail start\" at a shell prompt."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../qmail.templates:2001
+msgid "Remove qmail users during a purge?"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../qmail.templates:3001
+msgid "SMTP entry in /etc/inetd.conf"
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../qmail.templates:3001
+msgid "The /etc/inetd.conf file of your system contains an smtp entry."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../qmail.templates:3001
+msgid ""
+"inetd does not handle qmail terribly effectively, so the default "
+"installation uses tcpserver from ucspi-tcp instead."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../qmail.templates:3001
+msgid "For this reason, the smtp line in /etc/inetd.conf was disabled."
+msgstr ""
+
+#. Type: error
+#. Description
+#: ../qmail.templates:3001
+msgid ""
+"This means that you must configure things such as RELAYCLIENT using /etc/tcp."
+"smtp, rather than hosts allow (see /usr/doc/qmail/README for details)."
+msgstr ""
diff -Nur qmail-1.03/debian/postinst qmail-1.03.fixed/debian/postinst
--- qmail-1.03/debian/postinst	2006-12-30 13:07:39.000000000 +0100
+++ qmail-1.03.fixed/debian/postinst	2006-12-30 11:34:49.000000000 +0100
@@ -20,7 +20,6 @@
   
   if ( !defined($old_version) || $old_version le "1.01-7" ) {
     check_hosts_allow();
-    input ("low","qmail/tcpupdate");
     go();
     system("/usr/bin/tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp >/dev/null") ;
 
@@ -43,25 +42,13 @@
   }
   
   $checkstart = 0 ;
-  if ( $old_version le '1.01-7' ) { 
-    if ( -f '/var/qmail/control/recipientmap' ) {
-      input ("medium","qmail/recipientmap");
-      go();
-    }
-  }
 
-  input ("medium","qmail/qlist");
   input ("medium","qmail/start");
   my @ret=go();
-  if ( $ret[0] eq "" ||  $answer =~ /^\s*[yY]/ ) {
+  if ( $ret[0] eq "" ||  $answer eq "true" ) {
     debug("Starting qmail . . .\n");
     system("/etc/init.d/qmail start 1>&2");
   } 
-  else {
-    input ("medium","qmail/reboot");
-    go();
-  }
-
 }
 
 sub check_hosts_allow {
diff -Nur qmail-1.03/debian/postrm qmail-1.03.fixed/debian/postrm
--- qmail-1.03/debian/postrm	2006-12-30 13:07:39.000000000 +0100
+++ qmail-1.03.fixed/debian/postrm	2006-12-30 11:28:04.000000000 +0100
@@ -16,7 +16,7 @@
     system("rm -rf /etc/qmail/users");
     input ("medium","qmail/userpurge");
     my @ret=go();
-    if ( $ret[0] eq "" ||  $answer =~ /^\s*[yY]/ ) {
+    if ( $ret[0] eq "" ||  $answer eq "true" ) {
     	system('userdel alias >/dev/null');
     	system('userdel qmaild >/dev/null');
     	system('userdel qmails >/dev/null');
diff -Nur qmail-1.03/debian/qmail-src.config.disabled qmail-1.03.fixed/debian/qmail-src.config.disabled
--- qmail-1.03/debian/qmail-src.config.disabled	2006-12-30 13:07:39.000000000 +0100
+++ qmail-1.03.fixed/debian/qmail-src.config.disabled	1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-#!/bin/sh -e
-
-# Source debconf library.
-. /usr/share/debconf/confmodule
-
-db_input medium qmail-src/build || true
-db_input high qmail-src/warning || true
-UCSPITCP=`/usr/bin/dpkg --get-selections ucspi-tcp 2>/dev/null | /usr/bin/awk '{ print $2; }'`
-
-if [ "$UCSPITCP" != "install" ]; then
-	db_input high qmail-src/ucspitcp || true
-fi
-
-db_go || true
diff -Nur qmail-1.03/debian/qmail-src.templates.disabled qmail-1.03.fixed/debian/qmail-src.templates.disabled
--- qmail-1.03/debian/qmail-src.templates.disabled	2006-12-30 13:07:39.000000000 +0100
+++ qmail-1.03.fixed/debian/qmail-src.templates.disabled	1970-01-01 01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-Template: qmail-src/build
-Type: note
-Description: To build qmail binary package, you have to run
-         build-qmail
-
-Template: qmail-src/warning
-Type: note
-Description: WARNING! WARNING! WARNING!
- The binary packages built by build-qmail are
- dependant on the uid and gid's of the system
- that the package was built on.
- .
- If you are building/installing qmail for the
- first time, I highly recommend you check your
- /etc/passwd, /etc/shadow, & /etc/group files
- and remove ANY existing qmail uid or gid's and
- re-install qmail-src.  If you choose not to,
- it may not work!
-
-Template: qmail-src/ucspitcp
-Type: note
-Description: ucspi-tcp dependancy warning
- QMail depends on the ucspi-tcp binary package before it can be installed.
- .
- If you have not already installed ucspi-tcp-src and built ucspi-tcp, I suggest
- you do that task first before installing the finished qmail package.
diff -Nur qmail-1.03/debian/qmail.templates qmail-1.03.fixed/debian/qmail.templates
--- qmail-1.03/debian/qmail.templates	2006-12-30 13:07:39.000000000 +0100
+++ qmail-1.03.fixed/debian/qmail.templates	2006-12-30 11:37:05.000000000 +0100
@@ -1,69 +1,26 @@
-Template: qmail/readme
-Type: note
-Description: README
- Before making any changes to your qmail configuration, please read
- /usr/share/doc/qmail/README.Debian.gz.  This contains a description of the 
- differences bewtween other mailers on Debian, qmail on Debian, and qmail on 
- other systems.
- .
- If you were using sendmail (or smail) previously, you will also want to read
- the "qmail-upgrade" manpage, which details user-visible differences between
- sendmail and qmail.
- .
- If you are new to qmail, you will want to at least peruse the qmail FAQ, which
- can be found in /usr/doc/qmail
-
 Template: qmail/start
-Type: select
-Choices: yes, no
-Description: Do you want to start qmail now?
-
-Template: qmail/reboot
-Type: note
-Description: Qmail will be started at the next reboot.
- Or you can start qmail manually when
- you are ready by typing (as root) "/etc/init.d/qmail start" at a shell prompt.
+Type: boolean
+Default: true
+_Description: Do you want to start qmail now?
+ If you do not want to start qmail now, it will be started at the next
+ reboot.  You can also start qmail manually when you are ready by typing
+ (as root) "/etc/init.d/qmail start" at a shell prompt.
 
 Template: qmail/userpurge
-Type: select
-Choices: yes, no
-Description: Remove qmail users during a purge?
-
-Template: qmail/recipientmap
-Type: note
-Description: WARNING!
- recipientmap is gone from qmail-1.03. The virtualdomains mechanism
- has been expanded to support virtual users.  You will need to fix your setup.
-
-Template: qmail/qlist
-Type: note
-Description: WARNING!
- qlist has been split into a separate package by Dan Bernstein (the
- author of qmail) since qmail-1.02.
- .
- I was not planning on debianising qlist, because ezmlm does a better job,
- so if you still want qlist, you can either get it direct from
- http://pobox.com/~djb/qlist.html
- .
- Please check in /usr/doc/qmail and the man pages for changes since qmail 1.01
+Type: boolean
+Default: true
+_Description: Remove qmail users during a purge?
 
 Template: qmail/inetd
-Type: note
-Description: inetd.conf changes
- inetd does not handle qmail terribly effectively, so I have decided
- to make the default instalation use tcpserver from ucspi-tcp instead.
+Type: error
+_Description: SMTP entry in /etc/inetd.conf
+ The /etc/inetd.conf file of your system contains an smtp entry.
+ .
+ inetd does not handle qmail terribly effectively, so the default
+ installation uses tcpserver from ucspi-tcp instead.
  .
- For this reason, I have disabled the smtp line in /etc/inetd.conf.
+ For this reason, the smtp line in /etc/inetd.conf was disabled.
  .
  This means that you must configure things such as RELAYCLIENT using
- /etc/tcp.smtp, rather than hosts allow (see /usr/doc/qmail/README for details)
-
-Template: qmail/tcpupdate
-Type: note
-Description: Updating /etc/tcp.smtp database for tcpserver
-
-Template: qmail/override
-Type: select
-Choices: yes, no
-Description: Pre-existing qmail installation detected.  Override?
-
+ /etc/tcp.smtp, rather than hosts allow (see /usr/doc/qmail/README for
+ details).
diff -Nur qmail-1.03/debian/rules qmail-1.03.fixed/debian/rules
--- qmail-1.03/debian/rules	2007-01-15 22:29:45.000000000 +0100
+++ qmail-1.03.fixed/debian/rules	2007-01-15 22:29:50.000000000 +0100
@@ -30,7 +30,7 @@
 	-$(MAKE) clean -C contrib/checkpassword-0.90/
 	-rm `find . -name "*~"`
 	-rm -rf debian/files*
-	-rm -rf `find debian/* -type d -prune`
+	-rm -rf `find debian/* -type d -prune | grep -v "debian/po"`
 	find . \( -name '#*#' -o -name '*~' -o -name DEADJOE -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' -o -name '.*.orig' -o -name '.*.rej' -o -name .SUMS -o -name TAGS -o -name core \) -exec rm -f {} \;
 
 binary-indep: checkroot build
@@ -138,7 +138,7 @@
 
 	# Install debconf stuff
 	cp debian/qmail.config debian/tmp/DEBIAN/config
-	cp debian/qmail.templates debian/tmp/DEBIAN/templates
+	po2debconf -o debian/tmp/DEBIAN/templates debian/qmail.templates
 	chmod 755 debian/tmp/DEBIAN/config debian/tmp/DEBIAN/templates
 	chmod u+x debian/*config
 

Attachment: signature.asc
Description: Digital signature

Reply via email to