mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Merge 20778eb023
into c5e44a0435
This commit is contained in:
commit
0786b2d2aa
2 changed files with 6 additions and 4 deletions
|
@ -52,7 +52,7 @@ path to `Xcode.app` (extracted in the previous stage) as the first argument.
|
||||||
```
|
```
|
||||||
|
|
||||||
The generated archive should be: `Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers.tar.gz`.
|
The generated archive should be: `Xcode-15.0-15A240d-extracted-SDK-with-libcxx-headers.tar.gz`.
|
||||||
The `sha256sum` should be `c0c2e7bb92c1fee0c4e9f3a485e4530786732d6c6dd9e9f418c282aa6892f55d`.
|
The `sha256sum` should be `2184c9699203ca32521899ca0deec831f2b6af214549c85bfad6ef8554d7778e`.
|
||||||
|
|
||||||
## Deterministic macOS App Notes
|
## Deterministic macOS App Notes
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ def run():
|
||||||
out_sdktgz_path = pathlib.Path("./{}.tar.gz".format(out_name))
|
out_sdktgz_path = pathlib.Path("./{}.tar.gz".format(out_name))
|
||||||
|
|
||||||
def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir):
|
def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir):
|
||||||
"""Add all files in dir_to_add to tarfp, but prepent alt_base_dir to the files'
|
"""Add all files in dir_to_add to tarfp, but prepend alt_base_dir to the files'
|
||||||
names
|
names
|
||||||
|
|
||||||
e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking:
|
e.g. if the only file under /root/bazdir is /root/bazdir/qux, invoking:
|
||||||
|
@ -81,11 +81,13 @@ def run():
|
||||||
return tarinfo
|
return tarinfo
|
||||||
with cd(dir_to_add):
|
with cd(dir_to_add):
|
||||||
# recursion already adds entries in sorted order
|
# recursion already adds entries in sorted order
|
||||||
tarfp.add(".", recursive=True, filter=change_tarinfo_base)
|
tarfp.add("./usr/include", recursive=True, filter=change_tarinfo_base)
|
||||||
|
tarfp.add("./usr/lib", recursive=True, filter=change_tarinfo_base)
|
||||||
|
tarfp.add("./System/Library/Frameworks", recursive=True, filter=change_tarinfo_base)
|
||||||
|
|
||||||
print("Creating output .tar.gz file...")
|
print("Creating output .tar.gz file...")
|
||||||
with out_sdktgz_path.open("wb") as fp:
|
with out_sdktgz_path.open("wb") as fp:
|
||||||
with gzip.GzipFile(fileobj=fp, mode='wb', compresslevel=9, mtime=0) as gzf:
|
with gzip.GzipFile(fileobj=fp, mode='wb', compresslevel=0, mtime=0) as gzf:
|
||||||
with tarfile.open(mode="w", fileobj=gzf, format=tarfile.GNU_FORMAT) as tarfp:
|
with tarfile.open(mode="w", fileobj=gzf, format=tarfile.GNU_FORMAT) as tarfp:
|
||||||
print("Adding MacOSX SDK {} files...".format(sdk_version))
|
print("Adding MacOSX SDK {} files...".format(sdk_version))
|
||||||
tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
|
tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
|
||||||
|
|
Loading…
Add table
Reference in a new issue