manifest/os: split out OSCustomizations

This is meant to encapsulate the tweaks we do to the OS tree
orthogonally to anything else. For now it still contains some
configuration that only sometimes applies, but this should
continue being reworked until all the fields in this struct
always apply to any artefact that is using it.

At the same time, stop instantiating with default values, as the
empty values should work. This is not a functional change as the
caller always sets these now.
This commit is contained in:
Tom Gundersen 2022-07-10 13:35:22 +01:00 committed by Christian Kellner
parent 0bebc107d2
commit 5c5c63afd1
3 changed files with 97 additions and 72 deletions

View file

@ -44,6 +44,10 @@ func (img *MyContainer) InstantiateManifest(m *manifest.Manifest, repos []rpmmd.
// create a minimal non-bootable OS tree
os := manifest.NewOS(m, build, &platform.X86{}, repos)
os.ExtraBasePackages = []string{"@core"}
os.OSCustomizations.Language = "en_US.UTF-8"
os.OSCustomizations.Hostname = "my-host"
os.OSCustomizations.Timezone = "UTC"
// create an OCI container containing the OS tree created above
manifest.NewOCIContainer(m, build, os)