]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Change how packages are installed into VM images: Rather than chrooting
authorcperciva <cperciva@FreeBSD.org>
Fri, 21 Nov 2014 02:13:12 +0000 (02:13 +0000)
committercperciva <cperciva@FreeBSD.org>
Fri, 21 Nov 2014 02:13:12 +0000 (02:13 +0000)
commit8b1726e8cc096e375dec775efc8fec7ce1e3dc84
treecbf195bc132fdb2f5bdc5c6561f594b8ce36a7cc
parentcb036cbe50cf25bdcc6642eb5f0810af8e4d58db
Change how packages are installed into VM images: Rather than chrooting
into the image and running 'pkg install' from there, use 'pkg fetch' to
download packages into a temporary location and then 'pkg add' to install
them into the image.

This simplifies the code by avoiding the need to copy /etc/resolv.conf
into the image and then delete it later, and makes it possible to cross
build (e.g., to create an amd64 image when running on i386 hardware; or
in the future for building disk images for embedded platforms).

Because pkg was implicitly installed when VM_EXTRA_PACKAGES was non-empty,
add it to VM_EXTRA_PACKAGES in azure.conf and openstack.conf to maintain
the current behaviour.

By default repo-FreeBSD.sqlite is copied into the image, (a) to match
previous behaviour, where the file would be downloaded by the chrooted
pkg invocation; and (b) because it may be useful for testing purposes,
e.g., to see why a package didn't get installed.  Because this file is
large (46 MB) and not likely to be useful in -RELEASE images which are
being launched into Clouds several months later, it can be disabled by
setting NOREPOSQLITE.

As far as I know this commit does not change the disk images produced in
any filesystem-visible way.
release/tools/azure.conf
release/tools/openstack.conf
release/tools/vmimage.subr