indygreg / apple-platform-rs

Rust crates supporting Apple platform development
565 stars 38 forks source link

--code-signature-flags Is Not Scopable #116

Closed hafta closed 9 months ago

hafta commented 9 months ago

When trying to sign a bundle using rcodesign 0.25.1, the --code-signature-flags argument doesn't accept a path scoped argument. For example, here's an error

error: invalid value 'Contents/MacOS/pingsender' for '--code-signature-flags <CODE_SIGNATURE_FLAGS>'

resulting from

$ rcodesign sign -v \                                                                    
--p12-file ./myDevId.p12 \                                                             
--p12-password-file ./myDevId.p12.passwd \                                             
--code-signature-flags runtime \                                                       
--entitlements-xml-path ./browser.xml \                                                
--entitlements-xml-path Contents/MacOS/plugin-container.app:./plugin-container.xml \
--entitlements-xml-path Contents/MacOS/media-plugin-helper.app:./media-plugin-helper.xml \
--code-signature-flags Contents/MacOS/pingsender:runtime \                             
--code-signature-flags Contents/MacOS/minidump-analyzer:runtime \                      
--code-signature-flags Contents/MacOS/updater.app:runtime \                            
--code-signature-flags Contents/MacOS/crashreporter.app:runtime \                      
--code-signature-flags Contents/MacOS/XUL:runtime \                                    
--code-signature-flags Contents/MacOS/libfreebl3.dylib:runtime \                       
--code-signature-flags Contents/MacOS/liblgpllibs.dylib:runtime \                      
--code-signature-flags Contents/MacOS/libsoftokn3.dylib:runtime \                      
--code-signature-flags Contents/MacOS/libosclientcerts.dylib:runtime \                 
--code-signature-flags Contents/MacOS/libmozavutil.dylib:runtime \                     
--code-signature-flags Contents/MacOS/libmozglue.dylib:runtime \                       
--code-signature-flags Contents/MacOS/libgkcodecs.dylib:runtime \                      
--code-signature-flags Contents/MacOS/libipcclientcerts.dylib:runtime \                
--code-signature-flags Contents/MacOS/libmozavcodec.dylib:runtime \                    
--code-signature-flags Contents/MacOS/libnssckbi.dylib:runtime \                       
--code-signature-flags Contents/MacOS/libnss3.dylib:runtime \                          
--code-signature-flags Contents/Resources/gmp-clearkey/0.1/libclearkey.dylib:runtime \
--code-signature-flags Contents/Library/LaunchServices/org.mozilla.updater:runtime \
Firefox.app
indygreg commented 9 months ago

Bleh. Can't believe this bug has survived as long as it has. Will fix shortly. Thanks for the report.

FWIW if you use config files, it will likely work.