Allow configurable gzip binary name
Add a new environment variable $DIB_GZIP_BIN allowing builders to specify a different gzip (such as pigz) to be used when compressing tgz images. Change-Id: Ifb617568140a149e2fda241e07ff8a59429e6697
This commit is contained in:
parent
472be2a144
commit
d9e85efd7c
@ -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=""
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
@ -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).
|
Loading…
Reference in New Issue
Block a user