timvisee / ffsend

:mailbox_with_mail: Easily and securely share files from the command line. A fully featured Firefox Send client.
https://gitlab.com/timvisee/ffsend
GNU General Public License v3.0
6.92k stars 182 forks source link

Upgrade linux/Arch builds to use libssl3. #156

Closed sarrchri closed 1 year ago

sarrchri commented 1 year ago

Aims to at least partially implement #141.

Tested building dynamically linked linux executable (Debian Bookworm) and it built without problems (cargo build --release). Ran cargo test and there were no errors. A couple warnings though, in code I didn't touch.

~I have not tested if it builds on Arch yet (will create a VM today and test it).~

Building via Cargo was successful on Arch.

sarrchri commented 1 year ago

Okay, now I got the hang of it (total Arch noob). Building via Cargo was successful on Arch, as was building with PKGBUILD. I see no problems with this, so I think it's ready for merge.

timvisee commented 1 year ago

Thanks a lot for your effort!

LGTM. Merging.

timvisee commented 1 year ago

It turns out this change is causing build issues for regular musl builds on CI.

Pipeline job: https://gitlab.com/timvisee/ffsend/-/jobs/4311710171

I do the main development over on GitLab, so that's why CI runs there. Don't worry about it though, I might temporarily revert.

sarrchri commented 1 year ago

It turns out this change is causing build issues for regular musl builds on CI.

Pipeline job: https://gitlab.com/timvisee/ffsend/-/jobs/4311710171

I do the main development over on GitLab, so that's why CI runs there. Don't worry about it though, I might temporarily revert.

Huh, so it seems. Well, I don't know how much of help I'll be with fixing that one, I've never touched a CI in my life haha. Or musl, even. But from what I googled, musl is another flavor of compiler? So I guess it's just compiler differences or something that I've failed to account for?

sarrchri commented 1 year ago

@timvisee I just did a manual build of the OpenSSL 3.0.8 package on a Debian machine. It installed in /usr/local/lib64/, not in /usr/local/lib/ as is in the .gitlab-ci.yml. Could that be why it failed the CI run?

sarrchri commented 1 year ago

Okay, I made a GitLab account and forked the project there to fix the CI. See these: https://gitlab.com/sarrchri/ffsend/-/commit/201254204fa3d5393d4855eef234ee09ff78dead // Fix OpenSSL Libraries location https://gitlab.com/sarrchri/ffsend/-/commit/73eeef11293d97b90478d765c9d3c7581ae14d88 // Switch building image to "rust:slim-bookworm". This makes it so that the native build will also require OpenSSL 3.x. You'll probably have to switch the image back to "rust:slim" once their bookworm image is swapped to be the stable one, thus becoming "rust:slim".

You gotta decide whether you still want to support OpenSSL 1.x at all. If not, you can go ahead and cherrypick both commits.