diff --git a/tor-versions.json b/tor-versions.json index 6425966ac4f806bb8105c3b4dff5de0bce953c5b..2540f448277521d56daaf6e1ee47341899a1c281 100644 --- a/tor-versions.json +++ b/tor-versions.json @@ -1,4 +1,39 @@ { + "0.4.8.9": { + "tor": { + "url": "https://gitlab.torproject.org/tpo/core/tor.git", + "commit": "tor-0.4.8.9" + }, + "libevent": { + "url": "https://github.com/libevent/libevent.git", + "commit": "release-2.1.12-stable" + }, + "openssl": { + "url": "https://github.com/openssl/openssl.git", + "commit": "OpenSSL_1_1_1w" + }, + "xz": { + "url": "https://git.tukaani.org/xz.git", + "commit": "v5.2.10" + }, + "zlib": { + "url": "https://github.com/madler/zlib.git", + "commit": "v1.2.12" + }, + "ndk": { + "url": "https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip", + "revision": "21.4.7075529", + "sha256": "ad7ce5467e18d40050dc51b8e7affc3e635c85bd8c59be62de32352328ed467e" + }, + "upstream": { + "url": "https://code.briarproject.org/briar/tor-browser-build.git", + "commit": "tor-0.4.8.9", + "tor-browser": "13.0.5", + "libevent": "2.1.7", + "reproduce-upstream": true + }, + "timestamp": "201001010000.00" + }, "0.4.7.15": { "tor": { "url": "https://gitlab.torproject.org/tpo/core/tor.git", diff --git a/upstream/build_tor_macos.py b/upstream/build_tor_macos.py index d81bf2f1df10e2d115348ca0981e2c54454489b3..deae0fb8710d2555301babf9ec3c4e20c6c5b401 100755 --- a/upstream/build_tor_macos.py +++ b/upstream/build_tor_macos.py @@ -42,8 +42,8 @@ def setup(): def build(): versions, jar_name = setup() - copytree('pre-out', os.path.join(BUILD_DIR, 'out')) - copytree('pre-clones', os.path.join(BUILD_DIR, 'git_clones')) + copytree('pre-out', os.path.join(BUILD_DIR, 'out'), dirs_exist_ok=True) + copytree('pre-clones', os.path.join(BUILD_DIR, 'git_clones'), dirs_exist_ok=True) build_arch(versions, 'aarch64') build_arch(versions, 'x86_64') @@ -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 @@ -104,9 +106,9 @@ def compare_with_upstream(versions, arch): print('comparing hashsums for {0}'.format(arch)) tor_browser_version = versions['upstream']['tor-browser'] libevent_version = versions['upstream']['libevent'] - check_call(['wget', '-c', ('https://archive.torproject.org/tor-package-archive/torbrowser/{0}/' - + 'tor-expert-bundle-{0}-macos-{1}.tar.gz').format(tor_browser_version, arch)]) - check_call(['tar', 'xvfz', 'tor-expert-bundle-{0}-macos-{1}.tar.gz'.format(tor_browser_version, arch), + package = 'tor-expert-bundle-macos-{0}-{1}.tar.gz'.format(arch, tor_browser_version) + check_call(['wget', '-c', 'https://archive.torproject.org/tor-package-archive/torbrowser/{0}/{1}'.format(tor_browser_version, package)]) + check_call(['tar', 'xvfz', package, '--one-top-level=upstream-' + arch, '--strip-components=1', 'tor/tor', 'tor/libevent-' + libevent_version + '.dylib']) hash_tor_upstream = get_sha256(os.path.join('upstream-' + arch, 'tor'))