Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the gzipped tarball output rsyncable for poor man's delta updates #2920

Open
afbjorklund opened this issue Apr 7, 2024 · 3 comments
Open

Comments

@afbjorklund
Copy link
Contributor

afbjorklund commented Apr 7, 2024

What is the problem you're trying to solve

Makefile: gzip -9 $(CURDIR)/_output/nerdctl-full-$(VERSION_TRIMMED)-linux-$(1).tar

Describe the solution you'd like

Add the --rsyncable flag to the gzip invocation above, to make the output more rsync friendly.

Additional context

No response

@AkihiroSuda
Copy link
Member

👍

(Off-topic: --rsyncable might be also useful for dedupe of OCI image layer blobs?)

@afbjorklund
Copy link
Contributor Author

If you want it accessible over HTTP as well, then we should also create a .zsync file.

http://zsync.moria.org.uk/

$ zsync -i nerdctl-full-1.7.3-linux-arm64.tgz http://localhost/zsync/nerdctl-full-1.7.5-linux-arm64.tgz.zsync
#################### 100.0% 0.0 kBps DONE    

reading seed file nerdctl-full-1.7.3-linux-arm64.tgz: ********************************************************************************************************************
Read nerdctl-full-1.7.3-linux-arm64.tgz. Target 33.3% complete.      ************************************
downloading from http://localhost/zsync/nerdctl-full-1.7.5-linux-arm64.tgz:
#################### 100.0% 0.0 kBps DONE    

verifying download...checksum matches OK
used 74076160 local, fetched 148500742
$ zsync -i nerdctl-full-1.7.4-linux-arm64.tgz http://localhost/zsync/nerdctl-full-1.7.5-linux-arm64.tgz.zsync
#################### 100.0% 0.0 kBps DONE    

reading seed file nerdctl-full-1.7.4-linux-arm64.tgz: ********************************************************************************************************************
Read nerdctl-full-1.7.4-linux-arm64.tgz. Target 37.1% complete.      ************************************
downloading from http://localhost/zsync/nerdctl-full-1.7.5-linux-arm64.tgz:
#################### 100.0% 0.0 kBps DONE    

verifying download...checksum matches OK
used 82632704 local, fetched 139945483

Where .tgz here was the .tar.gz, but re-compressed with gzip --rsync --best

Does require (lib)zsync, but...

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Apr 8, 2024

As advertised, the overhead is around 1%
210M nerdctl-full-1.7.5-linux-arm64.tar.gz
213M nerdctl-full-1.7.5-linux-arm64.tgz
372K nerdctl-full-1.7.5-linux-arm64.tgz.zsync

I don't think this is worthwhile for the small tarballs.
Also, they include a new binary version every time.

HTTPS support: https://github.com/probonopd/zsync-curl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants