Bug#284731: marked as done (update-grub doesn't clean files it had wrote in /tmp)

Debian Bug Tracking System owner@bugs.debian.org
Sat, 19 Mar 2005 16:19:22 -0800


Your message dated Sat, 19 Mar 2005 18:47:08 -0500
with message-id <E1DCneu-0006UN-00@newraff.debian.org>
and subject line Bug#284731: fixed in grub 0.95+cvs20040624-16
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; 8 Dec 2004 12:26:18 +0000
>From shaulk@013.net Wed Dec 08 04:26:18 2004
Return-path: <shaulk@013.net>
Received: from mtaout2.barak.net.il [212.150.49.172] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Cc0td-0004Sm-00; Wed, 08 Dec 2004 04:26:17 -0800
Received: from rakefet ([82.166.86.156])
 by mtaout2.barak.net.il (Sun Java System Messaging Server 6.1 HotFix 0.02
 (built Aug 25 2004)) with ESMTP id <0I8E00JVNLHO3EY0@mtaout2.barak.net.il> for
 submit@bugs.debian.org; Wed, 08 Dec 2004 14:32:13 +0200 (IST)
Received: from shaul by rakefet with local (Exim 4.34)
	id 1Cc0t6-0001dj-Kw; Wed, 08 Dec 2004 14:25:44 +0200
Date: Wed, 08 Dec 2004 14:25:44 +0200
From: Shaul Karl <shaulk@013.net>
Subject: update-grub doesn't clean files it had wrote in /tmp
Sender: Shaul Karl <shaulk@013.net>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Message-id: <E1Cc0t6-0001dj-Kw@rakefet>
MIME-version: 1.0
X-Mailer: reportbug 3.2
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7bit
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: grub
Version: 0.95+cvs20040624-12
Severity: normal
Tags: patch


  Please see bug #246284 for previous discussion.

  Of course update-grub might write to /tmp. The reason is tempfile(1).
Quoting tempfile(1):


    The directory to place the file is searched for in the following order:

    a) The directory specified by the environment variable  TMPDIR,  if
       it is writable.
    b) The directory specified by the --directory argument, if given.
    c) The directory /tmp.


  I believe the following patch removes those files:

--- grub/update-grub	2004-12-08 14:18:34.000000000 +0200
+++ grub/update-grub.patched	2004-12-08 14:17:43.000000000 +0200
@@ -547,6 +547,7 @@
 # Test if our menu file exists
 if [ -f "$menu_file" ] ; then
 	menu="$menu_file"
+	rm -f "$newtemplate"
 	unset newtemplate
 	echo "found: $menu_file ."
 	cp -f "$menu_file" "$menu_file~"
@@ -569,6 +570,7 @@
 	case "$answer" in
 		y* | Y*)
 		cat "$newtemplate" > $menu_file
+		rm -f "$newtemplate"
 		unset newtemplate
 		;;
 		*)
@@ -795,6 +797,7 @@
 # Insert the new options into the menu
 if ! grep -q "^$start" $menu ; then
 	cat $buffer >> $menu
+	rm -f "$buffer"
 else
 	umask 077
 	sed -e "/^$start/,/^$end/{


-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable')
Architecture: i386 (i586)
Kernel: Linux 2.6.8-7.pentium1.1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages grub depends on:
ii  libc6                       2.3.2.ds1-18 GNU C Library: Shared libraries an
ii  libncurses5                 5.4-4        Shared libraries for terminal hand

-- no debconf information

---------------------------------------
Received: (at 284731-close) by bugs.debian.org; 19 Mar 2005 23:58:21 +0000
>From katie@ftp-master.debian.org Sat Mar 19 15:58:20 2005
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DCnpk-0003fe-00; Sat, 19 Mar 2005 15:58:20 -0800
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1DCneu-0006UN-00; Sat, 19 Mar 2005 18:47:08 -0500
From: Jason Thomas <jason@debian.org>
To: 284731-close@bugs.debian.org
X-Katie: $Revision: 1.55 $
Subject: Bug#284731: fixed in grub 0.95+cvs20040624-16
Message-Id: <E1DCneu-0006UN-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Sat, 19 Mar 2005 18:47:08 -0500
Delivered-To: 284731-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-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
X-Spam-Level: 
X-CrossAssassin-Score: 3

Source: grub
Source-Version: 0.95+cvs20040624-16

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

grub-disk_0.95+cvs20040624-16_all.deb
  to pool/main/g/grub/grub-disk_0.95+cvs20040624-16_all.deb
grub-doc_0.95+cvs20040624-16_all.deb
  to pool/main/g/grub/grub-doc_0.95+cvs20040624-16_all.deb
grub_0.95+cvs20040624-16.diff.gz
  to pool/main/g/grub/grub_0.95+cvs20040624-16.diff.gz
grub_0.95+cvs20040624-16.dsc
  to pool/main/g/grub/grub_0.95+cvs20040624-16.dsc
grub_0.95+cvs20040624-16_i386.deb
  to pool/main/g/grub/grub_0.95+cvs20040624-16_i386.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 284731@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jason Thomas <jason@debian.org> (supplier of updated grub 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: Sun, 20 Mar 2005 10:25:41 +1100
Source: grub
Binary: grub-disk grub grub-doc
Architecture: source i386 all
Version: 0.95+cvs20040624-16
Distribution: unstable
Urgency: low
Maintainer: Grub Maintainers <pkg-grub-devel@lists.alioth.debian.org>
Changed-By: Jason Thomas <jason@debian.org>
Description: 
 grub       - GRand Unified Bootloader
 grub-disk  - GRUB bootable disk image
 grub-doc   - Documentation for GRand Unified Bootloader
Closes: 278529 283072 284731 291733 296724 299528
Changes: 
 grub (0.95+cvs20040624-16) unstable; urgency=low
 .
   * update-grub: fix kopt parsing to handle + signs in kernel versions
     (closes: #299528)
   * update-grub: fix variable parsing in get_kernel_opt function.
     (closes: #296724)
   * update-grub: don't add savedefault entry to memtest86 entries.
     (closes: #291733)
   * update-grub: fixed spelling mistake
     (closes: #283072)
   * update-grub: remove temp files
     (closes: #284731)
   * grub-floppy: fixed shell expansion
     finally a nice patch from "Clement 'nodens' Hermann"
     (closes: #278529)
Files: 
 b16f3d68402c199c3b508904f41d7606 888 admin optional grub_0.95+cvs20040624-16.dsc
 1e45e160b11bebf0690168c74f744f26 58356 admin optional grub_0.95+cvs20040624-16.diff.gz
 651192b75e87f0814d07aa94d113df32 358842 admin optional grub_0.95+cvs20040624-16_i386.deb
 03e13d8d4d653f8b6af921e205069a4d 228152 admin optional grub-disk_0.95+cvs20040624-16_all.deb
 ba32b67ec88fe263ddbdcb4a02ed3a87 259724 doc optional grub-doc_0.95+cvs20040624-16_all.deb

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

iD8DBQFCPLWf7cYwRJJSiL4RAtjqAJ0dqm28ecErex03XLom0b2RCTM2NQCg8avc
o1MQ0SyDML12chnURUzQm1k=
=er29
-----END PGP SIGNATURE-----