Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

install: --stateroot is silently ignored with --composefs-backend

已关闭
#2,542 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

已经有一个关联 PR 被合并了。

  • #2544 来自 @andrewdunndev —— 已合并

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
rust

调研方向

Start by reading InstallComposefsOpts::validate in crates/lib/src/install.rs and the fixed layout in crates/lib/src/composefs_consts.rs, then trace how bootc_composefs handles installation options. Decide whether composefs should support stateroots or reject --stateroot; done means the option is no longer silently ignored, with behavior covered by an install test.

由索引模型根据 Issue 内容生成。

描述

bootc install to-disk --composefs-backend --stateroot myroot exits 0, but the stateroot name isn't used. The installed disk has state/os/default, and no path on the root partition is named myroot. Without --composefs-backend the deployment lands in ostree/deploy/myroot. The install output doesn't mention the stateroot on either backend.

Reproduced on quay.io/fedora/fedora-bootc:44@sha256:5ab8ee5189bb0f3870279723f5343474df002d8d6f46564702b3ad3ba7382d98 (bootc 1.16.13). In the commands, $IMG is an image built FROM that one, adding only config files for other options.

truncate -s 20G c.raw d.raw
podman run --rm --privileged --pid=host --security-opt label=type:unconfined_t \
  -v /dev:/dev -v /var/lib/containers:/var/lib/containers -v $PWD:/out $IMG \
  bootc install to-disk --via-loopback --filesystem ext4 --generic-image --wipe \
  --composefs-backend --stateroot myroot /out/c.raw
# the same again without --composefs-backend, writing d.raw

With each root partition mounted:

# composefs disk
$ ls state/os
default
$ ls ostree/deploy
ls: cannot access 'ostree/deploy': No such file or directory

# ostree disk
$ ls ostree/deploy
myroot

InstallComposefsOpts::validate checks only the bootloader (install.rs L423-L439), the composefs layout uses a fixed state/os/default/var (composefs_consts.rs L11), and nothing under bootc_composefs reads the stateroot.

I'd expect --stateroot to be rejected with --composefs-backend, the way --bootloader=none is, unless composefs is meant to support stateroots.

Related: #2535

主要语言
Rust
星标
2.3k
派生
230
平均合并
2 天 12 小时
30 天内合并 PR
53

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bootc-dev/bootc 的其他 Issue

查看 bootc-dev/bootc 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。