From 901e40944f7b565cace3c1a2a9ce0519cba35690 Mon Sep 17 00:00:00 2001 From: Kristian Amlie Date: Thu, 12 Dec 2019 10:06:18 +0100 Subject: [PATCH] Make MENDER_COMPRESS_DISK_IMAGE have same args as MENDER_ARTIFACT_COMPRESSION Changelog: None Signed-off-by: Kristian Amlie --- configs/mender_convert_config | 3 +-- mender-convert-package | 4 ++-- scripts/test/test-utils.sh | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/configs/mender_convert_config b/configs/mender_convert_config index 74f5615..9071ad1 100644 --- a/configs/mender_convert_config +++ b/configs/mender_convert_config @@ -11,10 +11,9 @@ # machine, and obviously saves space. # # Possible values are: -# 'n' - No compression +# 'none' - No compression # 'gzip' - Compress with gzip # 'lzma' - Compress with xz (LZMA) -# 'y' - Alias for 'gzip' MENDER_COMPRESS_DISK_IMAGE=gzip # Compression algorithm for Mender Artifact diff --git a/mender-convert-package b/mender-convert-package index 344d54b..f52e668 100755 --- a/mender-convert-package +++ b/mender-convert-package @@ -252,7 +252,7 @@ if [ "${MENDER_USE_BMAP}" == "y" ]; then fi case "${MENDER_COMPRESS_DISK_IMAGE}" in - y | gzip) + gzip) log_info "Compressing ${sdimg_path}.gz" run_and_log_cmd "pigz --best --force ${sdimg_path}" ;; @@ -260,7 +260,7 @@ case "${MENDER_COMPRESS_DISK_IMAGE}" in log_info "Compressing ${sdimg_path}.xz" run_and_log_cmd "pxz --best --force ${sdimg_path}" ;; - n) + none) : ;; *) diff --git a/scripts/test/test-utils.sh b/scripts/test/test-utils.sh index 4f31803..bbc0ddc 100644 --- a/scripts/test/test-utils.sh +++ b/scripts/test/test-utils.sh @@ -43,12 +43,12 @@ convert_and_test() { # - test providing multiple '--config' options # # - (when no platform configuration is provided) test conversion without - # '--config' and with MENDER_COMPRESS_DISK_IMAGE=y. Compressed disk + # '--config' and with MENDER_COMPRESS_DISK_IMAGE=gzip. Compressed disk # images is the default user facing option and we need to ensure that we # cover this in the tests. if [ -n "${config}" ]; then echo "Will disable MENDER_COMPRESS_DISK_IMAGE for this image" - echo "MENDER_COMPRESS_DISK_IMAGE=n" > ${WORKSPACE}/test_config + echo "MENDER_COMPRESS_DISK_IMAGE=none" > ${WORKSPACE}/test_config local MENDER_CONVERT_EXTRA_ARGS="--config ${config} --config ${WORKSPACE}/test_config" fi @@ -74,7 +74,7 @@ run_tests() { html_report_args="--html=${MENDER_CONVERT_DIR}/report_${device_type}.html --self-contained-html" fi - # Need to decompress images built with MENDER_COMPRESS_DISK_IMAGE=y before + # Need to decompress images built with MENDER_COMPRESS_DISK_IMAGE=gzip before # running tests. if [ -f deploy/${device_type}-${artifact_name}.sdimg.gz ]; then # sudo is needed because the image is created using docker-mender-convert