Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 22836

Summary: Erlang doesn't use /etc/nsswitch.cong on linux boxen (erlang-9c.ebuild)
Product: Gentoo Hosted Projects Reporter: Claes Wikstrom <klacke>
Component: KeychainAssignee: George Shapovalov (RETIRED) <george>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: make erlang read nsswitch.conf
better (non rversed) patch

Description Claes Wikstrom 2003-06-14 16:39:43 UTC
Erlang reads /etc/host.conf on linux systems, gentoo doesn't have a
/etc/host.conf dile to control the behaviiour of the resolver. It only has
/etc/nsswitch.conf (which by the way makes sence)
Having the old BSD file /etc/host.conf as well as nsswitch.conf is strange.
redhat and suse has both ....

Reproducible: Always
Steps to Reproduce:
1.to inet:gethostbyname("www.yahoo.com"). in the shell
2.
3.

Actual Results:  
since erl only reads /etc/host.conf (and never nsswitch.conf) it only uses files
as resolv method and doesn't even invoke the resolver client.


Erlang reads /etc/host.conf on linux systems, gentoo doesn't have a
/etc/host.conf dile to control the behaviiour of the resolver. It only has
/etc/nsswitch.conf (which by the way makes sence)
Having the old BSD file /etc/host.conf as well as nsswitch.conf is strange.
redhat and suse has both ....
Comment 1 Claes Wikstrom 2003-06-14 16:46:25 UTC
Created attachment 13277 [details, diff]
make erlang read nsswitch.conf
Comment 2 George Shapovalov (RETIRED) gentoo-dev 2003-06-19 23:23:48 UTC
Hi Claes.

Thanks for the update!

>gentoo doesn't have a /etc/host.conf dile to control the behaviiour of the >resolver. It only has /etc/nsswitch.conf (which by the way makes sence)
Yes :), IIRC /etc/host.conf is considered deprecated with newer kernels.
Of course distributios trying to be automatic install everything "just in case", so thius might explain Red Hat having it..

However I am a bit confused:
you say that your patch is supposed to make erlang read nsswitch.conf (which should cause it obey whatever resolution order is defined on system), but I see it actually deleting nsswitch support. Are you sure you included the intended and not a reverse patch? 

George
Comment 3 Claes Wikstrom 2003-06-23 16:00:36 UTC
Created attachment 13743 [details, diff]
better (non rversed) patch

I'm an idiot, the patch was reversed. Sorry.
Comment 4 George Shapovalov (RETIRED) gentoo-dev 2003-07-01 19:55:15 UTC
Hi Claes.

Thanks for the update!
Unfortunately looks like bugzilla did not send notification email (yet again), just noticed your resubmission.
I incorporated the patch and issued a new revision - 9c-r1. The ebuild is committed and keymasked. Please test.

George
Comment 5 George Shapovalov (RETIRED) gentoo-dev 2003-10-14 09:42:00 UTC
Reclosing the bug