diff --git a/android/gyp/finalize_apk.py b/android/gyp/finalize_apk.py index bf3893203..d71cb8fc7 100755 --- a/android/gyp/finalize_apk.py +++ b/android/gyp/finalize_apk.py @@ -11,7 +11,6 @@ import optparse import shutil import sys import tempfile -import zipfile from util import build_utils @@ -144,15 +143,6 @@ def FinalizeApk(options): JarSigner(options.key_path, options.key_name, options.key_passwd, apk_to_sign, signed_apk_path) - # Make the signing files hermetic. - with tempfile.NamedTemporaryFile(suffix='.zip') as hermetic_signed_apk: - with zipfile.ZipFile(signed_apk_path, 'r') as zi: - with zipfile.ZipFile(hermetic_signed_apk, 'w') as zo: - for info in zi.infolist(): - info.date_time = build_utils.HERMETIC_TIMESTAMP - zo.writestr(info, zi.read(info.filename)) - shutil.copy(hermetic_signed_apk.name, signed_apk_path) - if options.load_library_from_zip: # Reorder the contents of the APK. This re-establishes the canonical # order which means the library will be back at its page aligned location. diff --git a/android/gyp/util/build_utils.py b/android/gyp/util/build_utils.py index 283934ccc..c7394e4e8 100644 --- a/android/gyp/util/build_utils.py +++ b/android/gyp/util/build_utils.py @@ -28,7 +28,7 @@ COLORAMA_ROOT = os.path.join(host_paths.DIR_SOURCE_ROOT, # aapt should ignore OWNERS files in addition the default ignore pattern. AAPT_IGNORE_PATTERN = ('!OWNERS:!.svn:!.git:!.ds_store:!*.scc:.*:_*:' + '!CVS:!thumbs.db:!picasa.ini:!*~:!*.d.stamp') -HERMETIC_TIMESTAMP = (2001, 1, 1, 0, 0, 0) +_HERMETIC_TIMESTAMP = (2001, 1, 1, 0, 0, 0) _HERMETIC_FILE_ATTR = (0644 << 16L) @@ -267,7 +267,7 @@ def AddToZipHermetic(zip_file, zip_path, src_path=None, data=None, assert (src_path is None) != (data is None), ( '|src_path| and |data| are mutually exclusive.') CheckZipPath(zip_path) - zipinfo = zipfile.ZipInfo(filename=zip_path, date_time=HERMETIC_TIMESTAMP) + zipinfo = zipfile.ZipInfo(filename=zip_path, date_time=_HERMETIC_TIMESTAMP) zipinfo.external_attr = _HERMETIC_FILE_ATTR if src_path and os.path.islink(src_path):