summaryrefslogtreecommitdiff
path: root/apexer/apexer.py
diff options
context:
space:
mode:
authorMartijn Coenen <maco@google.com>2019-03-29 09:48:09 +0100
committerMartijn Coenen <maco@google.com>2019-03-29 09:50:19 +0100
commit4d1634160d7dbd850140c917072f73f1063a60d3 (patch)
tree94e472dec420ebc57ce45d0e2e995a53c670d746 /apexer/apexer.py
parentda5f5061f317a4463d0eb3c458a5767e88809a09 (diff)
apexer: Build filesystem images with inode size 256.
The reason this caused non-deterministic images earlier is that larger inodes have the 'crtime' attribute inline, and, due to a missing E2FSPROGS_FAKE_TIME, this attribute was set to the current time instead of a fixed time. Bug: 122991714 Test: rebuild apex.apexd_test.apex several times, check hash Change-Id: I0e05dbd25d19a5219d5e0f2bd2e1ba057ad2cc8d
Diffstat (limited to 'apexer/apexer.py')
-rw-r--r--apexer/apexer.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/apexer/apexer.py b/apexer/apexer.py
index 56b4c9b..461b6a7 100644
--- a/apexer/apexer.py
+++ b/apexer/apexer.py
@@ -243,9 +243,7 @@ def CreateApex(args, work_dir):
cmd.extend(['-b', str(BLOCK_SIZE)])
cmd.extend(['-m', '0']) # reserved block percentage
cmd.extend(['-t', 'ext4'])
- # TODO(b/122991714) setting the inode size makes the image root digest
- # non-deterministic, figure out why.
- # cmd.extend(['-I', '256']) # inode size
+ cmd.extend(['-I', '256']) # inode size
cmd.extend(['-N', str(inode_num)])
uu = str(uuid.uuid5(uuid.NAMESPACE_URL, "www.android.com"))
cmd.extend(['-U', uu])
@@ -270,7 +268,7 @@ def CreateApex(args, work_dir):
cmd.extend(['-C', args.canned_fs_config])
cmd.append('-s') # share dup blocks
cmd.append(img_file)
- RunCommand(cmd, args.verbose)
+ RunCommand(cmd, args.verbose, {"E2FSPROGS_FAKE_TIME": "1"})
cmd = ['e2fsdroid']
cmd.append('-e') # input is not android_sparse_file