Skip to content

Symlink from /etc/<dir> to /usr/etc/<dir> breaks install to-filesystem #942

Open
@rainest

Description

@rainest

I've installed an RPM that includes a symlink from a path under /etc to a path under /usr/etc. In the container image:

# ls -l /etc/ | grep podman
lrwxrwxrwx 1 root root       21 Nov 12  2023 podman_hpc -> ../usr/etc/podman_hpc

# bootc --version
bootc 1.1.2

Attempting to run bootc install to-filesystem with this image (Containerfile) fails. Using https://github.com/osbuild/bootc-image-builder, the error is:

# podman run --rm -it --privileged --pull=newer --security-opt label=type:unconfined_t -v ./output:/output -v /var/lib/containers/storage:/var/lib/containers/storage quay.io/centos-bootc/bootc-image-builder:latest --local --rootfs ext4 localhost/broken:4
...
ERROR Installing to filesystem: Creating ostree deployment: Pulling: Importing: Parsing layer blob sha256:0c79447a149538e009ebe92da56b5fb54c07de502c82f69683cf8ac5136e6ac9: **
OSTree:ERROR:src/ostree/ot-main.c:324:ostree_run: assertion failed: (success || error): Processing tar: Failed to commit tar: ExitStatus(unix_wait_status(134))
Traceback (most recent call last):
...
subprocess.CalledProcessError: Command '['bootc', 'install', 'to-filesystem', '--source-imgref', 'containers-storage:[overlay@/run/osbuild/containers/storage+/run/containers/storage]4ce67502d3e958860e4c9541e4cd375da6a9833d43df3d6389f8eaf33a22dca4', '--skip-fetch-check', '--generic-image', '--karg', 'rw', '--karg', 'console=tty0', '--karg', 'console=ttyS0', '--target-imgref', 'localhost/broken:4', '/run/osbuild/mounts']' returned non-zero exit status 1.

log.txt is the complete log.

This comes from ostree-ext/src/container/store.rs and ostree-ext/src/tar/write.rs AFAICT.

Building from an image without the link (Containerfile) succeeds.

This looks a bit similar to #637 and #856, but with a symlink rather than a hard link.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/clientRelated to the client/CLIarea/installIssues related to `bootc install`bugSomething isn't workingtriagedThis looks like a valid issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions