[PR #288] [MERGED] fix(tools-image): bootstrap required paths for minimal images #318

Closed
opened 2026-10-29 14:22:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/288
Author: @zlzGithub-0801
Created: 9/14/2026
Status: ✅ Merged
Merged: 9/15/2026
Merged by: @yingdi-shan

Base: main ← Head: fix/pivot-init-minimal-image-bootstrap


📝 Commits (1)

  • 05533c0 fix(tools-image): bootstrap required paths for minimal images

📊 Changes

1 file changed (+14 additions, -0 deletions)

View changed files

📝 tools-image/pivot-init (+14 -0)

📄 Description

What

Bootstrap required paths and the root user entry in pivot-init for minimal guest images.

Why

Some minimal images lack /usr/local/bin or /etc/passwd, causing envd setup or commands that resolve the root user to fail.

N/A.

Scope and non-goals

Only initializes missing guest filesystem entries. It does not modify existing /etc/passwd files or other user accounts.

Design and behavior changes

pivot-init now:

  • Creates /usr/local/bin before linking envd.
  • Creates /etc/passwd with a root entry when the file is absent.
  • Uses /bin/bash as root’s shell when available, otherwise /bin/sh.

Compatibility and operations

  • Public API or generated protocol: N/A.
  • Configuration or defaults: N/A.
  • Snapshot manifest, artifact layout, or storage format: N/A.
  • Upgrade and rollback: Revert the commit to restore previous behavior.
  • Host requirements, permissions, ports, or dependencies: N/A.

Validation

  • make fmt
  • make clippy
  • make test-unit
  • Relevant Rust integration tests
  • make -C services test (required when services/ changes)
  • Generated clients/server regenerated with the documented make target
  • Documentation updated
  • Benchmarks or performance comparison completed

Risks and reviewer notes

The fallback root entry is created only when /etc/passwd is absent, so existing image account configuration remains unchanged.

Checklist

  • The PR contains one coherent change and no unrelated formatting or refactoring.
  • New behavior is covered by tests, or I explained why testing is impractical.
  • Logs and examples contain no credentials, tokens, or private registry information.
  • I did not manually edit generated code without updating its source and regenerating it.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/288 **Author:** [@zlzGithub-0801](https://github.com/zlzGithub-0801) **Created:** 9/14/2026 **Status:** ✅ Merged **Merged:** 9/15/2026 **Merged by:** [@yingdi-shan](https://github.com/yingdi-shan) **Base:** `main` ← **Head:** `fix/pivot-init-minimal-image-bootstrap` --- ### 📝 Commits (1) - [`05533c0`](https://github.com/kvcache-ai/AgentENV/commit/05533c007729f5ce75d59d1735434ef53e1de9ab) fix(tools-image): bootstrap required paths for minimal images ### 📊 Changes **1 file changed** (+14 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tools-image/pivot-init` (+14 -0) </details> ### 📄 Description ## What Bootstrap required paths and the root user entry in `pivot-init` for minimal guest images. ## Why Some minimal images lack `/usr/local/bin` or `/etc/passwd`, causing envd setup or commands that resolve the root user to fail. ## Related issue N/A. ## Scope and non-goals Only initializes missing guest filesystem entries. It does not modify existing `/etc/passwd` files or other user accounts. ## Design and behavior changes `pivot-init` now: - Creates `/usr/local/bin` before linking `envd`. - Creates `/etc/passwd` with a root entry when the file is absent. - Uses `/bin/bash` as root’s shell when available, otherwise `/bin/sh`. ## Compatibility and operations - Public API or generated protocol: N/A. - Configuration or defaults: N/A. - Snapshot manifest, artifact layout, or storage format: N/A. - Upgrade and rollback: Revert the commit to restore previous behavior. - Host requirements, permissions, ports, or dependencies: N/A. ## Validation - [x] `make fmt` - [x] `make clippy` - [x] `make test-unit` - [x] Relevant Rust integration tests - [ ] `make -C services test` (required when `services/` changes) - [ ] Generated clients/server regenerated with the documented `make` target - [ ] Documentation updated - [ ] Benchmarks or performance comparison completed ## Risks and reviewer notes The fallback root entry is created only when `/etc/passwd` is absent, so existing image account configuration remains unchanged. ## Checklist - [x] The PR contains one coherent change and no unrelated formatting or refactoring. - [x] New behavior is covered by tests, or I explained why testing is impractical. - [x] Logs and examples contain no credentials, tokens, or private registry information. - [x] I did not manually edit generated code without updating its source and regenerating it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:22:10 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#318
No description provided.