From owner-freebsd-questions@FreeBSD.ORG Mon Jul 21 06:18:43 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58E7E37B404 for ; Mon, 21 Jul 2003 06:18:43 -0700 (PDT) Received: from relay1.ntu-kpi.kiev.ua (oberon.ntu-kpi.kiev.ua [195.245.194.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5C9A943FA3 for ; Mon, 21 Jul 2003 06:18:35 -0700 (PDT) (envelope-from simon@comsys.ntu-kpi.kiev.ua) Received: from comsys.ntu-kpi.kiev.ua (eth0.comsys.ntu-kpi.kiev.ua [10.0.1.184]) by relay1.ntu-kpi.kiev.ua (Postfix) with ESMTP id 638B01CE30; Mon, 21 Jul 2003 16:18:26 +0300 (EEST) Received: from pm514-9.comsys.ntu-kpi.kiev.ua (pm514-9.comsys.ntu-kpi.kiev.ua [10.18.54.109]) by comsys.ntu-kpi.kiev.ua (8.11.6/8.11.6) with ESMTP id h6LDNEr29888; Mon, 21 Jul 2003 16:23:14 +0300 (EEST) Received: by pm514-9.comsys.ntu-kpi.kiev.ua (Postfix, from userid 1000) id 89BBF1C2; Mon, 21 Jul 2003 16:17:26 +0300 (EEST) From: Andrey Simonenko To: dan@slightlystrange.org In-Reply-To: <20030716134602.GB82301@catflap.home.slightlystrange.org.lucky.freebsd.questions> X-Newsgroups: lucky.freebsd.questions User-Agent: tin/1.5.18-20030602 ("Darts") (UNIX) (FreeBSD/4.8-STABLE (i386)) Message-Id: <20030721131726.89BBF1C2@pm514-9.comsys.ntu-kpi.kiev.ua> Date: Mon, 21 Jul 2003 16:17:26 +0300 (EEST) cc: freebsd-questions@freebsd.org Subject: Re: How an arbitrary user can install ports in own home dir? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2003 13:18:43 -0000 On Wed, 16 Jul 2003 13:46:34 +0000 (UTC) in lucky.freebsd.questions, Daniel Bye wrote: First of all thank you for your help, all what you said is correct. Next see below. > > On Wed, Jul 16, 2003 at 03:03:04PM +0300, Andrey Simonenko wrote: >> Hello all, >> >> How an arbitrary user (without root credentials) can install ports >> in own home dir? >> >> How I tried to do this: >> >> I created ~/local/ports, place Mk, Tools, Templates there. > > This step isn't necessary. Well, it might be, but only if you don't have > r-x access on /usr/ports and descendents. > I have to maintain own ports collection, because /usr/ports on target server is very outdated. >> But when I install any ports I'm asked to enter root password. >> This is from the bsd.port.mk: >> >> .if ${UID} != 0 && defined(_${target:U}_SUSEQ) >> [skip] >> @echo "===> Switching to root credentials for '${target}' target" >> @cd ${.CURDIR} && \ >> ${SU} root -c "${MAKE} ${__softMAKEFLAGS} ${_${target:U}_SUSEQ}" >> @echo "===> Returning to user credentials" >> >> If I give correct root's password, then a port is installed to ~/local >> and a package is registered in ~/local/var/db. > > Hmm, don't know what this means. With the correct set of variables defined, > I have not yet been asked to provide the root password... I think that something is broken in bsd.port.mk, because on another machine with old /usr/ports I _can_ install ports under in my home directory (using the method I described in my original message and additionally defining NO_MTREE=yes in environment). But with current ports collection that error about ``Switching to root...'' always appeared. On my system bsd.port.mk has 1.456 version. I suppose that this error was introduced in bsd.port.mk version 1.455. Which version of bsd.port.mk is installed on your system?