Merge branch 'default-mirror' into 'master'

Set default GNU FTP mirror

See merge request redox-os/cookbook!677
This commit is contained in:
Jeremy Soller 2025-11-02 06:45:10 -07:00
commit 26a25e093e
6 changed files with 15 additions and 6 deletions

View File

@ -41,9 +41,10 @@ Cookbook has special config to avoid repetitive args, place this file into `cook
#verbose = true
[mirrors]
# The uncommented option below is the default if [mirrors] is not set
# see list of GNU FTP mirrors at https://www.gnu.org/prep/ftp.en.html
"ftp.gnu.org/gnu" = "example.com/gnu"
"github.com/foo/bar" = "github.com/baz/bar"
"ftp.gnu.org/gnu" = "mirrors.ocf.berkeley.edu/gnu"
# "github.com/foo/bar" = "github.com/baz/bar"
```
### Recipe Categories

View File

@ -1,5 +1,5 @@
[source]
tar = "https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz"
tar = "https://ftp.gnu.org/gnu/libiconv/libiconv-1.17.tar.gz"
blake3 = "820b3b9fd3e2181bfb95475f01e9a3451e6d751e4f8c98ebcdcca1d8aa720f7f"
patches = [
"01_redox.patch"

View File

@ -1,7 +1,7 @@
# GNU gettext utilities are a set of tools that provides a framework to help
# other GNU packages produce multi-lingual messages.
[source]
tar = "https://ftp.gnu.org/pub/gnu/gettext/gettext-0.22.5.tar.gz"
tar = "https://ftp.gnu.org/gnu/gettext/gettext-0.22.5.tar.gz"
blake3 = "cb3f3a34da7ce1a92746df81f5b78c5d53841973a24eb80ab76537263d380ec0"
patches = [
"redox.patch"

View File

@ -1,5 +1,5 @@
#TODO compiled but not fully tested
[source]
tar = "http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz"
tar = "https://ftp.gnu.org/gnu/gperf/gperf-3.1.tar.gz"
[build]
template = "configure"

View File

@ -126,7 +126,7 @@ fn publish_packages(recipe_list: Vec<String>, repo_dir: String) -> anyhow::Resul
pkgar::create(
format!("{}/build/id_ed25519.toml", root),
&appstream_pkg,
&appstream_root
&appstream_root,
)?;
}
}

View File

@ -84,6 +84,14 @@ pub fn init_config() {
if config.cook_opt.nonstop.is_none() {
config.cook_opt.nonstop = Some(extract_env("COOKBOOK_NONSTOP", false));
}
if config.mirrors.len() == 0 {
// The GNU FTP mirror below is automatically inserted for convenience
// You can choose other mirrors by setting it on cookbook.toml
config.mirrors.insert(
"ftp.gnu.org/gnu".to_string(),
"mirrors.ocf.berkeley.edu/gnu".to_string(),
);
}
config.cook = CookConfig::from(config.cook_opt.clone());