Carthage/Carthage

COPY_PHASE_STRIP support in copy-frameworks is broken

Ouverte

#2 948 ouverte le 9 mars 2020

 (11 commentaires) (0 réaction) (0 personne assignée)Swift (1 544 forks)batch import
enhancementhelp wanted

Métriques du dépôt

Stars
 (15 179 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

  • carthage install method: [ ] .pkg, [x] homebrew, [ ] source
  • which carthage: /usr/local/bin/carthage
  • carthage version: 0.33.0 & 0.34.0
  • xcodebuild -version: Xcode 10.1 Build version 10B61 & Xcode 11.3.1 Build version 11C504
  • Are you using --no-build? No
  • Are you using --no-use-binaries? No
  • Are you using --use-submodules? No
  • Are you using --cache-builds? No
  • Are you using --new-resolver? No

Cartfile

github "sparkle-project/Sparkle" == 1.19.0

Carthage Output

PhaseScriptExecution carthage\ copy-frameworks /Users/travis/build/griff/metaz/build/MetaZ.build/Release/MetaZ.build/Script-1BA9B57B2089550F00DDC17F.sh (in target 'MetaZ' from project 'MetaZ')
2309 cd /Users/travis/build/griff/metaz
2310 /bin/sh -c /Users/travis/build/griff/metaz/build/MetaZ.build/Release/MetaZ.build/Script-1BA9B57B2089550F00DDC17F.sh
23110.34.0
2312A shell task (/usr/bin/xcrun codesign --force --sign - --preserve-metadata=identifier,entitlements /Users/travis/build/griff/metaz/build/Release/MetaZ.app/Contents/Frameworks/Sparkle.framework) failed with exit code 1:
2313/Users/travis/build/griff/metaz/build/Release/MetaZ.app/Contents/Frameworks/Sparkle.framework: bundle format is ambiguous (could be app or framework)

Actual outcome Whenever COPY_PHASE_STRIP is set to YES carthage copies the Sparkle framework into the app folder but strips the framework incorrectly because the binary in the root of the framework is not a symbolic link as it should be and that breaks code signing.

$ ls -la build/Release/MetaZ.app/Contents/Frameworks/Sparkle.framework
total 984
drwxr-xr-x   5 bro  staff     170 Mar  9 15:56 .
drwxr-xr-x  19 bro  staff     646 Mar  9 15:56 ..
lrwxr-xr-x   1 bro  staff      26 Jul 22  2019 Resources -> Versions/Current/Resources
-rwxr-xr-x   1 bro  staff  499572 Mar  9 15:56 Sparkle
drwxr-xr-x   4 bro  staff     136 Jul 22  2019 Versions

Expected outcome When COPY_PHASE_STRIP is set to NO then carthage copy-framework copies the framework correctly with a symlink in the root. I expected Carthage to do the same when stripping the framework.

$ ls -la build/Debug/MetaZ.app/Contents/Frameworks/Sparkle.framework
total 16
drwxr-xr-x   5 bro  staff  170 Mar  9 15:49 .
drwxr-xr-x  20 bro  staff  680 Mar  9 15:50 ..
lrwxr-xr-x   1 bro  staff   26 Jul 22  2019 Resources -> Versions/Current/Resources
lrwxr-xr-x   1 bro  staff   24 Jul 22  2019 Sparkle -> Versions/Current/Sparkle
drwxr-xr-x   4 bro  staff  136 Jul 22  2019 Versions

Guide contributeur