← Back to issue list

tarball sources fail if they contain hardlinks

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1606700
Type
issue
State
closed
Author
~mhall119
Labels
eco-team
Created
Updated
Closed

Current evaluation

Hardlink extraction was fixed by snapcore/snapcraft PR #688, commit 9b240efe3, which normalizes tar link targets as well as member names.

Resolution: closed resolved

Reason: Commit 9b240efe3 landed the fix linked in the issue: common path prefixes are stripped from link targets during tar extraction, allowing archives containing hardlinks to unpack correctly.

Evaluated by: mr-cal-bot

No scores available.

Issue body

I'm trying to use an upstream tarball of the Arduino IDE to build a snap package with: parts: upstream: source: https://www.arduino.cc/download.php?f=/arduino-1.6.9-linux64.tar.xz source-type: tar plugin: copy files: '*': './' after: [desktop/gtk2] However it fails while trying to extract the tarball because it can't find the target for a file in the tarball that is a hardlink.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Hardlink extraction was fixed by snapcore/snapcraft PR #688, commit 9b240efe3, which normalizes tar link targets as well as member names.
stealth/space-bunny-alpha — closed resolved Hardlink tar extraction was fixed by canonical/snapcraft#688 (commit 9b240efe3), which strips common prefixes from hardlink targets during tar extraction.
stealth/space-bunny-alpha — closed resolved Hardlink extraction was fixed by PR #688, merged as commit 9b240efe3, which normalized common prefixes in both tar entry names and link targets.
qwen/qwen3.6-35b-a3b — — Closed without resolution. The tarball hardlink extraction failure was abandoned after over ten years of inactivity with no comments or fixes.
qwen/qwen3.6-35b-a3b — — Tarball extraction fails when archives contain hardlinks. The report was closed after over a decade with zero comments, indicating it was abandoned without a fix or resolution.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcore/snapcraft#688 (confidence 100%)

    The linked PR was committed as 9b240efe3 with the title "Strip common path prefixes from linkname as well as name when extracting a tarfile".

Related issues

Issue Project State Summary Similarity
#1573753 sources can't extract tar.xz archive snapcraft (launchpad) open Tar source extraction failed with KeyError on linkname not found; cause was hardlink targets keeping the stripped common prefix. Fixed in snapcraft commit 9b240efe3 (PR #688), logic now lives in craft-parts tar_source.py with hardlink tests.
73%