Ensure proper /proc, /sys and /dev contents in build-slices chroot
Metadata
Current evaluation
Build-slices chroot lacks /proc, /sys, and /dev because mountpoints are absent; needs manual directory creation and test verification. Code already creates the dirs via _prepare_build_slices_root, but tests do not yet verify contents.
Suggested action: keep open
Reason: The issue is labeled Status: Triaged and authored by a maintainer. Current code already creates /dev, /proc, and /sys mountpoints in _prepare_build_slices_root (commit 07a32ae8), but the integration tests do not yet verify their contents, so the test portion remains open.
Evaluated by: mr-cal-bot
Impact:
65
Quick Win:
41
Complexity:
25
Confidence:
75
Actionability:
85
Issue body
### What needs to get done
The chroot setup code (bind) mounts the special directories /proc, /sys and /dev. However, the mount is skipped if the mountpoints (the empty dirs) don't exist in the target. This is the case for the build-slices currently; no slice provides those directories so the build-slices root always lacks those.
We should create those dirs manually and verify (in tests) that their contents are correct during the build of parts using build-slices.
### Why it needs to get done
Many basic things don't work otherwise. The example that triggered this bugreport is that pytest needs `/dev/null` to exist.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| ~deepseek/deepseek-pro-latest |
Impact:
65
Quick Win:
41
Complexity:
25
Confidence:
75
Actionability:
85
|
keep open | Build-slices chroot lacks /proc, /sys, and /dev because mountpoints are absent; needs manual directory creation and test verification. Code already creates the dirs via _prepare_build_slices_root, but tests do not yet verify contents. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Related To:
craft-parts#1724
(confidence 90%)
Introduced build-slices chroot execution and _prepare_build_slices_root, which creates the /dev, /proc, and /sys mountpoints.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1770 test: check special directories in build-slices test | craft-parts | open | Adds integration test checks for /dev, /proc, and /sys mount points in build-slices. Approved by 2 reviewers with 1 unresolved comment; CI has unrelated failures. |