Skip to content

error: slice base-passwd_data: invalid content path: /usr/share/base-passwd/group.master #221

@polarathene

Description

@polarathene
$ chisel cut --release ubuntu-24.04 --root / base-passwd_data
25.34 error: slice base-passwd_data: invalid content path: /usr/share/base-passwd/group.master

https://github.com/canonical/chisel-releases/blob/fb99e66e3127c73b40e4269f475d292e119414e2/slices/base-passwd.yaml#L11

FROM alpine AS get-chisel
ARG CHISEL_VERSION=1.1.0
ARG TARGETARCH
ARG CHISEL_RELEASE="https://github.com/canonical/chisel/releases/download/v${CHISEL_VERSION}/chisel_v${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz"
# NOTE: `--no-same-owner` used as `chisel` release has ownership of `1001:128`
RUN wget -qO - "${CHISEL_RELEASE}" | tar -xz --no-same-owner -C /usr/local/bin chisel


FROM scratch AS chisel
# Copy over chisel binary and it's external dependency to `ca-certificates.crt`:
COPY --link --from=get-chisel /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --link --from=get-chisel /usr/local/bin/chisel /usr/local/bin/chisel
# Provision bash and make it the default shell for `RUN`:
RUN   [ "/usr/local/bin/chisel", "cut", "--release", "ubuntu-24.04", "--root", "/", "base-files_base", "bash_bins" ]
SHELL [ "/bin/bash", "-c" ]
# This fails:
RUN chisel cut --release ubuntu-24.04 --root / base-passwd_data

If the last line is replaced with the following, it would work:

WORKDIR /root-fs
RUN chisel cut --release ubuntu-24.04 --root /root-fs base-passwd_data

I'm not sure if other slices would be similarly affected by this failure for --root /, it is unclear why the slice only fails with --root /? It doesn't seem to be about any conflict with existing directories AFAIK, I have run chisel from a different path than /usr/local/bin/chisel (such as /chisel instead) but it still fails with this error.

NOTE: This same error for the affected slice was reported in June 2022 but was related to a relative --root (using --root ./ or --root . for relative path does not help however).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions