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

Bug#227081: marked as done (cp does not truncate existing destinations)



Your message dated Mon, 12 Jan 2004 06:17:25 -0500
with message-id <E1Ag04T-0005OK-00@auric.debian.org>
and subject line Bug#227081: fixed in busybox-cvs 20040101-4
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; 11 Jan 2004 00:47:14 +0000
>From kraai@lafn.org Sat Jan 10 18:47:13 2004
Return-path: <kraai@lafn.org>
Received: from zoot.lafn.org [206.117.18.6] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Af94n-0008WU-00; Fri, 09 Jan 2004 20:42:23 -0600
Received: from catalunya (host-66-81-179-198.rev.o1.com [66.81.179.198])
	by zoot.lafn.org (8.12.3p3/8.12.3) with ESMTP id i0A2gAXh037943
	for <submit@bugs.debian.org>; Fri, 9 Jan 2004 18:42:11 -0800 (PST)
	(envelope-from kraai@lafn.org)
Received: from kraai by catalunya with local (Exim 3.36 #1 (Debian))
	id 1Af86r-0006tT-00
	for <submit@bugs.debian.org>; Fri, 09 Jan 2004 17:40:17 -0800
Date: Fri, 9 Jan 2004 17:40:16 -0800
From: Matt Kraai <kraai@ftbfs.org>
To: submit@bugs.debian.org
Subject: cp does not truncate existing destinations
Message-ID: <[🔎] 20040110014016.GA26385@catalunya>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="rwEMma7ioTxnRzrJ"
Content-Disposition: inline
User-Agent: Mutt/1.5.4i
Sender: Matt Kraai <kraai@lafn.org>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 
	2.60-master.debian.org_2003_11_25-bugs.debian.org_2004_1_5 
	(1.212-2003-09-23-exp) on master.debian.org
X-Spam-Status: No, hits=-5.0 required=4.0 tests=HAS_PACKAGE autolearn=no 
	version=2.60-master.debian.org_2003_11_25-bugs.debian.org_2004_1_5
X-Spam-Level: 


--rwEMma7ioTxnRzrJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Package: busybox-cvs
Version: 20040101-2
Severity: grave
Tags: patch

cp does not truncate existing destinations.  That is, after
running

 echo foo > foo
 echo fubar > fubar
 cp foo fubar

the contents of fubar are

 foo
 r

instead of

 foo

This breaks debian-installer.

The attached patch fixes it.

-- 
Matt Kraai                                         kraai@ftbfs.org

--rwEMma7ioTxnRzrJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch

diff -ru busybox-cvs-20040101-old/libbb/copy_file.c busybox-cvs-20040101/libbb/copy_file.c
--- busybox-cvs-20040101-old/libbb/copy_file.c	2004-01-09 17:32:08.000000000 -0800
+++ busybox-cvs-20040101/libbb/copy_file.c	2004-01-09 17:39:09.000000000 -0800
@@ -153,7 +153,7 @@
 				}
 			}
 
-			dst_fd = open(dest, O_WRONLY);
+			dst_fd = open(dest, O_WRONLY|O_TRUNC);
 			if (dst_fd == -1) {
 				if (!(flags & FILEUTILS_FORCE)) {
 					bb_perror_msg("unable to open `%s'", dest);

--rwEMma7ioTxnRzrJ--

---------------------------------------
Received: (at 227081-close) by bugs.debian.org; 13 Jan 2004 20:11:00 +0000
>From katie@auric.debian.org Tue Jan 13 14:11:00 2004
Return-path: <katie@auric.debian.org>
Received: from auric.debian.org [206.246.226.45] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Ag05r-0007bd-00; Mon, 12 Jan 2004 05:18:51 -0600
Received: from katie by auric.debian.org with local (Exim 3.35 1 (Debian))
	id 1Ag04T-0005OK-00; Mon, 12 Jan 2004 06:17:25 -0500
From: Glenn McGrath <bug1@debian.org>
To: 227081-close@bugs.debian.org
X-Katie: $Revision: 1.43 $
Subject: Bug#227081: fixed in busybox-cvs 20040101-4
Message-Id: <E1Ag04T-0005OK-00@auric.debian.org>
Sender: Archive Administrator <katie@auric.debian.org>
Date: Mon, 12 Jan 2004 06:17:25 -0500
Delivered-To: 227081-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_01_13 
	(1.212-2003-09-23-exp) on master.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=no 
	version=2.60-bugs.debian.org_2004_01_13
X-Spam-Level: 

Source: busybox-cvs
Source-Version: 20040101-4

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

busybox-cvs-floppy-udeb_20040101-4_i386.udeb
  to pool/main/b/busybox-cvs/busybox-cvs-floppy-udeb_20040101-4_i386.udeb
busybox-cvs-static_20040101-4_i386.deb
  to pool/main/b/busybox-cvs/busybox-cvs-static_20040101-4_i386.deb
busybox-cvs-udeb_20040101-4_i386.udeb
  to pool/main/b/busybox-cvs/busybox-cvs-udeb_20040101-4_i386.udeb
busybox-cvs_20040101-4.diff.gz
  to pool/main/b/busybox-cvs/busybox-cvs_20040101-4.diff.gz
busybox-cvs_20040101-4.dsc
  to pool/main/b/busybox-cvs/busybox-cvs_20040101-4.dsc
busybox-cvs_20040101-4_i386.deb
  to pool/main/b/busybox-cvs/busybox-cvs_20040101-4_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 227081@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Glenn McGrath <bug1@debian.org> (supplier of updated busybox-cvs 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: Mon, 12 Jan 2004 20:51:01 +1100
Source: busybox-cvs
Binary: busybox-cvs-static busybox-cvs busybox-cvs-udeb busybox-cvs-floppy-udeb
Architecture: source i386
Version: 20040101-4
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Glenn McGrath <bug1@debian.org>
Description: 
 busybox-cvs - Tiny utilities for small and embedded systems
 busybox-cvs-floppy-udeb - Tiny utilities for the debian-installer floppy images (udeb)
 busybox-cvs-static - Standalone rescue shell with tons of builtin utilities
 busybox-cvs-udeb - Tiny utilities for the debian-installer (udeb)
Closes: 227081
Changes: 
 busybox-cvs (20040101-4) unstable; urgency=low
 .
   * Fix cp truncation bug (Closes: #227081)
Files: 
 1ac4ed00fd5f8771b0f913e6e9fce478 818 - optional busybox-cvs_20040101-4.dsc
 ffd3ee93ae8735abe4c15a0f74a33517 141521 - optional busybox-cvs_20040101-4.diff.gz
 ae75c4484a60727e8532b29a9010868a 664220 shells optional busybox-cvs-static_20040101-4_i386.deb
 d47f6cb69dfa9796a260225e77ba4a37 125442 utils optional busybox-cvs_20040101-4_i386.deb
 cf8543383e448fc1910b7430db013154 134754 debian-installer extra busybox-cvs-udeb_20040101-4_i386.udeb
 9bd6b6aadeeb1e7e1435f4afcfdd44b1 59204 debian-installer extra busybox-cvs-floppy-udeb_20040101-4_i386.udeb

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

iD8DBQFAAnWgWWZyfXiLlL8RAt+DAJ4t5mM2gjjBPjmVD+Xucj2setOwQQCghRzR
PpB2h2fuV7MwVA5PwY0FgRo=
=3TWe
-----END PGP SIGNATURE-----



Reply to: