From owner-freebsd-pkg@FreeBSD.ORG Mon Sep 8 15:48:59 2014 Return-Path: Delivered-To: freebsd-pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 978EDEDD; Mon, 8 Sep 2014 15:48:59 +0000 (UTC) Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) by mx1.freebsd.org (Postfix) with ESMTP id 70F241F66; Mon, 8 Sep 2014 15:48:59 +0000 (UTC) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id DA1B85A9F24; Mon, 8 Sep 2014 15:48:58 +0000 (UTC) Date: Mon, 8 Sep 2014 15:48:58 +0000 From: Brooks Davis To: Craig Rodrigues Subject: Re: make -DNO_ROOT to create chroot, problem installing into chroot with pkg Message-ID: <20140908154858.GB35236@spindle.one-eyed-alien.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s/l3CgOIzMHHjg/5" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-current Current , freebsd-pkg@freebsd.org X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 15:48:59 -0000 --s/l3CgOIzMHHjg/5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 07, 2014 at 04:03:59PM -0700, Craig Rodrigues wrote: > Hi, >=20 > I am using pkg 1.3.7. >=20 > I did the following as a regular user, not root: >=20 > rm -fr /tmp/package > cd /usr/src > make buildworld > make buildkernel > make -DNO_ROOT -DDB_FROM_SRC installworld DESTDIR=3D/tmp/package > make -DNO_ROOT -DDB_FROM_SRC installkernel DESTDIR=3D/tmp/package > make -DNO_ROOT -DDB_FROM_SRC distribution DESTDIR=3D/tmp/package >=20 > This created an installed world under /tmp/package >=20 > Then I did: >=20 > pkg -c /tmp/package install -y devel/kyua >=20 > I got: >=20 > pkg: chroot failed! >=20 > Then I tried the same command under sudo: >=20 > sudo pkg -c /tmp/package install -y devel/kyua >=20 > I got: >=20 > pkg: /var/db/pkg wrong user or group ownership (expected 0/0 versus actual > 818/0) >=20 > 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 --s/l3CgOIzMHHjg/5 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlQNz+oACgkQXY6L6fI4GtRNUACffzeP9vzS7QmWYacey5k5lTkz 9xEAnRn3+AilINCx3AKv9GL6/UjfAljl =+qFI -----END PGP SIGNATURE----- --s/l3CgOIzMHHjg/5--