From 92d8d12325c58493ad32a4e1855dc87163e2b8f9 Mon Sep 17 00:00:00 2001 From: Tasos Sahanidis Date: Fri, 15 Mar 2024 17:32:22 +0200 Subject: Hack to fix building inside LXC containers --- src/arch-nspawn.in | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/arch-nspawn.in b/src/arch-nspawn.in index 8fcdead..8110337 100644 --- a/src/arch-nspawn.in +++ b/src/arch-nspawn.in @@ -140,4 +140,14 @@ else set_arch="${CARCH}" fi -exec ${CARCH:+setarch "$set_arch"} systemd-nspawn "${nspawn_args[@]}" "$@" +mkdir -p "${working_dir}/proc" +mount proc "${working_dir}/proc" -t proc -o nosuid,noexec,nodev + +# Eeeeeeh +${CARCH:+setarch "$set_arch"} systemd-nspawn "${nspawn_args[@]}" "$@" + +RET=$? + +umount "${working_dir}/proc" + +exit $RET -- cgit v1.2.3-70-g09d2