Summary: | net-dns/c-ares uses hardcoded paths to /etc outside of prefix | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nick Bowler <nbowler> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | prefix |
Priority: | Normal | Keywords: | PATCH |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | proposed fix |
Description
Nick Bowler
2022-10-13 17:42:00 UTC
Created attachment 823947 [details, diff]
proposed fix
This patch adjusts c-ares to respect sysconfdir setting and resolves the problem.
(In reply to Nick Bowler from comment #1) > Created attachment 823947 [details, diff] [details, diff] > proposed fix > > This patch adjusts c-ares to respect sysconfdir setting and resolves the > problem. Could you send the patch upstream? Interestingly enough /etc/resolv.conf doesn't make much sense to grab from prefix. I think in RAP you could have nsswitch but also there I doubt you want to use it. Non-RAP certainly don't want these paths prefixed, else no resolving would be possible at all any more. All normal prefixed applications using the prefix libc resolver are performing name resolution using the settings from prefixed /etc/nsswitch.conf, prefixed /etc/hosts, and prefixed /etc/resolv.conf. Only curl (via USE=adns / c-ares) is getting this different from every other application as it decides to bypass the libc resolver and use a completely different set of configuration files. Using prefixed configuration files is expected and desired behaviour, as I see it. I can easily symlink /prefix/etc/resolv.conf or whatever to the host system if this is needed (it is not). I can't direct /etc/resolv.conf back to the prefix. You're describing RAP. I think we could add those symlinks you talk about to a base-package or something, but at this point noone would have those symlinks, so all non-RAP prefixes would be broken. The easiest is probably to apply this patch conditional for !prefix-guest. Nicer solution probably is to pull in some virtual that sets up symlinks or something for hosts that lack these. |