GNOME Bugzilla – Bug 696283
initramfs vs content-addressed-storage
Last modified: 2018-08-17 19:00:10 UTC
There are at present at least 3 things causing each initramfs generated to differ every time it's built. We should also address this by not rebuilding it every time of course, but this bug is about the cases were we do. 1) The gzip timestamp header; just needs a simple dracut patch. 2) The cpio format contains the timestamps of the source files; also fixed by the below dracut patch. 3) The cpio format writes out the inodes of the files it finds. This is harder to fix than I thought because it uses the inode numbers for hardlinking. We'd need to patch cpio itself to have a hash table of inode -> serial where serial is an internal counter.
Created attachment 239465 [details] [review] use gzip -n
Created attachment 239466 [details] [review] avoid mtime
So what we still need is a patch for #3.
This was semi-addressed by manually adding components which force an initramfs rebuild. But that has many downsides: 1) Manual initramfs-depends list 2) Updating a TODO entry in ostree forces a new initramfs 3) When the initramfs contents actually do change, we'd like to still not have cascading differences in the file, since this hampers static deltas.
See also https://bugzilla.redhat.com/show_bug.cgi?id=1098457
One thing that if the initramfs *does* change, we could delta it better if we used gzip --rsyncable. http://blog.liw.fi/posts/zsync-deb-updates/ has some links, I'm not sure if there's a canonical reference.
Created attachment 309210 [details] [review] darcut no mtime rebased
I rebased the Dracut patch. It performs very well with rollsums.
I previously didn't manage to get good results with --reproducible as the cpio available on Fedora doesn't support --reproducible (supported added by an upstream patch). I have filed a bug here for the backport: https://bugzilla.redhat.com/show_bug.cgi?id=1254537 and a small patch for rpm-ostree: https://github.com/projectatomic/rpm-ostree/pull/166
OSTree has moved to Github a while ago. Furthermore, GNOME Bugzilla will be shut down and replaced by gitlab.gnome.org. If the problem reported in this Bugzilla ticket is still valid, please report it to https://github.com/ostreedev/ostree/issues instead. Thank you! Closing this report as WONTFIX as part of Bugzilla Housekeeping.