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

Function tryTarWithGzip (carvel-vendir/pkg/vendir/fetch/archive.go) loses link/symlink/mode/UID/GID/etc. in extracting .tar and .tar.gz files #174

Open
yeahdongcn opened this issue Jul 18, 2022 · 2 comments
Labels
bug This issue describes a defect or unexpected behavior carvel-accepted This issue should be considered for future work and that the triage process has been completed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@yeahdongcn
Copy link

yeahdongcn commented Jul 18, 2022

What steps did you take:
[A clear and concise description steps that can be used to reproduce the problem.]
Fetch a tar file through HTTP through DirectoryContents config, everything works as expected except the extracted file contents are different from tar xvf <<path-to-tar-file>>.

What happened:
[A small description of the issue]
.tar or .tar.gz file are extracted but the content is different than tar xvf <<path-to-tar-file>>.

What did you expect:
[A description of what was expected]
.tar or .tar.gz file are extracted and the content is the same as tar xvf <<path-to-tar-file>>.

Anything else you would like to add:
[Additional information that will assist in solving the issue.]

Environment:

  • vendir version (execute vendir --version):
    Head of develop branch.
  • OS (e.g. from /etc/os-release):
❯ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@yeahdongcn yeahdongcn added bug This issue describes a defect or unexpected behavior carvel-triage This issue has not yet been reviewed for validity labels Jul 18, 2022
@yeahdongcn
Copy link
Author

Just checked the implementation, tryTarWithGzip only handles tar.TypeReg.

@yeahdongcn yeahdongcn changed the title Function tryTarWithGzip (carvel-vendir/pkg/vendir/fetch/archive.go) loses link/symlink/UID/GID/etc. in extracting .tar and .tar.gz files Function tryTarWithGzip (carvel-vendir/pkg/vendir/fetch/archive.go) loses link/symlink/mode/UID/GID/etc. in extracting .tar and .tar.gz files Jul 18, 2022
@cppforlife
Copy link
Contributor

cppforlife commented Jul 26, 2022

@yeahdongcn yeah this was meant to be an implementation that covers majority of use cases and remains simplest. i think we would be open to a PR to enhance it but i would probably ask for an opt-in to enable this feature (as some kind of a configuration option on http section)

@joaopapereira joaopapereira added carvel-accepted This issue should be considered for future work and that the triage process has been completed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed carvel-triage This issue has not yet been reviewed for validity labels Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect or unexpected behavior carvel-accepted This issue should be considered for future work and that the triage process has been completed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
Status: Unprioritized
Development

No branches or pull requests

3 participants