[Rpm-maint] Build Host: localhost.localdomain

Giles Anderson agander at gmail.com
Wed Aug 26 14:23:25 UTC 2009


Thanks Mark and Panu.

2009/8/26 Panu Matilainen <pmatilai at laiskiainen.org>

> On Mon, 24 Aug 2009, Giles Anderson wrote:
>
>  On Monday 24 August 2009 15:49:39 Mark Hatle wrote:
>>
>>> RPM queries the name of the local machine from the DNS.
>>>
>>> So if you have the IP set to 127.0.0.1, and the DNS entry of
>>> locahost.localdomain, then that is what you will get.
>>>
>>> Fix the host's IP address and DNS entry to get a reasonable value.
>>>
>>
> To be exact, rpm queries the system hostname, and then performs a DNS
> lookup of that hostname. If the DNS query fails you get a warning but rpm
> uses whatever the hostname happens to be, otherwise it uses the name gotten
> from DNS.
>
>  Thats what I have done, but its the last item in the list.
>>
>> Presumably it has to be first?
>>
>
> Yes, the rest are considered aliases. For example on my F11 laptop:
> [pmatilai at localhost ~]$ hostname
> localhost.localdomain
> [pmatilai at localhost ~]$ python -c "import socket; print
> socket.gethostbyname_ex(socket.gethostname())"
> ('localhost', ['localhost.localdomain', 'localhost4',
> 'localhost4.localdomain4', 'localhost.localdomain', 'localhost6',
> 'localhost6.localdomain6'], ['127.0.0.1', '127.0.0.1'])
>
> The hostname is "localhost.localdomain" but the first entry in /etc/hosts
> is "localhost" so that is what gethostbyname() returns, and gets used by rpm
> as the build host.
>
>        - Panu -
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20090826/c784da56/attachment.htm>


More information about the Rpm-maint mailing list