mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
The existing tmpfile logic took care of folders that the ebuild keepdir directive wanted to exist on the OS. However, files and symlinks were not created, causing them to be missing if we didn't explicitly modify the ebuild files in coreos-overlay to find a solution with tmpfiles or patching the paths to /usr. Add logic to create missing files and symlinks through tmpfile directives and preserve any directory, not only the ones with the keepdir ebuild directive. Also remove any state from the rootfs to make sure that we don't rely on it when testing our images before the release. To create the files the final /etc folder is moved to /usr/share/flatcar/etc and in the future this can be used for a better logic that could take care of updating files the user didn't modify, deleting those that aren't needed anymore, and even reconciling changed files through a 3-way merge, instead of using simple tmpfile logic.