From fc3e148bb2afc71b444a1ea69bf937bf1d6d743a Mon Sep 17 00:00:00 2001 From: casjay Date: Wed, 5 Aug 2026 01:52:09 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Create=20/config/env=20directory?= =?UTF-8?q?=20before=20services=20write=20into=20it=20=F0=9F=90=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit App-breaking bug found during full runtime verification of the act_runner cache-server feature: `/config/env` was never explicitly created. It only came into existence as a side effect of `__create_env_file()` copying `/usr/local/etc/docker/env/default.sample` into it — but that sample file does not exist in this image's rootfs, so `__create_env_file()` returns early without creating the directory. `05-dockerd.sh` and `zz-act_runner.sh` then failed writing `/config/env/docker.local.sh` and `/config/env/act_runner.local.sh` directly, logging `No such file or directory` (non-fatal, but a real bug). - rootfs/usr/local/bin/entrypoint.sh: added `mkdir -p "/config/env" 2>/dev/null || true` alongside the other `/config/*` directory creation lines - TODO.AI.md: logged the fix and the upstream-template-sync follow-up Verified: full end-to-end run with `--privileged --cap-add CHOWN --cap-add SYS_TIME --cap-add SYS_ADMIN` (per README) shows no more "No such file or directory" errors, gitea starts on port 80, dockerd starts, act_runner cache server logs "Cache server has been started and is listening on 44015", and both configured runners register successfully ("Runner registered successfully." x2, RUNNERS_START=2). `runners-cache.yaml` is generated with real (non-REPLACE_) cache config values. --- TODO.AI.md | 14 ++++++++++++++ rootfs/usr/local/bin/entrypoint.sh | 1 + 2 files changed, 15 insertions(+) diff --git a/TODO.AI.md b/TODO.AI.md index c69ad53..7af9724 100644 --- a/TODO.AI.md +++ b/TODO.AI.md @@ -42,6 +42,20 @@ Needs syncing back to the upstream template per AI.md's runbook. entirely (`Command error: unknown command: /config/gitea/app.ini`). Fixed by replacing the `[ -z "$input" ]` check with `[[ "$input" =~ [^[:space:]] ]] || return 0`. +## App-breaking bug fixed — missing /config/env directory (bin/entrypoint.sh) + +- `/config/env` directory was never explicitly created. It only came into existence as a side + effect of `__create_env_file()` (functions/entrypoint.sh) copying + `/usr/local/etc/docker/env/default.sample` into it — but that sample file/dir does not exist in + this image's rootfs, so `__create_env_file()` returns early (line 960) without creating the + directory. `05-dockerd.sh`'s `__create_service_env()` then fails writing + `/config/env/docker.local.sh` directly (`cat <<'EOF' >"/config/env/....local.sh"`, no `tee` + suppression) with `No such file or directory`; `zz-act_runner.sh` hits the same error writing + `/config/env/act_runner.local.sh`. Fixed by adding + `mkdir -p "/config/env" 2>/dev/null || true` alongside the other `/config/*` directory creation + lines (~line 241) in `rootfs/usr/local/bin/entrypoint.sh`. Needs syncing to the upstream + template per AI.md's runbook. + ## Other observations not yet actioned - `.gitea/workflows/docker.yaml` uses the same stale/unpinned action pattern (`@v2`-`@v4`, DockerHub-only, `catthehacker/ubuntu:act-latest`) that was removed from the `opengist` repo's duplicate workflow — no `build.yml` counterpart exists here yet. diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh index 779d734..344a1de 100755 --- a/rootfs/usr/local/bin/entrypoint.sh +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -240,6 +240,7 @@ mkdir -p "/data/logs" 2>/dev/null || true mkdir -p "/run/init.d" 2>/dev/null || true mkdir -p "/config/enable" 2>/dev/null || true mkdir -p "/config/secure" 2>/dev/null || true +mkdir -p "/config/env" 2>/dev/null || true mkdir -p "/usr/local/etc/docker/exec" 2>/dev/null || true # - - - - - - - - - - - - - - - - - - - - - - - - - # create required files