carvel-dev / carvel-dev/vendir

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

Open
#174 2 comments 1 reaction 0 assignees View on GitHub
bug carvel-accepted priority/important-longterm
Dominant language
Go
Stars
399
Forks
73
Avg merge
2h 53m
Merged PRs (30d)
2

Description

**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 <>`.

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

**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 <>`.

**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`):
```bash
❯ 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.

Contributor guide

Open the contributing guide

Research direction

Start in carvel-vendir/pkg/vendir/fetch/archive.go at tryTarWithGzip and inspect how .tar and .tar.gz archives are extracted. Compare its behavior with tar xvf, focusing on links, modes, UID/GID, and other metadata named in the issue. Done means extraction preserves the expected archive contents and metadata for both formats.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.