Honestly... keeping pkgsrc in /usr/pkgsrc
is bad advice. Don't build things as root, either.
I keep it in my home directory. Don't bootstrap unprivileged, a default NetBSD install has everything needed to install packages system-wide. If you set SU_CMD
to sudo
as described in the pkgsrc guide, you can build everything as your local user and it will escalate appropriately to install things providing you have configured sudo to allow the escalation without a password (see wheel group stuff in the default config file)...
If you are dead against adding yourself to the wheel group and allowing escalation without a password, you can create a pkgdev user or something. To me the purpose of requiring commands to be prefixed with sudo
is to prevent mistakes, it's not security.