Skip to content

Conversation

@afbjorklund
Copy link
Member

Fork an external program, rather than linking everything.

(like https://github.com/mholt/archiver)

Keep some files compressed, such as the nerdctl-full tgz.

Closes #809

default:
return fmt.Errorf("decompressLocal: unknown extension %s", ext)
}
logrus.Infof("decompressing %s with %s", ext, program)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
logrus.Infof("decompressing %s with %s", ext, program)
logrus.Debugf("decompressing %s with %s", ext, program)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a looong pause here, when using some of the slower compressions like bzip2 or xz

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should consider printing progress bars?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but that would seem to imply not calling os/exec but using something like archiver ?

Copy link
Member

@AkihiroSuda AkihiroSuda Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just use io.MultiWriter(uncompressCmdStdin, progressBar).
Can be another PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we don't have any progress bars for the copy yet either (probably mostly shown for NFS)

func TestDownloadCompressed(t *testing.T) {

if runtime.GOOS == "windows" {
// FIXME: `assertion failed: error is not nil: exec: "gzip": executable file not found in %PATH%`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use stdlib for gzip.
Can be another PR in the future

Copy link
Member Author

@afbjorklund afbjorklund Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if anyone is using gzip, because I think the image format supports this natively ?

Fork an external program, rather than linking everything.

Keep some files compressed, such as the nerdctl-full tgz.

Signed-off-by: Anders F Björklund <[email protected]>
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AkihiroSuda AkihiroSuda added this to the v0.16.0 milestone Mar 28, 2023
@AkihiroSuda AkihiroSuda merged commit 3e0f9cb into lima-vm:master Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants