diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-15 20:18:49 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2021-10-18 21:05:26 +0200 |
commit | faa43d64913f70265626b5cdf6cdfe49d5e1840b (patch) | |
tree | 5b144c4a7610247e22595b97e0bdaff635e81050 /examples | |
parent | b97c17fbc124d12816c0635be3417ac5792e8e2f (diff) | |
download | rebel-faa43d64913f70265626b5cdf6cdfe49d5e1840b.tar rebel-faa43d64913f70265626b5cdf6cdfe49d5e1840b.zip |
examples: rootfs: make build reproducible
Diffstat (limited to 'examples')
-rw-r--r-- | examples/rootfs.yml | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/examples/rootfs.yml b/examples/rootfs.yml index f1322b0..77b50ba 100644 --- a/examples/rootfs.yml +++ b/examples/rootfs.yml @@ -37,13 +37,20 @@ tasks: build_depends: - recipe: 'e2fsprogs' task: 'install' + - recipe: 'make_ext4fs' + task: 'install' depends: - task: 'install' output: default: {} run: | - mkdir {{destdir}} - IMAGE={{destdir}}/{{pn}}.ext4 - truncate -s 2G "$IMAGE" - {{build.prefix}}/sbin/mkfs.ext4 -d {{sysroot}} "$IMAGE" + UUID="$( + python3 \ + -c 'import sys; import uuid; print(uuid.UUID(hex=sys.argv[1][:32], version=4))' \ + "$INPUT_HASH" + )" + + mkdir {{destdir}} + {{build.prefix}}/bin/make_ext4fs -l 2G -T "$SOURCE_DATE_EPOCH" -L root "$IMAGE" {{sysroot}} + E2FSPROGS_FAKE_TIME="$SOURCE_DATE_EPOCH" {{build.prefix}}/sbin/tune2fs -U "$UUID" "$IMAGE" |