Bug 690856

Summary: Dracut doesn't properly handle including symlinks that are not in a directory already included in the initramfs
Product: [Fedora] Fedora Reporter: David Shaw <dshaw>
Component: dracutAssignee: Harald Hoyer <harald>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 14CC: harald, jonathan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-25 15:51:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description David Shaw 2011-03-25 15:32:34 UTC
Description of problem:

When building an initramfs with dracut, the inst_xxxx functions are sometimes used to copy files to the initramfs.  If it detects that the file being copied is a symlink, it is smart enough to copy the original file and then make a symlink inside the initramfs pointing to the original file.

Unfortunately, if the symlink and original file are not in the same directory, this may fail since the parent directory of the symlink might not exist.

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

dracut-006-6.fc14.noarch

A simple reproduction case is:

# mkdir /usr/share/some-other-dir
# mv /usr/share/pixmaps/system-logo-white.png /usr/share/some-other-dir/
# ln -s /usr/share/some-other-dir/system-logo-white.png /usr/share/pixmaps/
# dracut --force
ln: creating symbolic link `/tmp/initramfs.k6dTa3/usr/share/pixmaps/system-logo-white.png': No such file or directory

The issue seems to be that /usr/share/pixmaps doesn't exist in the initramfs.
  
Actual results:

The directory of the actual file exists in the ramfs, but the directory of the symlink doesn't.

Expected results:

Both directories should exist.