Use SOURCE_DATE_EPOCH for volumeid of efi boot image

By default mkfs.mksdos choose volume id based on current time. If
SOURCE_DATE_EPOCH is set, use that instead.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
(cherry picked from commit de8124366e)
This commit is contained in:
Marek Marczykowski-Górecki 2018-10-05 04:48:57 +02:00 committed by Brian C. Lane
parent d04d176cb4
commit df5f67e690

View File

@ -474,8 +474,12 @@ def mkfsimage(fstype, rootdir, outfile, size=None, mkfsargs=None, mountargs="",
# convenience functions with useful defaults
def mkdosimg(rootdir, outfile, size=None, label="", mountargs="shortname=winnt,umask=0077", graft=None):
graft = graft or {}
mkfsargs = ["-n", label]
if 'SOURCE_DATE_EPOCH' in os.environ:
mkfsargs.extend(["-i",
"{:x}".format(int(os.environ['SOURCE_DATE_EPOCH']))])
mkfsimage("msdos", rootdir, outfile, size, mountargs=mountargs,
mkfsargs=["-n", label], graft=graft)
mkfsargs=mkfsargs, graft=graft)
def mkext4img(rootdir, outfile, size=None, label="", mountargs="", graft=None):
graft = graft or {}