tmpfiles: Support multiple generations #1151
Merged
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.
Way back in rpm-ostree's original code here, it always assumed that it owned The Build.
But in a container-native flow we may have a chain of builds across an organization and want to generate tmpfiles.d entries multiple times.
When we do this, we can't just blow away the existing
/usr/lib/tmpfiles.d/bootc-generated.conf
.Teach the tmpfiles code to have "generations" - we pick a new file name like
bootc-generated-0.conf
,bootc-generated-1.conf
etc.Also, change the generation code to return a struct with more info about what it did, which will be used in the linting code.