revert(os/mkosi): apply rootfs tmpfiles at boot again - #1415
Merged
Merged
Conversation
This reverts #1331 (merge 81cb016). Applying rootfs.tmpfiles only at build time broke two things: - mkosi.finalize runs as the invoking user in a rootless build, so systemd-tmpfiles cannot chown the root-owned entries and every rootless `make os-image` fails with exit code 73. - /var/lib is a writable overlay at runtime, so the boot-time pass was not a no-op: it kept /var/lib/tpm2-tss/system/keystore at 0755 root:root. Without it, tpm2-tss-fapi.conf resets the keystore to 2775 tss:tss on every boot. The boot-time entries that land on the read-only root were harmless no-ops, so restoring them costs nothing. Signed-off-by: Kevin Wang <wy721@qq.com>
This was referenced Sep 26, 2026
kvinwang
added a commit
that referenced
this pull request
Sep 26, 2026
#1415 reverts #1331, so the image again ships dstack-image.conf in tmpfiles.d and the first-boot unit. tc-gos-platform-005 keeps the outcome that matters, a root-owned 0755 TPM keystore at runtime, and the source catalogs follow the file back to its old path. Signed-off-by: Kevin Wang <wy721@qq.com>
Collaborator
Author
|
Physical TDX (tdxlab) validation of
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #1331.
Applying
rootfs.tmpfilesonly at build time broke two things:mkosi.finalizeruns as the invoking user in a rootless build, sosystemd-tmpfilescannot chown the root-owned entries and every rootlessmake os-imagefails (fchownat() of /buildroot/dstack failed, exit 73). CI runs mkosi as root and did not notice./var/libis a writable overlay at runtime, so the boot-time pass was not a no-op there: it kept/var/lib/tpm2-tss/system/keystoreat0755 root:root. Without it,tpm2-tss-fapi.confresets the keystore to2775 tss:tsson every boot.The boot-time entries that land on the read-only root were harmless no-ops. This replaces #1409 and #1413, which patched each symptom separately.
Verification
next;os/mkosi/build.sh lintpasses.