Skip to content

Commit d8ca51d

Browse files
committed
Merge #18589: Fix naming of macOS SDK and clarify version
eb37275 Fix naming of macOS SDK and clarify version (Andrew Chow) Pull request description: Fixes the `MacOSX10.14.sdk.tar.gz` creation command to have `MacOSX.sdk` be correctly named as `MacOSX10.14.sdk` and for the resulting file to be placed in the current directory. Gitian requires that `tar.gz` contains a folder named `MacOSX10.14.sdk` and the command did not do this originally. Having the file be placed in the current directory is a convenience so builders don't have to go find it. Also clarifies which version of Xcode to download and where it can be downloaded. ACKs for top commit: fanquake: ACK eb37275 - tested the macOS and Linux SDK extraction. Also noticed something seemingly broken with Apple `tar`, but will open an issue to follow up. Sjors: ACK eb37275 for the macOS instruction Tree-SHA512: d691e14711cf195999291dd6fb7ffe552c86f8b30d2b1a77e88b4db6050dd817ba128b047cf36d29b0bb0d4183e709b7c03aa27f31b64e562ea8cd948434ca55
2 parents 6413980 + eb37275 commit d8ca51d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

contrib/macdeploy/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ When complete, it will have produced `Bitcoin-Qt.dmg`.
1414

1515
## SDK Extraction
1616

17+
Our current macOS SDK (`macOSX10.14.sdk`) can be extracted from
18+
[Xcode_10.2.1.xip](https://download.developer.apple.com/Developer_Tools/Xcode_10.2.1/Xcode_10.2.1.xip).
19+
An Apple ID is needed to download this.
20+
1721
`Xcode.app` is packaged in a `.xip` archive.
1822
This makes the SDK less-trivial to extract on non-macOS machines.
1923
One approach (tested on Debian Buster) is outlined below:
@@ -38,14 +42,14 @@ xar -xf Xcode_10.2.1.xip -C .
3842

3943
./pbzx/pbzx -n Content | cpio -i
4044

41-
find Xcode.app -type d -name MacOSX.sdk -execdir sh -c 'tar -c MacOSX.sdk/ | gzip -9n > /MacOSX10.14.sdk.tar.gz' \;
45+
find Xcode.app -type d -name MacOSX.sdk -exec sh -c 'tar --transform="s/MacOSX.sdk/MacOSX10.14.sdk/" -c -C$(dirname {}) MacOSX.sdk/ | gzip -9n > MacOSX10.14.sdk.tar.gz' \;
4246
```
4347

4448
on macOS the process is more straightforward:
4549

4650
```bash
4751
xip -x Xcode_10.2.1.xip
48-
tar -C Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.14.sdk.tar.gz MacOSX.sdk
52+
tar -s "/MacOSX.sdk/MacOSX10.14.sdk/" -C Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ -czf MacOSX10.14.sdk.tar.gz MacOSX.sdk
4953
```
5054

5155
Our previously used macOS SDK (`MacOSX10.11.sdk`) can be extracted from

0 commit comments

Comments
 (0)