| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
tool_wrapper: move config from ~/.config/epkg to ~/.epkg/config Problem/Purpose: - Tool config at ~/.config/epkg/tool required separate virtiofs mount - ~/.epkg is already mounted in VM guest, so config under it needs no extra mount Solution: 1. Change config path from ~/.config/epkg/tool to ~/.epkg/config/tool 2. Update all wrapper scripts to use new path with EPKG_HOME support 3. Remove separate tool_config mount in libkrun/core.rs 4. Update docs and comments for new path Benefits: - Eliminates one virtiofs mount (virtiofs has limited device slots) - Config is under home_epkg which is already mounted - Simpler code, no special handling needed Files changed: - src/tool_wrapper.rs: get_tool_config_dir() path change - assets/tool/wrappers/*: config path + EPKG_HOME fallback - src/libkrun/core.rs: remove tool_config mount code - docs: update path references - src/models.rs, src/run.rs, CHANGELOG.md: comment updates Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
英文文档回稿 | 2 个月前 | |
Move doc/* to docs/* Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 7 个月前 | |
vm: unify lifecycle management with vm_keep_timeout and remove reuse_vm/vm_reuse_connect ## Problem/Purpose The reuse_vm and vm_reuse_connect flags had confusing semantics that made the code hard to understand and maintain. VM lifecycle control was scattered across multiple flags and conditional checks. ## Background/Context Session file is the cross-process coordination mechanism. When a VM session exists, it MUST be reused ("能reuse就必须reuse"). The VM lifecycle is independent from epkg run lifecycle (VM lifecycle >= epkg run). ## Solution Unified VM lifecycle control through vm_keep_timeout (Option<u32>): - None: VM shuts down immediately after command completes - Some(0): VM never times out (persistent) - Some(N) > 0: VM shuts down after N seconds idle Key changes: 1. Changed VmConfig.timeout from u32 to Option<u32> 2. Removed reuse_vm and vm_reuse_connect fields from RunOptions 3. Removed --reuse CLI flag (reuse is now always attempted) 4. Made session file registration UNCONDITIONAL for cross-process discovery 5. Guest daemon decides lifecycle based solely on vm_keep_timeout_secs 6. Removed unused functions: is_vm_reuse_active_for_env, send_command_to_running_qemu_guest ## Usage - epkg run --isolate=vm /bin/ls: VM shuts down immediately (timeout=None) - epkg run --isolate=vm --vm-keep-timeout=30 /bin/ls: VM idle 30s then shutdown - epkg vm start --set timeout=60: VM persistent for 60s idle timeout - epkg vm start --set timeout=0: VM never shuts down until manual stop - Concurrent epkg run automatically discovers and reuses existing session Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
docs: add buffer size performance test data to PERFORMANCE_ANALYSIS.md Recorded detailed test results for future reference: - 50MB file read tests: 1MB, 2MB, 4MB buffer sizes - whoami command tests showing no buffer size impact - Analysis of performance variability root causes Test date: 2026-04-21 on Windows WHPX Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
refactor: decouple environment location from visibility concept This commit refactors the environment directory layout to separate location decisions from visibility/permission controls, simplifying the overall design and improving security. Key Changes: 1. Decouple EnvConfig.public from location: - EnvConfig.public now only controls visibility/permission bits (700 for private) - Environment location is purely determined by InitOptions.shared_store - Private envs: $HOME/.epkg/envs/$env_name (when !shared_store) - Public envs: /opt/epkg/envs/$USER/$env_name (when shared_store) 2. Simplify directory management: - Remove EPKGDirs private_envs and public_envs members - Add user_envs (location depends on shared_store) - Add user_aur_builds (location depends on shared_store) - Remove get_home_epkg_path() and get_xdg_cache() helpers - Simplify build_dirs() to only take options parameter 3. Improve security for setuid execution: - Add security checks in get_home() and get_username() for setuid contexts - Validate environment variables against effective UID - Add utils::is_suid() and get_*_from_euid() helpers 4. Update deinitialization: - Let collect_user_personal_plan() handle shared_store/!shared_store cases - Simplify collect_global_deinit_plan() to only handle /opt/epkg/ - Update deinit_epkg() to always include shell RC cleanup 5. Update garbage collection: - Simplify collect_in_use_resources() using walk_environments() - Add collect_old_aur_build_dirs() for stale AUR build cleanup - Reuse walk_bottom_dir() helper across collection functions 6. Environment listing improvements: - Change get_all_env_names() to return (env_name, is_public) tuples - For shared_store envs owned by other users, prefix with "$owner/" - List user's own environments first, then others - Remove Owner column from list_environments() output 7. Path handling improvements: - Update cache path "channel" to "channels" - Change get_repo_dir() to return PathBuf directly (no Result) 8. Code cleanup: - Remove get_all_users() - Remove EPKGDirsBuilder Benefits: - Clearer separation of concerns: location vs. visibility - All disk-intensive operations isolated in either /opt/epkg/ or $HOME - Centralized disk layout making hardlink/reflinks more possible - Root can install global shared epkg while users can have private installs - Better security for setuid execution - Simplified codebase with less duplication Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 7 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 2 个月前 | ||
| 7 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 7 个月前 |