diff options
author | gjb <gjb@FreeBSD.org> | 2014-10-02 00:34:03 +0000 |
---|---|---|
committer | gjb <gjb@FreeBSD.org> | 2014-10-02 00:34:03 +0000 |
commit | 470a786adc20ab9d36c046eacc6c2c776d0e3e79 (patch) | |
tree | 8fdf7310cba635e4b5a27b6dba180dcf059bc77c /release | |
parent | 7403b4f22a256bcfea6b3206227339ad68c309c5 (diff) | |
download | FreeBSD-src-470a786adc20ab9d36c046eacc6c2c776d0e3e79.zip FreeBSD-src-470a786adc20ab9d36c046eacc6c2c776d0e3e79.tar.gz |
Add WITH_COMPRESSED_VMIMAGES variable, which when set enables
xz(1) compression of the virtual machine images.
This is intentionally separate to allow more fine-grained
tuning over which images are compressed, especially in cases
where compressing 20GB sparse images can take hours.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'release')
-rw-r--r-- | release/Makefile | 4 | ||||
-rw-r--r-- | release/release.conf.sample | 4 | ||||
-rwxr-xr-x | release/release.sh | 8 |
3 files changed, 14 insertions, 2 deletions
diff --git a/release/Makefile b/release/Makefile index 7d87013..905063b 100644 --- a/release/Makefile +++ b/release/Makefile @@ -24,6 +24,8 @@ # WITH_COMPRESSED_IMAGES: if set, compress installation images with xz(1) # (uncompressed images are not removed) # WITH_VMIMAGES: if set, build virtual machine images with the release +# WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images +# with xz(1) (extremely time consuming) # TARGET/TARGET_ARCH: architecture of built release # @@ -301,7 +303,7 @@ install: cp -p ${VMBASE}.${FORMAT} \ ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} . endfor -. if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) +. if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) # This is very time consuming, so defer it after the images are moved to # the DESTDIR. . for FORMAT in ${VMFORMATS} diff --git a/release/release.conf.sample b/release/release.conf.sample index 9acc0e2..c79ed9f 100644 --- a/release/release.conf.sample +++ b/release/release.conf.sample @@ -81,6 +81,10 @@ PORTBRANCH="ports/head@rHEAD" ## release build. #WITH_VMIMAGES= +## Set to a non-empty value to compress virtual machine images with xz(1) +## as part of the release build. +#WITH_COMPRESSED_VMIMAGES= + ## If WITH_VMIMAGES is set to a non-empty value, this is the name of the ## file to use for the installed userland/kernel. #VMBASE="vm" diff --git a/release/release.sh b/release/release.sh index e7f0c39..87b3697 100755 --- a/release/release.sh +++ b/release/release.sh @@ -89,6 +89,11 @@ NOPORTS= WITH_DVD= WITH_COMPRESSED_IMAGES= +# Set to non-empty value to build virtual machine images as part of +# the release. +WITH_VMIMAGES= +WITH_COMPRESSED_VMIMAGES= + usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -274,4 +279,5 @@ eval chroot ${CHROOTDIR} make -C /usr/src ${RELEASE_KMAKEFLAGS} buildkernel eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ release eval chroot ${CHROOTDIR} make -C /usr/src/release ${RELEASE_RMAKEFLAGS} \ - install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} + install DESTDIR=/R WITH_COMPRESSED_IMAGES=${WITH_COMPRESSED_IMAGES} \ + WITH_COMPRESSED_VMIMAGES=${WITH_COMPRESSED_VMIMAGES} |