bootstrapping /usr/sbin/pkg inside a jail

Craig Rodrigues rodrigc at FreeBSD.org
Wed May 7 19:56:57 UTC 2014


On Wed, May 7, 2014 at 7:07 AM, Fbsd8 <fbsd8 at a1poweruser.com> wrote:
> jexec dir23 tcsh
> dir23 /root >/usr/sbin/pkg
> The package management tool is not yet installed on your system.
> Do you want to fetch and install it now? [y/N]: y
> Bootstrapping pkg from
> ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-current/Latest/,
> please wait...
> pkg: Error fetching
> ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/i386/packages-current/Latest//Latest/pkg.txz:
> File unavailable (e.g., file not found, no access)
> A pre-built version of pkg could not be found for your system.
> Consider changing PACKAGESITE or installing it from ports

Hi,

I encountered similar problems when moving the build system of FreeNAS to use
poudriere for building ports.
You might want to check out:

https://github.com/freenas/freenas/blob/master/build/ports/install-ports.sh#L29

If you play with the PACKAGESITE environment variable,
and create the following files inside your jail:
/usr/local/etc/pkg/repos/FreeBSD.conf
/usr/local/etc/pkg/repos/local.conf

with entries like how I did in the install-ports.sh script, you can
suppress that
error message from /usr/sbin/pkg.

--
Craig


More information about the freebsd-pkg mailing list