Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CI image upstream Tor reproducer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
CI image upstream Tor reproducer
Commits
3ad59223
Verified
Commit
3ad59223
authored
May 17, 2023
by
Sebastian
Browse files
Options
Downloads
Patches
Plain Diff
Check built files with upstream binaries
parent
de1bf332
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
build_tor_macos.py
+33
-0
33 additions, 0 deletions
build_tor_macos.py
with
33 additions
and
0 deletions
build_tor_macos.py
+
33
−
0
View file @
3ad59223
...
...
@@ -2,6 +2,7 @@
import
os
from
shutil
import
copytree
from
subprocess
import
check_call
import
hashlib
import
utils
from
utils
import
get_version
,
get_build_versions
,
reset_time
,
\
...
...
@@ -9,6 +10,7 @@ from utils import get_version, get_build_versions, reset_time, \
PLATFORM
=
"
macos
"
BUILD_DIR
=
"
tor-browser-build
"
UPSTREAM_VERSION
=
"
12.0.6
"
def
setup
(
platform
):
...
...
@@ -58,5 +60,36 @@ def print_hashes(versions):
print
(
"
%s: %s
"
%
(
file
,
sha256hash
))
def
compare_output_with_upstream
():
compare_with_upstream
(
"
aarch64
"
)
compare_with_upstream
(
"
x86_64
"
)
def
compare_with_upstream
(
arch
):
check_call
([
'
wget
'
,
'
-c
'
,
(
'
https://archive.torproject.org/tor-package-archive/torbrowser/{0}/
'
+
'
tor-expert-bundle-{0}-macos-{1}.tar.gz
'
).
format
(
UPSTREAM_VERSION
,
arch
)])
check_call
([
'
tar
'
,
'
xvfz
'
,
'
tor-expert-bundle-{0}-macos-{1}.tar.gz
'
.
format
(
UPSTREAM_VERSION
,
arch
),
'
--one-top-level=upstream-
'
+
arch
,
'
--strip-components=1
'
,
'
tor/tor
'
,
'
tor/libevent-2.1.7.dylib
'
])
hash_tor_upstream
=
get_sha256
(
os
.
path
.
join
(
'
upstream-
'
+
arch
,
'
tor
'
))
hash_libevent_upstream
=
get_sha256
(
os
.
path
.
join
(
'
upstream-
'
+
arch
,
'
libevent-2.1.7.dylib
'
))
print
(
'
upstream tor: {0}
'
.
format
(
hash_tor_upstream
))
print
(
'
upstream libevent: {0}
'
.
format
(
hash_libevent_upstream
))
hash_tor_built
=
get_sha256
(
os
.
path
.
join
(
'
output
'
,
'
macos
'
,
arch
,
'
tor
'
))
hash_libevent_built
=
get_sha256
(
os
.
path
.
join
(
'
output
'
,
'
macos
'
,
arch
,
'
libevent-2.1.7.dylib
'
))
print
(
'
built tor: {0}
'
.
format
(
hash_tor_built
))
print
(
'
built libevent: {0}
'
.
format
(
hash_libevent_built
))
if
hash_tor_upstream
!=
hash_tor_built
:
print
(
"
tor hash does not match
"
)
exit
(
1
)
if
hash_libevent_upstream
!=
hash_libevent_built
:
print
(
"
libevent hash does not match
"
)
exit
(
1
)
if
__name__
==
"
__main__
"
:
build
()
compare_output_with_upstream
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment