lima icon indicating copy to clipboard operation
lima copied to clipboard

Support compressed source images ("http://domain/image.qcow2.gz")

Open sergelogvinov opened this issue 3 years ago • 5 comments

Description

Currently you can use only raw source images

images:
- location: "http://domain/image.qcow2"
  arch: "x86_64"
  digest: "sha512:123123"

Sometimes OS distributive does not have unarchived images on the website. It will be nice to have such capabilities to use archived source images.

sergelogvinov avatar Apr 20 '22 07:04 sergelogvinov

What is "archived source images"?

AkihiroSuda avatar Apr 20 '22 07:04 AkihiroSuda

What is "archived source images"?

Fo example: the source image gzipped or used another archive algorithm.

like this:

- location: "http://domain/image.qcow2.gz"

sergelogvinov avatar Apr 20 '22 08:04 sergelogvinov

That is normally called compressed images (like .gz or .xz), where "archive" is normally reserved for something like .tar or .zip

Being able to automatically decompress would be a nice feature

afbjorklund avatar Apr 21 '22 09:04 afbjorklund

What do you think about https://github.com/mholt/archiver module.

the workflow will be:

  • download file and check checksum
  • decompress the file if extension of file is "known compression format"
  • pass to next steps

sergelogvinov avatar Apr 21 '22 10:04 sergelogvinov

What do you think about https://github.com/mholt/archiver module.

Looks overloaded. Having a built-in support for gzip and maybe zstd is fine, but I'd prefer to use os/exec for other minor formats.

AkihiroSuda avatar Apr 21 '22 10:04 AkihiroSuda

Flatcar still uses the legacy .bz2 format, as well

afbjorklund avatar Mar 27 '23 17:03 afbjorklund