How an arbitrary user can install ports in own home dir?
Andrey Simonenko
simon at comsys.ntu-kpi.kiev.ua
Mon Jul 21 06:18:43 PDT 2003
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?
More information about the freebsd-questions
mailing list