Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485204 - sys-kernel/dracut-033 includes useless dirs in initramfs.img
Summary: sys-kernel/dracut-033 includes useless dirs in initramfs.img
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Amadeusz Żołnowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-17 15:12 UTC by Nikoli
Modified: 2013-10-02 21:31 UTC (History)
2 users (show)

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


Attachments
dracut-033-r1-libdirs.patch (dracut-033-r1-libdirs.patch,988 bytes, patch)
2013-10-01 20:52 UTC, Alexander Tsoy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2013-09-17 15:12:49 UTC
+usr/lib64/opengl
+usr/lib64/opengl/xorg-x11
+usr/lib64/opengl/xorg-x11/lib
+usr/lib64/qt4
+usr/lib64/usr
+usr/lib64/usr/lib64
+usr/lib/gcc
+usr/lib/gcc/x86_64-pc-linux-gnu
+usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3
+usr/x86_64-pc-linux-gnu
+usr/x86_64-pc-linux-gnu/lib
Comment 1 Alexander Tsoy 2013-09-30 22:02:52 UTC
Looks like an ldconfig paths. This was probably introduced in the following commit:
http://git.kernel.org/cgit/boot/dracut/dracut.git/commit/dracut-functions.sh?id=4fe1bdd406602922a55ef4f7d6a13e13dfd1b87f
Comment 2 Alexander Tsoy 2013-09-30 22:06:44 UTC
As a workaround we can define $libdirs in dracut.conf.d/gentoo.conf
Comment 3 Alexander Tsoy 2013-09-30 22:29:33 UTC
For example on my system (dracut.log is the output of "dracut --debug ..."):

$ egrep '70\(ldconfig_paths.*printf' dracut.log
///usr/lib/dracut/dracut-functions.sh@70(ldconfig_paths): printf '%s\n' /usr/lib64 /lib64 /usr/lib64/mysql /usr/lib/postgresql /usr/lib32 /usr/x86_64-pc-linux-gnu/lib /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/32 /lib32 /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3

And dracut script create all of this dirs: 

1058 if [[ $kernel_only != yes ]]; then
1059     for d in usr/bin usr/sbin bin etc lib sbin tmp usr var $libdirs; do
1060         [[ -e "${initdir}${prefix}/$d" ]] && continue
1061         if [ -L "/$d" ]; then
1062             inst_symlink "/$d" "${prefix}/$d"
1063         else
1064             mkdir -m 0755 -p "${initdir}${prefix}/$d"
[..]-------------^^^^
Comment 4 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-10-01 08:00:41 UTC
That's right. Setting libdirs is actually not a workaround, but the way to go. I'd have to prepare Gentoo default.
Comment 5 Alexander Tsoy 2013-10-01 20:52:20 UTC
Created attachment 359938 [details, diff]
dracut-033-r1-libdirs.patch

Works for me
Comment 6 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-10-02 21:11:18 UTC
Nikoli, thank you for the report!

Alexander, thank you for the patch. I haven't applied it, actually, but it was a good suggestion. See the ebuild to see why. :-)

+*dracut-033-r2 (02 Oct 2013)
+
+  02 Oct 2013; Amadeusz Żołnowski <aidecoe@gentoo.org> +dracut-033-r2.ebuild,
+  +files/033-0003-Use-the-same-paths-in-dracut.sh-as-tho.patch,
+  +files/033-0004-Install-dracut-install-into-libexec-di.patch:
+  Fixes bug #485204 and bug #485218.
+
+  Thanks to Alexander Tsoy <alexander@tsoy.me> for suggestions on bug #485204.
+
+  Thanks to  Steven Newbury <s_j_newbury@yahoo.co.uk> for good suggestions on
+  bug #485218.  Patch installing dracut-install to /usr/libexec has been
+  submitted upstream.
+
Comment 7 Alexander Tsoy 2013-10-02 21:31:14 UTC
> Alexander, thank you for the patch. I haven't applied it, actually, but it
> was a good suggestion. See the ebuild to see why. :-)

Ooops.. Yes, I see where is my fault. =/