From a3a81275437ce8ff5dc3c11fa90544605c9c5205 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Mon, 21 Jul 2025 18:54:07 +0800 Subject: [PATCH] Update OS recipes --- src/recipe/os/Alpine-Linux.c | 43 ++++++++++++++++++++--------- src/recipe/os/Gentoo-Linux.c | 42 ++++++++++++++++++++++------- src/recipe/os/OpenWrt.c | 22 +++++++-------- src/recipe/os/YUM/AlmaLinux.c | 36 ++++++++++++++++++------- src/recipe/os/YUM/Anolis-OS.c | 28 +++++++++++++++---- src/recipe/os/YUM/Fedora-Linux.c | 25 +++++++++-------- src/recipe/os/YUM/Rocky-Linux.c | 44 +++++++++++++++++++++--------- src/recipe/os/YUM/openEuler.c | 23 +++++++++------- src/recipe/os/openSUSE.c | 46 +++++++++++++++++++++++--------- 9 files changed, 217 insertions(+), 92 deletions(-) diff --git a/src/recipe/os/Alpine-Linux.c b/src/recipe/os/Alpine-Linux.c index 28d5db3..322b4b8 100644 --- a/src/recipe/os/Alpine-Linux.c +++ b/src/recipe/os/Alpine-Linux.c @@ -5,7 +5,7 @@ * Contributors : Yangmoooo * | * Created On : <2023-09-24> - * Last Modified : <2024-12-18> + * Last Modified : <2025-07-21> * ------------------------------------------------------------*/ static SourceProvider_t os_alpine_upstream = @@ -20,16 +20,16 @@ static SourceProvider_t os_alpine_upstream = */ static Source_t os_alpine_sources[] = { - {&os_alpine_upstream, "http://dl-cdn.alpinelinux.org/alpine"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine"}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine"}, - {&Sustech, "https://mirrors.sustech.edu.cn/alpine"}, - {&Zju, "https://mirrors.zju.edu.cn/alpine"}, - {&Lzuoss, "https://mirror.lzu.edu.cn/alpine"}, - {&Ali, "https://mirrors.aliyun.com/alpine"}, - {&Tencent, "https://mirrors.cloud.tencent.com/alpine"}, - // {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/alpine"}, - {&Huawei, "https://mirrors.huaweicloud.com/alpine"} + {&os_alpine_upstream, "http://dl-cdn.alpinelinux.org/alpine", DelegateToUpstream}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine", DelegateToMirror}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine", DelegateToMirror}, + {&Sustech, "https://mirrors.sustech.edu.cn/alpine", DelegateToMirror}, + {&Zju, "https://mirrors.zju.edu.cn/alpine", DelegateToMirror}, + {&Lzuoss, "https://mirror.lzu.edu.cn/alpine", DelegateToMirror}, + {&Ali, "https://mirrors.aliyun.com/alpine", DelegateToMirror}, + {&Tencent, "https://mirrors.cloud.tencent.com/alpine", DelegateToMirror}, + // {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/alpine", DelegateToMirror}, + {&Huawei, "https://mirrors.huaweicloud.com/alpine", DelegateToMirror} }; def_sources_n(os_alpine); @@ -40,6 +40,7 @@ os_alpine_getsrc (char *option) chsrc_view_file ("/etc/apk/repositories"); } + /** * @consult https://help.mirrors.cernet.edu.cn/alpine/ */ @@ -61,4 +62,22 @@ os_alpine_setsrc (char *option) chsrc_conclude (&source); } -def_target(os_alpine); + +Feature_t +os_alpine_feat (char *option) +{ + Feature_t f = {0}; + + f.can_get = true; + f.can_reset = false; + + f.cap_locally = CanNot; + f.cap_locally_explain = NULL; + f.can_english = true; + f.can_user_define = false; + + f.note = NULL; + return f; +} + +def_target_gsf(os_alpine); diff --git a/src/recipe/os/Gentoo-Linux.c b/src/recipe/os/Gentoo-Linux.c index 7c21c89..88dd285 100644 --- a/src/recipe/os/Gentoo-Linux.c +++ b/src/recipe/os/Gentoo-Linux.c @@ -4,7 +4,7 @@ * File Authors : Heng Guo <2085471348@qq.com> * Contributors : Aoran Zeng * Created On : <2023-09-05> - * Last Modified : <2025-06-20> + * Last Modified : <2025-07-21> * ------------------------------------------------------------*/ /** @@ -13,14 +13,17 @@ static Source_t os_gentoo_sources[] = { {&UpstreamProvider, NULL}, - {&Ali, "mirrors.aliyun.com"}, - {&Bfsu, "mirrors.bfsu.edu.cn"}, - {&Ustc, "mirrors.ustc.edu.cn"}, - {&Tuna, "mirrors.tuna.tsinghua.edu.cn"}, - {&Tencent, "mirrors.tencent.com"}, - // {&Tencent_Intra, "mirrors.tencentyun.com"}, - // {&Netease, "mirrors.163.com"}, /* 不启用原因:过慢 */ - // {&Sohu, "mirrors.sohu.com"} /* 不启用原因:过慢 */ + {&Ali, "mirrors.aliyun.com", DelegateToMirror }, + {&Bfsu, "mirrors.bfsu.edu.cn", DelegateToMirror}, + {&Ustc, "mirrors.ustc.edu.cn", DelegateToMirror}, + {&Tuna, "mirrors.tuna.tsinghua.edu.cn", DelegateToMirror}, + {&Tencent, "mirrors.tencent.com", DelegateToMirror}, + // {&Tencent_Intra, "mirrors.tencentyun.com", DelegateToMirror}, + + /* 不启用原因:过慢 */ + // {&Netease, "mirrors.163.com", DelegateToMirror}, + /* 不启用原因:过慢 */ + // {&Sohu, "mirrors.sohu.com", DelegateToMirror} }; def_sources_n(os_gentoo); @@ -50,4 +53,23 @@ os_gentoo_setsrc (char *option) chsrc_conclude (&source); } -def_target_s(os_gentoo); + +Feature_t +os_gentoo_feat (char *option) +{ + Feature_t f = {0}; + + f.can_get = false; + f.can_reset = false; + + f.cap_locally = CanNot; + f.cap_locally_explain = NULL; + f.can_english = true; + f.can_user_define = false; + + f.note = NULL; + return f; +} + + +def_target_sf(os_gentoo); diff --git a/src/recipe/os/OpenWrt.c b/src/recipe/os/OpenWrt.c index 8f141c5..1f1377e 100644 --- a/src/recipe/os/OpenWrt.c +++ b/src/recipe/os/OpenWrt.c @@ -6,7 +6,7 @@ * | happy game * | * Created On : <2024-08-08> - * Last Modified : <2024-12-18> + * Last Modified : <2025-07-21> * ------------------------------------------------------------*/ static SourceProvider_t os_openwrt_upstream = @@ -20,16 +20,16 @@ static SourceProvider_t os_openwrt_upstream = */ static Source_t os_openwrt_sources[] = { - {&os_openwrt_upstream, "https://downloads.openwrt.org"}, - {&MirrorZ, "https://mirrors.cernet.edu.cn/openwrt"}, - {&Ali, "https://mirrors.aliyun.com/openwrt"}, - {&Tencent, "https://mirrors.cloud.tencent.com/openwrt"}, - // {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/openwrt"}, - {&Tuna, "https://mirror.tuna.tsinghua.edu.cn/openwrt"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/openwrt"}, - {&Ustc, "https://mirrors.ustc.edu.cn/openwrt"}, - {&Pku, "https://mirrors.pku.edu.cn/openwrt"}, - {&Sustech, "https://mirrors.sustech.edu.cn/openwrt"}, + {&os_openwrt_upstream, "https://downloads.openwrt.org", DelegateToUpstream}, + {&MirrorZ, "https://mirrors.cernet.edu.cn/openwrt", DelegateToMirror}, + {&Ali, "https://mirrors.aliyun.com/openwrt", DelegateToMirror}, + {&Tencent, "https://mirrors.cloud.tencent.com/openwrt", DelegateToMirror}, + // {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/openwrt", DelegateToMirror}, + {&Tuna, "https://mirror.tuna.tsinghua.edu.cn/openwrt", DelegateToMirror}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/openwrt", DelegateToMirror}, + {&Ustc, "https://mirrors.ustc.edu.cn/openwrt", DelegateToMirror}, + {&Pku, "https://mirrors.pku.edu.cn/openwrt", DelegateToMirror}, + {&Sustech, "https://mirrors.sustech.edu.cn/openwrt", DelegateToMirror}, }; def_sources_n(os_openwrt); diff --git a/src/recipe/os/YUM/AlmaLinux.c b/src/recipe/os/YUM/AlmaLinux.c index 2eaa346..faa1ef5 100644 --- a/src/recipe/os/YUM/AlmaLinux.c +++ b/src/recipe/os/YUM/AlmaLinux.c @@ -5,7 +5,7 @@ * Contributors : Yangmoooo * | * Created On : <2024-06-12> - * Last Modified : <2024-12-18> + * Last Modified : <2025-07-21> * ------------------------------------------------------------*/ static SourceProvider_t os_almalinux_upstream = @@ -19,17 +19,17 @@ static SourceProvider_t os_almalinux_upstream = */ static Source_t os_almalinux_sources[] = { - {&os_almalinux_upstream , "http://repo.almalinux.org/almalinux"}, - {&Ali, "https://mirrors.aliyun.com/almalinux"}, - {&Volcengine, "https://mirrors.volces.com/almalinux"}, - {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux"}, - {&Zju, "https://mirrors.zju.edu.cn/almalinux"}, - {&Nju, "https://mirror.nju.edu.cn/almalinux"}, + {&os_almalinux_upstream , "http://repo.almalinux.org/almalinux", DelegateToUpstream}, + {&Ali, "https://mirrors.aliyun.com/almalinux", DelegateToMirror}, + {&Volcengine, "https://mirrors.volces.com/almalinux", DelegateToMirror}, + {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux", DelegateToMirror}, + {&Zju, "https://mirrors.zju.edu.cn/almalinux", DelegateToMirror}, + {&Nju, "https://mirror.nju.edu.cn/almalinux", DelegateToMirror}, }; def_sources_n(os_almalinux); /** - * 参考: https://developer.aliyun.com/mirror/almalinux + * @consult: https://developer.aliyun.com/mirror/almalinux */ void os_almalinux_setsrc (char *option) @@ -48,4 +48,22 @@ os_almalinux_setsrc (char *option) chsrc_conclude (&source); } -def_target_s(os_almalinux); + +Feature_t +os_almalinux_feat (char *option) +{ + Feature_t f = {0}; + + f.can_get = false; + f.can_reset = false; + + f.cap_locally = CanNot; + f.cap_locally_explain = NULL; + f.can_english = true; + f.can_user_define = false; + + f.note = NULL; + return f; +} + +def_target_sf(os_almalinux); diff --git a/src/recipe/os/YUM/Anolis-OS.c b/src/recipe/os/YUM/Anolis-OS.c index bed51ed..4407a19 100644 --- a/src/recipe/os/YUM/Anolis-OS.c +++ b/src/recipe/os/YUM/Anolis-OS.c @@ -14,15 +14,15 @@ */ static Source_t os_anolis_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://mirrors.aliyun.com/anolis"}, - {&Hust, "https://mirrors.hust.edu.cn/anolis"} + {&UpstreamProvider, NULL, NULL}, + {&Ali, "https://mirrors.aliyun.com/anolis", DelegateToMirror}, + {&Hust, "https://mirrors.hust.edu.cn/anolis", DelegateToMirror} }; def_sources_n(os_anolis); /** - * 参考: https://mirrors.hust.edu.cn/docs/anolis + * @consult: https://mirrors.hust.edu.cn/docs/anolis */ void os_anolis_setsrc (char *option) @@ -41,4 +41,22 @@ os_anolis_setsrc (char *option) chsrc_conclude (&source); } -def_target_s(os_anolis); + +Feature_t +os_anolis_feat (char *option) +{ + Feature_t f = {0}; + + f.can_get = false; + f.can_reset = false; + + f.cap_locally = CanNot; + f.cap_locally_explain = NULL; + f.can_english = true; + f.can_user_define = false; + + f.note = NULL; + return f; +} + +def_target_sf(os_anolis); diff --git a/src/recipe/os/YUM/Fedora-Linux.c b/src/recipe/os/YUM/Fedora-Linux.c index ed61158..c6ee6da 100644 --- a/src/recipe/os/YUM/Fedora-Linux.c +++ b/src/recipe/os/YUM/Fedora-Linux.c @@ -6,7 +6,7 @@ * Contributors : Aoran Zeng * | * Created On : <2023-09-26> - * Last Modified : <2025-06-20> + * Last Modified : <2025-07-21> * * 名称为 Fedora Linux * ------------------------------------------------------------*/ @@ -16,15 +16,18 @@ */ static Source_t os_fedora_sources[] = { - {&UpstreamProvider, "http://download.example/pub/fedora/linux"}, - {&Ali, "https://mirrors.aliyun.com/fedora"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/fedora"}, - {&Ustc, "https://mirrors.ustc.edu.cn/fedora"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/fedora"}, - {&Tencent, "https://mirrors.tencent.com/fedora"}, - // {&Tencent_Intra, "https://mirrors.tencentyun.com/fedora"}, - // {&Netease, "https://mirrors.163.com/fedora"}, /* 不启用原因:过慢 */ - // {&Sohu, "https://mirrors.sohu.com/fedora"} /* 不启用原因:过慢 */ + {&UpstreamProvider, "http://download.example/pub/fedora/linux", DelegateToUpstream}, + {&Ali, "https://mirrors.aliyun.com/fedora", DelegateToMirror}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/fedora", DelegateToMirror}, + {&Ustc, "https://mirrors.ustc.edu.cn/fedora", DelegateToMirror}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/fedora", DelegateToMirror}, + {&Tencent, "https://mirrors.tencent.com/fedora", DelegateToMirror}, + // {&Tencent_Intra, "https://mirrors.tencentyun.com/fedora", DelegateToMirror}, + + /* 不启用原因:过慢 */ + // {&Netease, "https://mirrors.163.com/fedora", DelegateToMirror}, + /* 不启用原因:过慢 */ + // {&Sohu, "https://mirrors.sohu.com/fedora", DelegateToMirror}" }; def_sources_n(os_fedora); @@ -99,4 +102,4 @@ os_fedora_feat (char *option) return f; } -def_target_sf(os_fedora); +def_target_srf(os_fedora); diff --git a/src/recipe/os/YUM/Rocky-Linux.c b/src/recipe/os/YUM/Rocky-Linux.c index 28c8a4a..4fa4792 100644 --- a/src/recipe/os/YUM/Rocky-Linux.c +++ b/src/recipe/os/YUM/Rocky-Linux.c @@ -5,7 +5,7 @@ * Contributors : happy game * | * Created On : <2023-09-24> - * Last Modified : <2025-06-20> + * Last Modified : <2025-07-21> * ------------------------------------------------------------*/ /** @@ -13,16 +13,19 @@ */ static Source_t os_rockylinux_sources[] = { - {&UpstreamProvider, NULL}, - {&MirrorZ, "https://mirrors.cernet.edu.cn/rocky"}, - {&Ali, "https://mirrors.aliyun.com/rockylinux"}, - {&Volcengine, "https://mirrors.volces.com/rockylinux"}, - {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rocky"}, - {&Sustech, "https://mirrors.sustech.edu.cn/rocky-linux"}, - {&Zju, "https://mirrors.zju.edu.cn/rocky"}, - {&Lzuoss, "https://mirror.lzu.edu.cn/rocky"}, - // {&Netease, "https://mirrors.163.com/rocky"}, /* 不启用原因:过慢 */ - // {&Sohu, "https://mirrors.sohu.com/Rocky"} /* 不启用原因:过慢 */ + {&UpstreamProvider, NULL, NULL}, + {&MirrorZ, "https://mirrors.cernet.edu.cn/rocky", DelegateToMirror}, + {&Ali, "https://mirrors.aliyun.com/rockylinux", DelegateToMirror}, + {&Volcengine, "https://mirrors.volces.com/rockylinux", DelegateToMirror}, + {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rocky", DelegateToMirror}, + {&Sustech, "https://mirrors.sustech.edu.cn/rocky-linux", DelegateToMirror}, + {&Zju, "https://mirrors.zju.edu.cn/rocky", DelegateToMirror}, + {&Lzuoss, "https://mirror.lzu.edu.cn/rocky", DelegateToMirror}, + + /* 不启用原因:过慢 */ + // {&Netease, "https://mirrors.163.com/rocky", DelegateToMirror}, + /* 不启用原因:过慢 */ + // {&Sohu, "https://mirrors.sohu.com/Rocky", DelegateToMirror} }; def_sources_n(os_rockylinux); @@ -72,4 +75,21 @@ os_rockylinux_setsrc (char *option) } -def_target_s(os_rockylinux); +Feature_t +os_rockylinux_feat (char *option) +{ + Feature_t f = {0}; + + f.can_get = false; + f.can_reset = false; + + f.cap_locally = CanNot; + f.cap_locally_explain = NULL; + f.can_english = true; + f.can_user_define = false; + + f.note = NULL; + return f; +} + +def_target_sf(os_rockylinux); diff --git a/src/recipe/os/YUM/openEuler.c b/src/recipe/os/YUM/openEuler.c index 15fad9f..db646e6 100644 --- a/src/recipe/os/YUM/openEuler.c +++ b/src/recipe/os/YUM/openEuler.c @@ -7,7 +7,7 @@ * | happy game * | * Created On : <2023-09-06> - * Last Modified : <2025-06-20> + * Last Modified : <2025-07-21> * ------------------------------------------------------------*/ static SourceProvider_t os_openEuler_upstream = @@ -22,15 +22,18 @@ static SourceProvider_t os_openEuler_upstream = */ static Source_t os_openeuler_sources[] = { - {&os_openEuler_upstream, "https://repo.openeuler.org/"}, - {&Ali, "https://mirrors.aliyun.com/openeuler/"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/openeuler/"}, - {&Ustc, "https://mirrors.ustc.edu.cn/openeuler/"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/openeuler/"}, - {&Tencent, "https://mirrors.tencent.com/openeuler/"}, - // {&Tencent_Intra, "https://mirrors.tencentyun.com/openeuler/"}, - // {&Netease, "https://mirrors.163.com/openeuler/"} /* 不启用原因:过慢 */ - // {&Sohu, "https://mirrors.sohu.com/openeuler/"} /* 不启用原因:过慢 */ + {&os_openEuler_upstream, "https://repo.openeuler.org/", DelegateToUpstream}, + {&Ali, "https://mirrors.aliyun.com/openeuler/", DelegateToMirror}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/openeuler/", DelegateToMirror}, + {&Ustc, "https://mirrors.ustc.edu.cn/openeuler/", DelegateToMirror}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/openeuler/", DelegateToMirror}, + {&Tencent, "https://mirrors.tencent.com/openeuler/", DelegateToMirror}, + // {&Tencent_Intra, "https://mirrors.tencentyun.com/openeuler/", DelegateToMirror}, + + /* 不启用原因:过慢 */ + // {&Netease, "https://mirrors.163.com/openeuler/", DelegateToMirror} + /* 不启用原因:过慢 */ + // {&Sohu, "https://mirrors.sohu.com/openeuler/", DelegateToMirror} }; def_sources_n(os_openeuler); diff --git a/src/recipe/os/openSUSE.c b/src/recipe/os/openSUSE.c index e31613e..9bc00d0 100644 --- a/src/recipe/os/openSUSE.c +++ b/src/recipe/os/openSUSE.c @@ -4,7 +4,7 @@ * File Authors : Heng Guo <2085471348@qq.com> * Contributors : Aoran Zeng * Created On : <2023-09-17> - * Last Modified : <2025-06-20> + * Last Modified : <2025-07-21> * ------------------------------------------------------------*/ /** @@ -12,16 +12,19 @@ */ static Source_t os_opensuse_sources[] = { - {&UpstreamProvider, NULL}, - {&Ali, "https://mirrors.aliyun.com/opensuse"}, - {&Volcengine, "https://mirrors.volces.com/opensuse"}, - {&Bfsu, "https://mirrors.bfsu.edu.cn/opensuse"}, - {&Ustc, "https://mirrors.ustc.edu.cn/opensuse"}, - {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/opensuse"}, - {&Tencent, "https://mirrors.tencent.com/opensuse"}, - // {&Tencent_Intra, "https://mirrors.tencentyun.com/opensuse"}, - // {&Netease, "https://mirrors.163.com/opensuse"}, /* 不启用原因:过慢 */ - // {&Sohu, "https://mirrors.sohu.com/opensuse"} /* 不启用原因:过慢 */ + {&UpstreamProvider, NULL, NULL}, + {&Ali, "https://mirrors.aliyun.com/opensuse", DelegateToMirror}, + {&Volcengine, "https://mirrors.volces.com/opensuse", DelegateToMirror}, + {&Bfsu, "https://mirrors.bfsu.edu.cn/opensuse", DelegateToMirror}, + {&Ustc, "https://mirrors.ustc.edu.cn/opensuse", DelegateToMirror}, + {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/opensuse", DelegateToMirror}, + {&Tencent, "https://mirrors.tencent.com/opensuse", DelegateToMirror}, + // {&Tencent_Intra, "https://mirrors.tencentyun.com/opensuse", DelegateToMirror}, + + /* 不启用原因:过慢 */ + // {&Netease, "https://mirrors.163.com/opensuse", DelegateToMirror}, + /* 不启用原因:过慢 */ + // {&Sohu, "https://mirrors.sohu.com/opensuse", DelegateToMirror} }; def_sources_n(os_opensuse); @@ -80,4 +83,23 @@ os_opensuse_setsrc (char *option) chsrc_conclude (&source); } -def_target_s(os_opensuse); + +Feature_t +os_opensuse_feat (char *option) +{ + Feature_t f = {0}; + + f.can_get = false; + f.can_reset = false; + + f.cap_locally = CanNot; + f.cap_locally_explain = NULL; + f.can_english = false; + f.can_user_define = false; + + f.note = NULL; + return f; +} + + +def_target_sf(os_opensuse);