From a03cf8a5f0f4a64fd62166c286a4451ec3292009 Mon Sep 17 00:00:00 2001 From: Attila Szakacs Date: Tue, 2 Jan 2024 16:51:01 +0100 Subject: [PATCH] dbld: use home dir of the container user This commit fixes packaging on debian buster, which broke with the removal of gosu. While creating a python venv, some cache files are to be written to the $HOME dir, which is /root, and the current user does not have a write permission to it. With the gosu method the $HOME dir was still /root, but python did not try to use /root/.cache for some reason. I tried to pinpoint the cause, but could not find it. I also do not know why it only affects buster, but I wasted too much time to investigate. Signed-off-by: Attila Szakacs --- dbld/images/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbld/images/entrypoint.sh b/dbld/images/entrypoint.sh index 9e382534aaa..43b540097a4 100755 --- a/dbld/images/entrypoint.sh +++ b/dbld/images/entrypoint.sh @@ -26,5 +26,5 @@ else chown $USER_NAME:$GROUP_ID /home/$USER_NAME fi - exec sudo --preserve-env -u "${USER_NAME}" "$@" + exec sudo --preserve-env -Hu "${USER_NAME}" "$@" fi