Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 2014 15:48:58 +0000
From:      Brooks Davis <brooks@freebsd.org>
To:        Craig Rodrigues <rodrigc@freebsd.org>
Cc:        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:  <20140908154858.GB35236@spindle.one-eyed-alien.net>
In-Reply-To: <CAG=rPVe%2BM6uU6OFUOHi4H8yydYKx8NtT14Xp0XbUw5wr4a%2B5pg@mail.gmail.com>
References:  <CAG=rPVe%2BM6uU6OFUOHi4H8yydYKx8NtT14Xp0XbUw5wr4a%2B5pg@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sun, Sep 07, 2014 at 04:03:59PM -0700, Craig Rodrigues wrote:
> Hi,
> 
> I am using pkg 1.3.7.
> 
> I did the following as a regular user, not root:
> 
> rm -fr /tmp/package
> cd /usr/src
> make buildworld
> make buildkernel
> make  -DNO_ROOT -DDB_FROM_SRC  installworld DESTDIR=/tmp/package
> make  -DNO_ROOT -DDB_FROM_SRC  installkernel DESTDIR=/tmp/package
> make  -DNO_ROOT -DDB_FROM_SRC  distribution DESTDIR=/tmp/package
> 
> This created an installed world under /tmp/package
> 
> Then I did:
> 
> pkg -c /tmp/package install -y devel/kyua
> 
> I got:
> 
> pkg: chroot failed!
> 
> Then I tried the same command under sudo:
> 
> sudo pkg -c /tmp/package install -y devel/kyua
> 
> I got:
> 
> pkg: /var/db/pkg wrong user or group ownership (expected 0/0 versus actual
> 818/0)
> 
> Is there a way to install packages into chroot without
> being root?

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.

-- Brooks

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlQNz+oACgkQXY6L6fI4GtRNUACffzeP9vzS7QmWYacey5k5lTkz
9xEAnRn3+AilINCx3AKv9GL6/UjfAljl
=+qFI
-----END PGP SIGNATURE-----
help

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