mirror of
https://github.com/RubyMetric/chsrc
synced 2026-03-04 12:50:45 +08:00
Update YUM recipes using chef DSL
This commit is contained in:
@@ -1,35 +1,53 @@
|
||||
chef_set_created_on ("2023-09-06");
|
||||
chef_set_authors ("Heng Guo <2085471348@qq.com>");
|
||||
chef_set_contributors ("Aoran Zeng <ccmywish@qq.com>", "Yangmoooo <yangmoooo@outlook.com>", "happy game <happygame1024@gmail.com>");
|
||||
chef_allow_set();
|
||||
use_this;
|
||||
/** ------------------------------------------------------------
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
static SourceProvider_t os_openEuler_upstream =
|
||||
def_target(os_openeuler);
|
||||
|
||||
void
|
||||
os_openeuler_prelude ()
|
||||
{
|
||||
def_upstream, "https://repo.openeuler.org/",
|
||||
{NotSkip, NA, NA, "https://repo.openeuler.org/openEuler-24.03-LTS/ISO/x86_64/openEuler-24.03-LTS-netinst-x86_64-dvd.iso", ACCURATE} // 896MB
|
||||
};
|
||||
use_this(os_openeuler);
|
||||
|
||||
chef_set_created_on (this, "2023-09-06");
|
||||
chef_set_last_updated (this, "2025-08-10");
|
||||
chef_set_sources_last_updated (this, "2025-06-20");
|
||||
|
||||
/**
|
||||
* @update 2025-06-20
|
||||
*/
|
||||
static Source_t os_openeuler_sources[] =
|
||||
{
|
||||
{&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},
|
||||
chef_set_authors (this, 1, "Heng Guo", "2085471348@qq.com");
|
||||
chef_set_chef (this, NULL, NULL);
|
||||
chef_set_sous_chefs (this, 0);
|
||||
chef_set_contributors (this, 3,
|
||||
"Aoran Zeng", "ccmywish@qq.com",
|
||||
"Yangmoooo", "yangmoooo@outlook.com",
|
||||
"happy game", "happygame1024@gmail.com");
|
||||
|
||||
chef_allow_get();
|
||||
chef_allow_set();
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_forbid_english(this);
|
||||
chef_forbid_user_define(this);
|
||||
|
||||
chef_set_note(this, NULL, NULL);
|
||||
|
||||
def_upstream("https://repo.openeuler.org/");
|
||||
def_sources_begin()
|
||||
{&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);
|
||||
def_sources_end()
|
||||
|
||||
chsrc_set_provider_speed_measure_url (&upstream, "https://repo.openeuler.org/openEuler-24.03-LTS/ISO/x86_64/openEuler-24.03-LTS-netinst-x86_64-dvd.iso");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -50,7 +68,8 @@ os_openeuler_setsrc (char *option)
|
||||
{
|
||||
chsrc_ensure_root ();
|
||||
|
||||
chsrc_yield_source_and_confirm (os_openeuler);
|
||||
use_this(os_openeuler);
|
||||
Source_t source = chsrc_yield_source_and_confirm (this, option);
|
||||
|
||||
chsrc_backup (OS_openEuler_SourceList);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user