Subject: bin/13643: pax doesn't handle hardlinks correctly
To: None <gnats-bugs@gnats.netbsd.org>
From: None <leo@marco.de>
List: netbsd-bugs
Date: 08/06/2001 17:50:50
>Number: 13643
>Category: bin
>Synopsis: pax doesn't handle hardlinks correctly
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 06 08:49:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Matthias Pfaller
>Release: NetBSD-20010731
>Organization:
Matthias Pfaller Software Entwicklung
marco Systemanalyse und Entwicklung GmbH Tel +49 8131 5161-41
Hans-Böckler-Str. 2, D 85221 Dachau Fax +49 8131 5161-66
http://www.marco.de/ Email leo@dachau.marco.de
>Environment:
System: NetBSD lethe 1.5X NetBSD 1.5X (LETHE) #182: Thu Jul 26 12:04:09 CEST 2001 leo@lethe:/usr/src/sys/arch/dnard/compile/LETHE arm32
Architecture: arm32
Machine: arm32
>Description:
When writing sv4cpio archives, cpio puts files with hardlinks way
too often into the archive.
>How-To-Repeat:
$ cd /tmp
$ mkdir d
$ cd d
$ echo hello >x
$ ln x ../out
$ ln x y
$ find . -depth | pax -w -x sv4cpio >../a-pax
1 block
$ find . -depth | cpio -o -H newc >../a-cpio
2 blocks
$ cpio -itv <../a-bax
-rw-r--r-- 3 leo wheel 6 Aug 6 17:43 ./x
-rw-r--r-- 3 leo wheel 6 Aug 6 17:43 ./y
drwxr-xr-x 2 leo wheel 0 Aug 6 17:43 .
-rw-r--r-- 3 leo wheel 6 Aug 6 17:43 ./x
-rw-r--r-- 3 leo wheel 6 Aug 6 17:43 ./y
1 block
$ cpio -itv <../a-cpio
drwxr-xr-x 2 leo wheel 0 Aug 6 17:48 .
-rw-r--r-- 3 leo wheel 0 Aug 6 17:48 y
-rw-r--r-- 3 leo wheel 6 Aug 6 17:48 x
Note that while cpio is better than pax, it still doesn't handle this
correctly. When reading in this archive, the directory modification time
will be wrong in the cpio case as well.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: