Error processing tar file(duplicates of file paths not supported)
Metadata
Current evaluation
Fixed in commit c3382fc2 by merging duplicate directory entries caused by /lib resolving to /usr/lib, preventing Docker tar-layer errors.
Resolution: closed resolved
Reason: Commit c3382fc2, “oci: handle duplicate directories because of usrmerge,” resolved the archive collision that caused Docker to reject the layer.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Hi,
Trying to pack a ROCK image for the first time and encountering issues.
I'm trying to pack a Keystone image with the following `rockcraft.yaml`:
```yaml
name: keystone
summary: Openstack Keystone
license: Apache-2.0
description: |
Ubuntu distribution of OpenStack Keystone
version: antelope
base: ubuntu:22.04
platforms:
amd64:
parts:
cloud-archive:
plugin: nil
build-packages:
- ubuntu-cloud-keyring
- software-properties-common
override-pull: |
craftctl default
add-apt-repository cloud-archive:antelope
apt update
keystone:
after: [cloud-archive]
plugin: nil
stage-packages:
- apache2
- keystone
```
When I try to import the generated ROCK image using `skopeo`:
```
skopeo copy --insecure-policy oci-archive:keystone_antelope_amd64.rock docker-daemon:keystone:antelope
Getting image source signatures
Copying blob 677076032cca done
Copying blob 4af93843b91c done
Copying blob 4bfd57fdda04 done
Copying config 05d3bd154c done
Writing manifest to image destination
Storing signatures
```
It's missing from docker registry:
```bash
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest feb5d9fea6a5 17 months ago 13.3kB
```
When uploading to local registry with `skopeo` then downloading with `docker`:
```bash
docker pull localhost:32000/keystone:antelope
antelope: Pulling from keystone
677076032cca: Already exists
4af93843b91c: Extracting [==================================================>] 9.225MB/9.225MB
4bfd57fdda04: Download complete
failed to register layer: Error processing tar file(duplicates of file paths not supported):
```
When following the procedure [here](https://github.com/canonical/rockcraft/issues/194):
```bash
skopeo copy --insecure-policy oci-archive:keystone_antelope_amd64.rock oci:keystone
❯ cd keystone
❯ manifest=$(jq -r '.manifests[].digest' < index.json | cut -d ':' -f 2)
❯ cd blobs/sha256
❯ blob_name=$(jq -r '.layers[1].digest' < $manifest | cut -d ':' -f 2)
❯ tar -tvf $blob_name | awk -F' ' '{print $6}' | sort | uniq -d
usr/lib/x86_64-linux-gnu/
```
How do we handle duplicate paths in generated rocks ?
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed in commit c3382fc2 by merging duplicate directory entries caused by /lib resolving to /usr/lib, preventing Docker tar-layer errors. | |
| stealth/space-bunny-alpha | — | closed resolved | Rockcraft fixed duplicate layer paths caused by Ubuntu usrmerge in commit c3382fc2, allowing generated ROCKs to be registered by Docker without tar-path errors. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed in Rockcraft commit c3382fc2 by handling duplicate directories caused by usrmerge, preventing Docker layer errors when /lib and /usr/lib resolve to the same path. | |
| qwen/qwen3.6-35b-a3b | — | — | Identified as a bug where symlinked /lib to /usr/lib caused duplicate paths, failing Docker imports. Resolved by updating rockcraft to automatically merge directories and resolve symlink conflicts during staging. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed as a bug. Duplicate paths from Ubuntu's /lib symlink break Docker imports. Rockcraft will be updated to merge overlapping directories and resolve conflicts using craft-parts. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed. Acknowledged as a bug where /lib symlinks to /usr/lib caused duplicate tar paths. Maintainer plans to fix rockcraft by merging directories and resolving conflicts via craft-parts. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Fixed a bug where Ubuntu base symlinks caused duplicate paths in ROCK tar layers, failing Docker imports. Resolved by implementing directory merging with conflict detection directly in rockcraft. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.