We're holding back two things:
- Postgres 12 and up breaks `libpq-sys`.
- Ubuntu 20.04 breaks `sqlx`.
We intend to merge this branch as the main release.
This PR attempts to lay the groundwork to address
https://github.com/emk/rust-musl-builder/issues/96. In particular, we
install the Rust toolchain globally by abusing `rustup`.
We still preserve the legacy `rust` user but we now encourage derived
Dockerfiles to consider `USER root`.
This PR also removes ARM support. We want to explore the idea of
supporting ARM more reliably using a separate image, but perhaps it
would be better to refer those users to one of the Rust
cross-compilation toolchains. See
https://github.com/emk/rust-musl-builder/issues/63 for discussion.
`sqlx` requires linking against OpenSSL twice:
- `sqlx-macros` needs to link against OpenSSL as a shared libary for use
at compile time.
- `sqlx` needs to link against OpenSSL a static library for use at
runtime.
You can find the details here:
https://github.com/launchbadge/sqlx/issues/670https://github.com/sfackler/rust-openssl/issues/1337
We go with the fix proposed by @sfackler, and add a test program that we
can use to verify everything works correctly.
We remove a few `OPENSSL`-related variables that were added 4 years ago,
and that no longer appear to be needed.
I've tweaked this so that we can easily update our dependencies in the
future.
Note that we're still using PostgreSQL 11 and we should probably start
testing everything with 12.
We can't build `libgit2` while passing `no-engine` to OpenSSL. Let's
also try removing `no-async`, just in case somebody needs that.
`no-engine` seems to break OpenSSL 1.0 but not 1.1. I'm not feeling
motivated to find out why on a Saturday; let the CI system see if this
works.
It turns out that some popular libaries still have problems with OpenSSL
1.1, particularly `postgres` 0.15. So we'll build two sets of images
now.
We also explain the new image tagging scheme, and fix a bug wher the
test script didn't test the newly built image.
This project is getting fairly popular, and I need some help sorting bug reports into:
1. Cases where `./test-image` has broken.
2. Cases where `./test-image` works, but the user is having trouble getting their own images to work.
We update our base image to Ubuntu 18.04, and update all of our
dependencies to the latest released versions. This includes:
- gcc-multilib-arm-linux-gnueabihf (latest distro version)
- mdbook 0.2.1 (0.2.3 is out, but there's no binary build)
- OpenSSL 1.1.1b
- libpq 11.2