There doesn’t seem to be any provision to set mender-artifact global options like compression. MENDER_ARTIFACT_EXTRA_ARGS adds command args and cannot be used for global options. Should we provide a MENDER_ARTIFACT_GLOBAL_ARGS variable to support change of compression in yocto builds.
For example:
from this:
mender-artifact write rootfs-image \
-n ${MENDER_ARTIFACT_NAME} \
$extra_args \
$image_flag ${IMGDEPLOYDIR}/${ARTIFACTIMG_NAME}.${ARTIFACTIMG_FSTYPE} \
${MENDER_ARTIFACT_EXTRA_ARGS} \
-o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.mender
to
mender-artifact ${MENDER_ARTIFACT_GLOBAL_ARGS} write rootfs-image \
-n ${MENDER_ARTIFACT_NAME} \
$extra_args \
$image_flag ${IMGDEPLOYDIR}/${ARTIFACTIMG_NAME}.${ARTIFACTIMG_FSTYPE} \
${MENDER_ARTIFACT_EXTRA_ARGS} \
-o ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.mender