<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/meta-virtualization.git/classes/meta-virt-hosts.bbclass, branch master</title>
<subtitle>Mirror of git.yoctoproject.org/meta-virtualization</subtitle>
<id>https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=master</id>
<link rel='self' href='https://git.enea.com/cgit/linux/meta-virtualization.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/'/>
<updated>2021-12-13T20:59:35+00:00</updated>
<entry>
<title>config: introduce hostname generation hooks</title>
<updated>2021-12-13T20:59:35+00:00</updated>
<author>
<name>Bruce Ashfield</name>
<email>bruce.ashfield@gmail.com</email>
</author>
<published>2021-11-22T20:28:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/meta-virtualization.git/commit/?id=491a385ca6fd6e47c364d0bda0ffdf557eec6da0'/>
<id>urn:sha1:491a385ca6fd6e47c364d0bda0ffdf557eec6da0</id>
<content type='text'>
Overriding hostname in a .conf file, via base-files:

  HOST_NAME="k3s-host"
  hostname_pn-base-files = "${HOST_NAME}"

Is always a valid option, but if it is not configured, we can easily
have two hosts with the same name on the network, confusing adddress
assignement, etc.

This commit introduces a way to generate a unique hostname based
on the uuid of the build host, and the machine being built.

If virt-unique-hostname is added to IMAGE_FEATURES, like the following:

  IMAGE_FEATURES += "virt-unique-hostname"
  IMAGE_FEATURES[validitems] += "virt-unique-hostname"

Then a rootfs postprocessing hook will override hostnae to something
unique.

Note: this means your image will be reproducible on a single builder,
but not between them.

Signed-off-by: Bruce Ashfield &lt;bruce.ashfield@gmail.com&gt;
</content>
</entry>
</feed>
