Override Build Host string

Mike McLean mikem at redhat.com
Wed Mar 9 21:01:36 UTC 2011


On 03/09/2011 03:42 PM, Mike McLean wrote:
> On 03/08/2011 12:25 PM, Michael Cronenworth wrote:
>> How does one override the "Build Host" string found in an RPM package
>> when using Koji to build the RPM? Currently, koji is storing the
>> hostname, not the FQDN, and I'd like to make it the FQDN.
>
> Someone recently submitted a patch to mock for something like this:
> https://fedorahosted.org/mock/ticket/14
>
> Assuming this patch works (haven't tested it), you could apply it to
> your mock. Koji doesn't place a hostname option in the mock configs it
> writes, but you could add one in site-defaults.cfg on the builder.
>
> OTOH, this might be overkill. I suspect you just need to fix your system
> so that uname -n reports the fqdn. On most of my systems it does.

What rpm does (at least for a few different versions I have handy) is 
call gethostname and then call gethostbyname on the result. If the 
gethostbyname call succeeds, then the name is pulled from that result, 
otherwise it sticks with the first result but logs a "Could not 
canonicalize hostname" warning.

So it's /trying/ to get the fqdn. Are you seeing "Could not canonicalize 
hostname" warnings?


More information about the buildsys mailing list