Skip to content

fix(forgejo): actually install the pinned release (ETXTBSY on running binary) - #136

Merged
ralyodio merged 1 commit into
mainfrom
fix/forgejo-upgrade-etxtbsy
Oct 1, 2026
Merged

ralyodio merged 1 commit into
mainfrom
fix/forgejo-upgrade-etxtbsy

Conversation

@ralyodio

@ralyodio ralyodio commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Every deploy logs forgejo download failed, so AgentGit is still on 11.0.1 (/api/v1/version → 11.0.1+gitea-1.22.0) although FORGEJO_VERSION pins 11.0.15.

Cause: setup.sh curls straight to /usr/local/bin/forgejo while forgejo.service runs it, and Linux refuses to write a running executable (ETXTBSY, "Text file busy").

Fix: download to forgejo.new, check that its --version matches the pin, then mv it over the old binary. A rename is allowed on a running executable. The existing systemctl restart forgejo (same section) starts the new release. On a failed download the installed binary is kept, and the warning says so instead of claiming the backend is unavailable. This is the same pattern deploy/git-chovy/install.sh uses.

Effect on merge: the next deploy upgrades git.profullstack.com from 11.0.1 to 11.0.15 (same 11.0 LTS line, patch releases only) with one Forgejo restart.

Checks: bash -n passes; shellcheck shows the same 3 pre-existing warnings as main, none new.

Split out of #135 (closed): that PR's ufw/app.ini changes turned out to be unneeded, because :2222 is dropped by the DigitalOcean cloud firewall, not on the box.

🤖 Generated with Claude Code

… binary

setup.sh downloaded straight to /usr/local/bin/forgejo while forgejo.service
was running, which fails with ETXTBSY ("Text file busy"). Every deploy logged
"forgejo download failed" and prod stayed on 11.0.1 although the pin is
11.0.15. Download to forgejo.new, check its --version, and rename it over the
old binary; the existing `systemctl restart forgejo` then starts the new one.
A failed or wrong download now keeps the installed binary instead of warning
that the backend will be unavailable.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

10 finding(s)

HIGH/CRITICAL: 7 | LOW: 3

Severity Rule Location
HIGH secret-generic-credential deploy/ergo/ircd.yaml:162
HIGH secret-generic-credential deploy/ergo/ircd.yaml:221
HIGH secret-generic-credential deploy/ergo/ircd.yaml:638
HIGH secret-generic-credential deploy/ergo/ircd.yaml:787
HIGH secret-database-url deploy/ergo/ircd.yaml:893
HIGH secret-generic-credential deploy/ergo/ircd.yaml:1025
HIGH secret-generic-credential deploy/ergo/ircd.yaml:1033
LOW secret-generic-credential deploy/ergo/ircd.yaml:772
LOW tls-verification-disabled internal/mail/mail.go:109
LOW secret-generic-credential internal/mailu/mailu_test.go:44

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit f5c8e31 into main Oct 1, 2026
6 checks passed
@ralyodio
ralyodio deleted the fix/forgejo-upgrade-etxtbsy branch October 1, 2026 10:32
ralyodio added a commit that referenced this pull request Oct 1, 2026
The redeploy restarts agentbbs, and the smoke test could run before it had
re-bound :22 (0.3 s after on the #136 deploy). One probe made most deploys go
red while the BBS answered moments later. Probe up to 12 times, 10 s apart,
and fail only if :22 never answers. Still a keyscan only, so no account is
ever registered.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant