| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
busybox: use symlink_for_native() for host CLI tools Problem: Busybox applets like cp, ln, tar run on the host system. On Windows, cp.exe/ln.exe should create native Windows symlinks, not virtiofs symlinks (which are only meaningful inside VM). Solution: Change all busybox applets to use symlink_for_native(): - cp.rs: cp -s creates symbolic links - ln.rs: ln -s creates symbolic links - tar.rs: tar extraction creates symlinks - update_alternatives.rs: manages alternative symlinks - systemd_tmpfiles.rs: creates tmpfiles symlinks - deb_systemd_helper.rs: manages systemd unit symlinks - lua/lposix.rs: posix.symlink() Lua binding On Unix, symlink_for_native() is equivalent to symlink(). On Windows, it creates native Windows symlinks (or hardlink/copy fallback). Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
lua: split register_rpm_extensions() and register_env_posix_functions() lrpm: register_rpm_vercmp(), register_rpm_glob(), register_rpm_spawn(). lposix: register_posix_env_var_bindings(), register_posix_passwd_group_bindings(). Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
lua: fix require('posix') and require('rpm') by registering modules in package.preload Problem: RPM Lua scripts from openEuler packages use require('posix') and require('rpm'), but epkg only registered these as global tables. This caused rpmlua errors: module 'posix' not found: no field package.preload['posix'] Root Cause: The require() function in Lua looks for modules in package.preload first. The C++ RPM implementation uses luaL_register() which populates package.preload. In mlua, we were setting module contents as global tables without registering them in package.preload as loader functions. Solution: Modified src/lua/mod.rs to wrap posix and rpm module tables in loader functions and register them in package.preload. The loader functions return the module tables when called, matching the C++ RPM implementation behavior. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 5 个月前 |