From 7c9cb655e4d808f028419897512d8e3c3ea15345 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Tue, 17 Nov 2026 04:26:43 +0000 Subject: [PATCH 1/4] fix: give the site name its own variable, EB_PIPELINE_SITE_NAME A run exported the site name as EB_PIPELINE_SITE, which is also the variable that --site falls back to. An eb-pipeline that a build, a route or a cache command started without --site read the name as a path, found no such file and exited 2. The commands of a run now get the site file in EB_PIPELINE_SITE, made absolute so that it names the same file from any directory, and the name in EB_PIPELINE_SITE_NAME. With EB_PIPELINE_TARGET, EB_PIPELINE_BUILD_TYPE, EB_PIPELINE_RUN_ID and EB_PIPELINE_LOG_STAMP, which already meant to the commands what they mean to the command line, an eb-pipeline call inside a run sees the settings of the run. The name cannot stay in a variable that must hold a path, so the fragment names the break: a command that read the name from EB_PIPELINE_SITE reads EB_PIPELINE_SITE_NAME. Nothing in the templates, examples and tests of this repository, nor in the sibling tools, read it. resolve::explain takes the site file, which Scope now carries, so that explain shows the environment that a run sets. --- changelog.d/+site-file-variable.removal.md | 1 + docs/orgmode/howto/write-a-site-file.org | 5 ++- docs/orgmode/reference/environment.org | 6 ++- docs/orgmode/reference/plan-and-result.org | 3 +- docs/orgmode/reference/site-file.org | 16 +++---- src/main.rs | 11 ++++- src/resolve.rs | 17 +++++++- src/site.rs | 1 + tests/run_stubs.rs | 51 ++++++++++++++++++++++ tests/schema_and_plan.rs | 49 +++++++++++++++------ 10 files changed, 132 insertions(+), 28 deletions(-) create mode 100644 changelog.d/+site-file-variable.removal.md diff --git a/changelog.d/+site-file-variable.removal.md b/changelog.d/+site-file-variable.removal.md new file mode 100644 index 0000000..5730dce --- /dev/null +++ b/changelog.d/+site-file-variable.removal.md @@ -0,0 +1 @@ +The commands of a run get the site file in `EB_PIPELINE_SITE`, as an absolute path, and the site name in the new `EB_PIPELINE_SITE_NAME`; `explain` and the plan show both. `EB_PIPELINE_SITE` held the name, so an `eb-pipeline` that a command started without `--site` tried to read a file of that name and exited 2. A command that reads the site name from `EB_PIPELINE_SITE` must read `EB_PIPELINE_SITE_NAME` instead. In the library, `resolve::explain` takes the site file as its second argument and `Scope` has a `site_file` field. diff --git a/docs/orgmode/howto/write-a-site-file.org b/docs/orgmode/howto/write-a-site-file.org index 54c63ca..ebaec02 100644 --- a/docs/orgmode/howto/write-a-site-file.org +++ b/docs/orgmode/howto/write-a-site-file.org @@ -88,7 +88,8 @@ For a site on top of the European Environment for Scientific Software Installati EB_PIPELINE_LOG_STAMP = "" EB_PIPELINE_MODULES = "EasyBuild" EB_PIPELINE_RUN_ID = "" - EB_PIPELINE_SITE = "example" + EB_PIPELINE_SITE = "$WORK/site.toml" + EB_PIPELINE_SITE_NAME = "example" EB_PIPELINE_TARGET = "zen4" [targets.phases.build] @@ -99,6 +100,8 @@ For a site on top of the European Environment for Scientific Software Installati ... #+end_example + =EB_PIPELINE_SITE= is the site file as an absolute path, here with =$WORK= for the directory that holds it, so that a command can run eb-pipeline on the same file. + 5. To change a value for one run without editing the file, set it in a variable named =EB_PIPELINE__SECTION__KEY=, here a node-local build directory: #+begin_src bash diff --git a/docs/orgmode/reference/environment.org b/docs/orgmode/reference/environment.org index 2b00fda..ad6a732 100644 --- a/docs/orgmode/reference/environment.org +++ b/docs/orgmode/reference/environment.org @@ -72,7 +72,8 @@ The keys of =[scheduler.env]= come first, and a variable of the table below with | =EASYBUILD_CUDA_COMPUTE_CAPABILITIES= | the target's =cuda_compute_capabilities= | it is set | | =EASYBUILD_READ_ONLY_INSTALLDIR= | =filesystems.read_only_installdir_value=, =1= by default | =filesystems.read_only_installdir= is =true= | | =EASYBUILD_CONFIGS_REPOPATH= | =filesystems.configs_repo= | it is set | -| =EB_PIPELINE_SITE= | =site.name= | always | +| =EB_PIPELINE_SITE= | the site file, as an absolute path | always | +| =EB_PIPELINE_SITE_NAME= | =site.name= | always | | =EB_PIPELINE_TARGET= | the target's name | always | | =EB_PIPELINE_BUILD_TYPE= | the build type | always | | =EB_PIPELINE_RUN_ID= | the run id | always | @@ -89,6 +90,9 @@ The keys of =[scheduler.env]= come first, and a variable of the table below with | the one named by =modules.eessi.accel_override_var=, =EESSI_ACCELERATOR_TARGET_OVERRIDE= by default | the target's =accel_target= | =[modules.eessi]= is on and =accel_target= is set | | =EESSI_SITE_SOFTWARE_PREFIX= | the target's =site_prefix=, else =filesystems.install_root= | =[modules.eessi]= is on | +=EB_PIPELINE_SITE=, =EB_PIPELINE_TARGET=, =EB_PIPELINE_BUILD_TYPE=, =EB_PIPELINE_RUN_ID= and =EB_PIPELINE_LOG_STAMP= are also the variables of the options above, so a command that runs =eb-pipeline= without those options gets the site file, target, build type, run id and log stamp of the run. +=eb-pipeline= does not read =EB_PIPELINE_SITE_NAME=; =EB_PIPELINE__SITE__NAME=, with two underscores, is the variable that sets =name= in the site file. + =[modules.eessi]= is on when the site file has the table and its =enabled= is not =false=. =[licences]= is on when its =enabled= and =enforce= are not =false=. =EESSI= stands for the European Environment for Scientific Software Installations. diff --git a/docs/orgmode/reference/plan-and-result.org b/docs/orgmode/reference/plan-and-result.org index 50ce42c..9923786 100644 --- a/docs/orgmode/reference/plan-and-result.org +++ b/docs/orgmode/reference/plan-and-result.org @@ -76,7 +76,8 @@ cat plan.json "EB_PIPELINE_LOG_DIR": "$WORK/logs/20261117_090000/cpu", "EB_PIPELINE_LOG_STAMP": "20261117_090000", "EB_PIPELINE_RUN_ID": "nightly", - "EB_PIPELINE_SITE": "example", + "EB_PIPELINE_SITE": "$WORK/site.toml", + "EB_PIPELINE_SITE_NAME": "example", "EB_PIPELINE_TARGET": "cpu" }, "name": "build", diff --git a/docs/orgmode/reference/site-file.org b/docs/orgmode/reference/site-file.org index 60fe1d7..849bd0c 100644 --- a/docs/orgmode/reference/site-file.org +++ b/docs/orgmode/reference/site-file.org @@ -77,14 +77,14 @@ It is one file in Tom's Obvious Minimal Language (TOML), named by =--site=. ** =[site]= -| Key | Type | Default | Meaning | -|--------------------+--------+---------------------------------------------------+-----------------------------------------------------------------------------------------------------| -| =name= | string | required | The name of the site. A run exports it as =EB_PIPELINE_SITE=, and it is the default of =project=. | -| =project= | string | =site.name= | The value of ={project}= in =scheduler.job_name_template=. | -| =build_account= | string | none | The account that owns the installs; exported as =EB_PIPELINE_BUILD_ACCOUNT= and not read otherwise. | -| =default_group= | string | none | The default Unix group of the installs; exported as =EB_PIPELINE_DEFAULT_GROUP=. | -| =stack_generation= | string | none | A label for the generation of the software stack, such as =2026.1=; not read. | -| =tools= | table | all tools looked up on =PATH=, no minimum version | The programs of the sibling tools and the versions they need. | +| Key | Type | Default | Meaning | +|--------------------+--------+---------------------------------------------------+--------------------------------------------------------------------------------------------------------| +| =name= | string | required | The name of the site. A run exports it as =EB_PIPELINE_SITE_NAME=, and it is the default of =project=. | +| =project= | string | =site.name= | The value of ={project}= in =scheduler.job_name_template=. | +| =build_account= | string | none | The account that owns the installs; exported as =EB_PIPELINE_BUILD_ACCOUNT= and not read otherwise. | +| =default_group= | string | none | The default Unix group of the installs; exported as =EB_PIPELINE_DEFAULT_GROUP=. | +| =stack_generation= | string | none | A label for the generation of the software stack, such as =2026.1=; not read. | +| =tools= | table | all tools looked up on =PATH=, no minimum version | The programs of the sibling tools and the versions they need. | *** =[site.tools]= diff --git a/src/main.rs b/src/main.rs index 605d232..0c87da9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -188,6 +188,14 @@ fn load_valid(path: &Path, lists_dir: Option<&Path>) -> Result Option { + std::path::absolute(path) + .ok() + .and_then(|p| p.to_str().map(str::to_string)) +} + fn cmd_check(site_path: &Path, lists_dir: Option<&Path>, probe: bool) -> Result { let s = load_valid(site_path, lists_dir)?; let m = &s.modules; @@ -237,7 +245,7 @@ fn cmd_explain( format: Format, ) -> Result { let s = load_valid(site_path, None)?; - let v = explain(&s, target, build_type)?; + let v = explain(&s, site_file(site_path).as_deref(), target, build_type)?; match format { Format::Json => write_json(&v, None)?, Format::Toml => print!( @@ -380,6 +388,7 @@ fn cmd_plan_or_run(c: &Common, m: Mode) -> Result { }); let scope = Scope { site: &s, + site_file: site_file(&c.site), target, build_type: Some(&c.build_type), run_id, diff --git a/src/resolve.rs b/src/resolve.rs index 8dc46f3..616115e 100644 --- a/src/resolve.rs +++ b/src/resolve.rs @@ -58,6 +58,9 @@ pub fn role_args(site: &Site, target: &Target, role: Role) -> Option { pub struct Scope<'a> { /// The site file. pub site: &'a Site, + /// The path of the site file, absolute, exported as `EB_PIPELINE_SITE` + /// so that a command can run eb-pipeline on the same file. + pub site_file: Option, /// The target the phase runs for. pub target: &'a Target, /// The build type, which picks the target's `build_types` override. @@ -410,7 +413,10 @@ impl<'a> Scope<'a> { if let Some(c) = &fs.configs_repo { put("EASYBUILD_CONFIGS_REPOPATH", c.clone()); } - put("EB_PIPELINE_SITE", s.site.name.clone()); + if let Some(f) = &self.site_file { + put("EB_PIPELINE_SITE", f.clone()); + } + put("EB_PIPELINE_SITE_NAME", s.site.name.clone()); put("EB_PIPELINE_TARGET", self.target.name.clone()); put("EB_PIPELINE_BUILD_TYPE", self.build_name().to_string()); put("EB_PIPELINE_RUN_ID", self.run_id.clone()); @@ -535,7 +541,13 @@ fn strip_nulls(v: Value) -> Value { } /// Resolved view of one or all targets after defaults and overrides. -pub fn explain(site: &Site, target: Option<&str>, build_type: Option<&str>) -> Result { +/// `site_file` is the `EB_PIPELINE_SITE` of the environment it shows. +pub fn explain( + site: &Site, + site_file: Option<&str>, + target: Option<&str>, + build_type: Option<&str>, +) -> Result { let selected: Vec<&Target> = match target { Some(t) => vec![site.target(t)?], None => site.targets.iter().collect(), @@ -544,6 +556,7 @@ pub fn explain(site: &Site, target: Option<&str>, build_type: Option<&str>) -> R for t in selected { let scope = Scope { site, + site_file: site_file.map(str::to_string), target: t, build_type, run_id: "".into(), diff --git a/src/site.rs b/src/site.rs index 48be2f3..46adba3 100644 --- a/src/site.rs +++ b/src/site.rs @@ -501,6 +501,7 @@ pub fn validate(site: &Site, lists_dir: Option<&Path>) -> Vec { for t in site.targets.iter().filter(|t| t.staged.unwrap_or(r.staged)) { let scope = Scope { site, + site_file: None, target: t, build_type: None, run_id: String::new(), diff --git a/tests/run_stubs.rs b/tests/run_stubs.rs index feb1f4e..a442c8d 100644 --- a/tests/run_stubs.rs +++ b/tests/run_stubs.rs @@ -75,6 +75,9 @@ ec="$1"; stem="${ec%.eb}" echo "$*" >> "$D/eb.calls" case " $* " in *" --fetch "*) kind=fetch;; *) kind=build;; esac env | grep '^EB_PIPELINE_\|^EASYBUILD_\|^ROUTE_' | sort > "$D/env.$kind.$stem" +if [ -n "${STUB_EB_PIPELINE:-}" ]; then + (cd / && "$STUB_EB_PIPELINE" targets) > "$D/targets.$stem" 2>&1 || exit 1 +fi if [ -n "${STUB_EB_SLEEP:-}" ]; then echo started > "$D/started" trap 'echo term > "$D/termed"; kill $pid 2>/dev/null; exit 0' TERM @@ -2029,6 +2032,54 @@ fn split_install_vars_reach_the_build() { assert!(e.contains("EASYBUILD_READ_ONLY_INSTALLDIR=True"), "{e}"); } +/// A command of a run that runs eb-pipeline without `--site`, from another +/// directory, reads the site file of the run: a relative `--site` reaches it +/// as an absolute EB_PIPELINE_SITE, and the site name as EB_PIPELINE_SITE_NAME. +#[test] +fn a_command_that_runs_eb_pipeline_reads_the_site_file_of_the_run() { + let env = setup(""); + let root = env.dir.path(); + std::fs::write(root.join("list.txt"), "Foo-1.0-foss-2025a.eb\n").unwrap(); + let path = format!( + "{}:{}", + env.stubs.display(), + std::env::var("PATH").unwrap_or_default() + ); + let mut c = Command::new(env!("CARGO_BIN_EXE_eb-pipeline")); + c.current_dir(root) + .args(["run", "--site", "site.toml", "--list", "list.txt"]) + .args(["--target", "cpu", "--build-type", "production"]) + .args(["--log-stamp", "20260101_000000"]) + .env("PATH", path) + .env("STUB_DIR", root) + .env("STUB_EB_PIPELINE", env!("CARGO_BIN_EXE_eb-pipeline")) + .env_remove("EB_PIPELINE_SITE") + .env_remove("EB_PIPELINE_SITE_NAME") + .stdin(Stdio::null()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()); + let child = { + let _g = SPAWN.lock().unwrap(); + c.spawn().unwrap() + }; + let o = child.wait_with_output().unwrap(); + assert_eq!( + o.status.code(), + Some(0), + "{}", + String::from_utf8_lossy(&o.stderr) + ); + let e = file_text(&env, "env.build.Foo-1.0-foss-2025a"); + let site_file = root.canonicalize().unwrap().join("site.toml"); + assert!( + e.lines() + .any(|l| l == format!("EB_PIPELINE_SITE={}", site_file.display())), + "{e}" + ); + assert!(e.lines().any(|l| l == "EB_PIPELINE_SITE_NAME=t"), "{e}"); + assert_eq!(file_text(&env, "targets.Foo-1.0-foss-2025a"), "cpu\n"); +} + #[test] fn installed_modules_dirs_come_from_the_environment_at_run_time() { let site = "[shards]\ncount = 2\neasyconfigs = [\"/opt/ec\"]\ninstalled_modules_dirs = [\"@ROOT@/m\"]\ninstalled_modules_dirs_from_env = [\"STUB_MODS\", \"STUB_MODS2\"]\n"; diff --git a/tests/schema_and_plan.rs b/tests/schema_and_plan.rs index d918936..3ad4a61 100644 --- a/tests/schema_and_plan.rs +++ b/tests/schema_and_plan.rs @@ -80,7 +80,7 @@ fn missing_required_sections_are_rejected() { fn defaults_and_overrides_resolve() { let s = site::parse(MINIMAL).unwrap(); assert!(site::validate(&s, None).is_empty()); - let v = resolve::explain(&s, Some("cpu"), Some("test")).unwrap(); + let v = resolve::explain(&s, None, Some("cpu"), Some("test")).unwrap(); let t = &v["targets"][0]; // target override wins over the default assert_eq!(t["phases"]["build"]["args"], "-p big -c 64"); @@ -88,12 +88,12 @@ fn defaults_and_overrides_resolve() { assert_eq!(t["phases"]["short"]["args"], "-p batch -c 1"); // per build type override wins over the target value assert_eq!(t["eb_optarch"], "GCC:-march=b"); - let v = resolve::explain(&s, Some("cpu"), Some("production")).unwrap(); + let v = resolve::explain(&s, None, Some("cpu"), Some("production")).unwrap(); assert_eq!(v["targets"][0]["eb_optarch"], "GCC:-march=a"); // launch line: launch, job name, role arguments let launch: Vec = serde_json::from_value( - resolve::explain(&s, Some("other"), Some("production")).unwrap()["targets"][0]["phases"] - ["build"]["launch"] + resolve::explain(&s, None, Some("other"), Some("production")).unwrap()["targets"][0] + ["phases"]["build"]["launch"] .clone(), ) .unwrap(); @@ -108,7 +108,27 @@ fn defaults_and_overrides_resolve() { "4" ] ); - assert!(resolve::explain(&s, Some("nope"), None).is_err()); + assert!(resolve::explain(&s, None, Some("nope"), None).is_err()); +} + +#[test] +fn the_environment_names_the_site_file_and_the_site() { + let s = site::parse(MINIMAL).unwrap(); + let env = + |file| resolve::explain(&s, file, Some("cpu"), None).unwrap()["targets"][0]["env"].clone(); + let e = env(Some("/etc/eb/site.toml")); + assert_eq!(e["EB_PIPELINE_SITE"], "/etc/eb/site.toml"); + assert_eq!(e["EB_PIPELINE_SITE_NAME"], "t"); + assert!(env(None).get("EB_PIPELINE_SITE").is_none()); + let v = plan_of(MINIMAL, "Foo-1.0.eb\n", "other"); + let e = &phase(&v, "build")["env"]; + assert!( + e["EB_PIPELINE_SITE"] + .as_str() + .is_some_and(|f| f.starts_with('/') && f.ends_with("/site.toml")), + "{e}" + ); + assert_eq!(e["EB_PIPELINE_SITE_NAME"], "t"); } #[test] @@ -129,7 +149,7 @@ fn staged_targets_record_through_their_own_ledger_config() { ); let s = site::parse(&own).unwrap(); assert!(site::validate(&s, None).is_empty()); - let v = resolve::explain(&s, None, None).unwrap(); + let v = resolve::explain(&s, None, None, None).unwrap(); assert_eq!(v["targets"][0]["ledger_config"], "/etc/eb/ledger.json"); assert_eq!( v["targets"][1]["ledger_config"], @@ -859,8 +879,8 @@ fn route_phases_select_what_is_routed() { fn route_without_args_keeps_the_zero_one_argv() { let site = with_target("[targets.route]\nkind = \"command\"\ncommand = \"/opt/r/route\"\n"); let s = site::parse(&site).unwrap(); - let launch = resolve::explain(&s, Some("other"), Some("production")).unwrap()["targets"][0] - ["phases"]["cpu"]["launch"] + let launch = resolve::explain(&s, None, Some("other"), Some("production")).unwrap()["targets"] + [0]["phases"]["cpu"]["launch"] .clone(); assert_eq!(launch[0], "/opt/r/route"); assert_eq!(launch[1], "srun"); @@ -912,7 +932,7 @@ fn cpu_hardware_and_fetch_profile() { assert_eq!(fetch["EB_PIPELINE_HW_VENDOR_ID"], "v"); assert_eq!(fetch["EB_PIPELINE_HW_MODEL"], "2"); let s = site::parse(&site).unwrap(); - let e = resolve::explain(&s, Some("other"), None).unwrap(); + let e = resolve::explain(&s, None, Some("other"), None).unwrap(); assert_eq!(e["targets"][0]["cpu_hardware"]["model"], 4); // without cpu_hardware nothing is exported let site = with_target("[targets.hardware]\nvendor_id = \"v\"\n"); @@ -1234,7 +1254,7 @@ fn work_dir_is_the_target_build_path() { .replace("/scratch/x/build", "/scratch/x/build/{target}"); let s = site::parse(&site).unwrap(); assert!(site::validate(&s, None).is_empty()); - let t = &resolve::explain(&s, Some("other"), None).unwrap()["targets"][0]; + let t = &resolve::explain(&s, None, Some("other"), None).unwrap()["targets"][0]; let launch: Vec = serde_json::from_value(t["phases"]["cpu"]["launch"].clone()).unwrap(); assert_eq!( launch[..4], @@ -1261,7 +1281,7 @@ fn a_target_state_root_gives_each_target_its_own_state_root() { let a = argv_of(&phase(&v, "build")["commands"][0]); let i = a.iter().position(|x| x == "--state-root").unwrap(); assert_eq!(a[i + 1], "/opt/eb/other/.eb-staged-rebuild"); - let e = resolve::explain(&s, None, None).unwrap(); + let e = resolve::explain(&s, None, None, None).unwrap(); assert_eq!( e["targets"][0]["state_root"], "/opt/eb/cpu/.eb-staged-rebuild" @@ -1428,7 +1448,8 @@ fn explain_names_the_eessi_extend_install_path() { ); let note = |text: &str| { let s = site::parse(text).unwrap(); - resolve::explain(&s, Some("other"), None).unwrap()["targets"][0]["install_note"].clone() + resolve::explain(&s, None, Some("other"), None).unwrap()["targets"][0]["install_note"] + .clone() }; assert_eq!( note(&site), @@ -1457,7 +1478,7 @@ fn explain_names_the_eessi_extend_install_path() { fn eessi_template_roots_sit_under_the_eessi_extend_path() { let text = std::fs::read_to_string(example("eessi-site.toml")).unwrap(); let s = site::parse(&text).unwrap(); - let v = resolve::explain(&s, None, None).unwrap(); + let v = resolve::explain(&s, None, None, None).unwrap(); for t in v["targets"].as_array().unwrap() { let base = format!( "{}/versions//software/linux/", @@ -1476,7 +1497,7 @@ fn eessi_template_roots_sit_under_the_eessi_extend_path() { fn eessi_template_targets_have_a_build_path_and_a_state_root_each() { let text = std::fs::read_to_string(example("eessi-site.toml")).unwrap(); let s = site::parse(&text).unwrap(); - let v = resolve::explain(&s, None, None).unwrap(); + let v = resolve::explain(&s, None, None, None).unwrap(); let targets = v["targets"].as_array().unwrap(); assert_eq!(targets.len(), 4); for t in targets { From 163dbab14ee47ef338adc7eeb5f822f69e8b9689 Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Tue, 17 Nov 2026 04:29:54 +0000 Subject: [PATCH 2/4] fix: say which commands get the hardware class of cpu_hardware The schema text of [targets.cpu_hardware] said that every command exports a hardware class, while only the source prefetch and build commands of a line do: hardware_env is called from prefetch_cmd and build_cmd alone. The code is right for site operations, and the text now says what it does. Those two commands work for one unit on nodes of one class, so a hook or wrapper that chooses by CPU, such as an override of CPU detection for prerequisites built on other nodes, needs the class there. The shard, admit, keep-failed, cache and rotate commands work for a whole list, a reservation, a log or a target, and no class is theirs to carry. The text of [targets.hardware] also says that it is exported only when cpu_hardware is set, which the site file reference now says too. --- changelog.d/+hardware-schema-text.bugfix.md | 1 + docs/orgmode/reference/site-file.org | 4 +- src/schema.rs | 5 +- tests/schema_and_plan.rs | 76 +++++++++++++++++++++ 4 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 changelog.d/+hardware-schema-text.bugfix.md diff --git a/changelog.d/+hardware-schema-text.bugfix.md b/changelog.d/+hardware-schema-text.bugfix.md new file mode 100644 index 0000000..98490ac --- /dev/null +++ b/changelog.d/+hardware-schema-text.bugfix.md @@ -0,0 +1 @@ +`eb-pipeline schema` says which commands get the hardware class of `[targets.cpu_hardware]`: the source prefetch and build commands of each line, which build for one class of node, as they always have. It said that every command did, and did not say that `[targets.hardware]` is exported only when `cpu_hardware` is set. diff --git a/docs/orgmode/reference/site-file.org b/docs/orgmode/reference/site-file.org index 849bd0c..713fcfe 100644 --- a/docs/orgmode/reference/site-file.org +++ b/docs/orgmode/reference/site-file.org @@ -151,8 +151,8 @@ A run builds for one target, named by =--target=. | =phases= | table | =phase_defaults= | The launch arguments of the target, per role; a role it leaves out takes the one in =[phase_defaults]=. | | =route= | table | none | A command that wraps the CPU-role commands of the target. | | =select= | table | none | Which lines of a list the target builds; without it, all of them. | -| =hardware= | table | none | The CPU of the target's build nodes. | -| =cpu_hardware= | table | none | The CPU of the nodes that build the CPU-role units. When it is set, the source prefetch and build commands export a CPU class as =EB_PIPELINE_HW_VENDOR_ID=, =EB_PIPELINE_HW_CPU_FAMILY= and =EB_PIPELINE_HW_MODEL=: this one for a CPU-role unit, =hardware= for the others. | +| =hardware= | table | none | The CPU of the target's build nodes; the commands get it only when =cpu_hardware= is set. | +| =cpu_hardware= | table | none | The CPU of the nodes that build the CPU-role units. When it is set, the source prefetch and build commands export a CPU class as =EB_PIPELINE_HW_VENDOR_ID=, =EB_PIPELINE_HW_CPU_FAMILY= and =EB_PIPELINE_HW_MODEL=: this one for a CPU-role unit, =hardware= for the others. No other command gets them. | | =fetch_profile= | table | none | A table with any keys, passed to the source prefetch commands as =EB_PIPELINE_FETCH_PROFILE=, in JavaScript Object Notation (JSON) with sorted keys. | | =package_env= | table of tables | ={}= | Variables per package name, =[targets.package_env.NAME]=, for the lines of that package; per key, they win over =[modules.package_env.NAME]=. | | =build_types= | table of tables | ={}= | Values per build type, =[targets.build_types.NAME]=. | diff --git a/src/schema.rs b/src/schema.rs index 29fe847..1b32d7f 100644 --- a/src/schema.rs +++ b/src/schema.rs @@ -281,9 +281,10 @@ doc_struct! { route: Option => ("table", "none", false, "CPU phase wrapper."), select: Option