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.
Thanks, Michael
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.
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?
Mike McLean wrote:
So it's/trying/ to get the fqdn. Are you seeing "Could not canonicalize hostname" warnings?
Yes, I see the warning occur twice in my build.log. Once at the start, and once at the end.
hostname -f does not return the fqdn. I am running bind locally on the koji build server and it has the fqdn for the server in it. a "host shortname" returns "shortname.fqdn.com" as a result. Do you have a suggestion on how to correct hostname -f? (assuming that will correct mock/koji)
On Wednesday, March 09, 2011 03:22:49 PM Michael Cronenworth wrote:
Mike McLean wrote:
So it's/trying/ to get the fqdn. Are you seeing "Could not canonicalize hostname" warnings?
Yes, I see the warning occur twice in my build.log. Once at the start, and once at the end.
hostname -f does not return the fqdn. I am running bind locally on the koji build server and it has the fqdn for the server in it. a "host shortname" returns "shortname.fqdn.com" as a result. Do you have a suggestion on how to correct hostname -f? (assuming that will correct mock/koji)
set the hostname in /etc/sysconfig/network to be the fqdn
Dennis
Mike McLean wrote:
So it's/trying/ to get the fqdn. Are you seeing "Could not canonicalize hostname" warnings?
After the hostname change my Build Host field now displays the fqdn. However, the build.log still displays "Could not canonicalize hostname: shortname.fqdn.com". Is this harmless, or something is still not configured, or something that needs to be reported?
Mike McLean wrote:
So it's/trying/ to get the fqdn. Are you seeing "Could not canonicalize hostname" warnings?
After the hostname change my Build Host field now displays the fqdn. However, the build.log still displays "Could not canonicalize hostname: shortname.fqdn.com". Is this harmless, or something is still not configured, or something that needs to be reported?
all fedora builds have that. it is a harmless message.
dennis
buildsys@lists.fedoraproject.org