ostreedev / ostree-rs-ext

Rust library with higher level APIs on top of the core ostree API
Apache License 2.0
74 stars 24 forks source link

Multiple `/var` bugs #598

Closed cgwalters closed 6 months ago

cgwalters commented 7 months ago

First, we aren't handling hardlinks, see https://github.com/coreos/rpm-ostree/issues/4820

A simple reproducer is

FROM quay.io/centos-bootc/centos-bootc:stream
RUN mkdir -p /var/lib && echo hello world > /var/lib/foo && ln /var/lib/foo{,2}

The second problem is that our usage of C+ in https://github.com/ostreedev/ostree/pull/3103 isn't in c9s systemd.

One thing I think we could probably do here is synthesize distinct tmpfiles.d snippets instead for the subdirectories of /var instead of having the toplevel.

Alternatively...it is tempting here to try to match the semantics of docker volumes, pretend like the base image has VOLUME /var. Then the idea is that the content from the container is only populated on initial deployment - we don't do any tmpfiles.d stuff.

The more I think about the more I like that.

cgwalters commented 7 months ago

xref https://github.com/systemd/systemd/pull/27592/commits/30e59a06ad64b0e50e0da5dc40bae449c9f855e4

cgwalters commented 7 months ago

https://github.com/ostreedev/ostree/pull/3166