mikelangelo-project / capstan

Capstan, a tool for packaging and running your application on OSv.
http://osv.io/capstan/
Other
19 stars 7 forks source link

Fix "invalid tar header" when package is tar #27

Closed miha-plesko closed 7 years ago

miha-plesko commented 7 years ago

Capstan supports both tar.gz-ed and tar-ed MPM packages. I came across a bug testing this: some tar packages couldn't be untarred properly. Turns out that tar.gz reader spoiled input stream offset when trying to decompress so falling back to tar reader didn't work correctly. Fixed by explicitly setting stream offset back to 0.

miha-plesko commented 7 years ago

@gberginc the package that I was testing backwards compatibility with was eu.mikelangelo-project.osv.bootstrap and it worked even without this patch. But today I tested with eu.mikelangelo-project.app.node-4.4.5 and it complained about invalid tar header.

gberginc commented 7 years ago

Please close & reopen this PR to rerun travis with only 1.7+ Go support.

miha-plesko commented 7 years ago

Green

gberginc commented 7 years ago

Thanks @miha-plesko!