forked from Nexus/nexus
Add diagnostics for the still-failing Nix lipo permission issue
This commit is contained in:
parent
970d124ad6
commit
f155d2dd2d
4 changed files with 28 additions and 8 deletions
14
.github/workflows/ios.yml
vendored
14
.github/workflows/ios.yml
vendored
|
|
@ -28,9 +28,17 @@ jobs:
|
||||||
flutter pub get
|
flutter pub get
|
||||||
dart scripts/generate.dart
|
dart scripts/generate.dart
|
||||||
flutter pub run build_runner build
|
flutter pub run build_runner build
|
||||||
# Nix-provided Flutter'"'"'s bundled frameworks are read-only, which
|
|
||||||
# breaks lipo when Flutter thins them into build/ (NixOS/nixpkgs#405066).
|
# Diagnostics for NixOS/nixpkgs#405066 (Flutter'"'"'s bundled
|
||||||
find "$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")" -type d -iname "*.framework" -exec chmod -R u+w {} + 2>/dev/null || true
|
# frameworks are read-only, which breaks lipo when Flutter thins
|
||||||
|
# them into build/). Remove once this is confirmed fixed.
|
||||||
|
echo "lipo resolves to: $(command -v lipo)"
|
||||||
|
FLUTTER_ROOT="$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")"
|
||||||
|
echo "Resolved Flutter root: $FLUTTER_ROOT"
|
||||||
|
find "$FLUTTER_ROOT" -type d -iname "*.framework" -print
|
||||||
|
find "$FLUTTER_ROOT" -type d -iname "*.framework" -exec chmod -R u+w {} + 2>&1 || true
|
||||||
|
find "$FLUTTER_ROOT" -type d -iname "*.framework" -exec ls -ld {} \;
|
||||||
|
|
||||||
flutter build ios --release --no-codesign
|
flutter build ios --release --no-codesign
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
|
||||||
14
.github/workflows/macos.yml
vendored
14
.github/workflows/macos.yml
vendored
|
|
@ -28,9 +28,17 @@ jobs:
|
||||||
flutter pub get
|
flutter pub get
|
||||||
dart scripts/generate.dart
|
dart scripts/generate.dart
|
||||||
flutter pub run build_runner build
|
flutter pub run build_runner build
|
||||||
# Nix-provided Flutter'"'"'s bundled frameworks are read-only, which
|
|
||||||
# breaks lipo when Flutter thins them into build/ (NixOS/nixpkgs#405066).
|
# Diagnostics for NixOS/nixpkgs#405066 (Flutter'"'"'s bundled
|
||||||
find "$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")" -type d -iname "*.framework" -exec chmod -R u+w {} + 2>/dev/null || true
|
# frameworks are read-only, which breaks lipo when Flutter thins
|
||||||
|
# them into build/). Remove once this is confirmed fixed.
|
||||||
|
echo "lipo resolves to: $(command -v lipo)"
|
||||||
|
FLUTTER_ROOT="$(dirname "$(dirname "$(readlink -f "$(command -v flutter)")")")"
|
||||||
|
echo "Resolved Flutter root: $FLUTTER_ROOT"
|
||||||
|
find "$FLUTTER_ROOT" -type d -iname "*.framework" -print
|
||||||
|
find "$FLUTTER_ROOT" -type d -iname "*.framework" -exec chmod -R u+w {} + 2>&1 || true
|
||||||
|
find "$FLUTTER_ROOT" -type d -iname "*.framework" -exec ls -ld {} \;
|
||||||
|
|
||||||
flutter build macos --release
|
flutter build macos --release
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,13 @@
|
||||||
# stay read-only, so lipo can't write its temporary output file when Flutter
|
# stay read-only, so lipo can't write its temporary output file when Flutter
|
||||||
# thins them during the build. Make the framework writable before delegating
|
# thins them during the build. Make the framework writable before delegating
|
||||||
# to the real lipo.
|
# to the real lipo.
|
||||||
|
echo "lipo shim invoked with: $*" >&2
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
*/*.framework/*)
|
*/*.framework/*)
|
||||||
fw_dir="${arg%.framework/*}.framework"
|
fw_dir="${arg%.framework/*}.framework"
|
||||||
chmod -R +w "$fw_dir" 2>/dev/null
|
echo "lipo shim: chmod -R +w $fw_dir" >&2
|
||||||
|
chmod -R +w "$fw_dir"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,13 @@
|
||||||
# stay read-only, so lipo can't write its temporary output file when Flutter
|
# stay read-only, so lipo can't write its temporary output file when Flutter
|
||||||
# thins FlutterMacOS.framework during the build. Make the framework writable
|
# thins FlutterMacOS.framework during the build. Make the framework writable
|
||||||
# before delegating to the real lipo.
|
# before delegating to the real lipo.
|
||||||
|
echo "lipo shim invoked with: $*" >&2
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
*/*.framework/*)
|
*/*.framework/*)
|
||||||
fw_dir="${arg%.framework/*}.framework"
|
fw_dir="${arg%.framework/*}.framework"
|
||||||
chmod -R +w "$fw_dir" 2>/dev/null
|
echo "lipo shim: chmod -R +w $fw_dir" >&2
|
||||||
|
chmod -R +w "$fw_dir"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue