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

Append missing in tar #331

Open
MrVeink opened this issue Apr 8, 2022 · 5 comments
Open

Append missing in tar #331

MrVeink opened this issue Apr 8, 2022 · 5 comments

Comments

@MrVeink
Copy link

MrVeink commented Apr 8, 2022

Using Toybox tar and the flag -r ain't there. Couldn't find in --help any other flag for append.

@landley
Copy link
Owner

landley commented Apr 8, 2022

Nobody had asked for it yet. I'll try to take a look in the morning. (Does it strip off the trailing null blocks or do they not cause a problem...?)

@landley
Copy link
Owner

landley commented Apr 8, 2022

$ tar c xargs.diff > woot.tar $ tar c zapdots.patch >> woot.tar $ tar tvf woot.tar -rw-r--r-- landley/landley 2213 2019-10-21 16:50 xargs.diff

It's gotta strip. Ok.

@landley
Copy link
Owner

landley commented Apr 8, 2022

I despise github's Gratuitous Wiki Syntax in replies.

@landley
Copy link
Owner

landley commented Apr 8, 2022

Except the archives can be compressed, at which point stripping off the trailing null blocks is nontrivial. Depending on the compression format, you may have to recompress the whole archive. And it's ALREADY nontrivial because you have to parse from the beginning to see how many trailing null blocks are padding and how many are potentially payload from the last file...

@MrVeink
Copy link
Author

MrVeink commented Apr 8, 2022

Except the archives can be compressed, at which point stripping off the trailing null blocks is nontrivial. Depending on the compression format, you may have to recompress the whole archive. And it's ALREADY nontrivial because you have to parse from the beginning to see how many trailing null blocks are padding and how many are potentially payload from the last file...

Where we're using it, it's a simple .tar without any compression but I don't know how GNU tar does it. We archive a ./usr into a tar, list everything that's in it into a text file and then inject that list afterwards to the archive. Then we use XZ and compress it.

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

No branches or pull requests

2 participants