Conversation
#1331 applies rootfs.tmpfiles at build time only, on the premise that the root is read-only at runtime. /var/lib is a writable overlay, though, so systemd-tmpfiles-setup re-applies tpm2-tss-fapi.conf at every boot and the keystore comes back as 2775 tss:tss. Ship a boot-time entry that sorts before the package's and restores the image's mode. Signed-off-by: Kevin Wang <wy721@qq.com>
This was referenced Sep 25, 2026
Collaborator
Author
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.
#1331 applies
rootfs.tmpfilesat build time only, assuming the root stays read-only at runtime./var/libis a writable overlay, though (dstack-volatile-binds.sh), sosystemd-tmpfiles-setupre-appliestpm2-tss-fapi.confon every boot and/var/lib/tpm2-tss/system/keystorecomes back as2775 tss:tssinstead of the image's0755 root:root, the package defaultrootfs.tmpfilesexists to override.Ship a boot-time entry for that one path that sorts before the package's file (the earliest file wins for a path). No other
rootfs.tmpfilesentry is on a writable overlay or conflicts with a package tmpfiles file.Found by the PR 841 acceptance suite (
tc-gos-platform-005).Verification
Rootless mkosi dev image on a TDX host, booted under dstack-vmm:
stat -c %a /var/lib/tpm2-tss/system/keystoreis2775on next and755with this change; the squashfs content is0755 0/0in both.