Skip to contentSkip to conversation

Explicitly unset SOURCE_DATE_EPOCH before running fs tests

PATCH In review Steve McIntyre 2 participants 3 messages Sep 18, 2022 – Sep 22, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Explicitly unset SOURCE_DATE_EPOCH before running fs tests

In some filesystem utils like mksquashfs, they will silently change behaviour and cause timestamps to unexpectedly change. Build environments like Debian's set SOURCE_DATE_EPOCH in the environment, so remove it. Reproducible builds are good and useful for shipped artifacts, but this causes build-time tests to fail.

---
 tests/util/grub-fs-tester.in | 3 +++
 1 file changed, 3 insertions(+)
tests/util/grub-fs-tester.in +3 -0
index 43f6175c3..6d70967e6 100644
@@ -5,6 +5,9 @@ export BLKID_FILE=/dev/null
 
 fs="$1"
 
+# We can't have this set, or filesystem tests will fail
+unset SOURCE_DATE_EPOCH
+
 GRUBFSTEST="@builddir@/grub-fstest"
 
 tempdir=`mktemp -d "${TMPDIR:-/tmp}/${0##*/}.$(date '+%Y%m%d%H%M%S%N').${fs}.XXX"` ||
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Steve McIntyre

In some filesystem utils like mksquashfs, they will silently change behaviour and cause timestamps to unexpectedly change. Build environments like Debian's set SOURCE_DATE_EPOCH in the environment, so remove it. Reproducible builds are good and useful for shipped artifacts, but this causes build-time tests to fail.

Quoted 9 lines
---
 tests/util/grub-fs-tester.in | 3 +++
 1 file changed, 3 insertions(+)
tests/util/grub-fs-tester.in +0 -0
index 43f6175c3..6d70967e6 100644

tests/util/grub-fs-tester.in export BLKID_FILE=/dev/null · line 10

Quoted 6 lines
tests/util/grub-fs-tester.in +3 -0
@@ -5,6 +5,9 @@ export BLKID_FILE=/dev/null
 
 fs="$1"
 
+# We can't have this set, or filesystem tests will fail
+unset SOURCE_DATE_EPOCH
+

... I would put this change before fs assignment above. It would be next to export and look more logically. At least for me... :-) If you do not object I will make this change before applying the patch.

Daniel

#2 lore raw
Quoted 23 lines · Daniel Kiper
Quoted 7 lines · Steve McIntyre

In some filesystem utils like mksquashfs, they will silently change behaviour and cause timestamps to unexpectedly change. Build environments like Debian's set SOURCE_DATE_EPOCH in the environment, so remove it. Reproducible builds are good and useful for shipped artifacts, but this causes build-time tests to fail.

Quoted 12 lines
---
 tests/util/grub-fs-tester.in | 3 +++
 1 file changed, 3 insertions(+)
tests/util/grub-fs-tester.in +0 -0
index 43f6175c3..6d70967e6 100644
@@ -5,6 +5,9 @@ export BLKID_FILE=/dev/null
 
 fs="$1"
 
Quoted 7 lines

tests/util/grub-fs-tester.in export BLKID_FILE=/dev/null · line 10

Quoted 3 lines
tests/util/grub-fs-tester.in +3 -0
+# We can't have this set, or filesystem tests will fail
+unset SOURCE_DATE_EPOCH
+

... I would put this change before fs assignment above. It would be next to export and look more logically. At least for me... :-) If you do not object I will make this change before applying the patch.

Sure, go for it. :-)

Signature · 2 lines
Steve McIntyre, Cambridge, UK.                                [email protected]
You raise the blade, you make the change... You re-arrange me 'til I'm sane...