From 677343ca2edffd049b665ace898b12af37eb9684 Mon Sep 17 00:00:00 2001 From: Kai Lueke Date: Wed, 1 Jun 2022 14:21:07 +0900 Subject: [PATCH] run_sdk_container: Workaround for write-protected /etc/hosts bind-mount The baselayout package wants to manage the /etc/hosts file and thus fails to emerge in the SDK container. One would have to build a new SDK container instead. To unblock the LTS 3033.3.1 release we can add a workaround to make the SDK container environment more similar to how cork worked by removing the /etc/hosts bind mount. This action has to be added to run_sdk_container instead of sdk_lib/sdk_entry.sh because the existing SDK's copy of sdk_lib/sdk_entry.sh won't have the change. --- run_sdk_container | 3 +++ 1 file changed, 3 insertions(+) diff --git a/run_sdk_container b/run_sdk_container index 465451c4fd..d82331b66c 100755 --- a/run_sdk_container +++ b/run_sdk_container @@ -143,4 +143,7 @@ if [ "$stat" != "Up" ] ; then $docker start "$name" fi +# Workaround: The SDK expects to be able to write to /etc/hosts +$docker exec "$name" sh -c 'cp /etc/hosts /etc/hosts2; umount /etc/hosts ; mv /etc/hosts2 /etc/hosts' + $docker exec $tty -i "$name" /home/sdk/sdk_entry.sh "$@"