| LICENSES: add BSD-2-Clause for homebrew code Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 |
| 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 个月前 |
| install.sh: fix jq parse error by using printf instead of echo Root Cause: - Shell 'echo' interprets \r\n escape sequences in the JSON response - When the response contains "\r\n" (literal backslash-r-backslash-n), echo converts them to actual control characters CR and LF - jq then fails with: "control characters from U+0000 through U+001F must be escaped" Solution: - Use 'printf "%s"' instead of 'echo' to preserve literal characters - printf '%s' does not interpret escape sequences in its argument Fixes: sh bin/install.sh jq: parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 4, column 27 Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 |
| assets: update all references after moving files to assets/ Follow up commit 6a013f62, update all code and docs to use new paths: lib/epkg-rc.sh -> assets/shell/epkg.sh sources/*.yaml -> assets/repos/*.yaml sources/mirrors.json -> assets/mirrors/mirrors.json sources/manual-mirrors.json -> assets/mirrors/manual-mirrors.json sources/cc-timezone.txt -> assets/mirrors/cc-timezone.txt Changes: - src/: update paths in init.rs, location.rs, main.rs, mirror/loading.rs, mirror/url.rs, deb_repo.rs, io.rs, models.rs - scripts/mirror/: update Makefile, common.py, ls_mirrors.py, README.md - build/, bin/, tests/: update shell scripts - docs/: update all path references in en/ and zh/ docs Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 |
| full name in index.json fix bug fix bug change format of index.json fix bug fix bug fix bug | 1 年前 |
| 英文文档回稿 | 2 个月前 |
| build: fix musl cross-compilation for aarch64/riscv64/loongarch64 Problem: - Cross-compiling to musl targets using glibc cross-compilers causes undefined references to fopen64, fseeko64, ftello64, mkstemp64, etc. - mlua-sys builds its own Lua library that references these *64 functions - musl libc doesn't provide these functions (it uses 64-bit file ops by default) - riscv64/loongarch64 builds were producing dynamically linked binaries instead of statically linked ones Solution: 1. Add missing shim functions (fseeko64, ftello64, mkstemp64) to musl_compat.c 2. Add stdlib.h include for mkstemp() declaration 3. Define off64_t type for musl compatibility 4. Fix ar command: use 'ar rs' to append instead of 'ar rcs' which replaces 5. Add add_musl_compat_to_mlua() function to inject shims into mlua-sys's liblua5.4.a after it's built 6. Implement two-pass build for cross-compilation: - First pass builds mlua-sys's Lua - Then add musl_compat.o to the library - Retry if linking failed due to *64 undefined references 7. Add -C target-feature=+crt-static to RUSTFLAGS for all architectures to ensure static CRT linkage Root Cause Analysis: - glibc cross-compiler headers cause *64 function calls even with -D_FILE_OFFSET_BITS=64 -U_LARGEFILE64_SOURCE flags - mlua-sys ignores LUA_LIB/LUA_LIB_NAME and builds its own Lua - Rust's musl targets for riscv64/loongarch64 don't enable crt-static by default Fixes: make release-aarch64 error: undefined reference to 'fopen64' undefined reference to 'fseeko64' undefined reference to 'ftello64' undefined reference to 'mkstemp64' Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 |
| improve epkg-rootfs.sh | 1 年前 |
| scripts: add performance benchmark and analysis scripts Scripts for analyzing epkg VM performance: - benchmark.sh: Simple timing benchmark - benchmark_analyze.sh: Detailed timing breakdown - benchmark_perf.sh: Performance analysis with EPKG_DEBUG_LIBKRUN - analyze_virtiofs.sh: Virtiofs operation analysis Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 |
| main: compile mount_specs only for linux or libkrun Root Cause Analysis The mount_specs module is referenced only from namespace.rs (Linux-only) and libkrun/core.rs (libkrun feature). Cross-target macOS x86_64 builds omit both, so every public function in mount_specs.rs was dead code and rustc emitted dead_code warnings. Solution Gate mod mount_specs with cfg(any(target_os = "linux", feature = "libkrun")) so the crate is built only when a caller exists. Fixes - reproduce: make cross-macos ARCH=x86_64 - warning: function build_vm_mount_policy() is never used (and seven similar dead_code warnings from mount_specs.rs) Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 2 个月前 |
| tests: add automatic update after env creation in dev-projects tests Problem: When running dev-projects tests on Fedora, package installation fails because the environment's package metadata is stale. The cached repodata references old package versions (e.g., java-25-openjdk-25.0.2.0.10-5.fc43) that no longer exist on mirrors, causing 404 errors during download. Solution: 1. Add run_update() function to common.sh for test scripts that need it 2. Call 'epkg update' automatically in create_env() after environment setup to ensure fresh package metadata before any install operations This ensures all subsequent package installs use current repository metadata. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 2 个月前 |
| upload conda and alpine to epkg fix bug fix bug chmod fix bug fix bug fix bug fix bug fix bug fix bug fix bug fix bug fix bug fix bug fix bug fix bug fix bug add testcase.py update testcase use tar -xzf fix fix fix fix unittest.py common function fix bug | 1 年前 |
| ignore vim *~ files Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 |
| CHANGELOG: add v0.2.6 release notes Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 2 个月前 |
| Cargo: bump version to 0.2.6 Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 2 个月前 |
| Cargo: bump version to 0.2.6 Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 2 个月前 |
| add LICENSE and release_notes | 11 个月前 |
| Makefile: document hardlink deployment chain clearly Purpose/Background: The epkg binary is deployed through a hardlink chain to ensure all environments share the same inode, saving disk space and enabling atomic updates. Solution/Documentation: Document the complete deployment chain: - build: target/.../epkg - self: ~/.epkg/envs/self/usr/bin/epkg-linux-x86_64 - envs: ~/.epkg/envs/<env>/usr/bin/{epkg,init} (hardlinks) Update scenarios: - make: make.sh update_all_env_hardlinks() after build - epkg self install --force: init.rs update_all_env_hardlinks() Result: all hardlinked epkg/init files share same inode, updates are atomic across all environments. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 |
| docs: update README to reflect macOS/Windows support and VM isolation modes Problem: README was Linux-centric and lacked several cross-platform and isolation features already implemented. Updates: - Platform: Linux → Linux, macOS, Windows - Package sources: add Homebrew, MSYS2 to multi-distro list - Quick start: add Windows PowerShell install, WSL2 note - Quick start: add --isolate=env|fs|vm examples - Commands table: add VM row (vm start, stop, list, status) - How it works: describe all three isolation modes (env/fs/vm) - Use cases: simplify End users description, remove stale "on the way" note - Features: update binary size (~11MB → ~14MB), update Portable description - Supported distributions: add Homebrew and MSYS2 entries Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 |
| docs: sync README.zh.md with English version, fix code block formatting Updates to README.zh.md (sync with v0.2.4..master changes): - Platform: expand from Linux-only to cross-platform (Linux, macOS, Windows) - Package sources: add Homebrew, MSYS2 to descriptions and lists - Quick start: curl|bash install, add Windows PowerShell section, add --isolate=env|fs|vm run examples, use "alpine" as example env name - Commands table: add VM row - How it works: describe all three isolation modes (env/fs/vm) - Use cases: simplify first user scenario, remove stale "场景 1-3" status line - Features: update binary size (~11MB -> ~14MB), update portable description Also fix missing ```bash opening fence before example commands in both files. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 |
| busybox: move df to LINUX_ONLY applets Problem: epkg busybox df / fails on macOS with "No such file or directory" which is confusing as the path '/' clearly exists. Root Cause: df.rs read_mount_table() reads /proc/mounts (line 248) to get mount table, which only exists on Linux. On macOS, this file doesn't exist, causing the error before df can even check the target path. Solution: Add "df" to LINUX_ONLY list in build.rs, so it's gated with #[cfg(target_os = "linux")] and shows proper "applet not found" message on non-Linux platforms. Fixes: epkg busybox df / Error: No such file or directory (os error 2) Location: src/busybox/df.rs:248 Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 2 个月前 |