Skip to content

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented Sep 3, 2024

This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are expected to not be codesigned.

In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16.

We did the same for macOS in flutter/engine#54696.

Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is).

Issue: #154571

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@cbracken
Copy link
Member Author

cbracken commented Sep 3, 2024

As a followup to this, I think we should add an equivalent file on the engine side, so instead of entitlements.txt and without_entitlements.txt we would also have unsigned.txt.

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The codesign script stdout from the last 3.24.candidate.0 build show's the dSYMs being "successfully" codesigned:

[INFO] codesign: Executing: /usr/bin/codesign --keychain build.keychain -f -s Developer ID Application: FLUTTER.IO LLC (S8QB4VV633) /Volumes/Work/s/w/ir/x/t/conductor_codesign9UWZuh/single_artifact/extension_safe/Flutter.xcframework/ios-arm64_x86_64-simulator/dSYMs/Flutter.framework.dSYM/Contents/Resources/DWARF/Flutter --timestamp --options=runtime

I'm guessing the codesign command check on this side doesn't like this because it's not an executable, as you said.

I think the more correct solution would be to have an unsigned_binaries.txt next to the entitlements and without_entitlements txt files in the engine. However, as a stop-gap for a better solution #153614 this seems fine?

@cbracken
Copy link
Member Author

cbracken commented Sep 3, 2024

I think the more correct solution would be to have an unsigned_binaries.txt next to the entitlements and without_entitlements txt files in the engine. However, as a stop-gap for a better solution #153614 this seems fine?

Yep see my comment here: #154591 (comment)

For that approach, we still need this patch.

Copy link
Contributor

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jmagman
Copy link
Member

jmagman commented Sep 3, 2024

For that approach, we still need this patch.

Ah sorry, missed that comment.

This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned.

In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16.

We did the same for macOS in flutter/engine#54696.

Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is).

Issue: flutter#154571
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 4, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Sep 4, 2024

auto label is removed for flutter/flutter/154591, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 4, 2024
@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 4, 2024
@auto-submit auto-submit bot merged commit 07fcfd1 into flutter:master Sep 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 4, 2024
auto-submit bot pushed a commit that referenced this pull request Sep 4, 2024
This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned.

In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16.

We did the same for macOS in flutter/engine#54696.

Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is).

Issue: #154571

This is a cherry-pick of #154591 to the flutter-3.24-candidate.0 branch.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 5, 2024
@cbracken cbracken deleted the codesign-exclusions branch September 5, 2024 19:49
auto-submit bot pushed a commit to flutter/engine that referenced this pull request Sep 5, 2024
There are three categories of binaries produced as part of the framework artifacts:
* Those that use APIs that require entitlements and must be code-signed; e.g. gen_snapshot
* Those that do not use APIs that require entitlements and must be code-signed; e.g. Flutter.framework dylib.
* Those that do not need to be code-signed; e.g. Flutter.dSYM symbols.

Until now, our signing infrastructure has assumed that all mach-o binaries in the artifacts we produce require a signature. dSYM files are not required to be codesigned, although the xcframework containing them are, and as such they cannot be removed or tampered with.

The framework code-signing tests in `dev/bots/suite_runners/run_verify_binaries_codesigned_tests.dart` are only run on post-submit on release branches, and thus, this issue was not uncovered until the first release after all the dSYM work landed. Those tests were updated in flutter/flutter#154591. This updates the framework and artifact archive generation code to also explicitly exclude those files from signing.

Issue: flutter/flutter#154571
Related: flutter/flutter#116493
Related: flutter/flutter#153532

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Gustl22 pushed a commit to Gustl22/flutter that referenced this pull request Nov 13, 2024
This updates the codesigning test to account for iOS and macOS binaries in the artifact cache that are _expected_ to not be codesigned.

In flutter/engine#54414 we started bundling dSYM (debugging symbols) within Flutter.xcframework, a requirement for App Store verification using Xcode 16.

We did the same for macOS in flutter/engine#54696.

Unlike the framework dylib, dSYM contents are not directly codesigned (though the xcframework containing them is).

Issue: flutter#154571

This is a cherry-pick of flutter#154591 to the flutter-3.24-candidate.0 branch.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants