commit:     3e9ffa310cfcbadbe5c17160e72f0ff86feed8e4
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 11 19:42:14 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sun Aug 11 19:48:58 2019 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=3e9ffa31

gen_initramfs.sh: create_initramfs(): Disable sandbox for ldconfig

ldconfig will use chroot(). However, sandbox doesn't understand
that and believes we are writing to /etc/ld.so.cache... which is wrong.

Bug: https://bugs.gentoo.org/431038
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 gen_initramfs.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index c5e4a67..23ed9dc 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -1608,7 +1608,8 @@ create_initramfs() {
                        # We can generate or update /etc/ld.so.cache which was 
copied from host
                        # to actually match initramfs' content.
                        print_info 1 "$(get_indent 1)>> Pre-generating 
initramfs' /etc/ld.so.cache ..."
-                       ldconfig -f /etc/ld.so.conf -r "${TDIR}" 2>/dev/null \
+                       # Need to disable sandbox which doesn't understand 
chroot(), bug #431038
+                       SANDBOX_ON=0 ldconfig -f /etc/ld.so.conf -r "${TDIR}" 
2>/dev/null \
                                || gen_die "Failed to pre-generate 
'${TDIR}/etc/ld.so.cache'!"
                fi
 

Reply via email to