On 1/6/06, Bryan Kadzban <[EMAIL PROTECTED]> wrote: > Well, the perl Configure script used to have some verbiage in it about > the gethostname() function not returning the correct hostname in all > cases (something about "but it can't be changed for political reasons"). > In that case, it offered an option to use the external "hostname" binary > or the /etc/hosts file when a program asked for the current hostname. > Maybe the hostcat stuff is related to that. (Current perl Configure > scripts seem to just use the hostname command, and don't bother with > gethostname() at all.)
Thanks, Bryan. Looks like we'll have to investigate more. We have hostname in early Ch. 6 from coreutils. So, if what you're saying is right, it should prefer hostname to 'cat /etc/hosts'. The perl Configure script makes me want to gouge my eyes out. > The command in the > string is supposed to "produce the text of the /etc/hosts file", but I'm > not sure what purpose that would necessarily serve. Hmm... Interesting. A good reason to at least have a dummy hosts file at the time of perl build so that it doesn't set hostcat=''. > Regardless, it is a difference, that (IMO at least) should be fixed. > The perl installation instructions already have the user create a hosts > file before running the perl tests. Maybe it would be a good idea to > create it earlier (before ./configure.gnu), then overwrite it when the > user sets up networking later (section 7.11). Or remove it after > installing Perl. Well, DIY creates a simple hosts at the beginning of the chroot at the same time as the passwd and group files. This seems reasonable to me since loopback should be defined in a sane host, anyway. Command is echo "127.0.0.1 localhost $(hostname)" > /etc/hosts This will definitely be overwritten in 7.11. It also takes care of the perl testsuite case where it is needed. What do people think about adding the above command to Ch. 6.7? -- Dan -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page