twoliter icon indicating copy to clipboard operation
twoliter copied to clipboard

custom /etc/os-release

Open bcressey opened this issue 1 year ago • 0 comments

Currently we hardcode the contents of /etc/os-release based on build-related variables.

That locks downstream builds into specific outputs that they may not want; for example, PRETTY_NAME will always be something like "Bottlerocket x.y.z" even if the version isn't meaningful.

What I'd suggest instead is that:

  1. if no /etc/os-release exists in the sys-root, we write the existing os-release as a file with unexpanded variables
  2. then we apply envsubst to /etc/os-release in a second pass to fill in variables we want to replace

The URL fields should also be parameterized so that variable substitution works there too.

bcressey avatar Nov 15 '24 18:11 bcressey