Snap-packed Chisel cannot cut without explicit `--release` on Ubuntu 26.10

Abierto
#344 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
cli

Línea de trabajo

Start by tracing the release inference used by chisel cut and compare how /etc/lsb-release and /etc/os-release resolve inside the Snap mount namespace. The linked Snap smoke test for #343 demonstrates the ubuntu-core-22 failure; use the Ubuntu 26.10 repro to verify that cut without --release detects the host release, while preserving the existing behavior described in the issue.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

context

Chisel infers the release from /etc/lsb-release when --release is not passed from the command line.

Ubuntu 26.10's base-files 14.2ubuntu1 removed this file. This breaks automatic release detection on hosts where the file is no longer available.

repro

Observed with the Chisel snap in an LXD VM, which either of the channels:

lxc launch ubuntu:26.10 test-chisel-snap --vm

lxc exec test-chisel-snap -- cat /etc/os-release
lxc exec test-chisel-snap -- dpkg-query -W base-files
lxc exec test-chisel-snap -- test ! -e /etc/lsb-release

lxc exec test-chisel-snap -- snap install chisel

lxc exec test-chisel-snap -- mkdir -p /root/test-root
lxc exec test-chisel-snap -- /snap/bin/chisel cut \
    --root /root/test-root/ bash_bins

expected

Without --release, Chisel should infer the actual host's Ubuntu release, as documented in the command help, without depending on /etc/lsb-release.

Passing an explicit --release bypasses the affected detection code. but breaks the existing UX and may cause regressions (e.g., how rockcraft currently handles the slices in stage-packages).

additional context

Migrating to /etc/os-release needs to account for the Snap's mount namespace.

On Ubuntu, snapd exposes the host's /etc, so /etc/lsb-release previously provided the host's release information. However, /etc/os-release is normally a symlink to ../usr/lib/os-release. Inside the Snap, that target resolves to the base snap's file, which identifies Ubuntu Core rather than the host.

Consequently, reading ID and VERSION_ID from /etc/os-release in the current core22-based snap produces ubuntu-core and 22. The Snap smoke test for #343 demonstrates the resulting failure:

Consulting release repository...
error: no information for ubuntu-core-22 release

A similar situation was discussed in Host's lsb-release but core os-release prior to this regression.

On the other hand, the system-observe interface wouldn't be a good candidate to fix this issue either. The permissions it grants ("... giving privileged read access to all processes on the system") is overly broad.

Lenguaje dominante
Go
Estrellas
434
Forks
74
Merge medio
1 d 30 min
PR fusionados (30 d)
1

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de canonical/chisel

Todos los issues de canonical/chisel

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.