summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Clobus <rclobus@rclobus.nl>2020-12-13 18:33:54 +0100
committerLuca Boccassi <bluca@debian.org>2020-12-13 20:33:24 +0000
commit3f7dd00fcb83177e679e9f1449200dee11dc1531 (patch)
tree5efd3fb65a1735d5476f9b838d14f3748a9e3a23
parentfac389a51bbca45b2c240a483cc55a2d2a9e8200 (diff)
downloadvyos-live-build-3f7dd00fcb83177e679e9f1449200dee11dc1531.tar.gz
vyos-live-build-3f7dd00fcb83177e679e9f1449200dee11dc1531.zip
Delay resolving the timestamp for the ISO volume to the moment the ISO-image is created
-rwxr-xr-xfunctions/configuration.sh3
-rwxr-xr-xscripts/build/binary_iso1
-rwxr-xr-xscripts/build/source_iso1
3 files changed, 4 insertions, 1 deletions
diff --git a/functions/configuration.sh b/functions/configuration.sh
index 62d7830a6..abf68109f 100755
--- a/functions/configuration.sh
+++ b/functions/configuration.sh
@@ -408,7 +408,8 @@ Prepare_config ()
LB_ISO_APPLICATION="${LB_ISO_APPLICATION:-Debian Live}"
LB_ISO_PREPARER="${LB_ISO_PREPARER:-live-build @LB_VERSION@; https://salsa.debian.org/live-team/live-build}"
LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER:-Debian Live project; https://wiki.debian.org/DebianLive; debian-live@lists.debian.org}"
- LB_ISO_VOLUME="${LB_ISO_VOLUME:-Debian ${LB_DISTRIBUTION} \$(date $DATE_UTC_OPTION +%Y%m%d-%H:%M)}"
+ # The string @ISOVOLUME_TS@ must have the same length as the output of `date +%Y%m%d-%H:%M`
+ LB_ISO_VOLUME="${LB_ISO_VOLUME:-Debian ${LB_DISTRIBUTION} @ISOVOLUME_TS@}"
LB_HDD_LABEL="${LB_HDD_LABEL:-DEBIAN_LIVE}"
LB_HDD_SIZE="${LB_HDD_SIZE:-auto}"
diff --git a/scripts/build/binary_iso b/scripts/build/binary_iso
index c0c791b73..ca0b39ef3 100755
--- a/scripts/build/binary_iso
+++ b/scripts/build/binary_iso
@@ -99,6 +99,7 @@ fi
if [ -n "${LB_ISO_VOLUME}" ] && [ "${LB_ISO_VOLUME}" != "none" ]
then
+ LB_ISO_VOLUME="$(echo "${LB_ISO_VOLUME}" | sed "s|@ISOVOLUME_TS@|$(date $DATE_UTC_OPTION +%Y%m%d-%H:%M --date @${SOURCE_DATE_EPOCH:-$(date +%s)})|")"
XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\""
fi
diff --git a/scripts/build/source_iso b/scripts/build/source_iso
index 06de879ec..c5aa66bb5 100755
--- a/scripts/build/source_iso
+++ b/scripts/build/source_iso
@@ -90,6 +90,7 @@ fi
if [ -n "${LB_ISO_VOLUME}" ] && [ "${LB_ISO_VOLUME}" != "none" ]
then
+ LB_ISO_VOLUME="$(echo "${LB_ISO_VOLUME}" | sed "s|@ISOVOLUME_TS@|$(date $DATE_UTC_OPTION +%Y%m%d-%H:%M --date @${SOURCE_DATE_EPOCH:-$(date +%s)})|")"
XORRISO_OPTIONS="${XORRISO_OPTIONS} -V \"${LB_ISO_VOLUME}\""
fi