Bug 46997

Summary: hard links are not kept proberly
Product: [Retired] Red Hat Linux Reporter: Rached Ben Mustapha <rbenmustapha>
Component: tarAssignee: Peter Vrabec <pvrabec>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: high Docs Contact:
Priority: medium    
Version: 7.1CC: abrenner
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-20 08:52:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
tar hard link bug resolution none

Description Rached Ben Mustapha 2001-07-02 15:57:29 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2+) Gecko/20010701

Description of problem:
when i create a tar archive with some files hard-linked between them, some
have the leading '/' in their name, causing the file to be hard-linked with
the wrong inode when un-tarred.


How reproducible:
Always

Steps to Reproduce:
1. cd /tmp; tar cf foo.tar /bin
2. mkdir test; cd test
3. tar xf /tmp/foo.tar
4. ls -li bin/*awk*
5. ls -li /bin/*awk*

- or -

1. tar tvf /tmp/foo.tar




Actual Results:  "tar tvf /tmp/foo.tar" gives
-rwxr-xr-x root/root 157884 2000-08-16 19:26:13 bin/gawk-3.0.6
-rwxr-xr-x root/root 0 2000-08-16 19:26:13 bin/gawk link to /bin/gawk-3.0.6

and

in the un-tarred bin directory, gawk has the i-node number of /bin/gawk-3.0.6



Expected Results:  "tar tvf /tmp/foo.tar" should give "bin/gawk link to
bin/gawk-3.0.6"

and

in the un-tarred bin directory, gawk should have the same i-node number as
gawk-3.0.6 in the same directory



Additional info:

1. tar version is 1.3.19
2. when restoring an archive and modifying a file that was badly linked,
the wrong file is modified, so data loss can occur.

Comment 1 Jose Pedro Oliveira 2001-09-18 02:26:50 UTC
Created attachment 31959 [details]
tar hard link bug resolution

Comment 2 Tim Powers 2002-04-09 16:32:03 UTC
Bero: was there a reason for the pulling back from the 1.13.25 packages? Is this
one that missed the rebuilds in February?

Tim

Comment 3 Bernhard Rosenkraenzer 2002-04-09 16:33:45 UTC
Yes, it was missed in the mass rebuild.