twoliter
twoliter copied to clipboard
custom /etc/os-release
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:
- if no
/etc/os-releaseexists in the sys-root, we write the existingos-releaseas a file with unexpanded variables - then we apply
envsubstto/etc/os-releasein 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.