Port installation without root access

Alexander Leidinger Alexander at Leidinger.net
Tue Feb 14 04:11:59 PST 2006


Robert Backhaus <robbak at gmail.com> wrote:

> It does make sense to install ports into, say, ~/local . I can see
> three things that you need: Wrtie access to the distfiles directory,

DISTDIR=/a/dir/with/write/access/for/downloads

> (if you need to fetch), PREFIX set, and MAKEOBJDIR set to somewhere

You need to set WKRDIRPREFIX, not MAKEOBJDIR.

> spacious and writeable.

You also need to change PKG_DBDIR, and in case you install perl modules you
need to set PERL5LIB too.

Additionally INSTALL_AS_USER needs to be defined in make.conf or on the
command line.

> My limited experience is that this works, at least for the trivial
> ports for which user installation makes sense. Unless - Do ports
> recognise libraries/dependencies installed to /usr/local if PREFIX is
> altered?

Yes, they do.

But you will get into trouble when you try to install autoconf as an user. It
hardcodes the path to gm4 to /usr/local/bin, so this will not work out of the
box ATM. Another problem is that any dependency to autoconf259 will be
absolute to LOCALBASE. So if it is installed in a different prefix, it will
always try to build it.

The next problem are LIB_DEPENDS. You need a hacked ldconfig, the base system
one doesn't like non-root owned directories (there's another problem with
ldconfig, it tries to write to a place where an ordinary user has no write
access).

Bye,
Alexander.

-- 
http://www.Leidinger.net  Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org     netchild @ FreeBSD.org  : PGP ID = 72077137
Why doesn't everybody leave everybody else the hell alone?
		-- Jimmy Durante




More information about the freebsd-ports mailing list