On 2020-03-25, Moises Simon <m...@posteo.org> wrote: > Hi misc, > > I'm trying to set the ports system to use PORT_PRIVSEP > according to bsd.port.mk(5) and > https://www.openbsd.org/faq/ports/ports.html#PortsConfig > > but I'm getting the following error: > > sirius$ make fetch > mkdir /usr/obj/ports: Permission denied at > /usr/ports/infrastructure/bin/portlock line 53. *** Error 255 in > /usr/ports/mystuff/x11/dmenu (/usr/ports/infrastructure/mk/bsd.port.mk:2557 > 'fetch': @lock=dmenu-4.9; export _LOCKS_HELD="...
Does _pbuild have write access to /usr/obj? If not, either grant it, or create /usr/obj/ports yourself and grant _pbuild write access to that. > even after doing make fix-permissions. I'm not seens something. > > cat /etc/mk.conf > SUDO=doas > CLEANDEPENDS=Yes > PORTS_PRIVSEP=Yes > WRKOBJDIR=/usr/obj/ports > DISTDIR=/usr/ports/distfiles > PACKAGE_REPOSITORY=/usr/ports/packages > > cat /etc/doas.conf > permit nopass msv cmd touch > permit nopass setenv { TRUSTED_PKG_PATH TERM } msv cmd pkg_add Allowing pkg_add with nopass opens a way for your account to get root without a password. Since doas "persist" doesn't allow password persistence with how ports uses it, I use sudo not doas on ports dev machines. (I use doas on ports build machines, but dpb manages running pkg_add in that case, and is started as root so it only needs to drop privs rather than raise them).