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

Use reprepro to automatically pull Tor packages #128

Merged
merged 1 commit into from
Mar 11, 2022
Merged

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Jan 29, 2022

Status

Ready for review

Description of changes

Instead of maintaining and running a custom molecule playbook to pull
down Tor packages, we can use reprepro's built-in update functionality.

With this configuration, getting new Tor packages just requires:

$ gpg --import repo/conf/updates-keys/*.gpg
$ REPREPRO_BASE_DIR=repo reprepro --export=never update

And the latest Tor packages will be in repo/pool/t/tor/, where they
can be moved to core/focal and committed. For apt-test we should be
able to have CI do this regularly.

The container that runs the above commands will just need reprepro,
ca-certificates and dctrl-tools installed.

The bundled key was downloaded from https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc.

Refs freedomofpress/securedrop#6233.

Test plan

  • Verify bundled key matches one from deb.torproject.org and used elsewhere
  • Spin up a plain Debian container, mount this repo in it, run apt install reprepro ca-cerificates dctrl-tools. Then run the two gpg --import... and reprepro update commands as written above and verify the latest Tor packages are in repo/pool/t/tor/, and these packages match the ones currently in the repo (or if a new upstream version is released, that they match those).

legoktm added a commit to freedomofpress/securedrop-builder that referenced this pull request Feb 2, 2022
Instead of maintaining and running a custom molecule playbook to pull
down Tor packages, we can use reprepro's built-in update functionality.

Once <freedomofpress/securedrop-apt-test#128>
is merged, we can run `reprepro update` to automatically check the
upstream Tor apt repo, pulling down new debs if they're available.

The CI job checks out the securedrop-dev-packages-lfs repository, runs
`reprepro update` and copies over the newly fetched debs. If there's a
difference, it'll commit the new packages and push.

In the future we could publish an image with the reprepro, etc. packages
pre-installed so we don't have to do it at runtime.

Refs <freedomofpress/securedrop#6233>.
legoktm added a commit to freedomofpress/securedrop-builder that referenced this pull request Feb 2, 2022
Instead of maintaining and running a custom molecule playbook to pull
down Tor packages, we can use reprepro's built-in update functionality.

Once <freedomofpress/securedrop-apt-test#128>
is merged, we can run `reprepro update` to automatically check the
upstream Tor apt repo, pulling down new debs if they're available.

The CI job checks out the securedrop-dev-packages-lfs repository, runs
`reprepro update` and copies over the newly fetched debs. If there's a
difference, it'll commit the new packages and push.

In the future we could publish an image with the reprepro, etc. packages
pre-installed so we don't have to do it at runtime.

Refs <freedomofpress/securedrop#6233>.
@legoktm legoktm marked this pull request as ready for review February 2, 2022 00:06
Instead of maintaining and running a custom molecule playbook to pull
down Tor packages, we can use reprepro's built-in update functionality.

With this configuration, getting new Tor packages just requires:

$ gpg --import repo/conf/updates-keys/*.gpg
$ REPREPRO_BASE_DIR=repo reprepro --export=never update

And the latest Tor packages will be in repo/pool/t/tor/, where they
can be moved to core/focal and committed. For apt-test we should be
able to have CI do this regularly.

The container that runs the above commands will just need reprepro,
ca-certificates and dctrl-tools installed.

The bundled key was downloaded from <https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc>.

Refs freedomofpress/securedrop#6233.
legoktm added a commit to freedomofpress/securedrop-builder that referenced this pull request Feb 28, 2022
Instead of maintaining and running a custom molecule playbook to pull
down Tor packages, we can use reprepro's built-in update functionality.

Once <freedomofpress/securedrop-apt-test#128>
is merged, we can run `reprepro update` to automatically check the
upstream Tor apt repo, pulling down new debs if they're available.

The CI job checks out the securedrop-dev-packages-lfs repository, runs
`reprepro update` and copies over the newly fetched debs. If there's a
difference, it'll commit the new packages and push.

In the future we could publish an image with the reprepro, etc. packages
pre-installed so we don't have to do it at runtime.

Refs <freedomofpress/securedrop#6233>.
Copy link
Contributor

@zenmonkeykstop zenmonkeykstop left a comment

Choose a reason for hiding this comment

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

Test plan checks out, key matches that available on deb.torproject.org and latest stable Focal packages are downloaded!

@zenmonkeykstop zenmonkeykstop merged commit f1fe7fd into main Mar 11, 2022
legoktm added a commit to freedomofpress/securedrop that referenced this pull request Mar 17, 2022
We now use reprepro-update with CI to automatically fetch Tor packages
every night. This is now obsolete and no longer needed.

See:
* freedomofpress/securedrop-apt-test#128
* freedomofpress/securedrop-builder#287

Refs #6233.
@legoktm legoktm deleted the reprepro-tor branch May 28, 2024 18:33
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.

2 participants