Description / 问题描述
English: When running any rurima docker subcommand (e.g. docker pull, docker search) on systems where tar is provided by BusyBox, rurima incorrectly reports tar not found! and exits immediately, even though tar is actually present and functional.
中文: 在使用 BusyBox 提供的 tar 的系统上运行任意 rurima docker 子命令(如 docker pull、docker search)时,rurima 会错误地报告 tar not found! 并直接退出,尽管系统上确实存在可用的 tar。
Root Cause / 根本原因
English: In rurima_check_dep() (src/checkdep.c), the existence of tar is detected by running tar --version and checking whether the exit code is 0. However, BusyBox's tar does not recognize the --version option and exits with a non-zero status code, printing only a usage message to stderr. The detection function rurima_fork_execvp_get_stdout() treats any non-zero exit code as failure and returns NULL, causing rurima to incorrectly conclude that tar is missing.
The same potential issue exists for other tools (curl, file, gzip, xz) if their BusyBox variants are used.
中文: rurima_check_dep()(src/checkdep.c)中通过执行 tar --version 并判断 exit code 是否为 0 来检测 tar 是否存在。然而 BusyBox 的 tar 不支持 --version 参数,会以非零状态码退出,并只向 stderr 输出用法说明。检测函数 rurima_fork_execvp_get_stdout() 将任何非零 exit code 视为失败并返回 NULL,导致 rurima 错误地认为 tar 不存在。
同样的问题在其他工具(curl、file、gzip、xz)使用 BusyBox 变体时也可能发生。
Description / 问题描述
English: When running any rurima docker subcommand (e.g. docker pull, docker search) on systems where tar is provided by BusyBox, rurima incorrectly reports tar not found! and exits immediately, even though tar is actually present and functional.
中文: 在使用 BusyBox 提供的 tar 的系统上运行任意 rurima docker 子命令(如 docker pull、docker search)时,rurima 会错误地报告 tar not found! 并直接退出,尽管系统上确实存在可用的 tar。
Root Cause / 根本原因
English: In rurima_check_dep() (src/checkdep.c), the existence of tar is detected by running tar --version and checking whether the exit code is 0. However, BusyBox's tar does not recognize the --version option and exits with a non-zero status code, printing only a usage message to stderr. The detection function rurima_fork_execvp_get_stdout() treats any non-zero exit code as failure and returns NULL, causing rurima to incorrectly conclude that tar is missing.
The same potential issue exists for other tools (curl, file, gzip, xz) if their BusyBox variants are used.
中文: rurima_check_dep()(src/checkdep.c)中通过执行 tar --version 并判断 exit code 是否为 0 来检测 tar 是否存在。然而 BusyBox 的 tar 不支持 --version 参数,会以非零状态码退出,并只向 stderr 输出用法说明。检测函数 rurima_fork_execvp_get_stdout() 将任何非零 exit code 视为失败并返回 NULL,导致 rurima 错误地认为 tar 不存在。
同样的问题在其他工具(curl、file、gzip、xz)使用 BusyBox 变体时也可能发生。