Bug 1365722 - Use correct permission bits in chmod; r?chmanchester draft
authorMike Shal <mshal@mozilla.com>
Wed, 03 May 2017 12:37:49 -0400
changeset 582485 32d2f071051dacd6e9500f02cf5328d6c488213e
parent 582484 60dfda1fa5ac76df34dcfabfa7e2cf84e70a4974
child 582486 add67ac2e2783d9320778742e041108a65e4a16a
push id60110
push userbmo:mshal@mozilla.com
push dateMon, 22 May 2017 18:29:32 +0000
reviewerschmanchester
bugs1365722
milestone55.0a1
Bug 1365722 - Use correct permission bits in chmod; r?chmanchester The chmod permissions need to be in octal format to get the expected permissions settings. This only seems to affect the output if we run the repackaging command on Linux, but it should still be fixed. MozReview-Commit-ID: to4v7dkSBl
python/mozbuild/mozbuild/action/exe_7z_archive.py
--- a/python/mozbuild/mozbuild/action/exe_7z_archive.py
+++ b/python/mozbuild/mozbuild/action/exe_7z_archive.py
@@ -15,17 +15,17 @@ def archive_exe(pkg_dir, tagfile, sfx_pa
     tmpdir = tempfile.mkdtemp(prefix='tmp')
     subprocess.check_call(['upx', '--best', '-o', mozpath.join(tmpdir, '7zSD.sfx'), sfx_package])
     shutil.move(pkg_dir, 'core')
     subprocess.check_call(['7z', 'a', '-r', '-t7z', mozpath.join(tmpdir, 'app.7z'), '-mx', '-m0=BCJ2', '-m1=LZMA:d25', '-m2=LZMA:d19', '-m3=LZMA:d19', '-mb0:1', '-mb0s1:2', '-mb0s2:3'])
     shutil.move('core', pkg_dir)
     with open(package, 'wb') as o:
         for i in [mozpath.join(tmpdir, '7zSD.sfx'), tagfile, mozpath.join(tmpdir, 'app.7z')]:
             shutil.copyfileobj(open(i, 'rb'), o)
-    os.chmod(package, 755)
+    os.chmod(package, 0755)
 
 def main(args):
     if len(args) != 4:
         print('Usage: exe_7z_archive.py <pkg_dir> <tagfile> <sfx_package> <package>',
               file=sys.stderr)
         return 1
     else:
         archive_exe(args[0], args[1], args[2], args[3])