mirror of
https://github.com/casjaysdevdocker/gitea
synced 2026-08-14 14:01:17 -04:00
gitea / release-gitea (push) Failing after 41s
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.
4.1 KiB
4.1 KiB
TODO.AI.md
Lint cleanup — pre-existing script-lint violations (found incidentally while wiring act_runner cache-server)
Not fixed yet — out of scope for the cache-enablement change; flagged by script-lint agent.
rootfs/usr/local/bin/start-runners:- line 24: UUOC —
echo "$SERVER_ADDRESS" | grep -q '://'should be[[ "$SERVER_ADDRESS" == *"://"* ]] - line 24:
grep -q '://'missing--before query
- line 24: UUOC —
rootfs/usr/local/etc/docker/init.d/zz-act_runner.sh:- line 4:
##@Versionheader present but no matchingVERSION=assignment in script body - missing
--before the grep query at lines 124 (x2), 130, 133, 134, 369, 390, 401, 438, 468, 525 (x2), 544 (x2, also should quote thegreppattern), 571, 583
- line 4:
App-breaking bug fixed — DEBUGGER guard pattern under set -e (functions/entrypoint.sh)
Needs syncing back to the upstream template in casjay-dotfiles/scripts per the Docker Template
Update Runbook in AI.md — functions/entrypoint.sh is normally regenerated, not hand-edited.
- 26x occurrences of
[ "$DEBUGGER" = "on" ] && echo/printf/__service_banner "..."used as a bare statement: underset -e, this aborts the whole script silently whenever$DEBUGGER!= "on" (the default). This was the root cause of the container dying immediately after printing only the startup banner. Fixed by appending|| trueto all 26 occurrences.
App-breaking bug fixed — __random_password() SIGPIPE (functions/entrypoint.sh)
Needs syncing back to the upstream template in casjay-dotfiles/scripts per the Docker Template
Update Runbook in AI.md — functions/entrypoint.sh is normally regenerated, not hand-edited.
__random_password()(~line 333):tr | head -cpipeline died underset -eo pipefailon SIGPIPE. Fixed by wrapping in{ ... } || true.
App-breaking bug fixed — __format_variables() whitespace-only input (functions/entrypoint.sh)
Needs syncing back to the upstream template per AI.md's runbook.
__format_variables()(~line 187):printf '%s\n' $input | sort -Ru | tr '\n' ' 'always emits at least one line even when$inputword-splits to zero words (whitespace-only), becauseprintfwith a format containing%sruns once even with no args. This madeENV_PORTS/WEB_SERVER_PORTSresolve to a single space" "instead of empty when no port env vars were set, which madeSERVICE_PORTin08-gitea.shbecome" "— passing the-ntest but rendering as an empty--portarg togitea web, which broke gitea's CLI argument parsing 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/envdirectory 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.sampleinto 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.shdirectly (cat <<'EOF' >"/config/env/....local.sh", noteesuppression) withNo such file or directory;zz-act_runner.shhits the same error writing/config/env/act_runner.local.sh. Fixed by addingmkdir -p "/config/env" 2>/dev/null || truealongside the other/config/*directory creation lines (~line 241) inrootfs/usr/local/bin/entrypoint.sh. Needs syncing to the upstream template per AI.md's runbook.
Other observations not yet actioned
.gitea/workflows/docker.yamluses the same stale/unpinned action pattern (@v2-@v4, DockerHub-only,catthehacker/ubuntu:act-latest) that was removed from theopengistrepo's duplicate workflow — nobuild.ymlcounterpart exists here yet.Dockerfilesets forbidden OCI labels (org.opencontainers.image.base.name,.schema-version, duplicateauthors) — same issue previously found and fixed inopengist.