Subject: Re: Building in the source tree as a non-root user
To: None <netbsd-users@netbsd.org>
From: Ian P. Thomas <ipthomas@mac.com>
List: netbsd-users
Date: 08/12/2004 20:40:57
On Aug 11, 2004, at 3:27 PM, James Chacon wrote:
> Quoting "Ian P. Thomas" <ipthomas@mac.com>:
>
>> I'm having trouble updating openssl. My entire source tree,
>> 'usr/src', is owned by me, but I'm still not able to perform the
>> following step as a non-root user. I'm building on the latest 1-6
>> sources.
>>
>> /usr/src/lib/libcrypto % make USETOOLS=no cleandir dependall
>>
>> I've added the error message that occurs below.
>>
>> install -r -c -o root -g wheel -m 444
>> /usr/src/lib/libcrypto/../../crypto/dist/openssl/crypto/opensslv.h
>> /usr/include/openssl/opensslv.h
>> install: /usr/include/openssl/inst.09999a: mkstemp: Permission denied
>> *** Error code 1
>>
>
> This is because the library needs generated include files to build.
> These normally would be put into a DESTDIR when building.
>
> If you want to build non-priv'd I suggest you use build.sh and the
> -U flag to it. See the top level documentation in BUILDING for
> examples.
Appreciate the info. I should have given more information. I wasn't
attempting to update the entire system, just my openssl library as
specified in the SA2004-005. I read BUILDING and I didn't see a way to
build just a portion of the source tree.
I was able to perform the steps in SA2004-008 in the manner I expected,
non-root for 'make USETOOLS=no cleandir dependall' and root for 'make
USETOOLS=no install'. This didn't work for SA2004-005. It seems that
this is due to 'dependall' causing a library to be installed in
/usr/include/openssl. I figured that a 'dependall' would keep any
files created during this portion of the build in the source tree.
If I set DESTDIR to a directory tree owned by myself, would this take
care of this problem? It seems like this would cause problems when I
went ahead and tried to execute the 'install' stage of the build. It
would just install the new libs to the DESTDIR, rather than to the
actual system. Suggestions on how to proceed?
Ian Thomas