From 06bbc7abe02a90b5d74962ec0d7f23bda7661d35 Mon Sep 17 00:00:00 2001 From: Dmitry Kazakov Date: Tue, 8 Oct 2024 16:10:21 +0200 Subject: [PATCH] Add Library/QuickLook to the list of code resource bundles Otherwise rcodesign signs QuickLook plugins twice! --- apple-codesign/src/code_resources.rs | 2 +- apple-codesign/tests/cmd/sign-bundle-dsym.trycmd | 2 +- apple-codesign/tests/cmd/sign-bundle-electron.trycmd | 8 ++++---- .../tests/cmd/sign-bundle-framework-shallow.trycmd | 2 +- apple-codesign/tests/cmd/sign-bundle-framework.trycmd | 2 +- .../tests/cmd/sign-bundle-macho-universal.trycmd | 2 +- .../tests/cmd/sign-bundle-multiple-macho.trycmd | 2 +- .../tests/cmd/sign-bundle-nested-macho-identifier.trycmd | 2 +- .../tests/cmd/sign-bundle-nested-symlinks.trycmd | 2 +- .../tests/cmd/sign-bundle-with-nested-framework.trycmd | 6 +++--- apple-codesign/tests/cmd/sign-bundle.trycmd | 4 ++-- 11 files changed, 17 insertions(+), 17 deletions(-) diff --git a/apple-codesign/src/code_resources.rs b/apple-codesign/src/code_resources.rs index 4257033ed..ed3107351 100644 --- a/apple-codesign/src/code_resources.rs +++ b/apple-codesign/src/code_resources.rs @@ -986,7 +986,7 @@ impl CodeResourcesBuilder { slf.add_rule2(CodeResourcesRule::new("^.*")?); slf.add_rule2(CodeResourcesRule::new("^[^/]+$")?.nested().weight(10)); - slf.add_rule2(CodeResourcesRule::new("^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/")? + slf.add_rule2(CodeResourcesRule::new("^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/")? .nested().weight(10)); slf.add_rule2(CodeResourcesRule::new(".*\\.dSYM($|/)")?.weight(11)); slf.add_rule2( diff --git a/apple-codesign/tests/cmd/sign-bundle-dsym.trycmd b/apple-codesign/tests/cmd/sign-bundle-dsym.trycmd index 62e4e1b21..2c974d4bc 100644 --- a/apple-codesign/tests/cmd/sign-bundle-dsym.trycmd +++ b/apple-codesign/tests/cmd/sign-bundle-dsym.trycmd @@ -179,7 +179,7 @@ $ rcodesign print-signature-info MyApp.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' diff --git a/apple-codesign/tests/cmd/sign-bundle-electron.trycmd b/apple-codesign/tests/cmd/sign-bundle-electron.trycmd index bba0a4ee4..c29877bf2 100644 --- a/apple-codesign/tests/cmd/sign-bundle-electron.trycmd +++ b/apple-codesign/tests/cmd/sign-bundle-electron.trycmd @@ -502,7 +502,7 @@ $ rcodesign print-signature-info Electron.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' @@ -676,7 +676,7 @@ $ rcodesign print-signature-info Electron.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' @@ -866,7 +866,7 @@ $ rcodesign print-signature-info Electron.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' @@ -1114,7 +1114,7 @@ $ rcodesign print-signature-info Electron.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' diff --git a/apple-codesign/tests/cmd/sign-bundle-framework-shallow.trycmd b/apple-codesign/tests/cmd/sign-bundle-framework-shallow.trycmd index d906eb840..3701eb4a7 100644 --- a/apple-codesign/tests/cmd/sign-bundle-framework-shallow.trycmd +++ b/apple-codesign/tests/cmd/sign-bundle-framework-shallow.trycmd @@ -164,7 +164,7 @@ $ rcodesign print-signature-info Shallow.framework.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' diff --git a/apple-codesign/tests/cmd/sign-bundle-framework.trycmd b/apple-codesign/tests/cmd/sign-bundle-framework.trycmd index cb2d70f20..f307502b7 100644 --- a/apple-codesign/tests/cmd/sign-bundle-framework.trycmd +++ b/apple-codesign/tests/cmd/sign-bundle-framework.trycmd @@ -179,7 +179,7 @@ $ rcodesign print-signature-info MyFramework.framework.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' diff --git a/apple-codesign/tests/cmd/sign-bundle-macho-universal.trycmd b/apple-codesign/tests/cmd/sign-bundle-macho-universal.trycmd index 24a1f0413..d70a9e3fd 100644 --- a/apple-codesign/tests/cmd/sign-bundle-macho-universal.trycmd +++ b/apple-codesign/tests/cmd/sign-bundle-macho-universal.trycmd @@ -366,7 +366,7 @@ $ rcodesign print-signature-info MyApp.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' diff --git a/apple-codesign/tests/cmd/sign-bundle-multiple-macho.trycmd b/apple-codesign/tests/cmd/sign-bundle-multiple-macho.trycmd index 9929c3801..4375657d0 100644 --- a/apple-codesign/tests/cmd/sign-bundle-multiple-macho.trycmd +++ b/apple-codesign/tests/cmd/sign-bundle-multiple-macho.trycmd @@ -347,7 +347,7 @@ $ rcodesign print-signature-info MyApp.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' diff --git a/apple-codesign/tests/cmd/sign-bundle-nested-macho-identifier.trycmd b/apple-codesign/tests/cmd/sign-bundle-nested-macho-identifier.trycmd index 61a847e88..91fa9b310 100644 --- a/apple-codesign/tests/cmd/sign-bundle-nested-macho-identifier.trycmd +++ b/apple-codesign/tests/cmd/sign-bundle-nested-macho-identifier.trycmd @@ -280,7 +280,7 @@ $ rcodesign print-signature-info MyApp.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' diff --git a/apple-codesign/tests/cmd/sign-bundle-nested-symlinks.trycmd b/apple-codesign/tests/cmd/sign-bundle-nested-symlinks.trycmd index fced59ba7..637172237 100644 --- a/apple-codesign/tests/cmd/sign-bundle-nested-symlinks.trycmd +++ b/apple-codesign/tests/cmd/sign-bundle-nested-symlinks.trycmd @@ -210,7 +210,7 @@ $ rcodesign print-signature-info MyApp.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' diff --git a/apple-codesign/tests/cmd/sign-bundle-with-nested-framework.trycmd b/apple-codesign/tests/cmd/sign-bundle-with-nested-framework.trycmd index 9db6469ee..db4adb4d7 100644 --- a/apple-codesign/tests/cmd/sign-bundle-with-nested-framework.trycmd +++ b/apple-codesign/tests/cmd/sign-bundle-with-nested-framework.trycmd @@ -258,7 +258,7 @@ $ rcodesign print-signature-info MyApp.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' @@ -533,7 +533,7 @@ $ rcodesign print-signature-info MyApp.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' @@ -733,7 +733,7 @@ $ rcodesign print-signature-info MyApp.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' diff --git a/apple-codesign/tests/cmd/sign-bundle.trycmd b/apple-codesign/tests/cmd/sign-bundle.trycmd index a2a4e7d8d..ba212ee73 100644 --- a/apple-codesign/tests/cmd/sign-bundle.trycmd +++ b/apple-codesign/tests/cmd/sign-bundle.trycmd @@ -165,7 +165,7 @@ $ rcodesign print-signature-info MyApp.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' ' @@ -415,7 +415,7 @@ $ rcodesign print-signature-info MyApp.app.signed - ' weight' - ' 2000' - ' ' - - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/' + - ' ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|QuickLook|LoginItems))/' - ' ' - ' nested' - ' '