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

オープン
#344 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go
領域
cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Go
スター
434
フォーク
74
平均マージ
1日 30分
マージ済み PR(30日)
1

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

canonical/chisel のほかの issue

canonical/chisel の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。