Skip to content

Commit a3a8127

Browse files
committed
Update OS recipes
1 parent cf32d38 commit a3a8127

File tree

9 files changed

+217
-92
lines changed

9 files changed

+217
-92
lines changed

src/recipe/os/Alpine-Linux.c

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Contributors : Yangmoooo <[email protected]>
66
* |
77
* Created On : <2023-09-24>
8-
* Last Modified : <2024-12-18>
8+
* Last Modified : <2025-07-21>
99
* ------------------------------------------------------------*/
1010

1111
static SourceProvider_t os_alpine_upstream =
@@ -20,16 +20,16 @@ static SourceProvider_t os_alpine_upstream =
2020
*/
2121
static Source_t os_alpine_sources[] =
2222
{
23-
{&os_alpine_upstream, "http://dl-cdn.alpinelinux.org/alpine"},
24-
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine"},
25-
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine"},
26-
{&Sustech, "https://mirrors.sustech.edu.cn/alpine"},
27-
{&Zju, "https://mirrors.zju.edu.cn/alpine"},
28-
{&Lzuoss, "https://mirror.lzu.edu.cn/alpine"},
29-
{&Ali, "https://mirrors.aliyun.com/alpine"},
30-
{&Tencent, "https://mirrors.cloud.tencent.com/alpine"},
31-
// {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/alpine"},
32-
{&Huawei, "https://mirrors.huaweicloud.com/alpine"}
23+
{&os_alpine_upstream, "http://dl-cdn.alpinelinux.org/alpine", DelegateToUpstream},
24+
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine", DelegateToMirror},
25+
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine", DelegateToMirror},
26+
{&Sustech, "https://mirrors.sustech.edu.cn/alpine", DelegateToMirror},
27+
{&Zju, "https://mirrors.zju.edu.cn/alpine", DelegateToMirror},
28+
{&Lzuoss, "https://mirror.lzu.edu.cn/alpine", DelegateToMirror},
29+
{&Ali, "https://mirrors.aliyun.com/alpine", DelegateToMirror},
30+
{&Tencent, "https://mirrors.cloud.tencent.com/alpine", DelegateToMirror},
31+
// {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/alpine", DelegateToMirror},
32+
{&Huawei, "https://mirrors.huaweicloud.com/alpine", DelegateToMirror}
3333
};
3434
def_sources_n(os_alpine);
3535

@@ -40,6 +40,7 @@ os_alpine_getsrc (char *option)
4040
chsrc_view_file ("/etc/apk/repositories");
4141
}
4242

43+
4344
/**
4445
* @consult https://help.mirrors.cernet.edu.cn/alpine/
4546
*/
@@ -61,4 +62,22 @@ os_alpine_setsrc (char *option)
6162
chsrc_conclude (&source);
6263
}
6364

64-
def_target(os_alpine);
65+
66+
Feature_t
67+
os_alpine_feat (char *option)
68+
{
69+
Feature_t f = {0};
70+
71+
f.can_get = true;
72+
f.can_reset = false;
73+
74+
f.cap_locally = CanNot;
75+
f.cap_locally_explain = NULL;
76+
f.can_english = true;
77+
f.can_user_define = false;
78+
79+
f.note = NULL;
80+
return f;
81+
}
82+
83+
def_target_gsf(os_alpine);

src/recipe/os/Gentoo-Linux.c

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* File Authors : Heng Guo <[email protected]>
55
* Contributors : Aoran Zeng <[email protected]>
66
* Created On : <2023-09-05>
7-
* Last Modified : <2025-06-20>
7+
* Last Modified : <2025-07-21>
88
* ------------------------------------------------------------*/
99

1010
/**
@@ -13,14 +13,17 @@
1313
static Source_t os_gentoo_sources[] =
1414
{
1515
{&UpstreamProvider, NULL},
16-
{&Ali, "mirrors.aliyun.com"},
17-
{&Bfsu, "mirrors.bfsu.edu.cn"},
18-
{&Ustc, "mirrors.ustc.edu.cn"},
19-
{&Tuna, "mirrors.tuna.tsinghua.edu.cn"},
20-
{&Tencent, "mirrors.tencent.com"},
21-
// {&Tencent_Intra, "mirrors.tencentyun.com"},
22-
// {&Netease, "mirrors.163.com"}, /* 不启用原因:过慢 */
23-
// {&Sohu, "mirrors.sohu.com"} /* 不启用原因:过慢 */
16+
{&Ali, "mirrors.aliyun.com", DelegateToMirror },
17+
{&Bfsu, "mirrors.bfsu.edu.cn", DelegateToMirror},
18+
{&Ustc, "mirrors.ustc.edu.cn", DelegateToMirror},
19+
{&Tuna, "mirrors.tuna.tsinghua.edu.cn", DelegateToMirror},
20+
{&Tencent, "mirrors.tencent.com", DelegateToMirror},
21+
// {&Tencent_Intra, "mirrors.tencentyun.com", DelegateToMirror},
22+
23+
/* 不启用原因:过慢 */
24+
// {&Netease, "mirrors.163.com", DelegateToMirror},
25+
/* 不启用原因:过慢 */
26+
// {&Sohu, "mirrors.sohu.com", DelegateToMirror}
2427
};
2528
def_sources_n(os_gentoo);
2629

