1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-06 09:45:32 +01:00
Commit Graph

4 Commits

Author SHA1 Message Date
Colin Walters
53c167146e tmpfiles: Support multiple generations
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.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-27 12:43:24 -05:00
Colin Walters
c08e9f842f tmpfiles: Drop an unused file
This was a copy-pasteo.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-14 10:49:23 -05:00
Colin Walters
659218a516 tmpfiles: Don't traverse mount points
For the same reason we avoid doing this in other code like
in lints.rs; it's reasonable for someone to mount a volume
on `/var/cache/dnf` for example in a container build, and we
don't want to try to convert it to tmpfiles.d.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-12 18:56:38 -05:00
Colin Walters
3f48f548d9 tmpfiles: New crate
This adapts code rewritten from rpm-ostree to synthesize
tmpfiles.d entries.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-12 18:56:27 -05:00