verify_installed() treated "already running" as a pass, so on any run where an
app was already open the strongest gate in the script silently became the
weakest: it proved only that the binary printed something. It now stops a
leftover instance first, so the check always tests a real cold start.
Killing that instance is fiddlier than it looks, and both naive forms are
broken here:
* `pkill -x <name>` matches the kernel's 15-character comm field, and two of
the three wrappers are longer (habit_stack_desktop is 19). It would have
silently never fired -- confirmed by watching an instance survive it.
* `pkill -f <path>` matches this script's own command line and the shell
wrapping it, so it kills the run instead of the app. Observed as an exit
144 with no output, twice.
So the pids come from ps, filtered on the installed /opt path, with our own
process and parent skipped.
Also threads the wrapper process name through the package table rather than
deriving it: diet-guard-app runs diet_guard_desktop, so name mangling produces
the wrong process.
Verified: with an instance deliberately running, the guard reports stopping it
and the launch check then passes on a genuine cold start; all three packages
still pass the full dry run.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Aoa1nKWRrAbowz7Hfd3tgL
|
||
|---|---|---|
| .. | ||
| anubis_gate.py | ||
| publish.sh | ||
| README.md | ||
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
- Polls
/registeruntil 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. - Waits for
ssh aur@aur.archlinux.orgto authenticate. - Then, unattended, per package: resolve the newest
vX.Y.Ztag → setpkgver→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.