diff --git a/upstream/build_tor_macos.py b/upstream/build_tor_macos.py index 9057871544a52ff54872f68752835ee3657ceacf..957ee1a97920e8c385c7dd8d1007b72d150c6361 100755 --- a/upstream/build_tor_macos.py +++ b/upstream/build_tor_macos.py @@ -57,11 +57,13 @@ def build_arch(versions, arch): libevent_version = versions['upstream']['libevent'] # build using rbm check_call(['./rbm/rbm', 'build', 'tor', '--target', 'release', '--target', 'torbrowser-' + target], cwd=Path(BUILD_DIR)) - # extract tar.gz file + # extract tar.zst file arch_dir = Path('output') / PLATFORM / arch arch_dir.mkdir(parents=True, exist_ok=True) - tar_file = next(Path(BUILD_DIR).glob('out/tor/tor-*-' + target + '-*.tar.gz')) - tar = tarfile.open(tar_file, "r:gz") + tar_zst_file = str(next(Path(BUILD_DIR).glob('out/tor/tor-*-' + target + '-*.tar.zst'))) + check_call(['zstd', '-d', tar_zst_file]) + tar_file = tar_zst_file[:-4] + tar = tarfile.open(tar_file, 'r') tar.extractall(path=arch_dir) tar.close() # move contents out of tor/ directory