I'm trying to create a fake /etc/hosts to set the hostname in a Mock-built RPM. This is CentOS7 and the Mock/rpmbuild are not new enough to understand the new Fedora _buildhost macro.
So I configured a file thusly:
config_opts['files']['etc/hosts']="""\ 127.0.0.1 build.machine.com """
This is at the end of my target specific config file. Unfortunately this seems to be completely ignored.
I've looked at the
/var/lib/mock/<target>/root/etc/hosts and this is identical to the build machine's standard /etc/hosts.
Anyone able to shed some light on what I'm doing wrong?