I only want the tools dig/etc for a small embedded router which is space constrained. Previously I would use bind-tools, however, that seems to have gone away and we must use the full package of bind? So I build my image from a chroot using a script which broadly does a whole series of ROOT=/tmp/image emerge blah I get an error trying to install net-dns/bind-9.18.29-r2 * Generating rndc.key /var/tmp/portage/net-dns/bind-9.18.29-r2/temp/environment: line 1302: /usr/sbin/rndc-confgen: No such file or directory chown: cannot access '/etc/bind/rndc.key': No such file or directory Which seems to be due to the top of pkg_postinst, which seems to be assuming that should poke at files in the main filesystem, not the installed location? pkg_postinst() { tmpfiles_process named.conf if [[ ! -f '/etc/bind/rndc.key' && ! -f '/etc/bind/rndc.conf' ]]; then einfo "Generating rndc.key" /usr/sbin/rndc-confgen -a chown root:named /etc/bind/rndc.key || die chmod 0640 /etc/bind/rndc.key || die fi I'm not immediately sure how to suggest to fix this. Perhaps this code should be moved into pkg_config? Or perhaps we should generate the key in the src_install phase and manage the merging at that point? Or perhaps it should be done in the init file? Note that I'm almost certainly going to mask the install of that file since I'm after a minimal install, so please don't make the success/failure of the build contingent on having these utilities succeed. Additionally note that you might not notice this problem if you have bind installed in the host chroot, however, you would still be setting the permissions on the wrong file, so I think this needs to be resolved either way
The issue with the package non-withstanding. You really want to look for another set of tools outside bind. It will require all the bind libraries with the install. Maybe drill from net-libs/ldns. net-dns/doggo is a bit to large from what I've heard.