@@ -50,4 +53,23 @@ os_gentoo_setsrc (char *option)
5053
chsrc_conclude (&source);
5154
}
5255

53-
def_target_s(os_gentoo);
56+
57+
Feature_t
58+
os_gentoo_feat (char *option)
59+
{
60+
Feature_t f = {0};
61+
62+
f.can_get = false;
63+
f.can_reset = false;
64+
65+
f.cap_locally = CanNot;
66+
f.cap_locally_explain = NULL;
67+
f.can_english = true;
68+
f.can_user_define = false;
69+
70+
f.note = NULL;
71+
return f;
72+
}
73+
74+
75+
def_target_sf(os_gentoo);

src/recipe/os/OpenWrt.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* | happy game <[email protected]>
77
* |
88
* Created On : <2024-08-08>
9-
* Last Modified : <2024-12-18>
9+
* Last Modified : <2025-07-21>
1010
* ------------------------------------------------------------*/
1111

1212
static SourceProvider_t os_openwrt_upstream =
@@ -20,16 +20,16 @@ static SourceProvider_t os_openwrt_upstream =
2020
*/
2121
static Source_t os_openwrt_sources[] =
2222
{
23-
{&os_openwrt_upstream, "https://downloads.openwrt.org"},
24-
{&MirrorZ, "https://mirrors.cernet.edu.cn/openwrt"},
25-
{&Ali, "https://mirrors.aliyun.com/openwrt"},
26-
{&Tencent, "https://mirrors.cloud.tencent.com/openwrt"},
27-
// {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/openwrt"},
28-
{&Tuna, "https://mirror.tuna.tsinghua.edu.cn/openwrt"},
29-
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/openwrt"},
30-
{&Ustc, "https://mirrors.ustc.edu.cn/openwrt"},
31-
{&Pku, "https://mirrors.pku.edu.cn/openwrt"},
32-
{&Sustech, "https://mirrors.sustech.edu.cn/openwrt"},
23+
{&os_openwrt_upstream, "https://downloads.openwrt.org", DelegateToUpstream},
24+
{&MirrorZ, "https://mirrors.cernet.edu.cn/openwrt", DelegateToMirror},
25+
{&Ali, "https://mirrors.aliyun.com/openwrt", DelegateToMirror},
26+
{&Tencent, "https://mirrors.cloud.tencent.com/openwrt", DelegateToMirror},
27+
// {&Tencent_Intra, "https://mirrors.cloud.tencentyun.com/openwrt", DelegateToMirror},
28+
{&Tuna, "https://mirror.tuna.tsinghua.edu.cn/openwrt", DelegateToMirror},
29+
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/openwrt", DelegateToMirror},
30+
{&Ustc, "https://mirrors.ustc.edu.cn/openwrt", DelegateToMirror},
31+
{&Pku, "https://mirrors.pku.edu.cn/openwrt", DelegateToMirror},
32+
{&Sustech, "https://mirrors.sustech.edu.cn/openwrt", DelegateToMirror},
3333
};
3434

3535
def_sources_n(os_openwrt);

src/recipe/os/YUM/AlmaLinux.c

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Contributors : Yangmoooo <[email protected]>
66
* |
77
* Created On : <2024-06-12>
8-
* Last Modified : <2024-12-18>
8+
* Last Modified : <2025-07-21>
99
* ------------------------------------------------------------*/
1010

