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

Bug#244589: marked as done (busybox-cvs: 'cp -a' from cramfs breaks)

Your message dated Sun, 09 May 2004 04:02:10 -0400
with message-id <E1BMjGE-0005tx-00@newraff.debian.org>
and subject line Bug#244589: fixed in busybox-cvs 20040507-1
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; 19 Apr 2004 01:41:37 +0000
>From cjwatson@flatline.org.uk Sun Apr 18 18:41:37 2004
Return-path: <cjwatson@flatline.org.uk>
Received: from chiark.greenend.org.uk [] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BFNmz-0001kA-00; Sun, 18 Apr 2004 18:41:37 -0700
Received: from [] (helo=riva.lab.dotat.at)
	by chiark.greenend.org.uk (Debian Exim 3.35 #1) with esmtp
	for submit@bugs.debian.org
	id 1BFNmx-0002AE-00; Mon, 19 Apr 2004 02:41:35 +0100
Received: from cjwatson by riva.lab.dotat.at with local (Exim 3.35 #1 (Debian))
	for submit@bugs.debian.org
	id 1BFNmw-0002gL-00; Mon, 19 Apr 2004 02:41:34 +0100
Date: Mon, 19 Apr 2004 02:41:34 +0100
From: Colin Watson <cjwatson@debian.org>
To: submit@bugs.debian.org
Subject: busybox-cvs: 'cp -a' from cramfs breaks
Message-ID: <20040419014134.GB7428@riva.ucam.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.28i
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=-7.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-CrossAssassin-Score: 1

Package: busybox-cvs
Version: 20040408-1
Tags: patch d-i

When I create a cramfs of a debian-installer tree and try to boot from
it, the 'cp -a' in d-i's init falls over like this, which makes init
fall over in turn:

  cp: unable to link `../tmp/usr/share/discover/usb.lst': Operation not permitted
  cp: unable to link `../tmp/var/log/messages': Operation not permitted

It turns out that this is because cramfs sets the same inode (namely 1)
on empty directories and zero-length files, and busybox cp thinks that
it can hard-link together anything with the same inode. While this is a
fair assumption with more normal filesystems, it would be very useful if
it could apply more sanity checks before trying to call link(), such as
checking the link count, which on any normal filesystem will be greater
than one for each of a set of hardlink.

I've successfully booted using the following patch:

diff -u busybox-cvs-20040408/debian/changelog busybox-cvs-20040408/debian/changelog
--- busybox-cvs-20040408/debian/changelog
+++ busybox-cvs-20040408/debian/changelog
@@ -1,3 +1,11 @@
+busybox-cvs (20040408-1.1) UNRELEASED; urgency=low
+  * libbb/copy_file.c:
+    - Fix 'cp -a' from cramfs, where zero-length files and empty directories
+      have the same inode number. Only make hardlinks if st_nlink > 1.
+ -- Colin Watson <cjwatson@debian.org>  Mon, 19 Apr 2004 01:03:51 +0100
 busybox-cvs (20040408-1) unstable; urgency=low
   * New CVS version
only in patch2:
--- busybox-cvs-20040408.orig/libbb/copy_file.c
+++ busybox-cvs-20040408/libbb/copy_file.c
@@ -129,6 +129,7 @@
 		char *link_name;
 		if (!(flags & FILEUTILS_DEREFERENCE) &&
+				source_stat.st_nlink > 1 &&
 				is_in_ino_dev_hashtable(&source_stat, &link_name)) {
 			if (link(link_name, dest) < 0) {
 				bb_perror_msg("unable to link `%s'", dest);


Colin Watson                                  [cjwatson@flatline.org.uk]

Received: (at 244589-close) by bugs.debian.org; 9 May 2004 08:08:17 +0000
>From katie@ftp-master.debian.org Sun May 09 01:08:17 2004
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1BMjM8-0008Uq-00; Sun, 09 May 2004 01:08:16 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1BMjGE-0005tx-00; Sun, 09 May 2004 04:02:10 -0400
From: Bastian Blank <waldi@debian.org>
To: 244589-close@bugs.debian.org
X-Katie: $Revision: 1.49 $
Subject: Bug#244589: fixed in busybox-cvs 20040507-1
Message-Id: <E1BMjGE-0005tx-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Sun, 09 May 2004 04:02:10 -0400
Delivered-To: 244589-close@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=-5.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-CrossAssassin-Score: 4

Source: busybox-cvs
Source-Version: 20040507-1

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:

  to pool/main/b/busybox-cvs/busybox-cvs-floppy-udeb_20040507-1_i386.udeb
  to pool/main/b/busybox-cvs/busybox-cvs-static_20040507-1_i386.deb
  to pool/main/b/busybox-cvs/busybox-cvs-udeb_20040507-1_i386.udeb
  to pool/main/b/busybox-cvs/busybox-cvs_20040507-1.diff.gz
  to pool/main/b/busybox-cvs/busybox-cvs_20040507-1.dsc
  to pool/main/b/busybox-cvs/busybox-cvs_20040507-1_i386.deb
  to pool/main/b/busybox-cvs/busybox-cvs_20040507.orig.tar.gz

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

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

Debian distribution maintenance software
Bastian Blank <waldi@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)

Hash: SHA1

Format: 1.7
Date: Sat, 08 May 2004 14:58:04 +0200
Source: busybox-cvs
Binary: busybox-cvs-static busybox-cvs busybox-cvs-udeb busybox-cvs-floppy-udeb
Architecture: source i386
Version: 20040507-1
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Bastian Blank <waldi@debian.org>
 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: 231606 231618 243508 244589 245560 245580
 busybox-cvs (20040507-1) unstable; urgency=low
   * New CVS version
     - Fix detection of hardlinks. (closes: #244589)
     - Fix CAN-2003-0856.
   * debian/config-udeb*:
     - Enable netcat. (closes: #243508)
     - Enable support for md5sum -c.
   * modutils:
     - Fix parameter passing for 2.4 modules. (closes: #245560)
     - Add biarch support to 2.4 depmod and lsmod. (closes: #231606, #231618)
     - Add 2.6 support to lsmod. (closes: #245580)
 113ea64588b3818f08acb01db2b62003 793 - optional busybox-cvs_20040507-1.dsc
 32dfbe0f9e8b62068fc39c702a019452 1305493 - optional busybox-cvs_20040507.orig.tar.gz
 c6d9437d7261a70426a0db6292370181 174341 - optional busybox-cvs_20040507-1.diff.gz
 748e45604a1dd1ce013bcea4c6456251 663742 shells optional busybox-cvs-static_20040507-1_i386.deb
 f472f16657d1b4a00f6e82df6f7bc79c 124672 utils optional busybox-cvs_20040507-1_i386.deb
 342b17d56017cef366843ba2d60ecec4 141464 debian-installer extra busybox-cvs-udeb_20040507-1_i386.udeb
 e15741435178af495a2315a42c472e65 59436 debian-installer extra busybox-cvs-floppy-udeb_20040507-1_i386.udeb

Version: GnuPG v1.2.4 (GNU/Linux)


Reply to: