containers / bootc

Boot and upgrade via container images
https://containers.github.io/bootc/
Apache License 2.0
781 stars 84 forks source link

[object-store/composefs] File timestamps not preserved #837

Closed ehdis closed 1 month ago

ehdis commented 1 month ago

While playing with a bootc system I noticed that the timestamps of files are mostly/all set to "Jan 1 1970" (ls -la /usr/). For instance - verifying a installed package results in

# rpm -V bash |head
.......T.  c /etc/skel/.bash_logout
.......T.  c /etc/skel/.bash_profile
.......T.  c /etc/skel/.bashrc
.......T.    /usr/bin/alias
.......T.    /usr/bin/bash
.......T.    /usr/bin/bashbug-64
.......T.    /usr/bin/bg
.......T.    /usr/bin/cd
.......T.    /usr/bin/command
.......T.    /usr/bin/fc

# ls -la /usr/bin/bash
-rwxr-xr-x. 1 root root 1389072 Jan  1  1970 /usr/bin/bash

I would assume that the object-store/composefs also provides the timestamps in addition to the xattr metadata, not?

cgwalters commented 1 month ago

Hi yes, currently the container stack goes through ostree which canonicalizes timestamps to zero. Then we turn the ostree into a composefs.

https://github.com/containers/bootc/issues/20 is basically tracking significantly shrinking the role of ostree from this equation, so marking as a duplicate.