diff options
author | David Knaack <davidkna@users.noreply.github.com> | 2024-03-02 14:03:48 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2024-03-07 20:43:30 +0100 |
commit | 68fbdc88d27c81e1bc6c7a68647fd8a970283423 (patch) | |
tree | fa9526de6914e13ef6d1252a12fbbe44a16bc88a | |
parent | 580bc69d0c4e99394a5490d060ebba9ab54ef056 (diff) | |
download | mpv-68fbdc88d27c81e1bc6c7a68647fd8a970283423.tar.bz2 mpv-68fbdc88d27c81e1bc6c7a68647fd8a970283423.tar.xz |
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
-rwxr-xr-x | TOOLS/osxbundle.py | 8 |
1 files changed, 7 insertions, 1 deletions
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' |