Skip to content

Commit b631498

Browse files
committed
Bug 1812480 - Change Mac pkgs contents mode r=spohl,releng-reviewers,bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D291640
1 parent 6d4f40c commit b631498

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎python/mozbuild/mozpack/pkg.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@
1919
PBZX_CHUNK_SIZE = 16 * 1024 * 1024 # 16MB chunks
2020

2121

22+
def chmod(dir):
23+
"Set permissions of contents"
24+
perms = "a+rX,a-st,ug+w,o-w"
25+
print(f"Setting app permissions to: {perms}")
26+
subprocess.check_call(["chmod", "-R", perms, dir])
27+
28+
2229
def get_apple_template(name: str) -> Template:
2330
"""
2431
Given <name>, open file at <TEMPLATE_DIRECTORY>/<name>, read contents and
@@ -287,6 +294,8 @@ def create_pkg(
287294
distribution = distribution_tmp.substitute(app_info)
288295
save_text_file(distribution, flat_path / "Distribution")
289296

297+
chmod(root_path)
298+
290299
payload_path = flat_path / f"{app_name}.pkg/Payload"
291300
create_payload(payload_path, root_path, cpio_tool)
292301

0 commit comments

Comments
 (0)