Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949001 - net-dns/bind-9.18.29-r2 errors when installing into ROOT=
Summary: net-dns/bind-9.18.29-r2 errors when installing into ROOT=
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-29 09:16 UTC by Ed Wildgoose
Modified: 2025-01-29 12:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Wildgoose 2025-01-29 09:16:20 UTC
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
Comment 1 Paul Zander 2025-01-29 12:02:42 UTC
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.