From ba45a2bfb2b2b5e94ae4ee6bb1965a3a8080e3c1 Mon Sep 17 00:00:00 2001 From: Alex Crawford Date: Thu, 17 Apr 2014 12:48:25 -0700 Subject: [PATCH] feat(prod_image_util): Moving ld.so configs to /usr Moving the ld.so configs to /usr and symlinking them to /. This allows images with a tmpfiles root (e.g. PXE) to have ld.so config support. --- build_library/prod_image_util.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/build_library/prod_image_util.sh b/build_library/prod_image_util.sh index 89121e4c42..5f278f0b5c 100755 --- a/build_library/prod_image_util.sh +++ b/build_library/prod_image_util.sh @@ -33,6 +33,18 @@ setup_prod_image() { sudo rm ${root_fs_dir}/etc/locale.gen sudo rm -rf ${root_fs_dir}/etc/lvm/ + # Move the ld.so configs into /usr so they can be symlinked from / + sudo mv ${root_fs_dir}/etc/ld.so.conf ${root_fs_dir}/usr/lib + sudo mv ${root_fs_dir}/etc/ld.so.conf.d ${root_fs_dir}/usr/lib + + sudo ln --symbolic ../usr/lib/ld.so.conf ${root_fs_dir}/etc/ld.so.conf + + # Add a tmpfiles rule that symlink ld.so.conf from /usr into / + sudo tee "${root_fs_dir}/usr/lib64/tmpfiles.d/baselayout-ldso.conf" \ + > /dev/null <