From e6ac42e158ed5ceee2c58eaf2f23a0ad3bb82f41 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 19 Oct 2026 20:53:05 +0200 Subject: Track the slackrepo config; add sb-publish and publish gates slackrepo_SBo-danix.conf is now kept here. Site values (rsync target, Gotify URL and key) moved to the root-only SBo-danix.local it sources; make-local.py migrates them out of an old inline config. The rsync push moved into sb-publish; rsync_push_hook calls it and holds back when SBB_PUBLISH=n, so sb-builder can build without publishing and publish later. --preview does not set OPT_DRY_RUN, so the hooks now also check OPT_PREVIEW: previews no longer notify Gotify or run manage-packages.sh for real. gpg-agent.conf adds allow-preset-passphrase so sb-builder can unlock the signing key for jobs without a tty. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'AGENTS.md') diff --git a/AGENTS.md b/AGENTS.md index dcc195e..874558d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -43,6 +43,22 @@ Weekly flow: regenerate repo with this script; `sbshadow` runs `mkhint -F` at th Do **not** add a hintfile generator to this script — it would create a second owner of HINT_DIR and fight mkhint's `.bak` handling. +## slackrepo config and publishing + +`slackrepo_SBo-danix.conf` is the source of truth for `/etc/slackrepo/slackrepo_SBo-danix.conf`. +Never commit site values (rsync target, passwords, Gotify URL or key, hostnames): they live in the +root-only `/etc/slackrepo/SBo-danix.local`, which the config sources; `SBo-danix.local.example` +documents the keys with placeholders. slackrepo unsets only its own known config names after +sourcing (`varnames`, `genrepnames`, `initnames`, `OPTIONLIST` in `slackrepo`), so the `SB_*` +variables survive into the hooks, which run as functions in slackrepo's shell. + +Gates in the hooks: `SBB_PUBLISH=n` holds back `rsync_push_hook` (sb-builder sets it for +unpublished runs; `sb-publish` pushes later). `--preview` does not set `OPT_DRY_RUN` +(`cmdfunctions.sh`), so hooks check `OPT_PREVIEW` too. To check the gates without a VM, source +the config with `/usr/local/bin/` rewritten to a stub dir (stub `sb-publish`, +`manage-packages.sh`, `curl`) and call the hooks under each `OPT_DRY_RUN`/`OPT_PREVIEW`/ +`SBB_PUBLISH` combination. + ## Run ```bash -- cgit v1.2.3