Summary: | net-misc/dhcpcd should RDEPEND on net-dns/bind-tools (for either dig or host) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Hubert Mercier <anigel> |
Component: | [OLD] Core system | Assignee: | William Hubbs <williamh> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | anigel, base-system, ibuyandtrade0+bugs.gentoo.org, roy |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Hubert Mercier
2012-08-30 12:57:49 UTC
It can use host(1) or dig(1), both of which are provided by net-dns/bind-tools. (In reply to comment #0) > But, in order to make hostname acquired from the DHCP server, the > /lib64/dhcpcd/dhcpcd-hooks/29-lookup-hostname script uses "dig", which is > part from net-dns/bind-tools. The premise is wrong. That script is only used when the DHCP server did not supply a hostname. To it's correct to say this: "But, in order to make the hostname aquired from the DNS server" Also, the default is not to actually run it so you would have needed to edit /etc/dhcpcd.conf > Maybe this package should be added as a required dependency of dhcpcd ? I strongly disagree. Added as an optional dependency maybe, but pulling net-dns/bind-tools just for this is too much imho. Hi
> > Maybe this package should be added as a required dependency of dhcpcd ?
>
> I strongly disagree. Added as an optional dependency maybe, but pulling
> net-dns/bind-tools just for this is too much imho.
An optional dependency sounds good. But since this functionality is not working unless this dep is satisfied, it does not seem "too much". Anyway at least some piece of information that would help users to understand why, when using this script, the hostname is not found (elog in post_inst should be fine too).
*** Bug 433501 has been marked as a duplicate of this bug. *** (In reply to comment #2) > An optional dependency sounds good. But since this functionality is not > working unless this dep is satisfied, it does not seem "too much". Anyway at > least some piece of information that would help users to understand why, > when using this script, the hostname is not found (elog in post_inst should > be fine too). By too much I mean that pulling net-dns/bind-tools in for embedded systems that use dhcpcd is too much. Just because an optional piece of functionality is required by you doesn't mean that everyone else desires it. Hence making it an option USE flag. I would propose -lookup_dns_hostname to avoid any confusion, or just -lookup_hostname. The ebuild could even modify the default config to enable the script at runtime. (In reply to comment #4) > By too much I mean that pulling net-dns/bind-tools in for embedded systems > that use dhcpcd is too much. I agree. > Just because an optional piece of functionality > is required by you doesn't mean that everyone else desires it. Hence making > it an option USE flag. I would propose -lookup_dns_hostname to avoid any > confusion, or just -lookup_hostname. The ebuild could even modify the > default config to enable the script at runtime. I've probably misexplained my thoughts (sorry, english is not my native language). I agree with this proposal too. Want me to modify the ebuilds ? Hello, sorry it has taken me a while to look at this. I can add a use flag to control whether the hook is installed, then I can set up the runtime dependency as you suggest. However, I am not comfortable adding another a use flag that modifies dhcpcd.conf. That seems to go against our definition of how use flags are supposed to be used [1]. Roy, it seems a little counter-intuitive to install the lookup-hostname hook by default then disable it in the default configuration. Are you willing to not install it by default and not mention it at all in the default configuration? I'll attach a patch if you want. [1] http://devmanual.gentoo.org/general-concepts/use-flags/index.html (In reply to comment #6) > it seems a little counter-intuitive to install the lookup-hostname hook > by default then disable it in the default configuration. How else am I meant to provide it? For systems other than Gentoo. > Are you willing > to not install it by default and not mention it at all in the default > configuration? I'll attach a patch if you want. Well, the only conceivable option would be to store it like in say /usr/share/examples/dhcpcd-hooks and document this in the readme. Hello, As I said in my second post here, the technical way this problem is handled is not very important. But it should be mentioned to users, since, for those who need this hook, missing this piece of information does not help to debug... Thank you in advance ! I added the following elogs to pkg_postinst in dhcpcd-5.99.6. if ! has_version net-dns/bind-tools; then elog elog "If you activate the lookup-hostname hook to look up your hostname" elog "using the dns, you need to install net-dns/bind-tools." fi Please feel free to let me know if you can think of a better fix. Thanks, William Hi, From my point of view this is a good solution. Thank you, Newer dhcpcd-6.6.5 and fewer fallback to getent(1), so this warning can now be removed. |