From a3c37d017bccce6ffc079f513e38dd6712c66106 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Sat, 8 Nov 2014 10:43:30 -0800 Subject: [PATCH] baselayout: Add OEM lib directories to default search path Although this shouldn't strictly be required, OEM binaries can use RPATH or RUNPATH, there are plenty of corner cases that waste time. For example if a library in OEM links to another OEM the linker verification performed by build_packages won't catch it since RPATH would be provided by the binary that happens to use those libraries, not the library files themselves. Such tediousness isn't worth wasting more time over and as long as OEM is after the normal system libraries this should be safe. --- .../{baselayout-3.0.9.ebuild => baselayout-3.0.10.ebuild} | 0 .../sys-apps/baselayout/baselayout-9999.ebuild | 8 ++++++++ 2 files changed, 8 insertions(+) rename sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/{baselayout-3.0.9.ebuild => baselayout-3.0.10.ebuild} (100%) diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.0.9.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.0.10.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.0.9.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-3.0.10.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-9999.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-9999.ebuild index 34ac28aa78..23a0ea9f31 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-9999.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/baselayout/baselayout-9999.ebuild @@ -130,6 +130,14 @@ src_install() { done echo "LDPATH='${ldpaths#:}'" >> "${D}"/etc/env.d/00basic || die + # Add oem/lib64 to search path towards end of the system's list. + # This simplifies the configuration of OEMs with dynamic libs. + ldpaths= + for libdir in $(get_all_libdirs) ; do + ldpaths+=":/usr/share/oem/${libdir}" + done + echo "LDPATH='${ldpaths#:}'" >> "${D}"/etc/env.d/80oem || die + if ! use symlink-usr ; then # modprobe uses /lib instead of /usr/lib mv "${D}"/usr/lib/modprobe.d "${D}"/lib/modprobe.d || die