From 2a8ed34b4ba2b90c7788fe50aa72babdd1c749fa Mon Sep 17 00:00:00 2001 From: Benno Rice Date: Fri, 24 Sep 2021 12:04:41 +1000 Subject: [PATCH] compose: pass SOURCE_DATE_EPOCH into bubblewrap environments This allows for internally executed processes to be stable around things like build timestamps, assuming they support it. --- rust/src/bwrap.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rust/src/bwrap.rs b/rust/src/bwrap.rs index fdd7ac7fa4..441b41ef08 100644 --- a/rust/src/bwrap.rs +++ b/rust/src/bwrap.rs @@ -175,6 +175,10 @@ impl Bubblewrap { let path_var = Path::new(PATH_VAR); launcher.set_environ(&[lang_var, path_var]); + if let Ok(source_date_epoch) = std::env::var("SOURCE_DATE_EPOCH") { + launcher.setenv("SOURCE_DATE_EPOCH", source_date_epoch, true); + } + // ⚠⚠⚠ If you change this, also update scripts/bwrap-script-shell.sh ⚠⚠⚠ let mut argv = vec![ "bwrap",