[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#327499: marked as done (Preseeding early/late commands can fail on directory change)



Your message dated Wed, 21 Sep 2005 09:47:05 -0700
with message-id <E1EI7kP-00018v-00@spohr.debian.org>
and subject line Bug#327499: fixed in base-config 2.72
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 10 Sep 2005 14:49:46 +0000
>From aragorn@tiscali.nl Sat Sep 10 07:49:46 2005
Return-path: <aragorn@tiscali.nl>
Received: from vs5-deb.fnb.maschinenbau.tu-darmstadt.de (frost.pumuki.org) [130.83.174.41] (foobar)
	by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
	id 1EE6fq-0004yR-00; Sat, 10 Sep 2005 07:49:46 -0700
Received: from [10.0.0.252] (unknown [10.0.0.252])
	by frost.pumuki.org (Postfix) with ESMTP id C51312EA920
	for <submit@bugs.debian.org>; Sat, 10 Sep 2005 17:49:39 +0300 (EEST)
From: Frans Pop <aragorn@tiscali.nl>
Subject: Preseeding early/late commands can fail on directory change
Date: Sat, 10 Sep 2005 16:50:15 +0200
User-Agent: KMail/1.7.2
To: submit@bugs.debian.org
MIME-Version: 1.0
Content-Disposition: inline
Message-Id: <[🔎] 200509101650.16902.aragorn@tiscali.nl>
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Package: preseed-common
Tags: patch

This bug is the result of the following thread on the d-boot list:
http://lists.debian.org/debian-boot/2005/09/msg00092.html

----------  Forwarded Message  ----------

Subject: Re: Preseeing w/o asking a question
Date: Friday 09 September 2005 13:31
From: Paul Millar <p.millar@physics.gla.ac.uk>
To: Joey Hess <joeyh@debian.org>
Cc: debian-boot@lists.debian.org

On Thursday 08 Sep 2005 18:23, Joey Hess wrote:
> > It was a single line, but a big(ish) one (77 characters, iirc).  I've
> > reduced its size (52 characters, now) and it seems to be working.  Is
> > there some limit to the size of a string?
>
> It's possible to run into some limits once the string is 20000
> character long or so (ARG_MAX), but it's more likely that your first
> command exited nonzero and your truncated one succeeds.

Nope, this is all a red-herring.

The real problem was that base-config/late_command is sensitive to cwd
 after the script exits.  As an illustration, try:
    base-config     base-config/late_command string  cd /tmp
For me, this is sufficient to stall the installer.

There's a trivial patch to base-config below that should fix the problem
 (but I haven't tested it :^).  Alternatively, one could eval the
 $PRESEED_COMMAND within a new shell for better protection (rather than
 in base-config's shell).

Meanwhile, being careful to make sure the script ends with the same cwd
 as it starts is a work-around.

Cheers,

Paul.


--- lib/menu/finish-orig        2005-09-09 11:36:30.892331830 +0100
+++ lib/menu/finish     2005-09-09 11:35:39.678301614 +0100
@@ -30,8 +30,10 @@
        # See if there is a preseeded command. If so, run it.
        PRESEED_COMMAND=$($0 get_preseed_command 4>&1 || true)
        if [ -n "$PRESEED_COMMAND" ]; then
+               curdir=$(pwd)
                # TODO error handling (needs error dialog)
                eval $PRESEED_COMMAND || true
+               cd $(curdir)
        fi

        DMS=""

-------------------------------------------------------

---------------------------------------
Received: (at 327499-close) by bugs.debian.org; 21 Sep 2005 16:48:26 +0000
>From katie@spohr.debian.org Wed Sep 21 09:48:26 2005
Return-path: <katie@spohr.debian.org>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
	id 1EI7kP-00018v-00; Wed, 21 Sep 2005 09:47:05 -0700
From: Joey Hess <joeyh@debian.org>
To: 327499-close@bugs.debian.org
X-Katie: $Revision: 1.56 $
Subject: Bug#327499: fixed in base-config 2.72
Message-Id: <E1EI7kP-00018v-00@spohr.debian.org>
Sender: Archive Administrator <katie@spohr.debian.org>
Date: Wed, 21 Sep 2005 09:47:05 -0700
Delivered-To: 327499-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02

Source: base-config
Source-Version: 2.72

We believe that the bug you reported is fixed in the latest version of
base-config, which is due to be installed in the Debian FTP archive:

base-config_2.72.dsc
  to pool/main/b/base-config/base-config_2.72.dsc
base-config_2.72.tar.gz
  to pool/main/b/base-config/base-config_2.72.tar.gz
base-config_2.72_all.deb
  to pool/main/b/base-config/base-config_2.72_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 327499@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joey Hess <joeyh@debian.org> (supplier of updated base-config package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 21 Sep 2005 18:21:48 +0200
Source: base-config
Binary: base-config
Architecture: source all
Version: 2.72
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Joey Hess <joeyh@debian.org>
Description: 
 base-config - Debian base system configurator
Closes: 327499
Changes: 
 base-config (2.72) unstable; urgency=low
 .
   [ Debconf translations ]
   * Ukrainian updated by Eugeniy Meshcheryakov
 .
   [ Program translations ]
   * Ukrainian updated by Eugeniy Meshcheryakov
 .
   [ Joey Hess ]
   * Run preseed late and early commands in a subshell so that they can
     cd without messing up base-config. Thanks, Paul Millar. Closes: #327499
   * If tasksel fails, don't use debconf to display an error message, since
     that clears the screen with the default frontend and makes it hard to see
     what broke. Instead, use gettext/read.
   * Remove base-config/install-problem template, now unused.
Files: 
 c17302a650f0def3252716b314fe4657 713 base important base-config_2.72.dsc
 aa81813d15244b7e63edb9b6e30190fd 401064 base important base-config_2.72.tar.gz
 71508a2b9918ca335cc549f35bd62e55 252596 base important base-config_2.72_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDMYrQ2tp5zXiKP0wRAg0MAJ92Tm/4H2jKUOEDBKGvo7Pc3qxAQwCggst7
SdvlaNOlBb909fj7N2yyOuo=
=q7XL
-----END PGP SIGNATURE-----



Reply to: