Description of problem: RPMs built inside an spawn container have BUILDHOST set to the container name. Version-Release number of selected component (if applicable): mock-1.2.14 Actual results: [mirror3 x86_64]$ rpm -qp pl-gcc-4.9.3-1.el7.centos.x86_64.rpm --queryformat '%{BUILDHOST}'; echo df7024de14094835a1a71f83dd915217 Expected results: BUILDHOST should be the name of the host operating system. Additional info: Inside a container, I ran $ hostname foo.example.com $ rpmbuild --rebuild foo.src.rpm And the resulting RPM had BUILDHOST=foo.example.com (which is different than the machine name). This would require the hostname utility be installed. But theoretically hostname could be run before issuing the rpmbuild command. No idea if this is the best approach. I'd be glad to take a stab at patch if you want try this method.
hostname is not available in base container It would be nice if rpmbuild has option to define hostname. Currently it is not possible because rpmbuild call directly gethostbyname(). I will prefer this over installing other dependency inside of container.
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
Resolved by commits: * 9a12844 change hostname in container [RHBZ#1302040] * e8c3b32 example how to change hostname in container [RHBZ#1302040] Note that it works only for F25+ chroots (does not matter what OS is used as host).
mock-1.3.2-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-07f2f5e2c9
mock-1.3.2-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.