mirror of
https://github.com/RubyMetric/chsrc
synced 2026-03-05 13:50:51 +08:00
Update BSD and pacman recipes using chef DSL
This commit is contained in:
@@ -1,24 +1,41 @@
|
||||
chef_set_created_on ("2023-09-03");
|
||||
chef_set_authors ("Aoran Zeng <ccmywish@qq.com>", "Heng Guo <2085471348@qq.com>");
|
||||
chef_set_contributors ("Nil Null <nil@null.org>");
|
||||
chef_allow_set();
|
||||
use_this;
|
||||
/** ------------------------------------------------------------
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @update 2023-09-27
|
||||
*
|
||||
* @note
|
||||
* 2023-09-24: 以下三个USTC, NJU, Netease 均维护了 freebsd-pkg freebsd-ports
|
||||
* 2023-09-27: 请务必保持Nju前面有至少一个镜像,原因请查看 freebsd 的换源函数
|
||||
*/
|
||||
static Source_t os_freebsd_sources[] =
|
||||
def_target(os_freebsd);
|
||||
|
||||
void
|
||||
os_freebsd_prelude ()
|
||||
{
|
||||
{&UpstreamProvider, NULL, NULL},
|
||||
use_this(os_freebsd);
|
||||
|
||||
chef_set_created_on (this, "2023-09-03");
|
||||
chef_set_last_updated (this, "2025-08-10");
|
||||
chef_set_sources_last_updated (this, "2023-09-27");
|
||||
|
||||
chef_set_authors (this, 2, "Aoran Zeng", "ccmywish@qq.com", "Heng Guo", "2085471348@qq.com");
|
||||
chef_set_chef (this, NULL, NULL);
|
||||
chef_set_sous_chefs (this, 0);
|
||||
chef_set_contributors (this, 1,
|
||||
"Nil Null", "nil@null.org");
|
||||
|
||||
chef_allow_set();
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_forbid_english(this);
|
||||
chef_forbid_user_define(this);
|
||||
|
||||
chef_set_note ("2023-09-24: 以下三个USTC, NJU, Netease 均维护了 freebsd-pkg freebsd-ports\n2023-09-27: 请务必保持Nju前面有至少一个镜像,原因请查看 freebsd 的换源函数", NULL);
|
||||
|
||||
def_upstream (NULL);
|
||||
|
||||
def_sources_begin()
|
||||
{&upstream, NULL, DelegateToUpstream},
|
||||
{&Ustc, "mirrors.ustc.edu.cn", DelegateToMirror},
|
||||
{&Nju, "mirror.nju.edu.cn", DelegateToMirror},
|
||||
{&Netease, "mirrors.163.com", DelegateToMirror},
|
||||
};
|
||||
def_sources_n(os_freebsd);
|
||||
def_sources_end()
|
||||
}
|
||||
|
||||
/**
|
||||
* @consult
|
||||
@@ -123,9 +140,5 @@ os_freebsd_setsrc (char *option)
|
||||
chsrc_overwrite_file (update, "/etc/freebsd-update.conf");
|
||||
*/
|
||||
|
||||
chsrc_determine_chgtype (ChgType_SemiAuto);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
def_target(os_freebsd);
|
||||
|
||||
@@ -1,16 +1,37 @@
|
||||
chef_set_created_on ("2023-09-05");
|
||||
chef_set_authors ("Aoran Zeng <ccmywish@qq.com>", "Heng Guo <2085471348@qq.com>");
|
||||
chef_set_contributors ("Nil Null <nil@null.org>");
|
||||
chef_allow_get();
|
||||
chef_allow_set();
|
||||
use_this;
|
||||
/** ------------------------------------------------------------
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @update 2025-07-31
|
||||
*/
|
||||
static Source_t os_netbsd_sources[] =
|
||||
def_target(os_netbsd);
|
||||
|
||||
void
|
||||
os_netbsd_prelude ()
|
||||
{
|
||||
{&UpstreamProvider, NULL, NULL},
|
||||
use_this(os_netbsd);
|
||||
|
||||
chef_set_created_on (this, "2023-09-05");
|
||||
chef_set_last_updated (this, "2025-08-10");
|
||||
chef_set_sources_last_updated (this, "2025-07-31");
|
||||
|
||||
chef_set_authors (this, 2, "Aoran Zeng", "ccmywish@qq.com", "Heng Guo", "2085471348@qq.com");
|
||||
chef_set_chef (this, NULL, NULL);
|
||||
chef_set_sous_chefs (this, 0);
|
||||
chef_set_contributors (this, 1,
|
||||
"Nil Null", "nil@null.org");
|
||||
|
||||
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 ("根据 @ykla: NetBSD 默认状态下没有 pkgsrc,用户可能安装了也可能没安装", NULL);
|
||||
|
||||
def_upstream (NULL);
|
||||
|
||||
def_sources_begin()
|
||||
{&upstream, NULL, DelegateToUpstream},
|
||||
{&MirrorZ, "https://mirrors.cernet.edu.cn/pkgsrc/packages/NetBSD/", DelegateToMirror},
|
||||
{&Ali, "https://mirrors.aliyun.com/pkgsrc/packages/NetBSD/", DelegateToMirror},
|
||||
{&Ustc, "https://mirrors.ustc.edu.cn/pkgsrc/packages/NetBSD/", DelegateToMirror},
|
||||
@@ -21,8 +42,8 @@ static Source_t os_netbsd_sources[] =
|
||||
// {&Tencent_Intra, "https://mirrors.tencentyun.com/pkgsrc/packages/NetBSD/", DelegateToMirror},
|
||||
{&Netease, "https://mirrors.163.com/pkgsrc/packages/NetBSD/", DelegateToMirror},
|
||||
{&Sohu, "https://mirrors.sohu.com/pkgsrc/packages/NetBSD/", DelegateToMirror}
|
||||
};
|
||||
def_sources_n(os_netbsd);
|
||||
def_sources_end()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
@@ -56,9 +77,5 @@ os_netbsd_setsrc (char *option)
|
||||
char *url = xy_strjoin (5, chef_ensure_trailing_slash (source.url), arch, "/", version, "/All");
|
||||
chsrc_overwrite_file (url, "/usr/pkg/etc/pkgin/repositories.conf");
|
||||
|
||||
chsrc_determine_chgtype (ChgType_Untested);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
def_target(os_netbsd);
|
||||
|
||||
@@ -1,16 +1,35 @@
|
||||
chef_set_created_on ("2023-09-03");
|
||||
chef_set_authors ("Heng Guo <2085471348@qq.com>", "Aoran Zeng <ccmywish@qq.com>");
|
||||
chef_set_contributors ("Nil Null <nil@null.org>");
|
||||
chef_allow_get();
|
||||
chef_allow_set();
|
||||
use_this;
|
||||
/** ------------------------------------------------------------
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @update 2025-07-31
|
||||
*/
|
||||
static Source_t os_openbsd_sources[] =
|
||||
def_target(os_openbsd);
|
||||
|
||||
void
|
||||
os_openbsd_prelude ()
|
||||
{
|
||||
{&UpstreamProvider, NULL, NULL},
|
||||
use_this(os_openbsd);
|
||||
|
||||
chef_set_created_on (this, "2023-09-03");
|
||||
chef_set_last_updated (this, "2025-08-10");
|
||||
chef_set_sources_last_updated (this, "2025-07-31");
|
||||
|
||||
chef_set_authors (this, 2, "Heng Guo", "2085471348@qq.com", "Aoran Zeng", "ccmywish@qq.com");
|
||||
chef_set_chef (this, NULL, NULL);
|
||||
chef_set_sous_chefs (this, 0);
|
||||
chef_set_contributors (this, 1,
|
||||
"Nil Null", "nil@null.org");
|
||||
|
||||
chef_allow_get();
|
||||
chef_allow_set();
|
||||
|
||||
chef_allow_local_mode (this, CanNot, NULL, NULL);
|
||||
chef_forbid_english(this);
|
||||
chef_forbid_user_define(this);
|
||||
|
||||
def_upstream (NULL);
|
||||
|
||||
def_sources_begin()
|
||||
{&upstream, NULL, DelegateToUpstream},
|
||||
{&MirrorZ, "https://mirrors.cernet.edu.cn/OpenBSD/", DelegateToMirror},
|
||||
{&Bfsu, "https://mirrors.bfsu.edu.cn/OpenBSD/", DelegateToMirror},
|
||||
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/OpenBSD/", DelegateToMirror},
|
||||
@@ -24,8 +43,8 @@ static Source_t os_openbsd_sources[] =
|
||||
// {&Tencent_Intra, "https://mirrors.tencentyun.com/OpenBSD/", DelegateToMirror},
|
||||
{&Netease, "https://mirrors.163.com/OpenBSD/", DelegateToMirror},
|
||||
{&Sohu, "https://mirrors.sohu.com/OpenBSD/", DelegateToMirror}
|
||||
};
|
||||
def_sources_n(os_openbsd);
|
||||
def_sources_end()
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
@@ -50,9 +69,5 @@ os_openbsd_setsrc (char *option)
|
||||
chsrc_backup ("/etc/installurl");
|
||||
chsrc_overwrite_file (source.url, "/etc/installurl");
|
||||
|
||||
chsrc_determine_chgtype (ChgType_Auto);
|
||||
chsrc_conclude (&source);
|
||||
}
|
||||
|
||||
|
||||
def_target(os_openbsd);
|
||||
|
||||
Reference in New Issue
Block a user