Compare commits

...

2 Commits

Author SHA1 Message Date
Jelle van der Waa 6ec855b229
Merge 2371786797 into d80a9042ca 2024-09-17 12:23:28 +02:00
Jelle van der Waa 2371786797 mkfs-utils: pass S_D_E to mkfs for reproducible image creation
Without passing SOURCE_DATE_EPOCH to for example `mkfs.erofs` the
current time is used which ends up making it impossible to create a
reproducible image.

In the future more filesystem creation tools hopefully accept
SOURCE_DATE_EPOCH.
2024-09-17 11:28:04 +02:00
1 changed files with 3 additions and 0 deletions

View File

@ -669,6 +669,9 @@ int make_filesystem(
if (r == 0) {
/* Child */
if (strv_extend(&env, strv_find_prefix(environ, "SOURCE_DATE_EPOCH=")) < 0)
return log_oom();
STRV_FOREACH_PAIR(k, v, env)
if (setenv(*k, *v, /* replace = */ true) < 0) {
log_error_errno(r, "Failed to set %s=%s environment variable: %m", *k, *v);