]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkfs-util: propagate SOURCE_DATE_EPOCH to mcopy
authorMalte Poll <mp@edgeless.systems>
Mon, 28 Aug 2023 15:20:36 +0000 (17:20 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 29 Aug 2023 13:58:44 +0000 (14:58 +0100)
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
src/shared/mkfs-util.c

index 6fb0e2a16564458bdd3e11d13cdeee6548e06e88..be831b0762298f5459fa421ba6fcf16bf442892a 100644 (file)
@@ -161,7 +161,7 @@ static int do_mcopy(const char *node, const char *root) {
         if (r == 0) {
                 /* Avoid failures caused by mismatch in expectations between mkfs.vfat and mcopy by disabling
                  * the stricter mcopy checks using MTOOLS_SKIP_CHECK. */
-                execve(mcopy, argv, STRV_MAKE("MTOOLS_SKIP_CHECK=1"));
+                execve(mcopy, argv, STRV_MAKE("MTOOLS_SKIP_CHECK=1", strv_find_prefix(environ, "SOURCE_DATE_EPOCH=")));
 
                 log_error_errno(errno, "Failed to execute mcopy: %m");