copy_binaries: utility function to pick up a binary and needed libs
authorRichard Yao <ryao@cs.stonybrook.edu>
Wed, 1 Feb 2012 03:20:49 +0000 (22:20 -0500)
committerRobin H. Johnson <robbat2@gentoo.org>
Mon, 6 Feb 2012 08:19:17 +0000 (08:19 +0000)
commit1079122ea0c1733024dbebadd2ae8ad2c88a9bee
treedac436d7f2be802c4e74bac8195ff56e58c3a61d
parentaf26e433cbe7b94ee699b4ecd14fe89efa46ecfe
copy_binaries: utility function to pick up a binary and needed libs

The existing multipath functionality manually picks up a binary and lots
of needed libraries manually, and sometimes misses libraries if the
binary was linked against something else.

Use lddtree from app-misc/pax-utils to get all libraries with the
binary. The only ones that will be missed are those that are dlopen()ed.
cpio is used for copying to preserve directory structure.

lddtree usage replaces a larger manual function from calling ldd, that
was also vulnerable to injections.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
(commit message rewritten)
ChangeLog
gen_initramfs.sh