Tried upgrading from dracut-027-r3 to dracut-033-r3, after rebuilding img it had new files: +lib32/ld-2.15.so +lib32/ld-linux.so.2 +lib32/libc-2.15.so +lib32/libc.so.6 +lib32/libnss_files-2.15.so +lib32/libnss_files.so.2 +usr/lib32/libnss_files.so Nothing uses them and nothing should. There are no non amd64 bins in img, only these libs. After downgrading to dracut-027-r3 and rebuilding img again these files were not added.
Looks like get_all_libdirs() is an overkill. :( How about get_libdir()? It should be enough if all packages used in initramfs installed their libraries in correct dirs.
Maybe. But it would only create empty dirs. It shouldn't take 32-bit libs if not needed, anyway.
(In reply to Amadeusz Żołnowski from comment #2) Then somebody should fix inst_libdir_file() function.
(In reply to Amadeusz Żołnowski from comment #2) > It shouldn't take 32-bit libs if not needed, anyway. inst_libdir_file() is intended to install libraries that cannot be automatically installed by dracut-install, because these libraries are usually loaded using dlopen() (dracut-install uses ldd to track dependencies of installed binaries). So I have no idea how dracut can automatically determine the correct libdir. Since we do not expect libraries for non-native ABIs in initramfs, I think the correct fix would be: libdirs="/$(get_libdir) /usr/$(get_libdir)" /lib and /usr/lib are not needed here: https://bugs.gentoo.org/show_bug.cgi?id=485218#c2 "On SYMLINK_LIB="no" /usr/lib is for x86 AND non-ABI-specific components."
/lib and /usr/lib in $libdirs is necessary, too. Otherwise /usr/lib is always created as directory, not a symlink. +*dracut-034-r1 (16 Oct 2013) + + 16 Oct 2013; Amadeusz Żołnowski <aidecoe@gentoo.org> +dracut-034-r1.ebuild, + +files/034-0006-resume-fix-swap-detection-in-hostonly.patch: + Fixed bug #487322 (resume support in hostonly mode) and bug #486516 + (redundant + inclusion of libs from lib32 directory). + + Thanks to Alexander Tsoy <alexander@tsoy.me> for patch for bug #486516. +