Mastodon Skip to content

Updating the directory structure

A previous update split the original config/ directory into two parts, config/ and the newly created recipes/, because we realized that it did not make sense to include files that will be copied into the image and configuration files used for generating the Containerfile (the lower-level build-instructions) in the same directory anymore.

This update left us at a weird state, though, because the directory that no longer contained image configuration, just files to be copied into the image, was called config/. We didn’t want to just rename config/ to files/, though, because that would have created the weirdly named directory files/files/ used by the files module (very confusing).

What we opted to in addition to renaming config/ to files/ is giving the files module access to the entire files/ directory. This keeps the convention of each module reading files from a folder named after itself, while unlocking better ways to organize files when using the files module.

This is a small and non-critical change, and existing configurations will continue to be supported for the time being. Our small team of volunteers is constantly working on improving the UX of BlueBuild and slowly integrating new features. We still have multiple similar refactors planned to increase the general cohesion of the whole system, so stay tuned to see us evolve.

And now the part you’re here for…

Migration

  1. Make sure you’ve done the caching update migration that introduced the recipes/ folder.
  2. Rename your config/ directory to files/.
  3. If you’re already working with a 1-to-1 filetree mapping structure, where you have root folders with names such as usr or etc that are copied into the image (as is the default), do the following:
    1. Move all such folders into the directory files/system/
    2. Change your files module configuration (or just the part that copied those folders) to below:
      type: files
      files:
      - source: system
      destination: /
      (notice that this is also using the new explicit source/destination syntax added in the same update)
  4. If you’re using the files module to copy other kinds of folders outside of the 1-to-1 filetree mapping for example using a copying a folder called wallpapers into the directory containing the default wallpapers in your environment, you may add those folders directly inside the files/ directory and copy them to the correct place similarly to the snippet above.
  5. You’re good to go! Commit your changes and wait to see that your custom image builds correctly.

Published on 2024-07-21.
Authors: