Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 614676 - Beta 2 cpio no longer handles symbolic links to directories
Beta 2 cpio no longer handles symbolic links to directories
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cpio (Show other bugs)
6.0
x86_64 Linux
low Severity urgent
: rc
: ---
Assigned To: Ondrej Vasik
qe-baseos-daemons
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-14 19:55 EDT by Bill Uetrecht
Modified: 2010-07-22 02:01 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-22 02:01:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bill Uetrecht 2010-07-14 19:55:52 EDT
Description of problem:

If I create a cpio archive containing symbolic links to directories, extracting the archive results in the links being replaced with empty directories. This occurs using the -o and -p options. If I replace the beta 2 cpio with beta 1 cpio it works correctly.

Version-Release number of selected component (if applicable):

cpio-2.10-8.el6.x86_64.rpm

How reproducible:

Always fails

Steps to Reproduce:
1. Create a /tmp/iso directory.
2. Mount the beta 2 iso on /mnt using the -o loop option
3. Change directory to /mnt and run 'find . -print | cpio -pdvm /tmp/iso'
4. Look at the repodata directory - was a symbolic link to Server/repodata,
   now is an empty directory. 
  
Actual results:


Expected results:


Additional info:
Comment 2 Ondrej Vasik 2010-07-15 09:28:26 EDT
Thanks for report - could you please where is the symlink in iso pointing (ls -l <symlinkaddress> or readlink <symlinkaddress> ? Maybe it is dangling symlink after the copy. If you just downgrade to beta1 cpio rpm, does it work correctly? If so, could you please attach strace of both runs (if you manage to get some more minimalistic fail scenario, it would be better) ? I don't think there was any change to the symlink handling between beta1 and beta2 cpio, but everything is possible.

Do you have some smaller reproducer? 

I tried:
$ mkdir tmp
$ cd tmp
$ dd if=/dev/zero of=blob bs=8192 count=200
$ mkdir mnt
$ mkfs -t ext2 -F blob
$ sudo mount -oloop blob mnt
$ mkdir -p x/y
$ touch x/y/a
$ ln -s x/y c
$ cd mnt
$ find . -print | cpio -pdvm ../cpio.archive

and it just worked (and directory symlinks were copied correctly) - so I think some special circumstances are necessary to reproduce the issue.
Comment 6 Bill Uetrecht 2010-07-21 22:38:11 EDT
I was running this on a KVM virtual machine. I just tried this with the beta 2 refresh version of cpio and it works fine.
Comment 7 Ondrej Vasik 2010-07-22 02:01:01 EDT
Thanks for retesting...
Strange, there was no cpio update between beta 2 and beta 2 refresh - so I guess the problem itself is likely not in cpio directly - maybe kernel or some library update affected it. Without clear reproducer and strace is everything very uncertain, so closing this bugzilla as "not a bug" - feel free to reopen it if you'll get some usable reproducer(and/or strace of the failure) in future. TIA.

Note You need to log in before you can comment on or make changes to this bug.