[Rpm-maint] Build Host: localhost.localdomain
pmatilai at laiskiainen.org
Wed Aug 26 05:40:21 UTC 2009
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
[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 -
More information about the Rpm-maint