From ff5e561df3d0374f0b057600d8bfbb6ce711ae0b Mon Sep 17 00:00:00 2001 From: pstruebi Date: Fri, 25 Apr 2025 11:05:20 +0200 Subject: [PATCH] update readme and fix poetry install --- README_AURACAST_SYSTEM.md | 3 ++- .../04-auracaster_customization/00-run-chroot.sh | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README_AURACAST_SYSTEM.md b/README_AURACAST_SYSTEM.md index 9d0a96f..e5fe7b1 100644 --- a/README_AURACAST_SYSTEM.md +++ b/README_AURACAST_SYSTEM.md @@ -1,8 +1,9 @@ # Build - Always use the docker build script - - sudo CONTINUE=1 bash build-docker.sh + - sudo bash build-docker.sh # System +- Extended stage2 with customizations - this builds a 'lite' version of the system, featuring also basic development tools - deactivate wifi and bluetooth (wifi can be deactivated, bt has bt-disable overlay) - install docker diff --git a/stage2/04-auracaster_customization/00-run-chroot.sh b/stage2/04-auracaster_customization/00-run-chroot.sh index 853e8eb..8ed06d2 100755 --- a/stage2/04-auracaster_customization/00-run-chroot.sh +++ b/stage2/04-auracaster_customization/00-run-chroot.sh @@ -33,13 +33,18 @@ fi # Use FIRST_USER_NAME if set, else default to 'pi' USER_TO_ADD="${FIRST_USER_NAME:-pi}" usermod -aG "$DOCKER_GROUP" "$USER_TO_ADD" || true - docker compose version +docker run hello-world -# Install Python Poetry (official installer) -curl -sSL https://install.python-poetry.org | python3 - -# Make Poetry available to all users -ln -sf /root/.local/bin/poetry /usr/local/bin/poetry +# Install Python Poetry for caster user (official installer) +sudo -u caster curl -sSL https://install.python-poetry.org | python3 - + +# Ensure Poetry's bin directory is in caster's PATH +CASTER_BASHRC="/home/caster/.bashrc" +if ! grep -q 'export PATH="/home/caster/.local/bin:$PATH"' "$CASTER_BASHRC" 2>/dev/null; then + echo 'export PATH="/home/caster/.local/bin:$PATH"' >> "$CASTER_BASHRC" + chown caster: "$CASTER_BASHRC" +fi # Install WireGuard apt-get install -y wireguard wireguard-tools