From 02b56be86f73965eab3a890cfe04869f6150c2f1 Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Tue, 21 Apr 2026 02:18:33 +0800 Subject: [PATCH 01/10] non: sync ruri update --- src/ruri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruri b/src/ruri index e612c43..06584f1 160000 --- a/src/ruri +++ b/src/ruri @@ -1 +1 @@ -Subproject commit e612c43dba5caee3832283fa3ea448b10f92538c +Subproject commit 06584f12dee3b0947cded7db27983cb7922a2a07 From b4ea576c3fc1af2e3f438bcff2fb5ad81794142d Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Tue, 21 Apr 2026 02:49:28 +0800 Subject: [PATCH 02/10] non: sync ruri update --- src/ruri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruri b/src/ruri index 06584f1..801f069 160000 --- a/src/ruri +++ b/src/ruri @@ -1 +1 @@ -Subproject commit 06584f12dee3b0947cded7db27983cb7922a2a07 +Subproject commit 801f0698ff36d151df46b631146f115e45c2a9c0 From e26aab61ac7fc2e457dd9453580da24426073ed9 Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Tue, 21 Apr 2026 23:01:01 +0800 Subject: [PATCH 03/10] non: sync ruri update --- src/ruri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruri b/src/ruri index 801f069..696f030 160000 --- a/src/ruri +++ b/src/ruri @@ -1 +1 @@ -Subproject commit 801f0698ff36d151df46b631146f115e45c2a9c0 +Subproject commit 696f03085e169543416c024dd89343d5c18bec78 From de417b969eed00fb095999cef2587e40bcaa6b19 Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Sat, 25 Apr 2026 18:11:54 +0800 Subject: [PATCH 04/10] non: sync ruri update --- src/ruri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruri b/src/ruri index 696f030..a38fe68 160000 --- a/src/ruri +++ b/src/ruri @@ -1 +1 @@ -Subproject commit 696f03085e169543416c024dd89343d5c18bec78 +Subproject commit a38fe681e2709860417b251e2c472e822037c920 From 3af6b91a546d802844353519cbccf2fab557e5ae Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Sat, 2 May 2026 15:16:12 +0800 Subject: [PATCH 05/10] non: sync ruri update --- src/ruri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruri b/src/ruri index a38fe68..525edca 160000 --- a/src/ruri +++ b/src/ruri @@ -1 +1 @@ -Subproject commit a38fe681e2709860417b251e2c472e822037c920 +Subproject commit 525edcab404839986bde1664d25df35922e1f53d From a1bb06aa11c3c7a05aafc4adbfb2ae0231f4ed10 Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Wed, 13 May 2026 23:13:11 +0800 Subject: [PATCH 06/10] doc: update usage.md --- doc/USAGE.md | 3 +++ src/ruri | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/USAGE.md b/doc/USAGE.md index 4f2230c..6522f02 100644 --- a/doc/USAGE.md +++ b/doc/USAGE.md @@ -1,5 +1,8 @@ # Undocumented part: The `load`, `run`, `sfx` and `netns` subcommand is WIP, it should not be used by users. +# $PATH injection: +rurima will automatically add /path/to/rurima/ to the top of $PATH. +So you can just put required binaries like `tar/curl/jq/file` under the same dir of rurima, or do some wrapper script hacking. # Image source: rurima currently supports both lxc-mirror and dockerhub as container image source. # Unified image puller: diff --git a/src/ruri b/src/ruri index 525edca..5a8627d 160000 --- a/src/ruri +++ b/src/ruri @@ -1 +1 @@ -Subproject commit 525edcab404839986bde1664d25df35922e1f53d +Subproject commit 5a8627d3844e8c070ed1de61acf2c379aac3fee4 From fbed3cccdc29cf5e0db930c74b66e6af93617daf Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Fri, 15 May 2026 01:39:52 +0800 Subject: [PATCH 07/10] non: make deepwiki happy :> --- src/archive.c | 13 ++++++++++--- src/shared.c | 2 +- src/subcommand.c | 7 ++++--- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/archive.c b/src/archive.c index 1fb8c86..8124876 100644 --- a/src/archive.c +++ b/src/archive.c @@ -329,8 +329,15 @@ int rurima_backup_dir(char *_Nonnull file, char *_Nonnull dir) rurima_fork_rexec(rexec_args); if (!du_found()) { rurima_warning("{yellow}du not found, progress will not be shown.\n"); - int exstat = tar_backup__(file, dir); - return exstat; + pid_t pid = fork(); + if (pid > 0) { + int status; + waitpid(pid, &status, 0); + return WEXITSTATUS(status); + } else { + int exstat = tar_backup__(file, dir); + exit(exstat); + } } cprintf("{base}Getting total size to backup\n"); off_t totalsize = rurima_get_dir_file_size(dir); @@ -351,7 +358,7 @@ int rurima_backup_dir(char *_Nonnull file, char *_Nonnull dir) usleep(100); } show_progress(1.0); - return status; + return WEXITSTATUS(status); } else { int exstat = tar_backup__(file, dir); exit(exstat); diff --git a/src/shared.c b/src/shared.c index 606b03c..33cfa8f 100644 --- a/src/shared.c +++ b/src/shared.c @@ -49,10 +49,10 @@ void end_loading_animation(void) { if (loading_animation_pid > 0) { kill(loading_animation_pid, SIGINT); - loading_animation_pid = 0; } waitpid(loading_animation_pid, NULL, 0); fflush(stdout); + loading_animation_pid = 0; } void loading_animation(char *msg) { diff --git a/src/subcommand.c b/src/subcommand.c index 12be14d..e6c660d 100644 --- a/src/subcommand.c +++ b/src/subcommand.c @@ -55,6 +55,7 @@ static void docker_pull_try_mirrors(const char *_Nonnull image, const char *_Non rexec_argv[0] = NULL; for (int i = 0; try_mirrorlist[i] != NULL; i++) { cprintf("{base}Trying mirror: {cyan}%s\n", try_mirrorlist[i]); + rexec_argv[0] = NULL; rurima_add_argv(&rexec_argv, "docker"); rurima_add_argv(&rexec_argv, "pull"); rurima_add_argv(&rexec_argv, "-i"); @@ -812,14 +813,14 @@ void rurima_load_rootfs(int argc, char **argv) char manifest_path[PATH_MAX]; sprintf(manifest_path, "%s/manifest.json", tmp_dir); FILE *manifest_file = fopen(manifest_path, "r"); + if (!manifest_file) { + rurima_error("{red}Failed to open manifest.json!\n"); + } struct stat st; if (fstat(fileno(manifest_file), &st) != 0) { rurima_error("{red}Failed to stat manifest.json!\n"); } char *manifest_content = malloc(st.st_size + 1); - if (!manifest_file) { - rurima_error("{red}Failed to open manifest.json!\n"); - } fread(manifest_content, 1, st.st_size, manifest_file); manifest_content[st.st_size] = 0; fclose(manifest_file); From fc53e726fc02b134ab5265d547b138813de00e87 Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Sun, 17 May 2026 17:29:57 +0800 Subject: [PATCH 08/10] non: sync ruri update --- build.c | 1 + src/info.c | 2 +- src/ruri | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.c b/build.c index a9db330..795f907 100644 --- a/build.c +++ b/build.c @@ -837,6 +837,7 @@ int main(int argc, char **argv) check_and_add_lib("-lpthread", false); build(); remove_test_dot_c(); + printf("\n\nThis program has Super Neko Powers! >w<\n") return 0; } diff --git a/src/info.c b/src/info.c index d1fbadc..8032b08 100644 --- a/src/info.c +++ b/src/info.c @@ -62,7 +62,7 @@ void rurima_show_version_info(void) cprintf("{base}%s%s\n", "Build date ......................: ", __TIMESTAMP__); cprintf("{base}\nThere is NO WARRANTY, to the extent permitted by law\n"); cprintf("{base}Docker is a registered trademark of Docker, Inc\nThis program has no relationship with it\n"); - cprintf("{base}\nThis program has Super Neko Powers!!!\n"); + cprintf("{base}\nThis program has Super Neko Powers! >w<\n"); cprintf("{clear}\n"); } // For `rurima -V`. diff --git a/src/ruri b/src/ruri index 5a8627d..53352f9 160000 --- a/src/ruri +++ b/src/ruri @@ -1 +1 @@ -Subproject commit 5a8627d3844e8c070ed1de61acf2c379aac3fee4 +Subproject commit 53352f9bed7503e947d298446e4f17969cbd50cc From de4cc0267d61297667a36f1311cfb48ee47a0d85 Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Sun, 17 May 2026 17:52:58 +0800 Subject: [PATCH 09/10] non: forgot the semicolon, QwQ? --- build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.c b/build.c index 795f907..88cfb9b 100644 --- a/build.c +++ b/build.c @@ -837,7 +837,7 @@ int main(int argc, char **argv) check_and_add_lib("-lpthread", false); build(); remove_test_dot_c(); - printf("\n\nThis program has Super Neko Powers! >w<\n") + printf("\n\nThis program has Super Neko Powers! >w<\n"); return 0; } From 93f31c25ad3c2cd1357c996c66c92cc148169629 Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Tue, 19 May 2026 17:41:46 +0800 Subject: [PATCH 10/10] non: sync ruri update --- src/ruri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruri b/src/ruri index 53352f9..1e481fe 160000 --- a/src/ruri +++ b/src/ruri @@ -1 +1 @@ -Subproject commit 53352f9bed7503e947d298446e4f17969cbd50cc +Subproject commit 1e481fe6e3a607f65412a8bf82e54d26dc176be0