01a0343a - Discover Postgres.app binaries for the device daemon - #31
01a0343a - Discover Postgres.app binaries for the device daemon#31TaprootFreak wants to merge 10 commits into
Conversation
|
EN: DE: DetailsGates at head 26f4a81:
Pass 1: extra-bin discovery needed numeric version sort, persist-on-reinstall, and PATH-before-extras. Those landed in follow-up commits. Pass 2: 0 findings. Tests cover extra-dir fallback, PATH precedence, unit unescape, and reinstall keep. |
The user-service PATH often lacks Postgres.app, so knock exits and sync --follow never stays up. Search well-known extra bins and persist AGENT_PG_BIN in the service unit when it is set at install time.
Numbered extra bins now match dotted version names and sort as integer tuples so 16 beats 9.6. Reinstall keeps a stored AGENT_PG_BIN unless the variable is explicitly empty. Extra bin discovery runs only after PATH.
Add a PATH-miss extra-dir hit for _bin and an install/reinstall pytest that keeps AGENT_PG_BIN in the written service unit.
…G_BIN _bin now has a test that PATH wins when both PATH and extra dirs have pg_ctl. Reading AGENT_PG_BIN back from the unit undoes XML escape and shell quoting so a reinstall keeps the original path.
|
EN: DE: |
26f4a81 to
a28df87
Compare
|
EN: DE: Details
|
|
EN: DE: Notes for the author / Hinweise an den Autor
|
EN:
The device daemon crash-loops when PostgreSQL lives in Postgres.app, because pg_ctl is not on the user-service PATH. This change searches those well-known extra bin directories and, when AGENT_PG_BIN is set at install time, writes it into the service unit so knock and sync --follow stay up.
DE:
Der Device-Daemon stürzt in einer Schleife ab, wenn PostgreSQL über Postgres.app läuft, weil pg_ctl nicht im PATH des User-Service liegt. Die Änderung sucht diese bekannten Extra-Bin-Verzeichnisse und schreibt AGENT_PG_BIN bei der Installation in die Service-Unit, damit knock und sync --follow laufen bleiben.
Details
Live watch on the hub needs the device daemon to keep
agent sync --followrunning. On a Mac using Postgres.app, launchd starts the daemon with a PATH that does not include/Applications/Postgres.app/Contents/Versions/.... Knock then exitspg_ctl is not installed, the supervisor dies, and the website terminal stays empty after the websocket drops._binnow also considers:/Applications/Postgres.app/Contents/Versions/latest/bininstall_and_start_servicepersists a non-emptyAGENT_PG_BINinto the unit environment.Tests:
tests/test_pg.py, extra cases intests/test_daemon.py.