Skip to content

release: ship shirudo's root units in the main tarball - #914

Merged
aledbf merged 1 commit into
mainfrom
shirudo-root-units
Dec 3, 2026
Merged

aledbf merged 1 commit into
mainfrom
shirudo-root-units

Conversation

@aledbf

@aledbf aledbf commented Dec 3, 2026

Copy link
Copy Markdown
Member

Why

spin's control plane publishes shirudo.service and shirudo-handover.service in the shirudo extension (spin-stack/spin#2010). It keeps copies of them because the main tarball doesn't carry them. Only the operator tarball renders them. The copies drift from the pinned shirudo the next time it changes a unit (#905).

What changes

  • The build renders the units. shirudo/Dockerfile renders both units from the pinned commit's systemd/*.in into shirudo/units/, replacing @bindir@ with /usr/bin as shirudo-operator.sh does. The step fails if any @...@ placeholder is left.
  • The build verifies what came out. VerifyShirudo refuses a unit that is missing, keeps a placeholder, or does not run /usr/bin/shirudo.
  • The release ships the directory. spin-machine-dev release ships every file in shirudo/units/ under usr/share/spin-stack/shirudo/units/, next to objects.json. It refuses a build that rendered none.
  • Docs. docs/shirudo.md describes the new directory.

spin then reads the units from the release, as it reads guest/shirudo, and deletes its copies. That change belongs in spin-stack/spin, once a release carries the units.

Verification

  • I ran the Dockerfile's render step on the two templates at the pin (412dc8f3). Both units come out with ExecStart=/usr/bin/shirudo init $SHIRUDO_INIT_ARGS and no placeholder.
  • task lint passes.
  • internal/build, internal/release, internal/patched, internal/shirudo and cmd/spin-machine-dev pass. I ran the release and dev-tool tests in golang:1.27.4 with GNU tar, xz and patch, because this host's busybox tar can't run them.
  • New tests cover a missing unit, an unrendered @bindir@, a unit that runs another binary, both units in the main tarball, and a build with no units.
  • The full shirudo build runs in CI's shirudo job.

Closes #905

🤖 Generated with Claude Code

spin's control plane publishes shirudo.service and
shirudo-handover.service in the shirudo extension, and embedded copies of
them because the main tarball did not carry them. The copies drift from
the pinned shirudo the next time it changes a unit.

The shirudo part now renders both from the pinned commit's
systemd/*.in, @bindir@ as /usr/bin as shirudo-operator.sh does, into
shirudo/units. VerifyShirudo refuses a unit that is missing, keeps a
placeholder, or does not run /usr/bin/shirudo, and the release ships
whatever the directory holds and refuses a build with none.

Closes #905

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit 4853304 into main Dec 3, 2026
16 checks passed
@aledbf
aledbf deleted the shirudo-root-units branch December 3, 2026 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release: ship shirudo's root units, so spin does not keep copies of them

1 participant