Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 2014 13:06:38 -0400
From:      Julio Merino <jmmv@freebsd.org>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        Craig Rodrigues <rodrigc@freebsd.org>, freebsd-current Current <freebsd-current@freebsd.org>, freebsd-pkg@freebsd.org
Subject:   Re: make -DNO_ROOT to create chroot, problem installing into chroot with pkg
Message-ID:  <CAFY7cWDx0RBaAo2-nC96E_cs-R_mVD1dbkiN8bw5UoQp6Mk41w@mail.gmail.com>
In-Reply-To: <20140908154858.GB35236@spindle.one-eyed-alien.net>
References:  <CAG=rPVe%2BM6uU6OFUOHi4H8yydYKx8NtT14Xp0XbUw5wr4a%2B5pg@mail.gmail.com> <20140908154858.GB35236@spindle.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Sep 8, 2014 at 11:48 AM, Brooks Davis <brooks@freebsd.org> wrote:
>
> If you don't mind the ownership being wrong and there being a few extra
> +FOO files tar works.  It would be great for someone to teach package to
> install without root and to update a METALOG file.  That's not 100% of
> the solution, but it's a solid 80-90% solution.

(This is just my completely uninformed opinion as I don't know the
internals of pkg.) There are other issues to be addressed.

Teaching pkg to install without root means changing pkg to not use
chroot: i.e. to make pkg be able to deal with the concept of a
"destdir" for package installations. That is probably easy: just
prefixing a bunch of destdir to the locations being touched.

However, the tricky part here is dealing with any package-specific
post-install scripts to ensure they understand destdir, which in turn
means that any tools executed by the scripts must also be capable of
dealing with a destdir. Also, the scripts (being potentially-untrusted
code) cannot be guaranteed to behave correctly on the
outside-of-the-chroot system.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFY7cWDx0RBaAo2-nC96E_cs-R_mVD1dbkiN8bw5UoQp6Mk41w>