Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Build System (http://www.linux-archive.org/fedora-build-system/)
-   -   Override Build Host string (http://www.linux-archive.org/fedora-build-system/498848-override-build-host-string.html)

Michael Cronenworth 03-08-2011 04:25 PM

Override Build Host string
 
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
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Mike McLean 03-09-2011 07:42 PM

Override Build Host string
 
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.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Mike McLean 03-09-2011 08:01 PM

Override Build Host string
 
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?
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Michael Cronenworth 03-09-2011 08:22 PM

Override Build Host string
 
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)
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Dennis Gilmore 03-09-2011 11:33 PM

Override Build Host string
 
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
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Michael Cronenworth 03-10-2011 01:25 PM

Override Build Host string
 
Dennis Gilmore wrote:
> set the hostname in /etc/sysconfig/network to be the fqdn

It seemed too obvious so I wanted to double-check. Thanks.
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Michael Cronenworth 03-11-2011 09:53 PM

Override Build Host string
 
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?
--
buildsys mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys

"Dennis Gilmore" 03-12-2011 11:33 PM

Override Build Host string
 
> 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 mailing list
buildsys@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/buildsys


All times are GMT. The time now is 02:14 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.