Skip to content

use --no-same-owner to fix tar errors#1002

Merged
ipetkov merged 2 commits intoipetkov:masterfrom
kybe236:master
Apr 3, 2026
Merged

use --no-same-owner to fix tar errors#1002
ipetkov merged 2 commits intoipetkov:masterfrom
kybe236:master

Conversation

@kybe236
Copy link
Copy Markdown
Contributor

@kybe236 kybe236 commented Mar 28, 2026

Motivation

Add --no-same-owner to the tar command to fix ownership errors when building crates in Docker.

Without this flag, building a crate with crane can fail with errors like:
cargo-package-pin-utils> tar: .gitignore: Cannot change ownership to uid 460880, gid 5001: Invalid argument

--no-same-owner prevents tar from setting the UID to the tar archive's encoded owner.
After adding this simple flag, it compiles fine

I thought that if it works for me, I might as well make a PR.

Checklist

  • added tests to verify new behavior
  • added an example template or updated an existing one
  • updated docs/API.md (or general documentation) with changes
  • updated CHANGELOG.md

@ipetkov
Copy link
Copy Markdown
Owner

ipetkov commented Apr 3, 2026

Thank you for the contribution! This looks good, ultimately there's no need to respect the owner as specified in the tarball as the Nix store entry will reset that bit of info anyway

@ipetkov ipetkov enabled auto-merge (squash) April 3, 2026 03:20
@ipetkov ipetkov merged commit 9f137cf into ipetkov:master Apr 3, 2026
18 checks passed
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

Successfully merging this pull request may close these issues.

2 participants