path: root/release/tools/azure.conf
diff options
authorColin Percival <cperciva@FreeBSD.org>2014-11-21 02:13:12 +0000
committerColin Percival <cperciva@FreeBSD.org>2014-11-21 02:13:12 +0000
commit32dbc829820b1b03bf2e27d204cb3fee8d072da9 (patch)
treecbf195bc132fdb2f5bdc5c6561f594b8ce36a7cc /release/tools/azure.conf
parent4e7bc9f0f7b329ce952e0faa4674d143ae2568ac (diff)
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.
Notes: svn path=/projects/release-vmimage/; revision=274773
Diffstat (limited to 'release/tools/azure.conf')
1 files changed, 1 insertions, 4 deletions
diff --git a/release/tools/azure.conf b/release/tools/azure.conf
index 3e4a4864adfe..46b678cd5c25 100644
--- a/release/tools/azure.conf
+++ b/release/tools/azure.conf
@@ -5,7 +5,7 @@
# Set to a list of packages to install.
# Example:
-#export VM_EXTRA_PACKAGES="www/apache24"
+#export VM_EXTRA_PACKAGES="www/apache24 ports-mgmt/pkg"
# Set to a list of third-party software to enable in rc.conf(5).
@@ -17,7 +17,6 @@ vm_extra_install_base() {
fetch -o ${DESTDIR}/usr/sbin/waagent \
chmod +x ${DESTDIR}/usr/sbin/waagent
- rm -f ${DESTDIR}/etc/resolv.conf
return 0
@@ -33,8 +32,6 @@ vm_extra_pre_umount() {
echo 'console="comconsole vidconsole"' >> ${DESTDIR}/boot/loader.conf
echo 'comconsole_speed="115200"' >> ${DESTDIR}/boot/loader.conf
- rm -f ${DESTDIR}/etc/resolv.conf
return 0