Ondřej Surý wrote:
> I was thinking of renaming the binaries to bind9-{util} and use
> update-alternatives to provide {util}, same for knot-dnsutils, e.g. have
> k{util} and use update-alternatives to provide {util}.
> 
> But P/C/R: dnsutils would suit me as well.

hi, unbound maintainer here :)

it's not clear to me if kdig is suitable to be provided as 'dig' via the
alternatives mechanism; this is not a problem with kdig per se, since
dig is a very complicated utility.  policy gives the vi (nvi, vim, etc.)
example but is otherwise not too clear on the issue of command line
interface compatibility.  (see #465140.)  we do have the example in the
archive of the netcats (netcat-openbsd, netcat-traditional) which are
command-line utilities which differ substantially, but in that case both
utilities are named 'nc' and there's a reasonably clear original ->
successor relationship.

to take a similar issue, bind9-host and unbound-host are somewhat
similar utilities but they differ enough in command line flags,
functionality, and output format that i've never felt comfortable having
unbound-host provide a 'host' substitute.  (i think there was another
'host' implementation in debian at one point, but i can't remember what
it was called.)

dig has a substantially complicated command-line interface and output
format to the point that i would recommend against trying to have kdig
provide the 'dig' command.  to take a not-very-contrived example,
compare:

    dig +vc +tries=1 +timeout=1 +edns=0 www.isc.org

and
    
    kdig +vc +tries=1 +timeout=1 +edns=0 www.nic.cz

kdig doesn't support any of those flags ;-)  more seriously, it looks
like kdig lacks "+trace", too, which is of course a very popular dig
mode.

i think tradition has entrenched the BIND9 versions of 'dig' and 'host'
to the point that replacements/reimplementations should just use
prefixed names (unbound-host, b10-host, khost, etc.).  the number of
users that want a different implementation to be used for 'dig' or
'host' at the command line is probably small enough that it's not worth
it to implement alternatives.

that being said, there are a few dozen reverse dependencies of
bind9-host some of which need to run 'host' and parse the output, e.g.,
krb5-config, and i can see how it would be useful to avoid pulling in
the full set of bind9 library dependencies just for 'host'.  but there
are substantial variations in output format among the 'host'
implementations:

    www.debian.org:

        edmonds@chase{0}:~$ host www.debian.org
        www.debian.org has address 128.31.0.51
        www.debian.org has address 140.211.15.34
        edmonds@chase{0}:~$ unbound-host www.debian.org
        www.debian.org has address 128.31.0.51
        www.debian.org has address 140.211.15.34
        edmonds@chase{0}:~$ khost www.debian.org
        www.debian.org. has IPv4 address 128.31.0.51
        www.debian.org. has IPv4 address 140.211.15.34
        Host www.debian.org. has no AAAA record
        Host www.debian.org. has no MX record
        edmonds@chase{0}:~$ 
    
    existing TXT record:

        edmonds@chase{0}:~$ host -t txt example.org
        example.org descriptive text "$Id: example.org 1253 2013-01-24 
02:04:57Z dknight $"
        example.org descriptive text "v=spf1 -all"
        edmonds@chase{0}:~$ unbound-host -t txt example.org
        example.org has TXT record "v=spf1 -all"
        example.org has TXT record "$Id: example.org 1253 2013-01-24 02:04:57Z 
dknight $"
        edmonds@chase{0}:~$ khost -t txt example.org       
        example.org. description is "$Id: example.org 1253 2013-01-24 02:04:57Z 
dknight $"
        example.org. description is "v=spf1 -all"
        edmonds@chase{0}:~$ 

    nonexistent TXT record:

        edmonds@chase{0}:~$ host -t txt debian.org
        debian.org has no TXT record
        edmonds@chase{0}:~$ unbound-host -t txt debian.org
        edmonds@chase{0}:~$ khost -t txt debian.org
        Host debian.org. has no TXT record
        edmonds@chase{0}:~$ 

btw, there's also dnsget (in the udns-utils package) which does both
'dig' and 'host' style output :)

-- 
Robert Edmonds
edmo...@debian.org

Attachment: signature.asc
Description: Digital signature

Reply via email to