utils/aur-publish
Krzysztof kuhy Rudnicki 085d08b5c9 Split the two shell scripts and the gate's own config
aur-publish/publish.sh   439 -> 148 + lib/aur_registration 107
                                      + lib/aur_verify 122 + lib/aur_publish_one 107
  guard-lib/lib/file_guard.sh  350 -> 140 + file_guard_unlock 214
  file_length/config.py        252 -> 45 + _tables 202 + exemptions 77

The libs are sourced, never executed: they read the readonly config the entry
script declares, and a `readonly` re-run inside a twice-sourced lib aborts
under `set -e`. Verified by function parity rather than by eye — publish.sh
resolves the same 17 functions as before the split, guardctl the same 15 —
plus `shellcheck -x` clean on every file and a real `--help` / bad-option run.

file_length is the gate's own code, so a broken import there turns the gate
into a no-op. Split three ways to avoid an import cycle without a `# noqa`:
_tables holds the data, exemptions the rules that read it, config re-exports
both so `from file_length.config import is_generated` still resolves. The
first attempt was wrong — EXCLUDED_DIRS was left behind and every invocation
raised — caught because the gate was re-run in both modes rather than
assumed. Now verified: exit 0 on a clean file, exit 1 on an over-cap one,
--explain intact, and the same 61 exemption decisions as HEAD.

Also deletes baseline-2026-08-14.json and SURVEY-2026-08-14.txt: the task
forbids a baseline file, and nothing in the tree read either.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG
2026-08-22 14:59:27 +02:00
..
lib Split the two shell scripts and the gate's own config 2026-08-22 14:59:27 +02:00
anubis_gate.py Add aur-publish: hands-off AUR publishing for the Flutter apps 2026-08-09 23:51:06 +02:00
publish.sh Split the two shell scripts and the gate's own config 2026-08-22 14:59:27 +02:00
README.md Add aur-publish: hands-off AUR publishing for the Flutter apps 2026-08-09 23:51:06 +02:00

aur-publish

Hands-off publishing of kuhy's Flutter apps to the AUR.

~/utils/aur-publish/publish.sh              # wait for registration, then publish
~/utils/aur-publish/publish.sh --dry-run    # everything except the push
~/utils/aur-publish/publish.sh --skip-wait  # account already works
~/utils/aur-publish/publish.sh --only habit-stack

What it does

  1. Polls /register until AUR signup reopens, opens it in a browser and prints the SSH key to paste. Signup is the only manual step — it requires email confirmation.
  2. Waits for ssh aur@aur.archlinux.org to authenticate.
  3. Then, unattended, per package: resolve the newest vX.Y.Z tag → set pkgver → updpkgsums → makepkg -C → namcap → AUR rule check → pacman -U → launch check → .SRCINFO → commit → push.

Every package is built, installed and launched before it is pushed, so a broken package cannot reach the AUR. A package failing any gate is skipped and reported; the others still publish. Safe to re-run.

anubis_gate.py

The AUR sits behind Anubis, which answers HTML requests with a proof-of-work challenge page carrying HTTP 200. A plain curl therefore reports 200 for a page that is actually unreachable — which is exactly how "is registration back?" gets answered wrong. This module solves the challenge and reports the status of the real page behind it.

python3 anubis_gate.py /register     # prints the true status code

AUR rules enforced before pushing

The AUR does not review uploads, but per the submission guidelines "packages that violate the rules may be deleted without warning". check_aur_rules() blocks a push on the mechanically checkable ones: # Maintainer: line, x86_64 in arch, no replaces= (reserved for renames — use conflicts), not already in an official repo, pkgdesc/url/license present, and .SRCINFO matching the PKGBUILD.