From 68fbdc88d27c81e1bc6c7a68647fd8a970283423 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Sat, 2 Mar 2024 14:03:48 +0100 Subject: osxbundle: avoid running `codesign` with deprecated `--deep` argument `--deep` is deprecated as of macos 13.0. It is also not supported by alternative `codesign` implementations like [sigtool](https://github.com/thefloweringash/sigtool). Related: https://github.com/NixOS/nixpkgs/pull/270691 --- TOOLS/osxbundle.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/TOOLS/osxbundle.py b/TOOLS/osxbundle.py index 1a9cfb4a6e..fc8379c748 100755 --- a/TOOLS/osxbundle.py +++ b/TOOLS/osxbundle.py @@ -40,7 +40,13 @@ def apply_plist_template(plist_file, version): print(line.rstrip().replace('${VERSION}', version)) def sign_bundle(binary_name): - sh('codesign --force --deep -s - ' + bundle_path(binary_name)) + sign_directories = ['Contents/Frameworks', 'Contents/MacOS'] + for dir in sign_directories: + resolved_dir = os.path.join(bundle_path(binary_name), dir) + for root, _dirs, files in os.walk(resolved_dir): + for f in files: + sh('codesign --force -s - ' + os.path.join(root, f)) + sh('codesign --force -s - ' + bundle_path(binary_name)) def bundle_version(src_path): version = 'UNKNOWN' -- cgit v1.2.3