Skip to content
Snippets Groups Projects
Commit fb2c7167 authored by akwizgran's avatar akwizgran
Browse files

Add Tor 0.3.5.14.

parent 9b26e561
No related branches found
No related tags found
1 merge request!15Add Tor 0.3.5.14
Pipeline #6791 passed
......@@ -19,4 +19,5 @@ apt-get install -y --no-install-recommends \
libc6-dev-arm64-cross \
gcc-arm-linux-gnueabihf \
libc6-dev-armhf-cross \
perl
perl \
po4a
......@@ -3,6 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.briarproject</groupId>
<artifactId>tor-android</artifactId>
<name>tor</name>
<version>VERSION</version>
<url>https://github.com/n8fr8/tor-android</url>
<description>Repo for building Tor for Android.</description>
......
......@@ -3,6 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.briarproject</groupId>
<artifactId>tor</artifactId>
<name>tor</name>
<version>VERSION</version>
<url>https://torproject.org</url>
<description>Repo for building Tor for Linux.</description>
......
{
"0.3.5.14": {
"tor": "tor-0.3.5.14",
"libevent": "release-2.1.8-stable",
"openssl": "OpenSSL_1_0_2u",
"xz": "v5.2.4",
"zlib": "v1.2.11",
"zstd": "v1.3.8",
"tor-android": "55791c108d4b732b1c12866e4db3b8b1fd826bf1",
"tor_android_repo_url": "https://github.com/n8fr8/tor-android",
"ndk": {
"url": "https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip",
"revision": "15.2.4203891",
"sha256": "f01788946733bf6294a36727b99366a18369904eb068a599dde8cca2c1d2ba3c"
},
"timestamp": "201001010000.00"
},
"0.3.5.13-1": {
"tor": "tor-0.3.5.13",
"libevent": "release-2.1.8-stable",
......
......@@ -49,7 +49,7 @@ def get_file_suffix(versions, android=False):
def get_final_file_name(versions, android=False):
return 'tor-%s.zip' % get_file_suffix(versions, android)
return 'tor-%s.jar' % get_file_suffix(versions, android)
def get_sources_file_name(versions, android=False):
......
......@@ -28,13 +28,15 @@ def verify(version, for_android):
file_name = get_final_file_name(versions, for_android)
ref_file = os.path.join(REF_DIR, file_name)
try:
# try downloading from jcenter
# try downloading from maven central (or jcenter for older versions)
check_call(['wget', '--no-verbose', get_url(versions, for_android), '-O', ref_file])
except CalledProcessError:
# try fallback to bintray
print("Warning: Download from jcenter failed. Trying bintray directly...")
check_call(['wget', '--no-verbose', get_url(versions, for_android, fallback=True), '-O',
ref_file])
except CalledProcessError as e:
# try fallback to bintray (for older versions only)
if version < '0.3.5.14':
print("Warning: Download from jcenter failed. Trying bintray directly...")
check_call(['wget', '--no-verbose', get_url(versions, for_android, fallback=True), '-O', ref_file])
else:
raise e
# check if Tor was already build
if not os.path.isfile(file_name):
......@@ -64,7 +66,9 @@ def get_url(versions, for_android, fallback=False):
version = get_version_tag(versions)
directory = "tor-android" if for_android else "tor"
file = get_final_file_name(versions, for_android)
if not fallback:
if version >= '0.3.5.14':
return "https://repo.maven.apache.org/maven2/org/briarproject/%s/%s/%s" % (directory, version, file)
elif not fallback:
return "https://jcenter.bintray.com/org/briarproject/%s/%s/%s" % (directory, version, file)
else:
return "https://dl.bintray.com/briarproject/org.briarproject/org/briarproject/%s/%s/%s" % \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment