Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 487322 - sys-kernel/dracut-033-r3 adds /lib32/ and /usr/lib32/ to img when using mutilib amd64 system
Summary: sys-kernel/dracut-033-r3 adds /lib32/ and /usr/lib32/ to img when using mutil...
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-10-08 14:57 UTC by Nikoli
Modified: 2013-10-16 21:44 UTC (History)
1 user (show)

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 Nikoli 2013-10-08 14:57:03 UTC
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.
Comment 1 Alexander Tsoy 2013-10-09 08:14:33 UTC
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.
Comment 2 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-10-09 10:20:29 UTC
Maybe. But it would only create empty dirs. It shouldn't take 32-bit libs if not needed, anyway.
Comment 3 Alexander Tsoy 2013-10-09 10:42:02 UTC
(In reply to Amadeusz Żołnowski from comment #2)
Then somebody should fix inst_libdir_file() function.
Comment 4 Alexander Tsoy 2013-10-15 11:38:04 UTC
(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."
Comment 5 Amadeusz Żołnowski (RETIRED) gentoo-dev 2013-10-16 21:44:56 UTC
/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.
+