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

Update ansible and Dockerfile for tbb #3592

Merged
merged 4 commits into from
Jul 12, 2018

Conversation

kushaldas
Copy link
Contributor

@kushaldas kushaldas commented Jun 28, 2018

Status

Ready for review.

Description of Changes

Fixes #3485

Changes proposed in this pull request:

Tor Browser 7.5.6 and geckodriver v0.17.0

Testing

Tests will fail for now in the whole tbb side.

@kushaldas kushaldas requested a review from conorsch as a code owner June 28, 2018 07:45
@kushaldas kushaldas requested a review from a user June 28, 2018 07:45
@kushaldas kushaldas changed the title Update ansible for tbb Update ansible and Dockerfile for tbb Jun 28, 2018
- apt

- name: install geckodriver
shell: |
Copy link
Contributor

Choose a reason for hiding this comment

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

You should use the unarchive module to un-tar the download.

Copy link
Contributor

@msheiny msheiny left a comment

Choose a reason for hiding this comment

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

Heyy @kushaldas i see some potential tweaks that need to be added first. It's minor and I'm happy to help but I didn't want to step over your PR. Let me know if you don't mind and I'll start throwing commits here.

@@ -20,6 +20,26 @@ RUN curl -LO https://launchpad.net/~ubuntu-mozilla-security/+archive/ubuntu/ppa/
dpkg -i firefox*deb && apt-get install -f && \
paxctl -cm /usr/lib/firefox/firefox

RUN apt-get install -y wget libasound2 libdbus-glib-1-2 libgtk2.0-0 libfontconfig1 libxrender1
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add these components to the other layer? (line 9). It's best practice to keep these things bundled. You could separate by a comment as a visual separator.

@@ -20,6 +20,26 @@ RUN curl -LO https://launchpad.net/~ubuntu-mozilla-security/+archive/ubuntu/ppa/
dpkg -i firefox*deb && apt-get install -f && \
paxctl -cm /usr/lib/firefox/firefox

RUN apt-get install -y wget libasound2 libdbus-glib-1-2 libgtk2.0-0 libfontconfig1 libxrender1

RUN gpg --keyserver=hkp://ipv4.pool.sks-keyservers.net --recv-keys EF6E286DDA85EA2A4BA7DE684E2C6E8793298290 && \
Copy link
Contributor

Choose a reason for hiding this comment

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

I would honestly prefer to drop this network outreach and add the key to version control and then docker COPY it into the container. We constantly battle with flakiness of keyservers in various projects

paxctl -cm /root/.local/tbb/tor-browser_en-US/Browser/firefox && \
paxctl -cm /root/.local/tbb/tor-browser_en-US/Browser/plugin-container

ENV GECKODRIVER_CHECKSUM=3154274c050d724eb2f4e8986a58ed37c0138b48304692bf7eeed827a5e82319
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make this a build ARG instead? Allow over-riding outside of this file

Copy link
Contributor Author

@kushaldas kushaldas Jun 29, 2018

Choose a reason for hiding this comment

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

@msheiny Why do we need to override the checksum? Asking because we have to use a particular version of geckodriver with Tor Browser?

Copy link
Contributor

Choose a reason for hiding this comment

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

oooooooh okay thats not gonna change? i dunno... i just always try to move any unique strings like this outside of the dockerfile.. but i see your point

@msheiny msheiny dismissed stale reviews from heartsucker and themself June 29, 2018 16:21

kushal mentioned waiting for upstream changes for CI. Im happy with his changes so far to this PR

@@ -20,6 +21,27 @@ RUN curl -LO https://launchpad.net/~ubuntu-mozilla-security/+archive/ubuntu/ppa/
dpkg -i firefox*deb && apt-get install -f && \
paxctl -cm /usr/lib/firefox/firefox


COPY ./tor_project_public.pub /opt/
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this file? Pulling down the branch locally, I can't find it anywhere. Was it omitted from an add? Recall that we already have the tor signing key at install_files/ansible-base/roles/tor-hidden-services/files/tor-signing-key.pub, although we'll have to consider the build context for the image and whether that's accessible here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uh, yes, I added that in the tbb_in_dev branch (after I figured that I am missing that) :(

Copy link
Contributor

@conorsch conorsch left a comment

Choose a reason for hiding this comment

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

Requesting clarification on the Tor apt pubkey location (appears to be missing). Once that's resolved, these changes can certainly be added to the target branch (which is not develop) via merge.

@conorsch
Copy link
Contributor

kushal mentioned waiting for upstream changes for CI.

@msheiny Can you elaborate a bit on this? Unclear to me why we'd wait to merge, particularly since this is landing in a feature branch, not develop.

Im happy with his changes so far to this PR

I concur! Modulo a single clarification on the tor apt pubkey (see requested changes above).

@redshiftzero
Copy link
Contributor

In sprint planning today, there was a lot of confusion about what the base branch is here, which branch is the right/current one, and what the workflow here is, so I'm going to write out what I think the workflow should be (following the approach we took for the alembic and journalist GUI feature branch work).

  1. tbb-0.9.0 is the base feature branch for the functional testing work. It is not merged into develop until all tickets related to the feature are completed.
  2. PRs implementing tickets for the feature should be proposed here for merge into tbb-0.9.0 as they are completed. There should be one PR per ticket. If the PR is from a fork, the (checked by default) checkbox indicating that maintainers should be allowed to push commits is enabled, this way others can help the PR along if needed.
  3. If two tickets for a given feature are dependent on one another, and the (first) dependent ticket is not yet merged, work should proceed regardless, by pulling the dependent commits into the branch where work is being done for the second ticket. PRs should be done as the work for a ticket is ready for review. The PR author should indicate in the PR description that the PR should not be merged until the PR for the dependent ticket(s) is merged.
  4. Once all tickets for the feature are implemented, a PR is then proposed for final merge of tbb-0.9.0 into develop.

Does that seem reasonable @kushaldas @msheiny @conorsch? Please let me know if there is a particular issue with this workflow and we can revise it.

@kushaldas
Copy link
Contributor Author

@conorsch I cherry-picked the commit which adds the missing tor public key. Rest of the branches I am working on are dependent on this branch. This is ready to be merged in the tbb-0.9.0 branch.

@msheiny
Copy link
Contributor

msheiny commented Jul 12, 2018

@conorsch can you take another pass here? I dismissed your review since @kushaldas addressed your issue but i wanted to wait to see if you had additional concerns.

@msheiny msheiny dismissed conorsch’s stale review July 12, 2018 16:43

kushal addressed original pub key issue

@conorsch conorsch self-requested a review July 12, 2018 16:57
Copy link
Contributor

@conorsch conorsch left a comment

Choose a reason for hiding this comment

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

LGTM! Dev container builds without error for me now. :shipit:

@conorsch conorsch merged commit badd904 into freedomofpress:tbb-0.9.0 Jul 12, 2018
redshiftzero pushed a commit that referenced this pull request Jul 18, 2018
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.

5 participants