From b8f847a9ce26a5f76a45e719797165581709dd64 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Fri, 22 Nov 2024 06:23:23 +0800 Subject: [PATCH] Introduce provider --- src/framework/core.c | 2 +- src/framework/mirror.c | 13 ------------- src/framework/struct.h | 26 ++++++++++++++++++++------ src/recipe/lang/Clojure.c | 2 +- src/recipe/lang/Dart/Flutter.c | 2 +- src/recipe/lang/Dart/Pub.c | 2 +- src/recipe/lang/Go.c | 2 +- src/recipe/lang/Haskell.c | 2 +- src/recipe/lang/Java.c | 2 +- src/recipe/lang/Julia.c | 2 +- src/recipe/lang/Lua.c | 2 +- src/recipe/lang/Node.js/common.h | 4 ++-- src/recipe/lang/NuGet.c | 2 +- src/recipe/lang/OCaml.c | 2 +- src/recipe/lang/PHP.c | 2 +- src/recipe/lang/Perl.c | 2 +- src/recipe/lang/Python/common.h | 2 +- src/recipe/lang/R.c | 2 +- src/recipe/lang/Ruby.c | 2 +- src/recipe/lang/Rust/Cargo.c | 2 +- src/recipe/lang/Rust/rustup.c | 2 +- src/recipe/menu.c | 2 +- src/recipe/os/APT/Armbian.c | 2 +- src/recipe/os/APT/Debian.c | 2 +- src/recipe/os/APT/Kali-Linux.c | 2 +- src/recipe/os/APT/Linux-Lite.c | 2 +- src/recipe/os/APT/Linux-Mint.c | 2 +- src/recipe/os/APT/ROS.c | 2 +- src/recipe/os/APT/Raspberry-Pi-OS.c | 2 +- src/recipe/os/APT/Trisquel.c | 2 +- src/recipe/os/APT/Ubuntu.c | 2 +- src/recipe/os/APT/deepin.c | 2 +- src/recipe/os/APT/openKylin.c | 2 +- src/recipe/os/Alpine-Linux.c | 2 +- src/recipe/os/BSD/FreeBSD.c | 2 +- src/recipe/os/BSD/NetBSD.c | 2 +- src/recipe/os/BSD/OpenBSD.c | 2 +- src/recipe/os/Gentoo-Linux.c | 2 +- src/recipe/os/OpenWrt.c | 2 +- src/recipe/os/Solus.c | 2 +- src/recipe/os/Void-Linux.c | 2 +- src/recipe/os/YUM/AlmaLinux.c | 2 +- src/recipe/os/YUM/Anolis-OS.c | 2 +- src/recipe/os/YUM/Fedora-Linux.c | 2 +- src/recipe/os/YUM/Rocky-Linux.c | 2 +- src/recipe/os/YUM/openEuler.c | 2 +- src/recipe/os/openSUSE.c | 2 +- src/recipe/os/pacman/Arch-Linux.c | 4 ++-- src/recipe/os/pacman/MSYS2.c | 2 +- src/recipe/recipe-template.c | 2 +- src/recipe/ware/Anaconda.c | 2 +- src/recipe/ware/CocoaPods.c | 2 +- src/recipe/ware/Docker-Hub.c | 2 +- src/recipe/ware/Emacs.c | 2 +- src/recipe/ware/Flathub.c | 2 +- src/recipe/ware/Guix.c | 2 +- src/recipe/ware/Homebrew.c | 2 +- src/recipe/ware/Nix.c | 2 +- src/recipe/ware/TeX-Live.c | 2 +- src/recipe/ware/WinGet.c | 2 +- 60 files changed, 80 insertions(+), 79 deletions(-) diff --git a/src/framework/core.c b/src/framework/core.c index 1683d3a..d4522fb 100644 --- a/src/framework/core.c +++ b/src/framework/core.c @@ -775,7 +775,7 @@ source_has_empty_url (SourceInfo *source) } \ else if (is_url (option)) \ { \ - SourceInfo __tmp = { &UserDefine, option }; \ + SourceInfo __tmp = { &UserDefinedProvider, option }; \ source = __tmp; \ } \ else \ diff --git a/src/framework/mirror.c b/src/framework/mirror.c index 89483cf..05faf65 100644 --- a/src/framework/mirror.c +++ b/src/framework/mirror.c @@ -171,16 +171,3 @@ Sohu = { "sohu", "SOHU", "搜狐开源镜像站", "https://mirrors.sohu.com/", {NotSkip, NA, NA, "https://mirrors.sohu.com/deepin-cd" Big_File_deepin} }; - - -MirrorSite -Upstream = { - "upstream", "Upstream", "上游默认源", NULL, - {SKIP, "上游默认源不测速", "SKIP for upstream source", NULL} -}; - -MirrorSite -UserDefine = { - "user", "用户自定义", "用户自定义", NULL, - {SKIP, "用户自定义源不测速", "SKIP for user-defined source", NULL} -}; diff --git a/src/framework/struct.h b/src/framework/struct.h index 4befd0c..f625800 100644 --- a/src/framework/struct.h +++ b/src/framework/struct.h @@ -26,15 +26,29 @@ SpeedMeasureInfo; #define ToFill NULL #define NA NULL -typedef struct MirrorSite_t +typedef struct SourceProvider_t { - const char *code; /* 用于用户指定镜像站 */ - const char *abbr; /* 需要使用镜像站的英文名时,用这个代替,因为大部分镜像站没有提供正式的英文名 */ - const char *name; /* 镜像站中文名 */ - const char *site; /* 镜像站首页 */ + const char *code; /* 用于用户指定某一 Provider */ + const char *abbr; /* 需要使用 Provider 的英文名时,用这个代替,因为大部分 Provider 没有提供正式的英文名 */ + const char *name; /* Provider 中文名 */ + const char *site; /* Provider 首页 */ SpeedMeasureInfo smi; } -MirrorSite; +SourceProvider; + +typedef SourceProvider MirrorSite; + +SourceProvider +UpstreamProvider = { + "upstream", "Upstream", "上游默认源", NULL, + {SKIP, "上游默认源不测速", "SKIP for upstream source", NULL} +}; + +SourceProvider +UserDefinedProvider = { + "user", "用户自定义", "用户自定义", NULL, + {SKIP, "用户自定义源不测速", "SKIP for user-defined source", NULL} +}; typedef struct SourceInfo_t diff --git a/src/recipe/lang/Clojure.c b/src/recipe/lang/Clojure.c index d183448..5f745c9 100644 --- a/src/recipe/lang/Clojure.c +++ b/src/recipe/lang/Clojure.c @@ -13,7 +13,7 @@ */ static SourceInfo pl_clojure_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/clojars/"}, {&Ustc, "https://mirrors.ustc.edu.cn/help/clojars.html"} }; diff --git a/src/recipe/lang/Dart/Flutter.c b/src/recipe/lang/Dart/Flutter.c index e5da474..f4e39f3 100644 --- a/src/recipe/lang/Dart/Flutter.c +++ b/src/recipe/lang/Dart/Flutter.c @@ -17,7 +17,7 @@ */ static SourceInfo pl_dart_flutter_sources[] = { - {&Upstream, "https://storage.googleapis.com"}, + {&UpstreamProvider, "https://storage.googleapis.com"}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn"}, // 没有后缀,怀疑是否存在问题 {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/git/flutter"}, // URL 带 git {&Nju, "https://mirror.nju.edu.cn/flutter"} diff --git a/src/recipe/lang/Dart/Pub.c b/src/recipe/lang/Dart/Pub.c index 3c40c2c..7cabfca 100644 --- a/src/recipe/lang/Dart/Pub.c +++ b/src/recipe/lang/Dart/Pub.c @@ -16,7 +16,7 @@ */ static SourceInfo pl_dart_sources[] = { - {&Upstream, "https://pub.dev"}, + {&UpstreamProvider, "https://pub.dev"}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/dart-pub"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/dart-pub"}, {&Nju, "https://mirror.nju.edu.cn/dart-pub"} diff --git a/src/recipe/lang/Go.c b/src/recipe/lang/Go.c index 8a6cdb3..f862958 100644 --- a/src/recipe/lang/Go.c +++ b/src/recipe/lang/Go.c @@ -27,7 +27,7 @@ GoProxyIO = { */ static SourceInfo pl_go_sources[] = { - {&Upstream, "https://proxy.golang.org"}, + {&UpstreamProvider, "https://proxy.golang.org"}, {&GoProxyCN, "https://goproxy.cn"}, {&Ali, "https://mirrors.aliyun.com/goproxy/"}, {&Huawei, "https://mirrors.huaweicloud.com/goproxy/"}, diff --git a/src/recipe/lang/Haskell.c b/src/recipe/lang/Haskell.c index 967588c..a467a57 100644 --- a/src/recipe/lang/Haskell.c +++ b/src/recipe/lang/Haskell.c @@ -12,7 +12,7 @@ */ static SourceInfo pl_haskell_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/hackage"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/hackage"}, {&Nju, "https://mirror.nju.edu.cn/hackage"}, diff --git a/src/recipe/lang/Java.c b/src/recipe/lang/Java.c index f7b5c68..12b5f49 100644 --- a/src/recipe/lang/Java.c +++ b/src/recipe/lang/Java.c @@ -13,7 +13,7 @@ */ static SourceInfo pl_java_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ali, "https://maven.aliyun.com/repository/public/"}, {&Huawei, "https://mirrors.huaweicloud.com/repository/maven/"}, {&Netease, "http://mirrors.163.com/maven/repository/maven-public/"} // 网易的24小时更新一次 diff --git a/src/recipe/lang/Julia.c b/src/recipe/lang/Julia.c index 755ee8d..db5a35c 100644 --- a/src/recipe/lang/Julia.c +++ b/src/recipe/lang/Julia.c @@ -13,7 +13,7 @@ */ static SourceInfo pl_julia_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/julia"}, {&Pku, "https://mirrors.pku.edu.cn/julia"}, {&Nju, "https://mirror.nju.edu.cn/julia"} diff --git a/src/recipe/lang/Lua.c b/src/recipe/lang/Lua.c index 1840b85..d269ba5 100644 --- a/src/recipe/lang/Lua.c +++ b/src/recipe/lang/Lua.c @@ -20,7 +20,7 @@ Api7 = { */ static SourceInfo pl_lua_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Api7, "https://luarocks.cn"}, }; def_sources_n(pl_lua); diff --git a/src/recipe/lang/Node.js/common.h b/src/recipe/lang/Node.js/common.h index b004476..dc49996 100644 --- a/src/recipe/lang/Node.js/common.h +++ b/src/recipe/lang/Node.js/common.h @@ -28,7 +28,7 @@ NpmMirror = { */ static SourceInfo pl_nodejs_sources[] = { - {&Upstream, "https://registry.npmjs.org/"}, // @note 根据 pnpm 官网,有最后的斜线 + {&UpstreamProvider, "https://registry.npmjs.org/"}, // @note 根据 pnpm 官网,有最后的斜线 {&NpmMirror, "https://registry.npmmirror.com"}, {&Huawei, "https://mirrors.huaweicloud.com/repository/npm/"}, {&Tencent, "https://mirrors.cloud.tencent.com/npm/"}, @@ -45,7 +45,7 @@ def_sources_n(pl_nodejs); */ static SourceInfo pl_nodejs_binary_release_sources[] = { - {&Upstream, "https://nodejs.org/dist/"}, + {&UpstreamProvider, "https://nodejs.org/dist/"}, {&NpmMirror, "https://npmmirror.com/mirrors"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/nodejs-release/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/nodejs-release/"}, diff --git a/src/recipe/lang/NuGet.c b/src/recipe/lang/NuGet.c index c71092f..7f8475d 100644 --- a/src/recipe/lang/NuGet.c +++ b/src/recipe/lang/NuGet.c @@ -21,7 +21,7 @@ NugetOrg = {"nuget.org", "NuGet Org", "Nuget Organization", "https://www.nuget.o */ static SourceInfo pl_nuget_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&NugetOrg, "https://www.nuget.org/api/v2/"}, {&Huawei, "https://mirrors.huaweicloud.com/repository/nuget/v3"} }; diff --git a/src/recipe/lang/OCaml.c b/src/recipe/lang/OCaml.c index c8e3c40..4651ab7 100644 --- a/src/recipe/lang/OCaml.c +++ b/src/recipe/lang/OCaml.c @@ -12,7 +12,7 @@ */ static SourceInfo pl_ocaml_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/git/opam-repository.git"} }; def_sources_n(pl_ocaml); diff --git a/src/recipe/lang/PHP.c b/src/recipe/lang/PHP.c index 3d8300c..bc87ce1 100644 --- a/src/recipe/lang/PHP.c +++ b/src/recipe/lang/PHP.c @@ -13,7 +13,7 @@ */ static SourceInfo pl_php_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ali, "https://mirrors.aliyun.com/composer/"}, {&Tencent, "https://mirrors.tencent.com/composer/"}, // {&Tencent_Intra, "https://mirrors.tencentyun.com/composer/"}, diff --git a/src/recipe/lang/Perl.c b/src/recipe/lang/Perl.c index 9f939ca..aa03ce3 100644 --- a/src/recipe/lang/Perl.c +++ b/src/recipe/lang/Perl.c @@ -12,7 +12,7 @@ */ static SourceInfo pl_perl_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Bfsu, "https://mirrors.bfsu.edu.cn/CPAN/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CPAN/"}, {&Bjtu, "https://mirror.bjtu.edu.cn/cpan/"}, diff --git a/src/recipe/lang/Python/common.h b/src/recipe/lang/Python/common.h index 1b7e49f..6f00940 100644 --- a/src/recipe/lang/Python/common.h +++ b/src/recipe/lang/Python/common.h @@ -14,7 +14,7 @@ */ static SourceInfo pl_python_sources[] = { - {&Upstream, "https://pypi.org/simple"}, + {&UpstreamProvider, "https://pypi.org/simple"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/pypi/web/simple"}, {&Lzuoss, "https://mirror.lzu.edu.cn/pypi/web/simple"}, {&Jlu, "https://mirrors.jlu.edu.cn/pypi/web/simple"}, diff --git a/src/recipe/lang/R.c b/src/recipe/lang/R.c index 47af6b4..9f515c1 100644 --- a/src/recipe/lang/R.c +++ b/src/recipe/lang/R.c @@ -16,7 +16,7 @@ */ static SourceInfo pl_r_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/cran/"}, // {&Ali, "https://mirrors.aliyun.com/CRAN/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CRAN/"}, diff --git a/src/recipe/lang/Ruby.c b/src/recipe/lang/Ruby.c index 553d9c7..7ea4fe3 100644 --- a/src/recipe/lang/Ruby.c +++ b/src/recipe/lang/Ruby.c @@ -22,7 +22,7 @@ RubyChina = { */ static SourceInfo pl_ruby_sources[] = { - {&Upstream, "https://rubygems.org"}, + {&UpstreamProvider, "https://rubygems.org"}, {&RubyChina, "https://gems.ruby-china.com/"}, {&Ustc, "https://mirrors.ustc.edu.cn/rubygems/"} diff --git a/src/recipe/lang/Rust/Cargo.c b/src/recipe/lang/Rust/Cargo.c index c368f7f..1bf91ff 100644 --- a/src/recipe/lang/Rust/Cargo.c +++ b/src/recipe/lang/Rust/Cargo.c @@ -14,7 +14,7 @@ */ static SourceInfo pl_rust_cargo_sources[] = { - {&Upstream, "https://index.crates.io/"}, // @help 是这个吗? + {&UpstreamProvider, "https://index.crates.io/"}, // @help 是这个吗? {&MirrorZ, "https://mirrors.cernet.edu.cn/crates.io-index/"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/crates.io-index/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/crates.io-index/"}, diff --git a/src/recipe/lang/Rust/rustup.c b/src/recipe/lang/Rust/rustup.c index ac8ea8f..37543eb 100644 --- a/src/recipe/lang/Rust/rustup.c +++ b/src/recipe/lang/Rust/rustup.c @@ -13,7 +13,7 @@ */ static SourceInfo pl_rust_rustup_sources[] = { - {&Upstream, "https://static.rust-lang.org"}, + {&UpstreamProvider, "https://static.rust-lang.org"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/rustup"}, {&Ustc, "https://mirrors.ustc.edu.cn/rust-static"}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/rust-static"}, diff --git a/src/recipe/menu.c b/src/recipe/menu.c index 3eb84f0..e815376 100644 --- a/src/recipe/menu.c +++ b/src/recipe/menu.c @@ -164,7 +164,7 @@ available_mirrors[] = { &RubyChina, &EmacsChina, &NpmMirror, &GoProxyIO, &GoProxyCN, &RsProxyCN, // 暂不支持 &NugetOrg - // 不要列出 &Upstream 和 &UserDdefine + // 不要列出 &UpstreamProvider 和 &UserDefinedProvider }; /* End Target Matrix */ diff --git a/src/recipe/os/APT/Armbian.c b/src/recipe/os/APT/Armbian.c index 4b97a3a..1998863 100644 --- a/src/recipe/os/APT/Armbian.c +++ b/src/recipe/os/APT/Armbian.c @@ -14,7 +14,7 @@ */ static SourceInfo os_armbian_sources[] = { - {&Upstream, "http://apt.armbian.com"}, + {&UpstreamProvider, "http://apt.armbian.com"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/armbian"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/armbian"}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/armbian"}, diff --git a/src/recipe/os/APT/Debian.c b/src/recipe/os/APT/Debian.c index af28445..df61072 100644 --- a/src/recipe/os/APT/Debian.c +++ b/src/recipe/os/APT/Debian.c @@ -14,7 +14,7 @@ */ static SourceInfo os_debian_sources[] = { - {&Upstream, "http://deb.debian.org/debian"}, + {&UpstreamProvider, "http://deb.debian.org/debian"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/debian/"}, {&Ali, "https://mirrors.aliyun.com/debian"}, {&Volcengine, "https://mirrors.volces.com/debian"}, diff --git a/src/recipe/os/APT/Kali-Linux.c b/src/recipe/os/APT/Kali-Linux.c index cd8593c..110c613 100644 --- a/src/recipe/os/APT/Kali-Linux.c +++ b/src/recipe/os/APT/Kali-Linux.c @@ -14,7 +14,7 @@ */ static SourceInfo os_kali_sources[] = { - {&Upstream, "http://http.kali.org/kali"}, + {&UpstreamProvider, "http://http.kali.org/kali"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/kali"}, {&Ali, "https://mirrors.aliyun.com/kali"}, {&Volcengine, "https://mirrors.volces.com/kali"}, diff --git a/src/recipe/os/APT/Linux-Lite.c b/src/recipe/os/APT/Linux-Lite.c index ccafd2d..a6571a7 100644 --- a/src/recipe/os/APT/Linux-Lite.c +++ b/src/recipe/os/APT/Linux-Lite.c @@ -13,7 +13,7 @@ */ static SourceInfo os_linuxlite_sources[] = { - {&Upstream, "http://repo.linuxliteos.com/linuxlite/"}, + {&UpstreamProvider, "http://repo.linuxliteos.com/linuxlite/"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/linuxliteos/"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/linuxliteos/"}, {&Nju, "https://mirror.nju.edu.cn/linuxliteos/"} diff --git a/src/recipe/os/APT/Linux-Mint.c b/src/recipe/os/APT/Linux-Mint.c index 5f65c9d..c3a8c7f 100644 --- a/src/recipe/os/APT/Linux-Mint.c +++ b/src/recipe/os/APT/Linux-Mint.c @@ -13,7 +13,7 @@ */ static SourceInfo os_linuxmint_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&MirrorZ, "https://mirrors.cernet.edu.cn/linuxmint/"}, {&Ali, "http://mirrors.aliyun.com/linuxmint-packages/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/linuxmint/"}, diff --git a/src/recipe/os/APT/ROS.c b/src/recipe/os/APT/ROS.c index 39a5290..2faaf42 100644 --- a/src/recipe/os/APT/ROS.c +++ b/src/recipe/os/APT/ROS.c @@ -12,7 +12,7 @@ */ static SourceInfo os_ros_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ali, "https://mirrors.aliyun.com"}, {&Bfsu, "https://mirrors.bfsu.edu.cn"}, {&Ustc, "https://mirrors.ustc.edu.cn"}, diff --git a/src/recipe/os/APT/Raspberry-Pi-OS.c b/src/recipe/os/APT/Raspberry-Pi-OS.c index 65ce9aa..8798be4 100644 --- a/src/recipe/os/APT/Raspberry-Pi-OS.c +++ b/src/recipe/os/APT/Raspberry-Pi-OS.c @@ -14,7 +14,7 @@ */ static SourceInfo os_raspberrypi_sources[] = { - {&Upstream, "https://archive.raspberrypi.com/"}, // https://archive.raspberrypi.org/ until Debian "bullseye" release + {&UpstreamProvider, "https://archive.raspberrypi.com/"}, // https://archive.raspberrypi.org/ until Debian "bullseye" release {&MirrorZ, "https://mirrors.cernet.edu.cn/raspberrypi/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/raspberrypi/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/raspberrypi/"}, diff --git a/src/recipe/os/APT/Trisquel.c b/src/recipe/os/APT/Trisquel.c index ab979e7..44b55ec 100644 --- a/src/recipe/os/APT/Trisquel.c +++ b/src/recipe/os/APT/Trisquel.c @@ -14,7 +14,7 @@ */ static SourceInfo os_trisquel_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&MirrorZ, "https://mirrors.cernet.edu.cn/trisquel/"}, {&Ali, "https://mirrors.aliyun.com/trisquel/"}, {&Nju, "https://mirror.nju.edu.cn/trisquel/"}, diff --git a/src/recipe/os/APT/Ubuntu.c b/src/recipe/os/APT/Ubuntu.c index 1fe1658..8b446a9 100644 --- a/src/recipe/os/APT/Ubuntu.c +++ b/src/recipe/os/APT/Ubuntu.c @@ -14,7 +14,7 @@ */ static SourceInfo os_ubuntu_sources[] = { - {&Upstream, "http://archive.ubuntu.com/ubuntu/"}, //不支持https + {&UpstreamProvider, "http://archive.ubuntu.com/ubuntu/"}, //不支持https {&MirrorZ, "https://mirrors.cernet.edu.cn/ubuntu/"}, {&Ali, "https://mirrors.aliyun.com/ubuntu"}, {&Volcengine, "https://mirrors.volces.com/ubuntu"}, diff --git a/src/recipe/os/APT/deepin.c b/src/recipe/os/APT/deepin.c index 774b8da..347afcd 100644 --- a/src/recipe/os/APT/deepin.c +++ b/src/recipe/os/APT/deepin.c @@ -14,7 +14,7 @@ */ static SourceInfo os_deepin_sources[] = { - {&Upstream, "https://community-packages.deepin.com/deepin"}, + {&UpstreamProvider, "https://community-packages.deepin.com/deepin"}, {&Ali, "https://mirrors.aliyun.com/deepin"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/deepin"}, {&Ustc, "https://mirrors.ustc.edu.cn/deepin"}, diff --git a/src/recipe/os/APT/openKylin.c b/src/recipe/os/APT/openKylin.c index dc98a3d..53215aa 100644 --- a/src/recipe/os/APT/openKylin.c +++ b/src/recipe/os/APT/openKylin.c @@ -15,7 +15,7 @@ */ static SourceInfo os_openkylin_sources[] = { - {&Upstream, "https://archive.openkylin.top/openkylin/"}, + {&UpstreamProvider, "https://archive.openkylin.top/openkylin/"}, {&Ali, "https://mirrors.aliyun.com/openkylin/"}, {&Netease, "https://mirrors.163.com/openkylin/"}, }; diff --git a/src/recipe/os/Alpine-Linux.c b/src/recipe/os/Alpine-Linux.c index ee08a3e..6892fc3 100644 --- a/src/recipe/os/Alpine-Linux.c +++ b/src/recipe/os/Alpine-Linux.c @@ -12,7 +12,7 @@ */ static SourceInfo os_alpine_sources[] = { - {&Upstream, "http://dl-cdn.alpinelinux.org/alpine"}, + {&UpstreamProvider, "http://dl-cdn.alpinelinux.org/alpine"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/alpine"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/alpine"}, {&Sustech, "https://mirrors.sustech.edu.cn/alpine"}, diff --git a/src/recipe/os/BSD/FreeBSD.c b/src/recipe/os/BSD/FreeBSD.c index 1cb72f9..60ba349 100644 --- a/src/recipe/os/BSD/FreeBSD.c +++ b/src/recipe/os/BSD/FreeBSD.c @@ -18,7 +18,7 @@ */ static SourceInfo os_freebsd_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ustc, "mirrors.ustc.edu.cn"}, {&Nju, "mirror.nju.edu.cn"}, {&Netease, "mirrors.163.com"}, diff --git a/src/recipe/os/BSD/NetBSD.c b/src/recipe/os/BSD/NetBSD.c index 48b78ac..c4b932b 100644 --- a/src/recipe/os/BSD/NetBSD.c +++ b/src/recipe/os/BSD/NetBSD.c @@ -13,7 +13,7 @@ */ static SourceInfo os_netbsd_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ali, "https://mirrors.aliyun.com/pkgsrc/packages/NetBSD/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/pkgsrc/packages/NetBSD/"}, {&Ustc, "https://mirrors.ustc.edu.cn/pkgsrc/packages/NetBSD/"}, diff --git a/src/recipe/os/BSD/OpenBSD.c b/src/recipe/os/BSD/OpenBSD.c index a89cce1..511d1d1 100644 --- a/src/recipe/os/BSD/OpenBSD.c +++ b/src/recipe/os/BSD/OpenBSD.c @@ -13,7 +13,7 @@ */ static SourceInfo os_openbsd_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ali, "https://mirrors.aliyun.com/OpenBSD/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/OpenBSD/"}, {&Ustc, "https://mirrors.ustc.edu.cn/OpenBSD/"}, diff --git a/src/recipe/os/Gentoo-Linux.c b/src/recipe/os/Gentoo-Linux.c index a5c78b7..fd7529e 100644 --- a/src/recipe/os/Gentoo-Linux.c +++ b/src/recipe/os/Gentoo-Linux.c @@ -12,7 +12,7 @@ */ static SourceInfo os_gentoo_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ali, "mirrors.aliyun.com"}, {&Bfsu, "mirrors.bfsu.edu.cn"}, {&Ustc, "mirrors.ustc.edu.cn"}, diff --git a/src/recipe/os/OpenWrt.c b/src/recipe/os/OpenWrt.c index 0d57ac2..5cef5e1 100644 --- a/src/recipe/os/OpenWrt.c +++ b/src/recipe/os/OpenWrt.c @@ -12,7 +12,7 @@ */ static SourceInfo os_openwrt_sources[] = { - {&Upstream, "http://downloads.openwrt.org"}, + {&UpstreamProvider, "http://downloads.openwrt.org"}, {&MirrorZ, "https://mirrors.cernet.edu.cn/openwrt"}, {&Ali, "https://mirrors.aliyun.com/openwrt"}, {&Tencent, "https://mirrors.cloud.tencent.com/openwrt"}, diff --git a/src/recipe/os/Solus.c b/src/recipe/os/Solus.c index 579113e..c84b393 100644 --- a/src/recipe/os/Solus.c +++ b/src/recipe/os/Solus.c @@ -12,7 +12,7 @@ */ static SourceInfo os_solus_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"}, {&Nju, "https://mirror.nju.edu.cn/solus/packages/shannon/eopkg-index.xml.xz"} diff --git a/src/recipe/os/Void-Linux.c b/src/recipe/os/Void-Linux.c index da7906f..581a627 100644 --- a/src/recipe/os/Void-Linux.c +++ b/src/recipe/os/Void-Linux.c @@ -12,7 +12,7 @@ */ static SourceInfo os_void_sources[] = { - {&Upstream, "https://repo-default.voidlinux.org"}, + {&UpstreamProvider, "https://repo-default.voidlinux.org"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/voidlinux"}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/voidlinux"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/voidlinux"} diff --git a/src/recipe/os/YUM/AlmaLinux.c b/src/recipe/os/YUM/AlmaLinux.c index 1111253..296adff 100644 --- a/src/recipe/os/YUM/AlmaLinux.c +++ b/src/recipe/os/YUM/AlmaLinux.c @@ -12,7 +12,7 @@ */ static SourceInfo os_almalinux_sources[] = { - {&Upstream, "http://repo.almalinux.org/almalinux"}, + {&UpstreamProvider, "http://repo.almalinux.org/almalinux"}, {&Ali, "https://mirrors.aliyun.com/almalinux"}, {&Volcengine, "https://mirrors.volces.com/almalinux"}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/almalinux"}, diff --git a/src/recipe/os/YUM/Anolis-OS.c b/src/recipe/os/YUM/Anolis-OS.c index e53d5bc..9aac398 100644 --- a/src/recipe/os/YUM/Anolis-OS.c +++ b/src/recipe/os/YUM/Anolis-OS.c @@ -14,7 +14,7 @@ */ static SourceInfo os_anolis_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ali, "https://mirrors.aliyun.com/anolis"}, {&Hust, "https://mirrors.hust.edu.cn/anolis"} }; diff --git a/src/recipe/os/YUM/Fedora-Linux.c b/src/recipe/os/YUM/Fedora-Linux.c index 520fa3f..ee14ab3 100644 --- a/src/recipe/os/YUM/Fedora-Linux.c +++ b/src/recipe/os/YUM/Fedora-Linux.c @@ -16,7 +16,7 @@ */ static SourceInfo os_fedora_sources[] = { - {&Upstream, "http://download.example/pub/fedora/linux"}, + {&UpstreamProvider, "http://download.example/pub/fedora/linux"}, {&Ali, "https://mirrors.aliyun.com/fedora"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/fedora"}, {&Ustc, "https://mirrors.ustc.edu.cn/fedora"}, diff --git a/src/recipe/os/YUM/Rocky-Linux.c b/src/recipe/os/YUM/Rocky-Linux.c index 79f99b4..4e38186 100644 --- a/src/recipe/os/YUM/Rocky-Linux.c +++ b/src/recipe/os/YUM/Rocky-Linux.c @@ -12,7 +12,7 @@ */ static SourceInfo os_rockylinux_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&MirrorZ, "https://mirrors.cernet.edu.cn/rocky"}, {&Ali, "https://mirrors.aliyun.com/rockylinux"}, {&Volcengine, "https://mirrors.volces.com/rockylinux"}, diff --git a/src/recipe/os/YUM/openEuler.c b/src/recipe/os/YUM/openEuler.c index c6437b5..83e67dc 100644 --- a/src/recipe/os/YUM/openEuler.c +++ b/src/recipe/os/YUM/openEuler.c @@ -13,7 +13,7 @@ */ static SourceInfo os_openeuler_sources[] = { - {&Upstream, "https://repo.openeuler.org/"}, + {&UpstreamProvider, "https://repo.openeuler.org/"}, {&Ali, "https://mirrors.aliyun.com/openeuler/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/openeuler/"}, {&Ustc, "https://mirrors.ustc.edu.cn/openeuler/"}, diff --git a/src/recipe/os/openSUSE.c b/src/recipe/os/openSUSE.c index bc0fdc7..1e93141 100644 --- a/src/recipe/os/openSUSE.c +++ b/src/recipe/os/openSUSE.c @@ -12,7 +12,7 @@ */ static SourceInfo os_opensuse_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ali, "https://mirrors.aliyun.com/opensuse"}, {&Volcengine, "https://mirrors.volces.com/opensuse"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/opensuse"}, diff --git a/src/recipe/os/pacman/Arch-Linux.c b/src/recipe/os/pacman/Arch-Linux.c index 62d081f..f10efea 100644 --- a/src/recipe/os/pacman/Arch-Linux.c +++ b/src/recipe/os/pacman/Arch-Linux.c @@ -14,7 +14,7 @@ */ static SourceInfo os_arch_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ali, "https://mirrors.aliyun.com/archlinux"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/archlinux"}, {&Ustc, "https://mirrors.ustc.edu.cn/archlinux"}, @@ -31,7 +31,7 @@ os_arch_sources[] = { * @note 根据 GitHub:@zheng7fu2 建议,拆分 archlinuxcn 出来 */ os_archlinuxcn_sources[] = { - {&Upstream, "https://repo.archlinuxcn.org/"}, + {&UpstreamProvider, "https://repo.archlinuxcn.org/"}, {&Ali, "https://mirrors.aliyun.com/archlinuxcn/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/archlinuxcn/"}, {&Ustc, "https://mirrors.ustc.edu.cn/archlinuxcn/"}, diff --git a/src/recipe/os/pacman/MSYS2.c b/src/recipe/os/pacman/MSYS2.c index f0d2cfb..d01af28 100644 --- a/src/recipe/os/pacman/MSYS2.c +++ b/src/recipe/os/pacman/MSYS2.c @@ -12,7 +12,7 @@ */ static SourceInfo os_msys2_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Ali, "https://mirrors.aliyun.com/msys2"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/msys2"}, {&Ustc, "https://mirrors.ustc.edu.cn/msys2"}, diff --git a/src/recipe/recipe-template.c b/src/recipe/recipe-template.c index dda97c0..59a13cf 100644 --- a/src/recipe/recipe-template.c +++ b/src/recipe/recipe-template.c @@ -47,7 +47,7 @@ RubyMetric = {"rbmt", // chsrc set rbmt */ static SourceInfo __sources[] = { - {&Upstream, "上游地址,若维护者暂时未知,可填NULL,这个主要用于reset"}, + {&UpstreamProvider, "上游地址,若维护者暂时未知,可填NULL,这个主要用于reset"}, {&RubyMetric, "https://rubymetirc.com/target"}, {&RubyInstaller, "https://rubyinstaller.cn/target"}, {&Gitee, "https://gitee.com/RubyMetric/chsrc"}, diff --git a/src/recipe/ware/Anaconda.c b/src/recipe/ware/Anaconda.c index 6439629..94bfca5 100644 --- a/src/recipe/ware/Anaconda.c +++ b/src/recipe/ware/Anaconda.c @@ -13,7 +13,7 @@ */ static SourceInfo wr_anaconda_sources[] = { - {&Upstream, "https://repo.anaconda.com/"}, + {&UpstreamProvider, "https://repo.anaconda.com/"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/anaconda/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/anaconda/"}, {&Zju, "https://mirrors.zju.edu.cn/anaconda/"}, diff --git a/src/recipe/ware/CocoaPods.c b/src/recipe/ware/CocoaPods.c index 2d75590..21c4531 100644 --- a/src/recipe/ware/CocoaPods.c +++ b/src/recipe/ware/CocoaPods.c @@ -12,7 +12,7 @@ */ static SourceInfo wr_cocoapods_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/git/CocoaPods/Specs.git"} }; diff --git a/src/recipe/ware/Docker-Hub.c b/src/recipe/ware/Docker-Hub.c index 3089cef..def3143 100644 --- a/src/recipe/ware/Docker-Hub.c +++ b/src/recipe/ware/Docker-Hub.c @@ -38,7 +38,7 @@ Huecker = { static SourceInfo wr_dockerhub_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, // {&Ustc, "https://docker.mirrors.ustc.edu.cn/"}, // https://github.com/DaoCloud/public-image-mirror diff --git a/src/recipe/ware/Emacs.c b/src/recipe/ware/Emacs.c index 60fb344..57c246a 100644 --- a/src/recipe/ware/Emacs.c +++ b/src/recipe/ware/Emacs.c @@ -19,7 +19,7 @@ EmacsChina = { */ SourceInfo wr_emacs_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/docs/emacs-elpa"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/help/elpa/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/help/elpa/"}, diff --git a/src/recipe/ware/Flathub.c b/src/recipe/ware/Flathub.c index e3c856c..a54109c 100644 --- a/src/recipe/ware/Flathub.c +++ b/src/recipe/ware/Flathub.c @@ -13,7 +13,7 @@ */ static SourceInfo wr_flathub_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/flathub"}, }; def_sources_n(wr_flathub); diff --git a/src/recipe/ware/Guix.c b/src/recipe/ware/Guix.c index d42d202..9e2e85e 100644 --- a/src/recipe/ware/Guix.c +++ b/src/recipe/ware/Guix.c @@ -13,7 +13,7 @@ */ static SourceInfo wr_guix_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Sjtug_Zhiyuan, "https://mirror.sjtu.edu.cn/git/guix.git"} }; def_sources_n(wr_guix); diff --git a/src/recipe/ware/Homebrew.c b/src/recipe/ware/Homebrew.c index 9715e25..052eebd 100644 --- a/src/recipe/ware/Homebrew.c +++ b/src/recipe/ware/Homebrew.c @@ -17,7 +17,7 @@ */ static SourceInfo wr_homebrew_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/"}, {&Zju, "https://mirrors.zju.edu.cn/"}, diff --git a/src/recipe/ware/Nix.c b/src/recipe/ware/Nix.c index 73196a0..3110c8f 100644 --- a/src/recipe/ware/Nix.c +++ b/src/recipe/ware/Nix.c @@ -16,7 +16,7 @@ */ static SourceInfo wr_nix_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Bfsu, "https://mirrors.bfsu.edu.cn/nix-channels/"} }; def_sources_n(wr_nix); diff --git a/src/recipe/ware/TeX-Live.c b/src/recipe/ware/TeX-Live.c index 573c89e..64e71ed 100644 --- a/src/recipe/ware/TeX-Live.c +++ b/src/recipe/ware/TeX-Live.c @@ -12,7 +12,7 @@ */ static SourceInfo wr_tex_sources[] = { - {&Upstream, NULL}, + {&UpstreamProvider, NULL}, {&Sjtug_Zhiyuan, "https://mirrors.sjtug.sjtu.edu.cn/ctan/systems/texlive/tlnet"}, {&Tuna, "https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet"}, {&Bfsu, "https://mirrors.bfsu.edu.cn/CTAN/systems/texlive/tlnet"}, diff --git a/src/recipe/ware/WinGet.c b/src/recipe/ware/WinGet.c index eebc21e..d6814c4 100644 --- a/src/recipe/ware/WinGet.c +++ b/src/recipe/ware/WinGet.c @@ -13,7 +13,7 @@ */ static SourceInfo wr_winget_sources[] = { - {&Upstream, "https://cdn.winget.microsoft.com/cache"}, + {&UpstreamProvider, "https://cdn.winget.microsoft.com/cache"}, {&Ustc, "https://mirrors.ustc.edu.cn/winget-source"}, }; def_sources_n(wr_winget);