mirror of
https://github.com/raspberrypi/rpi-eeprom.git
synced 2026-01-20 21:13:36 +08:00
rpi-eeprom-digest: honour SOURCE_DATE_EPOCH
If used in a build environment that sets SOURCE_DATE_EPOCH, we should honour that in order to generate reproducible binaries. See https://reproducible-builds.org/specs/source-date-epoch/ .
This commit is contained in:
committed by
Tim Gover
parent
c873eecc28
commit
c6b8de409d
@@ -92,7 +92,11 @@ writeSig() {
|
|||||||
sha256sum "${IMAGE}" | awk '{print $1}' > "${OUTPUT}"
|
sha256sum "${IMAGE}" | awk '{print $1}' > "${OUTPUT}"
|
||||||
|
|
||||||
# Include the update-timestamp
|
# Include the update-timestamp
|
||||||
echo "ts: $(date -u +%s)" >> "${OUTPUT}"
|
if [ -n "${SOURCE_DATE_EPOCH}" ] ; then
|
||||||
|
echo "ts: ${SOURCE_DATE_EPOCH}" >> "${OUTPUT}"
|
||||||
|
else
|
||||||
|
echo "ts: $(date -u +%s)" >> "${OUTPUT}"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "${KEY}" ]; then
|
if [ -n "${KEY}" ]; then
|
||||||
[ -f "${KEY}" ] || die "RSA private \"${KEY}\" not found"
|
[ -f "${KEY}" ] || die "RSA private \"${KEY}\" not found"
|
||||||
|
|||||||
Reference in New Issue
Block a user