bootstrapping /usr/sbin/pkg inside a jail

Craig Rodrigues rodrigc at FreeBSD.org
Wed May 7 21:07:10 UTC 2014


On Wed, May 7, 2014 at 1:46 PM, Fbsd8 <fbsd8 at a1poweruser.com> wrote:
> Craig Rodrigues wrote:

> Thank you Craig for your work around. But the fact is the bootstrap pkg
> program should work from within a jail. This looks like a bug that needs a
> PR.

/usr/sbin/pkg behaves differently on FreeBSD 9
vs. FreeBSD 10.  You can see the source code in /usr/src/usr.bin/pkg/
to see how it works.

Before you run /usr/sbin/pkg for the first time, you need to check if
any of the following are true in your jail:

(1)  Is something setting PACKAGESITE in your environment?
(2)  Do you have any files:
          /usr/local/etc/pkg.conf
         /usr/local/etc/pkg/repos/*

If any of those things are true, they will affect the behavior of /usr/sbin/pkg.
You will need to delete those files and unset the variable, and then
apply the workaround
at: https://github.com/freenas/freenas/blob/master/build/ports/install-ports.sh#L29

You can try filing a bug against pkg, but the pkg developers might
tell you that this
is a bootstrapping problem which is fixed in newer versions of FreeBSD.

--
Craig


More information about the freebsd-pkg mailing list