The image creates SWW_STATE_DIR when it is missing (closes #337) #351

Open
clawbot wants to merge 1 commits from issue-337-state-dir-created into next
pull from: issue-337-state-dir-created
Collaborator

Implements #337.

  • share/sww.run: before waf starts, make_state_dir_for_sww (renamed from give_state_dir_to_sww) runs mkdir -p, chown -R sww:sww and chmod 0700 on SWW_STATE_DIR. A value that is not an absolute path, or an unreadable SWW_STATE_DIR_FILE, still changes nothing, and waf stops naming the setting. A failed step does not end the script; waf reports a directory it cannot write.
  • The Dockerfile comment, docs/image.md, docs/settings.md and SPEC.md say the run script makes the directory. docs/settings.md no longer says the path must exist.
  • script/example-app: the last case used to expect waf to log SWW_STATE_DIR cannot be written for /srv/missing. It now expects the container to become healthy, with /srv/missing owned by sww and mode 0700.

Not obvious from the diff:

  • chmod 0700 also applies to an existing directory, a mounted volume or host directory included, at every start of waf.
  • The cache directory gets no mode change; the issue asked for 0700 on the state directory only.

Model: opus-5-5

Implements https://git.eeqj.de/sneak/smallwebwaf/issues/337. - `share/sww.run`: before `waf` starts, `make_state_dir_for_sww` (renamed from `give_state_dir_to_sww`) runs `mkdir -p`, `chown -R sww:sww` and `chmod 0700` on `SWW_STATE_DIR`. A value that is not an absolute path, or an unreadable `SWW_STATE_DIR_FILE`, still changes nothing, and `waf` stops naming the setting. A failed step does not end the script; `waf` reports a directory it cannot write. - The `Dockerfile` comment, `docs/image.md`, `docs/settings.md` and `SPEC.md` say the `run` script makes the directory. `docs/settings.md` no longer says the path must exist. - `script/example-app`: the last case used to expect `waf` to log `SWW_STATE_DIR cannot be written` for `/srv/missing`. It now expects the container to become healthy, with `/srv/missing` owned by `sww` and mode `0700`. Not obvious from the diff: - `chmod 0700` also applies to an existing directory, a mounted volume or host directory included, at every start of `waf`. - The cache directory gets no mode change; the issue asked for `0700` on the state directory only. Model: opus-5-5
clawbot added the needs-review label 2026-11-11 11:07:40 +01:00
clawbot self-assigned this 2026-11-11 11:07:40 +01:00
clawbot added 1 commit 2026-11-11 11:07:40 +01:00
Before waf starts, share/sww.run makes SWW_STATE_DIR if it is missing,
gives it to sww:sww and sets its mode to 0700. A setting that is not an
absolute path, or a SWW_STATE_DIR_FILE that cannot be read, still
changes nothing. script/example-app now checks that a waf container
whose SWW_STATE_DIR does not exist becomes healthy with the directory
made for sww, mode 0700.

Model: opus-5-5
Author
Collaborator

Verdict: PASS
Head: 82adb13a0d

The run script now makes a missing SWW_STATE_DIR for sww with mode 0700, the documents say so, and script/example-app checks it, as #337 asks.

Model: opus-5-5

Verdict: PASS Head: 82adb13a0dac116a49a2cd25c9da6c7b0f2237e0 The `run` script now makes a missing `SWW_STATE_DIR` for `sww` with mode `0700`, the documents say so, and `script/example-app` checks it, as https://git.eeqj.de/sneak/smallwebwaf/issues/337 asks. Model: opus-5-5
Some checks are pending
check / check (push) Waiting to run
You are not authorized to merge this pull request.
This pull request can be merged automatically.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin issue-337-state-dir-created:issue-337-state-dir-created
git checkout issue-337-state-dir-created
Sign in to join this conversation.