On Mon, Oct 13, 2014 at 04:59:42AM -0400, [email protected] wrote: > this probably would have been noticed anyway, unless there is something very > strange on my system, and i did everything by the book (manual). > > ports(7) leads me to believe this should work, particularly /etc/mk.conf > > In the following list, each target will run the preceding targets in > order automatically. That is, build will be run (if necessary) by > install, and so on all the way to fetch. In typical use, one will only > run install explicitly (as normal user, with SUDO defined in > /etc/mk.conf), or build (as user), then install (as root). > > if SUDO is unset, or set but not exported, 'make' works, 'make install' fails. > if SUDO is exported, or set in mk.conf, 'make' fails, but 'make install' > works. > running everything as root breaks other things (see end), though that is > probably intended. > > everything has to be installed manually, which is a PITA for most ports, or > run as root, which has its obvious problems, and still breaks on some things > (groff). as it is i cannot chain build dependences (except as root, mostly). > > > building with clean install -current (2014-10-12) > > $ pwd > /usr/ports/devel/pcre > $ export SUDO=/usr/bin/sudo > $ make > Error: sudo does not let env variables through > *** Error 1 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2556 > '/usr/ports/pobj/pcre-8.35/.extract_started': @if [ x`SUDO_PORT_V1=ah sudo > /...)
We specifically added a variable to /etc/sudoers AND to bsd.port.mk to make sure that test got triggered, instead of failing randomly on some ports. (SUDO_PORT_V1, to be changed to V2, V3... if we figure out other variables to let thru) -> have a look at the default sudoers in src, and make sure you get that setup right. As for builds no longer working as root, well, that's a side-effect of the FAKE_AS_ROOT work... It's possible to work around it by forcing FAKE_AS_ROOT=Yes on the command line, though that's *highly* undesireable...