1111
static SourceProvider_t os_almalinux_upstream =
@@ -19,17 +19,17 @@ static SourceProvider_t os_almalinux_upstream =
1919
*/
2020
static Source_t os_almalinux_sources[] =
2121
{
22-
{&os_almalinux_upstream , "http://repo.almalinux.org/almalinux"},
23-
{&Ali, "https://mirrors.aliyun.com/almalinux"},
24-
{&Volcengine, "https://mirrors.volces.com/almalinux"},
25-
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux"},
26-
{&Zju, "https://mirrors.zju.edu.cn/almalinux"},
27-
{&Nju, "https://mirror.nju.edu.cn/almalinux"},
22+
{&os_almalinux_upstream , "http://repo.almalinux.org/almalinux", DelegateToUpstream},
23+
{&Ali, "https://mirrors.aliyun.com/almalinux", DelegateToMirror},
24+
{&Volcengine, "https://mirrors.volces.com/almalinux", DelegateToMirror},
25+
{&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux", DelegateToMirror},
26+
{&Zju, "https://mirrors.zju.edu.cn/almalinux", DelegateToMirror},
27+
{&Nju, "https://mirror.nju.edu.cn/almalinux", DelegateToMirror},
2828
};
2929
def_sources_n(os_almalinux);
3030

3131
/**
32-
* 参考: https://developer.aliyun.com/mirror/almalinux
32+
* @consult: https://developer.aliyun.com/mirror/almalinux
3333
*/
3434
void
3535
os_almalinux_setsrc (char *option)
@@ -48,4 +48,22 @@ os_almalinux_setsrc (char *option)
4848
chsrc_conclude (&source);
4949
}
5050

51-
def_target_s(os_almalinux);
51+
52+
Feature_t
53+
os_almalinux_feat (char *option)
54+
{
55+
Feature_t f = {0};
56+
57+
f.can_get = false;
58+
f.can_reset = false;
59+
60+
f.cap_locally = CanNot;
61+
f.cap_locally_explain = NULL;
62+
f.can_english = true;
63+
f.can_user_define = false;
64+
65+
f.note = NULL;
66+
return f;
67+
}
68+
69+
def_target_sf(os_almalinux);

src/recipe/os/YUM/Anolis-OS.c

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
*/
1515
static Source_t os_anolis_sources[] =
1616
{
17-
{&UpstreamProvider, NULL},
18-
{&Ali, "https://mirrors.aliyun.com/anolis"},
19-
{&Hust, "https://mirrors.hust.edu.cn/anolis"}
17+
{&UpstreamProvider, NULL, NULL},
18+
{&Ali, "https://mirrors.aliyun.com/anolis", DelegateToMirror},
19+
{&Hust, "https://mirrors.hust.edu.cn/anolis", DelegateToMirror}
2020
};
2121
def_sources_n(os_anolis);
2222

2323

2424
/**
25-
* 参考: https://mirrors.hust.edu.cn/docs/anolis
25+
* @consult: https://mirrors.hust.edu.cn/docs/anolis
2626
*/
2727
void
2828
os_anolis_setsrc (char *option)
@@ -41,4 +41,22 @@ os_anolis_setsrc (char *option)
4141
chsrc_conclude (&source);
4242
}
4343

44-
def_target_s(os_anolis);
44+
45+
Feature_t
46+
os_anolis_feat (char *option)
47+
{
48+
Feature_t f = {0};
49+
50+
f.can_get = false;
51+
f.can_reset = false;
52+
53+
f.cap_locally = CanNot;
54+
f.cap_locally_explain = NULL;
55+
f.can_english = true;
56+
f.can_user_define = false;
57+
58+
f.note = NULL;
59+
return f;
60+
}
61+
62+
def_target_sf(os_anolis);

