Klaus Heinz wrote:
Hi, I just noticed there is something wrong with SU_CMD: I cannot build games/netmaj with "SU_CMD=sudo su - root -c" because the environment variable OPSYS (among others, like HOST_OSTYPE, LOWER_OPSYS,LOWER_OS_VERSION) is not known.Now that I searched for it, it looks like doc/pkgsrc.txt has recommended "su root..." instead of "su - root..." since revision 1.1 from 2004. Is my memory wrong when I think that "su - root..." has been supported in the past?
A comment in bsd.pkg.mk says: # XXX: Shouldn't the $${PATH} be ${PATH} here? This may be related to # PR 34470. _ROOT_CMD= cd ${.CURDIR} && \ ${SETENV} ${PKGSRC_MAKE_ENV} \ PATH="$${PATH}:"${SU_CMD_PATH_APPEND:Q} \ ${MAKE} ${MAKEFLAGS} \ PKG_DEBUG_LEVEL=${PKG_DEBUG_LEVEL:Q} \ su-${.TARGET} ${MAKEFLAGS.su-${.TARGET}}That may be the problem. I couldn't find any documentation for the reason that $${PATH} is used in this place, so I didn't dare to change it.
Roland