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:
parent
d04d176cb4
commit
df5f67e690
@ -474,8 +474,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 {}
|
||||||
|
Loading…
Reference in New Issue
Block a user