Skip to content

Commit

Permalink
osxbundle: avoid running codesign with deprecated --deep argument
Browse files Browse the repository at this point in the history
`--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: NixOS/nixpkgs#270691
  • Loading branch information
davidkna committed Mar 2, 2024
1 parent 9189e89 commit 0b94473
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion TOOLS/osxbundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 0b94473

Please sign in to comment.