diff --git a/aosp_diff/caas/build/make/0001-use-a-dynamic-timestamp.patch b/aosp_diff/caas/build/make/0001-use-a-dynamic-timestamp.patch new file mode 100644 index 0000000000..dea652c1b3 --- /dev/null +++ b/aosp_diff/caas/build/make/0001-use-a-dynamic-timestamp.patch @@ -0,0 +1,65 @@ +From 20dd4a9b4c0fb0b18f0659a7bcc2e996699ecf51 Mon Sep 17 00:00:00 2001 +From: "jialei.feng" +Date: Tue, 13 Oct 2020 10:00:34 +0800 +Subject: [PATCH] use a dynamic timestamp + +Signed-off-by: jialei.feng +--- + tools/releasetools/add_img_to_target_files.py | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py +index eb041ecea..f85c9dfb3 100644 +--- a/tools/releasetools/add_img_to_target_files.py ++++ b/tools/releasetools/add_img_to_target_files.py +@@ -46,7 +46,6 @@ Usage: add_img_to_target_files [flag] target_files + + from __future__ import print_function + +-import datetime + import logging + import os + import shlex +@@ -76,13 +75,6 @@ OPTIONS.replace_verity_public_key = False + OPTIONS.replace_verity_private_key = False + OPTIONS.is_signing = False + +-# Use a fixed timestamp (01/01/2009 00:00:00 UTC) for files when packaging +-# images. (b/24377993, b/80600931) +-FIXED_FILE_TIMESTAMP = int(( +- datetime.datetime(2009, 1, 1, 0, 0, 0, 0, None) - +- datetime.datetime.utcfromtimestamp(0)).total_seconds()) +- +- + class OutputFile(object): + """A helper class to write a generated file to the given dir or zip. + +@@ -399,7 +391,6 @@ def CreateImage(input_dir, info_dict, what, output_file, block_list=None): + logger.info("creating %s.img...", what) + + image_props = build_image.ImagePropFromGlobalDict(info_dict, what) +- image_props["timestamp"] = FIXED_FILE_TIMESTAMP + + if what == "system": + fs_config_prefix = "" +@@ -471,8 +462,6 @@ def AddUserdata(output_zip): + + logger.info("creating userdata.img...") + +- image_props["timestamp"] = FIXED_FILE_TIMESTAMP +- + if OPTIONS.info_dict.get("userdata_img_with_data") == "true": + user_dir = os.path.join(OPTIONS.input_tmp, "DATA") + else: +@@ -562,8 +551,6 @@ def AddCache(output_zip): + + logger.info("creating cache.img...") + +- image_props["timestamp"] = FIXED_FILE_TIMESTAMP +- + user_dir = common.MakeTempDir() + build_image.BuildImage(user_dir, image_props, img.name) + +-- +2.17.1 +