Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,6 @@ task:
- ulimit -S -n 2048 # https://github.com/flutter/flutter/issues/2976
- dart --enable-asserts dev/bots/test.dart
- name: add2app-macos
skip: true # https://github.com/flutter/flutter/issues/39507
env:
SHARD: add2app_test
setup_xcpretty_script:
Expand Down
6 changes: 4 additions & 2 deletions packages/flutter_tools/bin/xcode_backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,13 @@ BuildApp() {
mkdir "${derived_dir}/engine"
RunCommand cp -r -- "${flutter_podspec}" "${derived_dir}/engine"
RunCommand cp -r -- "${flutter_framework}" "${derived_dir}/engine"
RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -exec chmod a-w "{}" \;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe add a comment noting this is marking all non-binary files as read-only so that we can code-sign the binaries.

Copy link
Member

Choose a reason for hiding this comment

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

I also wonder if there's any way to get the same list using only options to find rather than feeding it through grep -Il then into xargs.

Looking at the manpage, I don't see anything promising though.

Copy link
Member Author

Choose a reason for hiding this comment

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

That was my first thought but I couldn't find any such flag.

# Make non-binary files read-only to discourage editing headers, but allow binary code-signing.
RunCommand find "${derived_dir}/engine/Flutter.framework" -type f -exec grep -Il '.' {} \; | xargs chmod a-w
else
RunCommand rm -rf -- "${derived_dir}/Flutter.framework"
RunCommand cp -r -- "${flutter_framework}" "${derived_dir}"
RunCommand find "${derived_dir}/Flutter.framework" -type f -exec chmod a-w "{}" \;
# Make non-binary files read-only to discourage editing headers, but allow binary code-signing.
RunCommand find "${derived_dir}/Flutter.framework" -type f -exec grep -Il '.' {} \; | xargs chmod a-w
fi

RunCommand pushd "${project_path}" > /dev/null
Expand Down