mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-01-22 23:43:00 +08:00
Split rockylinux out
This commit is contained in:
parent
ea61e2af34
commit
d3c8f7fdfe
|
@ -172,24 +172,6 @@ os_msys2_sources[] = {
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @time 2024-06-12 更新
|
|
||||||
*/
|
|
||||||
os_rocky_sources[] = {
|
|
||||||
{&Upstream, NULL},
|
|
||||||
{&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"},
|
|
||||||
{&Sohu, "https://mirrors.sohu.com/Rocky"},
|
|
||||||
{&Netease, "https://mirrors.163.com/rocky"}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @time 2023-09-29 更新
|
* @time 2023-09-29 更新
|
||||||
|
@ -350,7 +332,6 @@ def_sources_n(pl_clojure);
|
||||||
def_sources_n(pl_dotnet);
|
def_sources_n(pl_dotnet);
|
||||||
|
|
||||||
def_sources_n(os_msys2);
|
def_sources_n(os_msys2);
|
||||||
def_sources_n(os_rocky);
|
|
||||||
|
|
||||||
def_sources_n(os_linuxlite);
|
def_sources_n(os_linuxlite);
|
||||||
|
|
||||||
|
|
24
src/chsrc.c
24
src/chsrc.c
|
@ -93,6 +93,7 @@ pl_clojure_setsrc (char *option)
|
||||||
|
|
||||||
#include "recipe/os/yum-family/Fedora-Linux.c"
|
#include "recipe/os/yum-family/Fedora-Linux.c"
|
||||||
#include "recipe/os/yum-family/AlmaLinux.c"
|
#include "recipe/os/yum-family/AlmaLinux.c"
|
||||||
|
#include "recipe/os/yum-family/Rocky-Linux.c"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* HELP: 未经测试
|
* HELP: 未经测试
|
||||||
|
@ -126,29 +127,6 @@ os_msys2_setsrc (char *option)
|
||||||
#include "recipe/os/arch.c"
|
#include "recipe/os/arch.c"
|
||||||
#include "recipe/os/gentoo.c"
|
#include "recipe/os/gentoo.c"
|
||||||
|
|
||||||
/**
|
|
||||||
* 参考: https://help.mirrors.cernet.edu.cn/rocky/
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
os_rocky_setsrc (char *option)
|
|
||||||
{
|
|
||||||
chsrc_ensure_root ();
|
|
||||||
|
|
||||||
SourceInfo source;
|
|
||||||
chsrc_yield_source (os_rocky);
|
|
||||||
chsrc_confirm_source (&source);
|
|
||||||
|
|
||||||
char *cmd = xy_strjoin (3,
|
|
||||||
"sed -e 's|^mirrorlist=|#mirrorlist=|g' "
|
|
||||||
"-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=", source.url, "|g' "
|
|
||||||
"-i.bak /etc/yum.repos.d/rocky-extras.repo /etc/yum.repos.d/rocky.repo"
|
|
||||||
);
|
|
||||||
chsrc_run (cmd, RunOpt_Default);
|
|
||||||
chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line);
|
|
||||||
chsrc_say_lastly (&source, ChsrcTypeUntested);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "recipe/os/alpine.c"
|
#include "recipe/os/alpine.c"
|
||||||
#include "recipe/os/void.c"
|
#include "recipe/os/void.c"
|
||||||
|
|
|
@ -41,7 +41,6 @@ static const char
|
||||||
|
|
||||||
def_target(os_linuxlite);
|
def_target(os_linuxlite);
|
||||||
def_target(os_openkylin);
|
def_target(os_openkylin);
|
||||||
def_target_noget(os_rocky);
|
|
||||||
def_target_noget(os_openeuler);
|
def_target_noget(os_openeuler);
|
||||||
def_target_noget(os_anolis);
|
def_target_noget(os_anolis);
|
||||||
def_target_noget(os_msys2);
|
def_target_noget(os_msys2);
|
||||||
|
@ -59,7 +58,7 @@ static const char
|
||||||
*os_archlinuxcn[] = {"archlinuxcn", "archcn",NULL, t(&os_archlinuxcn_target)},
|
*os_archlinuxcn[] = {"archlinuxcn", "archcn",NULL, t(&os_archlinuxcn_target)},
|
||||||
*os_manjaro [] = {"manjaro", NULL, t(&os_manjaro_target)},
|
*os_manjaro [] = {"manjaro", NULL, t(&os_manjaro_target)},
|
||||||
*os_gentoo [] = {"gentoo", NULL, t(&os_gentoo_target)},
|
*os_gentoo [] = {"gentoo", NULL, t(&os_gentoo_target)},
|
||||||
*os_rocky [] = {"rocky", "rockylinux", NULL, t(&os_rocky_target)},
|
*os_rockylinux [] = {"rocky", "rockylinux", NULL, t(&os_rockylinux_target)},
|
||||||
*os_almalinux [] = {"alma", "almalinux", NULL, t(&os_almalinux_target)},
|
*os_almalinux [] = {"alma", "almalinux", NULL, t(&os_almalinux_target)},
|
||||||
*os_alpine [] = {"alpine", NULL, t(&os_alpine_target)},
|
*os_alpine [] = {"alpine", NULL, t(&os_alpine_target)},
|
||||||
*os_void [] = {"void", "voidlinux", NULL, t(&os_void_target)},
|
*os_void [] = {"void", "voidlinux", NULL, t(&os_void_target)},
|
||||||
|
@ -87,13 +86,14 @@ static const char
|
||||||
os_trisquel, os_linuxlite, os_raspberrypi, os_armbian, os_openwrt,
|
os_trisquel, os_linuxlite, os_raspberrypi, os_armbian, os_openwrt,
|
||||||
os_deepin, os_openkylin, os_ros,
|
os_deepin, os_openkylin, os_ros,
|
||||||
|
|
||||||
os_rocky,
|
os_fedora, os_rockylinux, os_almalinux, os_openeuler, os_anolis,
|
||||||
os_fedora, os_almalinux, os_opensuse,
|
|
||||||
|
os_opensuse,
|
||||||
|
|
||||||
os_arch, os_archlinuxcn, os_manjaro, os_gentoo,
|
os_arch, os_archlinuxcn, os_manjaro, os_gentoo,
|
||||||
|
|
||||||
os_alpine, os_void, os_solus,
|
os_alpine, os_void, os_solus,
|
||||||
os_openeuler, os_anolis,
|
|
||||||
os_msys2,
|
os_msys2,
|
||||||
os_freebsd, os_netbsd, os_openbsd,
|
os_freebsd, os_netbsd, os_openbsd,
|
||||||
};
|
};
|
||||||
|
|
50
src/recipe/os/yum-family/Rocky-Linux.c
Normal file
50
src/recipe/os/yum-family/Rocky-Linux.c
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
/** ------------------------------------------------------------
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
* -------------------------------------------------------------
|
||||||
|
* File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||||
|
* Contributors : Nil Null <nil@null.org>
|
||||||
|
* Created On : <2023-09-24>
|
||||||
|
* Last Modified : <2024-08-16>
|
||||||
|
* ------------------------------------------------------------*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @time 2024-06-12 更新
|
||||||
|
*/
|
||||||
|
static SourceInfo
|
||||||
|
os_rockylinux_sources[] = {
|
||||||
|
{&Upstream, NULL},
|
||||||
|
{&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"},
|
||||||
|
{&Sohu, "https://mirrors.sohu.com/Rocky"},
|
||||||
|
{&Netease, "https://mirrors.163.com/rocky"}
|
||||||
|
};
|
||||||
|
def_sources_n(os_rockylinux);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参考: https://help.mirrors.cernet.edu.cn/rocky/
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
os_rockylinux_setsrc (char *option)
|
||||||
|
{
|
||||||
|
chsrc_ensure_root ();
|
||||||
|
|
||||||
|
SourceInfo source;
|
||||||
|
chsrc_yield_source (os_rockylinux);
|
||||||
|
chsrc_confirm_source (&source);
|
||||||
|
|
||||||
|
char *cmd = xy_strjoin (3,
|
||||||
|
"sed -e 's|^mirrorlist=|#mirrorlist=|g' "
|
||||||
|
"-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=", source.url, "|g' "
|
||||||
|
"-i.bak /etc/yum.repos.d/rocky-extras.repo /etc/yum.repos.d/rocky.repo"
|
||||||
|
);
|
||||||
|
chsrc_run (cmd, RunOpt_Default);
|
||||||
|
chsrc_run ("dnf makecache", RunOpt_No_Last_New_Line);
|
||||||
|
chsrc_say_lastly (&source, ChsrcTypeUntested);
|
||||||
|
}
|
||||||
|
|
||||||
|
def_target_noget(os_rockylinux);
|
Loading…
Reference in New Issue
Block a user