Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
go-reproducer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
briar
go-reproducer
Commits
a5a8b94d
Commit
a5a8b94d
authored
2 years ago
by
akwizgran
Browse files
Options
Downloads
Patches
Plain Diff
Keep obfs4 repo directory the same as before for reproducibility.
parent
398151bf
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!10
Add support for building snowflake
Pipeline
#12594
passed
2 years ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build-binary.py
+6
-6
6 additions, 6 deletions
build-binary.py
versions.json
+8
-0
8 additions, 0 deletions
versions.json
with
14 additions
and
6 deletions
build-binary.py
+
6
−
6
View file @
a5a8b94d
...
...
@@ -36,9 +36,9 @@ def main():
package_windows
(
tool
,
versions
)
def
get_repo_dir
(
tool
):
def
get_repo_dir
(
versions
):
# This needs to be always the same path, otherwise it breaks reproducibility
return
'
/tmp/%s
'
%
tool
return
'
/tmp/%s
'
%
versions
[
'
repo_dir
'
]
def
install_go
(
tool
,
tool_version
,
versions
):
...
...
@@ -56,7 +56,7 @@ def install_android_ndk(tool, tool_version):
def
checkout_source_repo
(
tool
,
versions
):
repo_dir
=
get_repo_dir
(
tool
)
repo_dir
=
get_repo_dir
(
versions
)
if
os
.
path
.
isdir
(
repo_dir
):
# get latest commits and tags from remote
check_call
([
'
git
'
,
'
fetch
'
,
'
origin
'
],
cwd
=
repo_dir
)
...
...
@@ -113,7 +113,7 @@ def build_android_arch(tool, versions, env, clang_arch, ndk_arch):
output_file
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
curdir
,
tool
))
go_flags
=
[
'
-asmflags
'
,
'
-trimpath
'
,
'
-o
'
,
output_file
]
repo_dir
=
get_repo_dir
(
tool
)
repo_dir
=
get_repo_dir
(
versions
)
ex
([
'
go
'
,
'
build
'
,
'
-buildmode=%s
'
%
build_mode
,
'
-ldflags
'
,
'
-w -s
'
+
extldflags
]
+
go_flags
+
[
os
.
path
.
join
(
'
.
'
,
versions
[
'
build_path
'
])],
env
=
env
,
cwd
=
repo_dir
)
...
...
@@ -142,7 +142,7 @@ def build_desktop_arch(tool, versions, goos, arch, goarch, goarm=None):
print
(
"
Building %s
"
%
filename
)
output_file
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
curdir
,
tool
))
go_flags
=
[
'
-asmflags
'
,
'
-trimpath
'
,
'
-o
'
,
output_file
]
repo_dir
=
get_repo_dir
(
tool
)
repo_dir
=
get_repo_dir
(
versions
)
ex
([
'
go
'
,
'
build
'
,
'
-ldflags
'
,
'
-w -s
'
]
+
go_flags
+
[
build_path
],
env
=
env
,
cwd
=
repo_dir
)
zip_files
([
tool
],
filename
,
versions
)
os
.
remove
(
tool
)
...
...
@@ -186,7 +186,7 @@ def package(tool, versions, file_list, platform):
def
create_sources_jar
(
tool
,
versions
,
platform
):
repo_dir
=
get_repo_dir
(
tool
)
repo_dir
=
get_repo_dir
(
versions
)
# clean all untracked files and directories (-d) from repo
check_call
([
'
git
'
,
'
clean
'
,
'
-dffx
'
],
cwd
=
repo_dir
)
# vendorize dependencies
...
...
This diff is collapsed.
Click to expand it.
versions.json
+
8
−
0
View file @
a5a8b94d
...
...
@@ -4,6 +4,7 @@
"repo_url"
:
"https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/obfs4.git"
,
"revision"
:
"ed46c23917b55c4b274d6986daeaf6bec7963115"
,
"build_path"
:
"obfs4proxy"
,
"repo_dir"
:
"obfs4"
,
"go"
:
{
"version"
:
"go1.16"
,
"sha256"
:
"7688063d55656105898f323d90a79a39c378d86fe89ae192eb3b7fc46347c95a"
...
...
@@ -19,6 +20,7 @@
"repo_url"
:
"https://git.torproject.org/pluggable-transports/obfs4.git"
,
"revision"
:
"336a71d6e4cfd2d33e9c57797828007ad74975e9"
,
"build_path"
:
"obfs4proxy"
,
"repo_dir"
:
"obfs4"
,
"go"
:
{
"version"
:
"go1.16"
,
"sha256"
:
"7688063d55656105898f323d90a79a39c378d86fe89ae192eb3b7fc46347c95a"
...
...
@@ -34,6 +36,7 @@
"repo_url"
:
"https://git.torproject.org/pluggable-transports/obfs4.git"
,
"revision"
:
"a564bc3840bc788605e1a8155f4b95ce0d70c6db"
,
"build_path"
:
"obfs4proxy"
,
"repo_dir"
:
"obfs4"
,
"go"
:
{
"version"
:
"go1.16"
,
"sha256"
:
"7688063d55656105898f323d90a79a39c378d86fe89ae192eb3b7fc46347c95a"
...
...
@@ -49,6 +52,7 @@
"repo_url"
:
"https://git.torproject.org/pluggable-transports/obfs4.git"
,
"revision"
:
"40245c4a"
,
"build_path"
:
"obfs4proxy"
,
"repo_dir"
:
"obfs4"
,
"go"
:
{
"version"
:
"go1.13.1"
,
"sha256"
:
"81f154e69544b9fa92b1475ff5f11e64270260d46e7e36c34aafc8bc96209358"
...
...
@@ -64,6 +68,7 @@
"repo_url"
:
"https://git.torproject.org/pluggable-transports/obfs4.git"
,
"revision"
:
"obfs4proxy-0.0.11"
,
"build_path"
:
"obfs4proxy"
,
"repo_dir"
:
"obfs4"
,
"go"
:
{
"version"
:
"go1.13.1"
,
"sha256"
:
"81f154e69544b9fa92b1475ff5f11e64270260d46e7e36c34aafc8bc96209358"
...
...
@@ -79,6 +84,7 @@
"repo_url"
:
"https://git.torproject.org/pluggable-transports/obfs4.git"
,
"revision"
:
"obfs4proxy-0.0.11"
,
"build_path"
:
"obfs4proxy"
,
"repo_dir"
:
"obfs4"
,
"go"
:
{
"version"
:
"go1.13.1"
,
"sha256"
:
"81f154e69544b9fa92b1475ff5f11e64270260d46e7e36c34aafc8bc96209358"
...
...
@@ -93,6 +99,7 @@
"repo_url"
:
"https://git.torproject.org/pluggable-transports/obfs4.git"
,
"revision"
:
"obfs4proxy-0.0.9"
,
"build_path"
:
"obfs4proxy"
,
"repo_dir"
:
"obfs4"
,
"go"
:
{
"version"
:
"go1.11.5"
,
"sha256"
:
"bc1ef02bb1668835db1390a2e478dcbccb5dd16911691af9d75184bbe5aa943e"
...
...
@@ -109,6 +116,7 @@
"repo_url"
:
"https://git.torproject.org/pluggable-transports/snowflake.git"
,
"revision"
:
"36f03dfd4483922b3e7400dedc71df9cf2f30b6b"
,
"build_path"
:
"client"
,
"repo_dir"
:
"snowflake"
,
"go"
:
{
"version"
:
"go1.16"
,
"sha256"
:
"7688063d55656105898f323d90a79a39c378d86fe89ae192eb3b7fc46347c95a"
...
...
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