[pkg-fso-maint] install.sh: debconf preseeding for console-* packages

Luca Capello luca at pca.it
Wed May 13 06:20:28 UTC 2009


Hi Joachim!

On Mon, 11 May 2009 23:04:43 +0200, Joachim Breitner wrote:
> thanks for figuring out stuff here!

You are welcome, I wanted to work on the xserver-xorg-video-glamo
package, but these stuff took me away from it for another moment...

> Am Montag, den 11.05.2009, 22:31 +0200 schrieb Luca Capello:
>> b. installing console-setup in a clean sid from `cowbuilder --login`
>>    does not prompt for any debconf question.
>
> why is that so? Is there anything in a cowbuilder chroot that prevents
> debconf questions from being asked, and that we could do in install.sh
> as well?

This is the first question I asked myself: it took me quite a lot of
digging to (two night ago) finally understand that the debconf frontend
we want is, from `man 7 debconf`:

  Frontends
	noninteractive

		This is the anti-frontend.  It never interacts with you
		at all, and makes the default answers be used for all
		questions.  It might mail error messages to root, but
		that's it; otherwise it is completely silent and
		unobtrusive, a perfect frontend for automatic installs.
		If you are using this front-end, and require non-default
		answers to questions, you will need to preseed the
		debconf database; see the section below on Unattended
		Package Installation for more details.

  [...]

  ENVIRONMENT
	DEBIAN_FRONTEND
		Used to temporarily change the frontend debconf
		uses.  See above.

And indeed cowbuilder has DEBIAN_FRONTEND="noninteractive".

However, understanding this allow us to simply adding console-setup
*before* any other package depending on it in the apt-get list, since
for apt-get the package order is important, as I explained at:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=435662#45

This is even a better solution, actually, tested to work as expected:

--8<---------------cut here---------------start------------->8---
@@ -841,6 +839,7 @@ action_fso () {
 
 	echo "Installing FSO-specific packages"
 	chroot "$INST_DIR" /bin/sh -e <<__END_CHROOT__
+export DEBIAN_FRONTEND=noninteractive
 apt-get $APT_OPTIONS install $FSO_PACKAGES
 apt-get clean
 __END_CHROOT__
--8<---------------cut here---------------end--------------->8---

I spent the whole yesterday installing and reinstalling Debian on my FSO
to test if the above patch work as expected, together with console-setup
listed in $FSO_PACKAGES before any X.Org package since apt-get
"respects" the order in which packages are listed:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=435662#45

Everything worked as expected until the chpasswd error at:

  http://lists.alioth.debian.org/pipermail/pkg-fso-maint/2009-May/001088.html

Removing the offending chpasswd line led to a correct installation, thus
I committed the patch:

  http://git.debian.org/?p=pkg-fso/files.git;a=commitdiff;h=7327b0a8be73d1b4eba438f96841bddf4ff83be0

> (This is similar to the task of figuring out what pbuilder chroots do to
> prevent init scripts from being started, which was recently discussed
> here)

This is explained at:

  http://lists.alioth.debian.org/pipermail/pkg-fso-maint/2009-May/001065.html

Thx, bye,
Gismo / Luca
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 314 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-fso-maint/attachments/20090513/08f9923b/attachment.pgp>


More information about the pkg-fso-maint mailing list