From 84ffe20f082f4d7f882fa55130d5d4f40cd5aa2b Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Sun, 5 Apr 2026 23:21:05 +0800 Subject: [PATCH 1/4] non: update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index db65f84..62512e3 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,10 @@ ![](https://img.shields.io/badge/Powered%20By-GNU%20C-00d000?style=flat&labelColor=gray&logo=C) +> [!WARNING] +> Most of the code is generated by human, maybe even neko. +> If you found any issues, rewrite it with Claude. + # WARNING: ``` * Your warranty is void. From 647cba5c5bfa9b787f27c63d0b04df7da71bb329 Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Sun, 5 Apr 2026 23:27:53 +0800 Subject: [PATCH 2/4] fix: force enable fallback mode for ghcr.io --- README.md | 1 + src/subcommand.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 62512e3..3408020 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ And, don't forget to `rurima ota` to get the latest build! # What's new: - We have a unified `pull` command to get images from dockerhub or LXC mirror now. - Some other OCI compatible registry like ghcr.io could work with `-f/--fallback` option enabled now. +- We will automatically force enable fallback mode for ghcr.io now. # Backward compatibility: We promise that rurima has backward compatibility of documented parts since v0.9.x, all unstable parts will be explicitly marked as WIP or unstable, and ruri has already been backward compatible. Users can always keep `rurima ota` to get the latest build. For any issue, please notify us, and we will fix it ASAP. diff --git a/src/subcommand.c b/src/subcommand.c index c05de96..8a90f62 100644 --- a/src/subcommand.c +++ b/src/subcommand.c @@ -233,6 +233,11 @@ void rurima_docker(int argc, char **_Nonnull argv) rurima_warning("{yellow}You use it as your own risk.\n") } } + // For ghcr.io, we enable fallback mode by default. + if (strncmp(mirror, "ghcr.io", 7) == 0) { + rurima_warning("{yellow}ghcr.io detected, enabling fallback mode by default for compatibility.\n"); + fallback = true; + } if (strcmp(argv[0], "search") == 0) { if (image == NULL) { rurima_error("{red}No image specified!\n"); From c5a5f66deadec214183bb19e1b4a3a5309dacb21 Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Sun, 5 Apr 2026 23:43:06 +0800 Subject: [PATCH 3/4] feat: load docker image from tarball --- doc/USAGE.md | 1 + src/main.c | 4 ---- src/subcommand.c | 6 ++++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/USAGE.md b/doc/USAGE.md index 0aec268..4f2230c 100644 --- a/doc/USAGE.md +++ b/doc/USAGE.md @@ -69,6 +69,7 @@ Subcommands: search: Search images from DockerHub. tag: Search tags from DockerHub. pull: Pull image from DockerHub. + load: Load rootfs from tarball. config: Get config of image from DockerHub. arch: Search architecture of image from DockerHub. help: Show help message. diff --git a/src/main.c b/src/main.c index 957b70e..1f60123 100644 --- a/src/main.c +++ b/src/main.c @@ -298,10 +298,6 @@ int main(int argc, char **argv) rurima_netns_wrapper(argc - i - 1, &argv[i + 1]); return 0; } - if (strcmp(argv[i], "load") == 0) { - rurima_load_rootfs(argc - i - 1, &argv[i + 1]); - return 0; - } if (strcmp(argv[i], "QwQ") == 0) { rurima_QwQ(); return 0; diff --git a/src/subcommand.c b/src/subcommand.c index 8a90f62..12be14d 100644 --- a/src/subcommand.c +++ b/src/subcommand.c @@ -121,6 +121,11 @@ static void docker_pull_try_mirrors(const char *_Nonnull image, const char *_Non */ void rurima_docker(int argc, char **_Nonnull argv) { + // rurima docker load + if (argc > 0 && (strcmp(argv[0], "load") == 0)) { + rurima_load_rootfs(argc - 1, &argv[1]); + return; + } if (!rurima_jq_exists()) { rurima_error("{red}jq is not installed!\n"); } @@ -332,6 +337,7 @@ void rurima_docker(int argc, char **_Nonnull argv) cprintf("{base} search: Search images from DockerHub.\n"); cprintf("{base} tag: Search tags from DockerHub.\n"); cprintf("{base} pull: Pull image from DockerHub.\n"); + cprintf("{base} load: Load rootfs from tarball.\n"); cprintf("{base} config: Get config of image from DockerHub.\n"); cprintf("{base} arch: Search architecture of image from DockerHub.\n"); cprintf("{base} help: Show help message.\n"); From bc5ba8e993afbbbaaafa718a4b365e57b38c143d Mon Sep 17 00:00:00 2001 From: Moe-hacker Date: Thu, 9 Apr 2026 17:29:53 +0800 Subject: [PATCH 4/4] non: sync ruri update --- src/ruri | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruri b/src/ruri index 3746bbd..e612c43 160000 --- a/src/ruri +++ b/src/ruri @@ -1 +1 @@ -Subproject commit 3746bbd27458e9d800d79b9f1fe726e9cb3277eb +Subproject commit e612c43dba5caee3832283fa3ea448b10f92538c