-
Notifications
You must be signed in to change notification settings - Fork 2
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: add support for long link names #2
Conversation
Before this commit, if a hard link with name length more than 100 chars, the original name will be truncated to 100 chars. This commit will help to support long link names files unpacking. Signed-off-by: Xynnn007 <[email protected]>
Cool, thanks a lot @Xynnn007 , looks good to me! |
Hi @pmores Do you have any plan to get this fix into another release? |
@Xynnn007 I'm not a project member and don't have commit rights. I just did a review. |
Hi @azenla, do you have any update on this PR? |
Hi! I will review this in the next day! Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I think this fix may be incomplete, because I can still reproduce what I believe to be the original issue that sent @Xynnn007 here (confidential-containers/guest-components#689). Preparing a pax tarball with long hard link namestouch 81ea4731d7e16961875695d35cc1b6fdcbcbb9f102fa532679c01d8698a7cca89f509a0803246b9cd6337d83cc92d70554b2fc82ec28e4ef52f924a2.1
ln 81ea4731d7e16961875695d35cc1b6fdcbcbb9f102fa532679c01d8698a7cca89f509a0803246b9cd6337d83cc92d70554b2fc82ec28e4ef52f924a2.1 81ea4731d7e16961875695d35cc1b6fdcbcbb9f102fa532679c01d8698a7cca89f509a0803246b9cd6337d83cc92d70554b2fc82ec28e4ef52f924a2.2
tar --format pax -cf /tmp/pax.tar 81ea4731d7e16961875695d35cc1b6fdcbcbb9f102fa532679c01d8698a7cca89f509a0803246b9cd6337d83cc92d70554b2fc82ec28e4ef52f924a2* Inspecting with the
|
let mut ef = EntryFields::from(entry); | |
let val = ready_err!(Pin::new(&mut ef).poll_read_all(cx)); | |
self.pax_extensions = Some(val); |
Iiuc the pax_extensions
field should be assigned the next polled val, but the poll returns early in my little test program, so the next entry is handled with the pax_extensions
still None
.
@burgerdev Yes. I can reproduce the behavior. You are right that ready_err!(Pin::new(&mut ef).poll_read_all(cx)); would return a |
Commits astral-sh/tokio-tar@a393710 and astral-sh/tokio-tar@b002e0a will solve this and I test locally. Coincidently that comes from another fork of this repository and which includes some more commits. As a downstream user, we still try our best to hope that the upstream is an active warehouse. With this in mind, one choice for us might be to consider using the fork -- if no more time is had to focus on maintaining this repository from @azenla @pmores |
Before this commit, if a hard link with name length more than 100 chars, the original name will be truncated to 100 chars. This commit will help to support long link names files unpacking.