Update os recipes using chef DSL

This commit is contained in:
Aoran Zeng 2025-08-10 12:54:07 +08:00
parent ee8b031ee7
commit e36bdffaff
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
7 changed files with 52 additions and 52 deletions

View File

@ -28,8 +28,14 @@ os_debian_prelude ()
chef_allow_set();
chef_allow_reset();
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("http://deb.debian.org/debian");
def_sources_begin(os_debian)
def_sources_begin()
{&upstream, "http://deb.debian.org/debian", DelegateToUpstream},
/* MirrorZ 的速度这么测也是可以的 */

View File

@ -2,12 +2,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later
* ------------------------------------------------------------*/
static SourceProvider_t os_alpine_upstream =
{
def_upstream, "http://dl-cdn.alpinelinux.org/alpine",
{NotSkip, NA, NA, "https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64/alpine-standard-3.21.0-x86_64.iso", ACCURATE}
};
def_target(os_alpine);
void
@ -28,13 +22,14 @@ os_alpine_prelude ()
chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = true;
this.can_user_define = false;
this.note = NULL;
def_upstream_provider(os_alpine_upstream);
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_allow_english(this);
chef_forbid_user_define(this);
chef_set_note(this, NULL, NULL);
def_upstream("http://dl-cdn.alpinelinux.org/alpine");
def_sources_begin()
{&upstream, "http://dl-cdn.alpinelinux.org/alpine", DelegateToUpstream},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine", DelegateToMirror},
@ -46,6 +41,8 @@ os_alpine_prelude ()
{&Tencent, "https://mirrors.cloud.tencent.com/alpine", DelegateToMirror},
{&Huawei, "https://mirrors.huaweicloud.com/alpine", DelegateToMirror}
def_sources_end()
chsrc_set_provider_speed_measure_url (&upstream, "https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64/alpine-standard-3.21.0-x86_64.iso");
}

View File

@ -22,11 +22,12 @@ os_gentoo_prelude ()
// chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = true;
this.can_user_define = false;
this.note = NULL;
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_allow_english(this);
chef_forbid_user_define(this);
chef_set_note(this, NULL, NULL);
def_upstream("https://www.gentoo.org/downloads/mirrors/");
def_sources_begin()

View File

@ -2,12 +2,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later
* ------------------------------------------------------------*/
static SourceProvider_t os_openwrt_upstream =
{
def_upstream, "https://downloads.openwrt.org",
{NotSkip, NA, NA, "https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/openwrt-sdk-23.05.5-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz", ACCURATE}
};
def_target(os_openwrt);
void
@ -29,13 +23,14 @@ os_openwrt_prelude ()
chef_allow_get();
chef_allow_set();
chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = true;
this.can_user_define = true;
this.note = NULL;
def_upstream_provider(os_openwrt_upstream);
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_allow_english(this);
chef_allow_user_define(this);
chef_set_note(this, NULL, NULL);
def_upstream("https://downloads.openwrt.org");
def_sources_begin()
{&upstream, "https://downloads.openwrt.org", DelegateToUpstream},
{&MirrorZ, "https://mirrors.cernet.edu.cn/openwrt", DelegateToMirror},
@ -47,6 +42,8 @@ os_openwrt_prelude ()
{&Pku, "https://mirrors.pku.edu.cn/openwrt", DelegateToMirror},
{&Sustech, "https://mirrors.sustech.edu.cn/openwrt", DelegateToMirror}
def_sources_end()
chsrc_set_provider_speed_measure_url (&upstream, "https://downloads.openwrt.org/releases/23.05.5/targets/x86/64/openwrt-sdk-23.05.5-x86-64_gcc-12.3.0_musl.Linux-x86_64.tar.xz");
}

View File

@ -22,11 +22,12 @@ os_solus_prelude ()
// chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = true;
this.note = NULL;
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english(this);
chef_allow_user_define(this);
chef_set_note(this, NULL, NULL);
def_upstream("https://packages.getsol.us/");
def_sources_begin()

View File

@ -2,12 +2,6 @@
* SPDX-License-Identifier: GPL-3.0-or-later
* ------------------------------------------------------------*/
static SourceProvider_t os_voidlinux_upstream =
{
def_upstream, "https://repo-default.voidlinux.org",
{NotSkip, NA, NA, "https://repo-default.voidlinux.org/live/20240314/void-live-x86_64-musl-20240314-xfce.iso", ACCURATE}
};
def_target(os_voidlinux);
void
@ -28,19 +22,22 @@ os_voidlinux_prelude ()
chef_allow_get();
chef_allow_set();
chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = true;
this.note = NULL;
def_upstream_provider(os_voidlinux_upstream);
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_forbid_english(this);
chef_set_note(this, NULL, NULL);
def_upstream("https://repo-default.voidlinux.org");
def_sources_begin()
{&upstream, "https://repo-default.voidlinux.org", DelegateToUpstream},
{&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/voidlinux", DelegateToMirror},
{&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/voidlinux", DelegateToMirror},
{&Bfsu, "https://mirrors.bfsu.edu.cn/voidlinux", DelegateToMirror}
def_sources_end()
chsrc_set_provider_speed_measure_url (&upstream, "https://repo-default.voidlinux.org/live/20240314/void-live-x86_64-musl-20240314-xfce.iso");
}

View File

@ -22,11 +22,12 @@ os_opensuse_prelude ()
// chef_allow_get();
chef_allow_set();
// chef_allow_reset();
this.cap_locally = CanNot;
this.cap_locally_explain = NULL;
this.can_english = false;
this.can_user_define = false;
this.note = NULL;
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://download.opensuse.org/");
def_sources_begin()