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

Make Rust toolchain available during package building #1818

Merged
merged 1 commit into from Feb 16, 2024
Merged

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Feb 12, 2024

Status

Ready for review, but depends on #1817 to be merged first.

Description

So far we've been using an ad-hoc image in which the necessary
dependencies are all downloaded at build time, which is nice for tooling
simplicity but adds up the more things we need to download each time.

This adopts the same system used in the SecureDrop server build process.
The tooling builds an image with some dependencies and installs the
minimal Rust toolchain in an image. The image_prop and dep-check scripts
verify all the dependencies are up to date, and rebuild the image if
not.

Test Plan

@legoktm legoktm requested a review from a team as a code owner February 12, 2024 21:14
@cfm cfm self-assigned this Feb 15, 2024
So far we've been using an ad-hoc image in which the necessary
dependencies are all downloaded at build time, which is nice for tooling
simplicity but adds up the more things we need to download each time.

This adopts the same system used in the SecureDrop server build process.
The tooling builds an image with some dependencies and installs the
minimal Rust toolchain in an image. The image_prop and dep-check scripts
verify all the dependencies are up to date, and rebuild the image if
not.
@cfm
Copy link
Member

cfm commented Feb 15, 2024

Rebased (actually, cherry-picked, to avoid having to resolve the same conflicts) from main after #1817.

Copy link
Member

@cfm cfm left a comment

Choose a reason for hiding this comment

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

That's a little sneaky, since it means reviewing on rust-packaging and testing on proxy-rusting. ;-) But I can confirm that the container builds on rust-packaging and builds securedrop-proxy on proxy-rusting.

However:

user@sd:~/securedrop-client/build$ dpkg-deb -c ./securedrop-proxy_0.9.0+bullseye_all.deb | grep "securedrop-proxy" | grep "usr/bin"
lrwxrwxrwx root/root         0 2023-03-16 13:29 ./opt/venvs/securedrop-proxy/bin/python -> /usr/bin/python3
lrwxrwxrwx root/root         0 2023-03-16 13:29 ./usr/bin/sd-proxy -> /opt/venvs/securedrop-proxy/bin/sd-proxy

Am I right that no change in the final package actually output is expected here?

Copy link
Member

@cfm cfm left a comment

Choose a reason for hiding this comment

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

My goof. securedrop-proxy is built in an amd64-architecture package, which therefore won't overwrite the old all package:

user@sd:~/securedrop-client/build$ ls -al securedrop-proxy*.deb
-rw-r--r-- 1 root root 1232512 Feb 15 11:56 securedrop-proxy_0.9.0+bullseye_all.deb
-rw-r--r-- 1 root root 1069724 Feb 15 12:07 securedrop-proxy_0.9.0+bullseye_amd64.deb
-rw-r--r-- 1 root root 1093408 Feb 15 12:07 securedrop-proxy-dbgsym_0.9.0+bullseye_amd64.deb
user@sd:~/securedrop-client/build$ dpkg-deb -c ./securedrop-proxy_0.9.0+bullseye_amd64.deb | grep "securedrop-proxy" | grep "usr/bin"
-rwxr-xr-x root/root   3485976 2023-03-16 13:29 ./usr/bin/securedrop-proxy

Full steam ahead.

@cfm cfm merged commit bb196d2 into main Feb 16, 2024
53 of 54 checks passed
@cfm cfm deleted the rust-packaging branch February 16, 2024 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants