Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build for Android and add binary .deb files to test repo #43

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

eighthave
Copy link
Contributor

@eighthave eighthave commented Nov 23, 2018

This creates the first, complete builds of snowflake for Android in the form of a shared library that can be integrated into https://github.com/guardianproject/AndroidPluggableTransports (guardianproject/AndroidPluggableTransports#9). It builds using the libwebrtc-android-arm-magic.a binary that is included in https://github.com/keroserene/go-webrtc.

This requires keroserene/go-webrtc#90 to be merged in order for the Android stuff to work.

This also adds ./build-deb to build a really simple binary .deb package for easy testing. Then via GitLab CI, it adds an apt source that can be added to Debian/stretch, Ubuntu/bionic, or newer to get the binary debs. The apt repo is based on GitLab Pages, and automatically available on forks on gitlab. For example, once this is merged into the official repo on git.torproject.org, there will be a repo here:

You can see my fork's repo here:

The GitLab-CI builds for all this can be seen here:
https://gitlab.com/eighthave/snowflake/pipelines/37667955

@n8fr8 @uniqx @arlolra @keroserene

@eighthave
Copy link
Contributor Author

The TravisCI build failure was inherited from @arlolra's last two commits. It seems there is some incompatibility with Go 1.8.x. The GitLab CI jobs don't have this, they are running Go 1.11 and 1.10.

@eighthave
Copy link
Contributor Author

@infinity0 since you worked on making this all work on Debian in the past, perhaps you might be interested in this.

@arlolra
Copy link
Collaborator

arlolra commented Nov 23, 2018

Snowflake development generally happens on Tor's trac these days, with gitweb.torproject.org/pluggable-transports/snowflake.git now being the canonical repo, but we can get this merged here.

@infinity0
Copy link

infinity0 commented Nov 24, 2018

This won't be able to enter Debian until Google's C++ webrtc library can be built as a public shared library ("component_build=on" in their terminology). We cannot distribute binary blobs like this.

I see there was some progress in go-webrtc as well as some progress in webrtc itself, but don't have the time to examine the situation to see what work is still left to do for Debian.

edit: clarify that there is most likely still a bunch of work remaining, based on what I read about the above issues.

@uumaro
Copy link

uumaro commented Nov 26, 2018

Snowflake development generally happens on Tor's trac these days, with gitweb.torproject.org/pluggable-transports/snowflake.git now being the canonical repo, but we can get this merged here.

Right, personally I would prefer to handle Snowflake issues (as opposed to go-webrtc ones) on Tor Trac.

Related to that, the patch refers to both github.com/keroserene/snowflake and git.torproject.org/pluggable-transports/snowflake.git. The former isn't used anymore. If there are any projects the build depends on that still refer to github.com/keroserene/snowflake, we need to get them updated.

mkdir -p $src/github.com/keroserene
mkdir -p $src/gitlab.com/$CI_PROJECT_NAMESPACE
ln -s $CI_PROJECT_DIR $src/git.torproject.org/pluggable-transports/snowflake
ln -s $CI_PROJECT_DIR $src/git.torproject.org/pluggable-transports/snowflake.git
Copy link

@uumaro uumaro Nov 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linking both snowflake and snowflake.git feels like voodoo to me. Only the .git one should be needed.

Maybe the cause of this is confusion with the old github.com/keroserene/snowflake repo, which uses a non-.git URL (based on this too). But github.com/keroserene/snowflake shouldn't appear anywhere; see #43 (comment).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My task was to get this building and running for Android. Since that was quite difficult, I started by getting it building and running on Debian. I don't know Go at all. This is what I did to get things working reliably based on my ignorance. Feel free to change it to something more properly Go. I'm not the one to do that, since I don't know Go.

@uumaro
Copy link

uumaro commented Nov 26, 2018

What's the purpose of building deb packages? I'm confused because the ones in the patch contain client, broker, standalone proxy, WebSocket server, and the useful-only-for-debugging WebRTC server. Nobody needs all of these at once, other than developers; who is the anticipated user of the deb?

The gitlab-ci part of this seems fine to me, if that's convenient for your purposes for https://github.com/guardianproject/AndroidPluggableTransports.

debian/DEBIAN/control Outdated Show resolved Hide resolved
@eighthave
Copy link
Contributor Author

I put together the Debian packages and repo as an easy way to test without knowing Go. Of course, before it can be included in Debian, there needs to be a free build of libwebrtc. But building the source code is only one part of packaging and integrating with Debian. Other parts include figuring out which binaries should go into what packages, what config options should be included, what services should be registered with systemd, etc. All that work can be done in parallel with building from source, and indeed they require different skill sets. So providing binary packages for people to mess with means someone can start working on the integration stuff without needing to know anything about building Go or libwebrtc.

As for the anticipated users: "anyone who wants to easily mess with snowflake on Debian or Ubuntu". Guardian Project will be doing some integration work with PTs, and we'll be building a full working prototype of how orgs like Wikimedia can integrate into their setups.

Like @infinity0 said, all parts of snowflake need to be 100% free software and buildable from source on Debian builders to be included in Debian 😄 I'm not proposing these binaries are ready for inclusion in Debian.

@arlolra
Copy link
Collaborator

arlolra commented Nov 26, 2018

The TravisCI build failure was inherited from @arlolra's last two commits. It seems there is some incompatibility with Go 1.8.x.

Fixed at 596d28b

@@ -0,0 +1,12 @@
Source: snowflake
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not put a /debian folder in release tarballs, so if this is accepted tagging realeses would be bad. The reason is Debian proper cannot package non-native, that's this project, cleanly... The source diff looks either ugly or incomplete.

Instead put these files in a staging folder and have build scripts copy or link them into place. Debian has no standard for doing this, but it is a rule not to package projects with a clashing folder.

@eighthave
Copy link
Contributor Author

eighthave commented Apr 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants