From owner-freebsd-ports Sun Nov 21 9:50: 7 1999 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 0A26814CBE for ; Sun, 21 Nov 1999 09:50:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id JAA59936; Sun, 21 Nov 1999 09:50:02 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from jerry.kfunigraz.ac.at (GIGAJERRY.kfunigraz.ac.at [143.50.55.161]) by hub.freebsd.org (Postfix) with ESMTP id 1BBE1158D3 for ; Sun, 21 Nov 1999 09:45:09 -0800 (PST) (envelope-from mkamm@tom.kfunigraz.ac.at) Received: from tom.kfunigraz.ac.at (mc_tom [10.10.1.160]) by jerry.kfunigraz.ac.at (8.9.3/8.9.3) with ESMTP id SAA20009 for ; Sun, 21 Nov 1999 18:45:06 +0100 (MET) Received: from localhost.kfunigraz.ac.at (BONLINEB83.kfunigraz.ac.at [143.50.33.83]) by tom.kfunigraz.ac.at (8.9.3/8.9.3) with ESMTP id SAA29798 for ; Sun, 21 Nov 1999 18:45:04 +0100 (MET) Received: (from mkamm@localhost) by localhost.kfunigraz.ac.at (8.9.3/8.9.3) id PAA07758; Sun, 21 Nov 1999 15:44:31 +0100 (CET) (envelope-from mkamm) Message-Id: <199911211444.PAA07758@localhost.kfunigraz.ac.at> Date: Sun, 21 Nov 1999 15:44:31 +0100 (CET) From: mkamm@gmx.net Reply-To: mkamm@gmx.net To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/15021: port installs fail for non-root users Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 15021 >Category: ports >Synopsis: some port installs fail for non-root users >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 21 09:50:01 PST 1999 >Closed-Date: >Last-Modified: >Originator: Martin Kammerhofer >Release: FreeBSD 3.3-STABLE i386 >Organization: Graz University >Environment: >Description: Ideally ports should be installable by non-root users with make PREFIX=$HOME install clean In practise this often fails because install(1) tries to set user and group. There are already provisions in bsd.port.mk for compatibility with euid!=0 users. (Search for 'id -u' in bsd.port.mk!) The patch below just fixes another case. >How-To-Repeat: >Fix: --- bsd.port.mk.orig Sat Nov 13 18:34:55 1999 +++ bsd.port.mk Sun Nov 21 15:15:45 1999 @@ -787,6 +787,8 @@ MTREE_ARGS?= -U -f ${MTREE_FILE} -d -e -p # A few aliases for *-install targets +UID != id -u +.if ${UID} == 0 INSTALL_PROGRAM= \ ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} INSTALL_SCRIPT= \ @@ -795,6 +797,12 @@ ${INSTALL} ${COPY} -o ${SHAREOWN} -g ${SHAREGRP} -m ${SHAREMODE} INSTALL_MAN= \ ${INSTALL} ${COPY} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} +.else +INSTALL_PROGRAM= ${INSTALL} ${COPY} ${STRIP} -m ${BINMODE} +INSTALL_SCRIPT= ${INSTALL} ${COPY} -m ${BINMODE} +INSTALL_DATA= ${INSTALL} ${COPY} -m ${SHAREMODE} +INSTALL_MAN= ${INSTALL} ${COPY} -m ${MANMODE} +.endif INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \ BSD_INSTALL_SCRIPT="${INSTALL_SCRIPT}" \ >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message