Date: Sun, 16 Mar 2003 12:55:25 +0100 (CET) From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> To: ports@freebsd.org Subject: ports/Mk/bsd.port.mk -- installing ports as non-root Message-ID: <Pine.BSF.4.51.0303161246490.43104@naos.dbai.tuwien.ac.at>
next in thread | raw e-mail | index | archive | help
In ports/Mk/bsd.port.mk we have # Determine whether or not we can use rootly owner/group functions. UID!= id -u .if ${UID} == 0 _BINOWNGRP= -o ${BINOWN} -g ${BINGRP} _SHROWNGRP= -o ${SHAREOWN} -g ${SHAREGRP} _MANOWNGRP= -o ${MANOWN} -g ${MANGRP} .else _BINOWNGRP= _SHROWNGRP= _MANOWNGRP= .endif which are then used as follows # A few aliases for *-install targets INSTALL_PROGRAM= \ ${INSTALL} ${COPY} ${STRIP} ${_BINOWNGRP} -m ${BINMODE} INSTALL_SCRIPT= \ ${INSTALL} ${COPY} ${_BINOWNGRP} -m ${BINMODE} INSTALL_DATA= \ ${INSTALL} ${COPY} ${_SHROWNGRP} -m ${SHAREMODE} INSTALL_MAN= \ ${INSTALL} ${COPY} ${_MANOWNGRP} -m ${MANMODE} However, in one case this is not honored and a chown is tried even when not running is root. The patch below tries to address this; or did I miss anything? Gerald (@FreeBSD.org) Index: bsd.port.mk =================================================================== RCS file: /sw/FreeBSD/CVSUP/ports/Mk/bsd.port.mk,v retrieving revision 1.442 diff -u -3 -p -r1.442 bsd.port.mk --- bsd.port.mk 12 Mar 2003 00:28:17 -0000 1.442 +++ bsd.port.mk 16 Mar 2003 11:43:49 -0000 @@ -2701,7 +2701,7 @@ do-configure: @(cd ${CONFIGURE_WRKSRC} && \ if ! ${SETENV} CC="${CC}" CXX="${CXX}" \ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ - INSTALL="/usr/bin/install -c -o ${BINOWN} -g ${BINGRP}" \ + INSTALL="/usr/bin/install -c ${_BINOWNGRP}" \ INSTALL_DATA="${INSTALL_DATA}" \ INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.51.0303161246490.43104>