reboot command beside poweroff, one polkit grant; forward yukart/gnss/+; mock uses current names
/ crosscheck (push) Successful in 0s
Rust (L4T) / Clippy, test, build, glibc (push) Successful in 4s

--allow-poweroff becomes --allow-power. deploy/50-yukart-gw-power.pkla adds logind's
reboot actions and the deploy removes the old poweroff-only file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
2026-10-13 22:50:04 +09:00
parent 133adeb5a5
commit aa72100148
8 changed files with 48 additions and 43 deletions
+7 -5
View File
@@ -6,8 +6,8 @@
# env: BUILD_HOST (default: mikkeli-orin-nano-2)
#
# Builds what is pushed, not the working tree: the build host pulls master of
# svc-gw and contracts under ~/dev/yukart/. Native on purpose: the poweroff command
# runs systemctl, and std::process::Command cross-compiled against the workstation's
# svc-gw and contracts under ~/dev/yukart/. Native on purpose: the poweroff and reboot
# commands run systemctl, and std::process::Command cross-compiled against the workstation's
# newer glibc links GLIBC_2.39 symbols (pidfd_spawnp) the car cannot load.
set -euo pipefail
@@ -31,13 +31,15 @@ scripts/check-glibc.sh "$BIN"
ssh "$HOST" 'mkdir -p ~/infra/svc-gw'
scp -q "$BIN" "$HOST:infra/svc-gw/svc-gw.new"
scp -q deploy/yukart-gw.service "$HOST:infra/svc-gw/yukart-gw.service"
scp -q deploy/50-yukart-gw-poweroff.pkla "$HOST:infra/svc-gw/50-yukart-gw-poweroff.pkla"
scp -q deploy/50-yukart-gw-power.pkla "$HOST:infra/svc-gw/50-yukart-gw-power.pkla"
ssh "$HOST" 'set -e
mv ~/infra/svc-gw/svc-gw.new ~/infra/svc-gw/svc-gw
sudo ln -sfn "$HOME/infra/svc-gw/svc-gw" /usr/local/bin/yukart-gw
sudo install -m 0644 ~/infra/svc-gw/yukart-gw.service /etc/systemd/system/yukart-gw.service
# polkit, not sudo, lets the service power the host off (the poweroff command).
sudo install -m 0644 ~/infra/svc-gw/50-yukart-gw-poweroff.pkla /etc/polkit-1/localauthority/50-local.d/50-yukart-gw-poweroff.pkla
# polkit, not sudo, lets the service power the host off or reboot it (the poweroff and
# reboot commands). The file was named 50-yukart-gw-poweroff.pkla before reboot joined.
sudo install -m 0644 ~/infra/svc-gw/50-yukart-gw-power.pkla /etc/polkit-1/localauthority/50-local.d/50-yukart-gw-power.pkla
sudo rm -f /etc/polkit-1/localauthority/50-local.d/50-yukart-gw-poweroff.pkla ~/infra/svc-gw/50-yukart-gw-poweroff.pkla
sudo systemctl daemon-reload
sudo systemctl enable yukart-gw.service >/dev/null
sudo systemctl restart yukart-gw.service