Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Unified Diff: build/android/gyp/util/build_utils.py

Issue 1384513002: Fix unix file permissions in resource zips and jar files (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/util/build_utils.py
diff --git a/build/android/gyp/util/build_utils.py b/build/android/gyp/util/build_utils.py
index e025fb93f4ac172e684bb869aa61ba344b3c7b2b..f69401bbb39f825981157dd125d45b63a0f67ad0 100644
--- a/build/android/gyp/util/build_utils.py
+++ b/build/android/gyp/util/build_utils.py
@@ -28,6 +28,7 @@ COLORAMA_ROOT = os.path.join(CHROMIUM_SRC,
AAPT_IGNORE_PATTERN = ('!OWNERS:!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:' +
'!CVS:!thumbs.db:!picasa.ini:!*~:!*.d.stamp')
HERMETIC_TIMESTAMP = (2001, 1, 1, 0, 0, 0)
+HERMETIC_FILE_ATTR = (0644 << 16L)
@contextlib.contextmanager
@@ -243,6 +244,7 @@ def DoZip(inputs, output, base_dir=None):
for zip_path, fs_path in input_tuples:
CheckZipPath(zip_path)
zipinfo = zipfile.ZipInfo(filename=zip_path, date_time=HERMETIC_TIMESTAMP)
+ zipinfo.external_attr = HERMETIC_FILE_ATTR
with file(fs_path) as f:
contents = f.read()
outfile.writestr(zipinfo, contents)
@@ -275,6 +277,7 @@ def MergeZips(output, inputs, exclude_patterns=None, path_transform=None):
if not already_added and not MatchesGlob(dst_name, exclude_patterns):
zipinfo = zipfile.ZipInfo(filename=dst_name,
date_time=HERMETIC_TIMESTAMP)
+ zipinfo.external_attr = HERMETIC_FILE_ATTR
out_zip.writestr(zipinfo, in_zip.read(name))
added_names.add(dst_name)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698