RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 614676 - Beta 2 cpio no longer handles symbolic links to directories
Summary: Beta 2 cpio no longer handles symbolic links to directories
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cpio
Version: 6.0
Hardware: x86_64
OS: Linux
low
urgent
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-07-14 23:55 UTC by Bill Uetrecht
Modified: 2010-07-22 06:01 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-22 06:01:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Bill Uetrecht 2010-07-14 23:55:52 UTC
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 13:28:26 UTC
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-22 02:38:11 UTC
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 06:01:01 UTC
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.