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>
This commit is contained in:
Marek Marczykowski-Górecki 2018-10-05 04:48:57 +02:00 committed by Brian C. Lane
parent e7f45d333f
commit de8124366e

View File

@ -484,8 +484,12 @@ def mkfsimage(fstype, rootdir, outfile, size=None, mkfsargs=None, mountargs="",
# convenience functions with useful defaults # convenience functions with useful defaults
def mkdosimg(rootdir, outfile, size=None, label="", mountargs="shortname=winnt,umask=0077", graft=None): def mkdosimg(rootdir, outfile, size=None, label="", mountargs="shortname=winnt,umask=0077", graft=None):
graft = graft or {} 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, 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): def mkext4img(rootdir, outfile, size=None, label="", mountargs="", graft=None):
graft = graft or {} graft = graft or {}