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

Fix a lot of issues at tar(1) #44

Open
takusuman opened this issue Mar 31, 2024 · 1 comment
Open

Fix a lot of issues at tar(1) #44

takusuman opened this issue Mar 31, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@takusuman
Copy link
Member

takusuman commented Mar 31, 2024

Happy (early-hours of) Easter!
What have we won? At least four things to fix at tar(1).
I commented at #27 that this tar implementation had some, well, questions to be solved, and @arthurbacci asked me to open an issue to talk specifically about these questions.

First: it will shamelessly break when the path is informed with a trailing slash.
image

Second: as I said in #27, it will probably break if used in a dircp(1)-ish way (or, effectively, in some specific pipelines) with this error.
In this example, with a xz-compressed tarball:
image
Using it in a dircp-ish way:
image

Third: Well, it won't support any file larger than 8GB. Working around that would be a really big challenge if a guy called Jörg Schilling haven't described why it only supports 8GB and what could we implement if we want to store files larger than 8GB at star(1) manual page. Apparently this tar implements just the "ustar" standard.

Fourth: It will go full batsh?t printing "zstd: /*stdin*\: unsupported format" and then
"zstd: /*stdin*\: unexpected end of file" if it can not identify which is the file type.
This was broken when we implemented zstd support and "accidentally" broke the error switch amid the process of doing it.
image
That may be the simplest to fix.

Jokes apart, I hope you enjoy a blessed and happy Easter and, really, do not worry with these for now --- at least not this Sunday, just Monday --- and be with your families instead.
Just wrote this for now because of a simple formality.
Be well.

Last consideration before "closing the opening" of this new issue:
"But I want to use Heirloom and I do not have a tar implementation, what should I do?"
I would recommend to use star, which is used by Copacabana Linux as the default /bin/tar and is being actively maintained at Codeberg or to use bsdtar.

Although this team is hardworking, I highly doubt that an UNIX v7-derived implementation of tar, even with all the bells and whistles implemented both by Ritter along with us, will soon match the trustworthiness of Schily's tar, bsdtar or even GNU tar for "heavier" operations often done nowadays.
To ratify my hopeful spirit, I must say that maybe in some years of work, or even in a separate branch of development, but not for this very next release.

If you're using tar in a script and Heirloom tar is currently breaking it, you can try to workaround it by writing a function that searches for a suitable implementation of tar to be used. Copacabana's build system has an example of how it could be done.

@takusuman
Copy link
Member Author

Take-a-Fifth one Ha, get it?: It breaks with longer file names and it doesn't print user names correctly.
image

@takusuman takusuman added the help wanted Extra attention is needed label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant