Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 199701 - sys-kernel/genkernel linuxrc creates bogus symlinks in tmpfs for directories with whitespace
Summary: sys-kernel/genkernel linuxrc creates bogus symlinks in tmpfs for directories ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Lowest trivial (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-19 20:27 UTC by loux thefuture
Modified: 2007-11-28 22:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description loux thefuture 2007-11-19 20:27:12 UTC
After the "Copying read-write image contents to tmpfs"
if you have directory with space like in gdm-themes (Pirates of Gnome)
when the script list all the subdirectories of /usr it'll have "Pirates of Gnome"
and he will build symlink for : 
/usr/share/gdm/themes/Pirates 
/of
/Gnome
(same thing for "Gnome Yang" for example)
so i got some wrong symlink inside my system after having boot on my liveCD
/Gnome -> /mnt/livecd/Gnome
/of -> /mnt/livecd/of
...
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-11-19 20:46:11 UTC
What does genkernel/linuxrc have in common with Gnome themes? Please explain how to reproduce this issue.
Comment 2 loux thefuture 2007-11-19 21:02:52 UTC
hello,
to reproduce this issue just build a livecd with gdm-themes inside it
and use genkernel to produce the kernel and initramfs,

when you'll boot on it, linuxrc'll create symlink (after "Coying read-write image contents to tmpfs") but when listing all subdirectories of x=usr it'll get (for example) /usr/share/gdm/themes/Pirates of Gnome and it'll produce symlink for 
/usr/share/gdm/themes/Pirates
/of
/Gnome
because of the space inside the directory name
this is not a gdm-themes issue but
a linuxrc issue which does list correctly all subdirectories
(gdm-themes is one of them)
loux
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-11-20 21:42:48 UTC
catalyst - is this yours, or... ? I fail to get what does some Gnome stuff w/ stupid spaces in path have in common w/ genkernel really.
Comment 4 Andrew Gaffney (RETIRED) gentoo-dev 2007-11-20 21:59:31 UTC
Yeah, I think this is technically us. The linuxrc in the genkernel initramfs does some "magic" tmpfs voodoo when booting a CD. I believe this culprit is the following line in generic/linuxrc:

# List all subdirectories of x
for directory in `find "${NEW_ROOT}/${FS_LOCATION}/${x}" -type d 2>/dev/null`

This should probably be something like the following to account for directories with whitespace in the name

find "${NEW_ROOT}/${FS_LOCATION}/${x}" -type d 2>/dev/null | while read directory
Comment 5 Andrew Gaffney (RETIRED) gentoo-dev 2007-11-24 05:35:19 UTC
This is fixed in SVN and will be in the next release.
Comment 6 Chris Gianelloni (RETIRED) gentoo-dev 2007-11-28 22:32:08 UTC
This should be done in 3.4.9_pre10 which will be hitting the tree soon.