← Back to issue list

Bad symlink collisions between overlay and build

View original Github issue

Metadata

Project
craft-parts
Number
#1293
Type
issue
State
closed
Author
tigarmo
Labels
Status: Triaged
Created
Updated
Closed

Current evaluation

Closed without a fix. Escalated to internal ticket CRAFT-4758. The issue remains unresolved, as collision detection incorrectly flags equivalent absolute and relative symlinks between overlays and stage packages.

Suggested action:

No scores available.

Issue body

### Bug Description The new collision handling between overlay and stage is reporting issues on symlinks. In the included example, the path `usr/lib/ssl/cert.pem` is present in both the overlay and the part's install dir, and is a symlink in both cases. However, the overlay symlink points to an absolute path: ``` lrwxrwxrwx 1 root root 34 Feb 5 2025 cert.pem -> /etc/ssl/certs/ca-certificates.crt ``` ... while the file coming from the stage-package is a relative symlink: ``` lrwxrwxrwx 1 root root 42 Sep 10 14:11 cert.pem -> ../../../etc/ssl/certs/ca-certificates.crt ``` It's a relative symlink because of the way craft-parts handles stage-packages, which is correct. However, in this case maybe both files should be considered "the same" since they will ultimately resolve to the same path in the payload (for Rockcraft and Imagecraft at least). As an aside, these absolute symlinks from the overlay are dangerous when they staged, as they now point to the build system (which is wrong) and will give wrong results if a part uses them. That's unrelated to this specific issue, which is only about the bad collision itself. ### To Reproduce Use Rockcraft 1.14 to build the attached part. ### part yaml ```shell parts: my-part: plugin: nil overlay-packages: [openssl] stage-packages: [openssl] ``` ### Relevant log output ```shell Failed to stage: parts list the same file or directory with different contents or permissions. Detailed information: Part 'my-part' and the overlay of part 'my-part' list the following files, but with different contents or permissions: usr/lib/ssl/cert.pem usr/lib/ssl/certs usr/lib/ssl/openssl.cnf usr/lib/ssl/private ```

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.6-35b-a3b Closed without a fix. Escalated to internal ticket CRAFT-4758. The issue remains unresolved, as collision detection incorrectly flags equivalent absolute and relative symlinks between overlays and stage packages.
qwen/qwen3.6-35b-a3b The issue was closed without explicit resolution details. Tracking was forwarded to internal Jira ticket CRAFT-4758, indicating it remains under investigation or was abandoned.
qwen/qwen3.6-35b-a3b Closed without resolution. The overlay and stage-package symlink collision was flagged and synced to internal Jira ticket CRAFT-4758. No fix or merge was implemented in the repository.
qwen3.6-35b-a3b-mtp-q6 Closed and triaged to internal ticket CRAFT-4758. No resolution or fix was provided. The report highlights incorrect collision detection for absolute versus relative symlinks pointing to the same target during overlay and stage-package processing.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1314 fix: do not collide on "similar" symlinks between overlay and install dir craft-parts merged Merged a fix for symlink collisions between overlay and install directories. The author refactored paths_collide for Rockcraft compatibility. All CI checks passed, reviews were approved, and the change resolved issue #1293.
70%