mender-convert support compressed input

Description

Input images used with mender-convert are virtually always compressed. Today the user is required to decompress the image first, which is a usability issue we can easily improve by supporting compressed input.

Secondly, the output image should be compressed with the same compression format as the input as well. This way, the user can follow exactly the getting started guide from the board manufacturer (and not have to fail and translate the decompression commands / steps because he is using mender-converted images).

Acceptance criteria

  • mender-convert supports compressed input in at least these formats: .gz, .xz, .zip

  • when compressed input is given, the output is compressed with the same format

  • it is possible to specify the output compression format

  • .gz is the default output compression format if neither the input is compressed nor the output compression format is specified

Affects versions

None

Environment

None

Checklist

Activity

Show:

Ole Petter OrhagenApril 28, 2020 at 12:15 PM

Lluis CamposJanuary 14, 2020 at 10:59 AM

Estimated to 5sp

Mirza KrakJanuary 14, 2020 at 8:30 AM

Do you want to take it Mirza Krak or should we add to next sprint?

Would appreciate if it can be added to the next sprint.

Here is also a code snippet that I use in my `.bashrc` slightly smiling face

# # ex - archive extractor # # usage: ex <file> ex () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjf $1 ;; *.tar.gz) tar xzf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar x $1 ;; *.gz) gunzip $1 ;; *.tar) tar xf $1 ;; *.tbz2) tar xjf $1 ;; *.tgz) tar xzf $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1;; *.7z) 7z x $1 ;; *.xz) xz -d $1 ;; *) echo "'$1' cannot be extracted via ex()" ;; esac else echo "'$1' is not a valid file" fi }

eystein.maloy.stenbergJanuary 13, 2020 at 10:50 PM

FYI, as discussed with Mirza as well.

Do you want to take it or should we add to next sprint? If on next sprint, can someone please estimate?

Fixed

Details

Assignee

Reporter

Story Points

Priority

Days in progress

14

Sprint

Backlog

yes

Zendesk Support

Checklist

Created January 13, 2020 at 10:47 PM
Updated May 11, 2020 at 8:05 AM
Resolved May 11, 2020 at 8:05 AM

Flag notifications