Merge "Allow configurable gzip binary name"

This commit is contained in:
Zuul 2019-09-06 09:47:06 +00:00 committed by Gerrit Code Review
commit 48edd472e7
4 changed files with 10 additions and 1 deletions

View File

@ -123,6 +123,7 @@ DIB_DEBUG_TRACE=${DIB_DEBUG_TRACE:-0}
INSTALL_PACKAGES="" INSTALL_PACKAGES=""
IMAGE_TYPES=("qcow2") IMAGE_TYPES=("qcow2")
COMPRESS_IMAGE="true" COMPRESS_IMAGE="true"
DIB_GZIP_BIN=${DIB_GZIP_BIN:-"gzip"}
ROOT_LABEL="" ROOT_LABEL=""
DIB_DEFAULT_INSTALLTYPE=${DIB_DEFAULT_INSTALLTYPE:-"source"} DIB_DEFAULT_INSTALLTYPE=${DIB_DEFAULT_INSTALLTYPE:-"source"}
MKFS_OPTS="" MKFS_OPTS=""

View File

@ -144,7 +144,7 @@ function compress_and_save_image () {
if [ "$IMAGE_TYPE" = "raw" ]; then if [ "$IMAGE_TYPE" = "raw" ]; then
mv $TMP_IMAGE_PATH $1-new mv $TMP_IMAGE_PATH $1-new
elif [ "$IMAGE_TYPE" == "tgz" ]; then elif [ "$IMAGE_TYPE" == "tgz" ]; then
gzip -9 < $IMAGE_NAME.tar > $1-new $DIB_GZIP_BIN -9 < $IMAGE_NAME.tar > $1-new
rm $IMAGE_NAME.tar rm $IMAGE_NAME.tar
elif [ "$IMAGE_TYPE" == "vhd" ]; then elif [ "$IMAGE_TYPE" == "vhd" ]; then
cp $TMP_IMAGE_PATH $1-intermediate cp $TMP_IMAGE_PATH $1-intermediate

View File

@ -57,6 +57,9 @@ formats are:
* docker * docker
* raw * raw
When building a tgz image, note that the `DIB_GZIP_BIN` environment variable
can be used to set the path of the gzip executable.
Disk Image Layout Disk Image Layout
----------------- -----------------

View File

@ -0,0 +1,5 @@
---
features:
- |
The `DIB_GZIP_BIN` environment variable enables builders to change the
path to `gzip`, such as when an alternate gzip is to be used (ie. pigz).