src/recipe/os/YUM/Fedora-Linux.c

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Contributors : Aoran Zeng <[email protected]>
77
* |
88
* Created On : <2023-09-26>
9-
* Last Modified : <2025-06-20>
9+
* Last Modified : <2025-07-21>
1010
*
1111
* 名称为 Fedora Linux
1212
* ------------------------------------------------------------*/
@@ -16,15 +16,18 @@
1616
*/
1717
static Source_t os_fedora_sources[] =
1818
{
19-
{&UpstreamProvider, "http://download.example/pub/fedora/linux"},
20-
{&Ali, "https://mirrors.aliyun.com/fedora"},
21-
{&Bfsu, "https://mirrors.bfsu.edu.cn/fedora"},
22-
{&Ustc, "https://mirrors.ustc.edu.cn/fedora"},
23-
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/fedora"},
24-
{&Tencent, "https://mirrors.tencent.com/fedora"},
25-
// {&Tencent_Intra, "https://mirrors.tencentyun.com/fedora"},
26-
// {&Netease, "https://mirrors.163.com/fedora"}, /* 不启用原因:过慢 */
27-
// {&Sohu, "https://mirrors.sohu.com/fedora"} /* 不启用原因:过慢 */
19+
{&UpstreamProvider, "http://download.example/pub/fedora/linux", DelegateToUpstream},
20+
{&Ali, "https://mirrors.aliyun.com/fedora", DelegateToMirror},
21+
{&Bfsu, "https://mirrors.bfsu.edu.cn/fedora", DelegateToMirror},
22+
{&Ustc, "https://mirrors.ustc.edu.cn/fedora", DelegateToMirror},
23+
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/fedora", DelegateToMirror},
24+
{&Tencent, "https://mirrors.tencent.com/fedora", DelegateToMirror},
25+
// {&Tencent_Intra, "https://mirrors.tencentyun.com/fedora", DelegateToMirror},
26+
27+
/* 不启用原因:过慢 */
28+
// {&Netease, "https://mirrors.163.com/fedora", DelegateToMirror},
29+
/* 不启用原因:过慢 */
30+
// {&Sohu, "https://mirrors.sohu.com/fedora", DelegateToMirror}"
2831
};
2932
def_sources_n(os_fedora);
3033

@@ -99,4 +102,4 @@ os_fedora_feat (char *option)
99102
return f;
100103
}
101104

102-
def_target_sf(os_fedora);
105+
def_target_srf(os_fedora);

src/recipe/os/YUM/Rocky-Linux.c

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,27 @@
55
* Contributors : happy game <[email protected]>
66
* |
77
* Created On : <2023-09-24>
8-
* Last Modified : <2025-06-20>
8+
* Last Modified : <2025-07-21>
99
* ------------------------------------------------------------*/
1010

1111
/**
1212
* @update 2025-06-20
1313
*/
1414
static Source_t os_rockylinux_sources[] =
1515
{
16-
{&UpstreamProvider, NULL},
17-
{&MirrorZ, "https://mirrors.cernet.edu.cn/rocky"},
18-
{&Ali, "https://mirrors.aliyun.com/rockylinux"},
19-
{&Volcengine, "https://mirrors.volces.com/rockylinux"},
20-
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rocky"},
21-
{&Sustech, "https://mirrors.sustech.edu.cn/rocky-linux"},
22-
{&Zju, "https://mirrors.zju.edu.cn/rocky"},
23-
{&Lzuoss, "https://mirror.lzu.edu.cn/rocky"},
24-
// {&Netease, "https://mirrors.163.com/rocky"}, /* 不启用原因:过慢 */
25-
// {&Sohu, "https://mirrors.sohu.com/Rocky"} /* 不启用原因:过慢 */
16+
{&UpstreamProvider, NULL, NULL},
17+
{&MirrorZ, "https://mirrors.cernet.edu.cn/rocky", DelegateToMirror},
18+
{&Ali, "https://mirrors.aliyun.com/rockylinux", DelegateToMirror},
19+
{&Volcengine, "https://mirrors.volces.com/rockylinux", DelegateToMirror},
20+
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rocky", DelegateToMirror},
21+
{&Sustech, "https://mirrors.sustech.edu.cn/rocky-linux", DelegateToMirror},
22+
{&Zju, "https://mirrors.zju.edu.cn/rocky", DelegateToMirror},
23+
{&Lzuoss, "https://mirror.lzu.edu.cn/rocky", DelegateToMirror},
24+
25+
/* 不启用原因:过慢 */
26+
// {&Netease, "https://mirrors.163.com/rocky", DelegateToMirror},
27+
/* 不启用原因:过慢 */
28+
// {&Sohu, "https://mirrors.sohu.com/Rocky", DelegateToMirror}
2629
};
2730
def_sources_n(os_rockylinux);
2831

@@ -72,4 +75,21 @@ os_rockylinux_setsrc (char *option)
7275
}
7376

7477

75-
def_target_s(os_rockylinux);
78+
Feature_t
79+
os_rockylinux_feat (char *option)
80+
{
81+
Feature_t f = {0};
82+
83+
f.can_get = false;
84+
f.can_reset = false;
85+
86+
f.cap_locally = CanNot;
87+
f.cap_locally_explain = NULL;
88+
f.can_english = true;
89+
f.can_user_define = false;
90+
91+
f.note = NULL;
92+
return f;
93+
}
94+
95+
def_target_sf(os_rockylinux);

0 commit comments

Comments
 (0)