sozu
sozu copied to clipboard
Proper packaging for distributions
Right now, installing the proxy requires downloading rustup and installing the proxy through cargo install sozu, but we need a good packaging option for most Linux distributions.
As usual, whenever there's a new cool Rust toy available, @Keruspe packages it for Exherbo before everybody else.
Which will be the next one?
- [x] Redhat/Fedora
- [x] Archlinux (AUR)
- [x] Exherbo
- [ ] Ubuntu
- [ ] Debian
- [ ] Gentoo
- [ ] ...?
I'm especially interested in input about where to put elements like the default certificate, or the command unix socket.
I can take care of an AUR package for Arch Linux.
that would be great, thanks! Hopefully, something that could be automated at some point.
Would you like a package for a release or for the git version?
the release, I guess? I think I'll make a 0.3 soon, when I'm done breaking the API for now :)
Ok, now it just needs to compile
Compiling sozu-lib v0.1.1
error: no associated item named `get_2048_256` found for type `openssl::dh::Dh` in the current scope
--> /home/jer/.cargo/registry/src/github.com-1ecc6299db9ec823/sozu-lib-0.1.1/src/network/tls.rs:433:11
|
433 | match Dh::get_2048_256() {
| ^^^^^^^^^^^^^^^^
error: no method named `set_ecdh_auto` found for type `openssl::ssl::SslContextBuilder` in the current scope
--> /home/jer/.cargo/registry/src/github.com-1ecc6299db9ec823/sozu-lib-0.1.1/src/network/tls.rs:441:13
|
441 | context.set_ecdh_auto(true);
| ^^^^^^^^^^^^^
error: no associated item named `get_2048_256` found for type `openssl::dh::Dh` in the current scope
--> /home/jer/.cargo/registry/src/github.com-1ecc6299db9ec823/sozu-lib-0.1.1/src/network/tls.rs:587:11
|
587 | match Dh::get_2048_256() {
| ^^^^^^^^^^^^^^^^
error: no method named `set_ecdh_auto` found for type `openssl::ssl::SslContextBuilder` in the current scope
--> /home/jer/.cargo/registry/src/github.com-1ecc6299db9ec823/sozu-lib-0.1.1/src/network/tls.rs:594:9
|
594 | ctx.set_ecdh_auto(true);
| ^^^^^^^^^^^^^
Seems to be a problem with having OpenSSL 1.1.0
@badboy you can have a look at #178, sozu is not yet compatible with OpenSSL 1.1.0 indeed
Right, should have looked first. I patched rust-openssl and now it compiles
oh, nice, thanks!
@badboy so, when can we move forward with this? :)
Sure! Initial PKGBUILD is here: https://github.com/badboy/aur-packages/blob/master/sozu-git/PKGBUILD
I'll add a default config, etc. today and will push it to the AUR then as well
Latest PKGBUILD here: https://github.com/badboy/aur-packages/blob/7a45fa0aef82ffaa7392cbc1fe0e50279f5b993f/sozu-git/PKGBUILD
Directory layout:
sozu-git /etc/
sozu-git /etc/sozu/
sozu-git /etc/sozu/config.toml
sozu-git /usr/
sozu-git /usr/bin/
sozu-git /usr/bin/sozu
sozu-git /usr/bin/sozuctl
sozu-git /usr/share/
sozu-git /usr/share/doc/
sozu-git /usr/share/doc/sozu-git/
sozu-git /usr/share/doc/sozu-git/README.md
sozu-git /usr/share/licenses/
sozu-git /usr/share/licenses/sozu-git/
sozu-git /usr/share/licenses/sozu-git/LICENSE-MIT
sozu-git /var/
sozu-git /var/lib/
sozu-git /var/lib/sozu/
State and the socket will be placed into /var/lib/sozu, though I think the socket should actually go into /run/
I need to add the systemd service file.
Hi, I'm working on a project of packaging Rust crates for Fedora (eventually for Red Hat Enterprise Linux): https://docs.pagure.org/fedora-rust.sig/ The project is in very early stage, but we can also take a look at Sozu and try to package it.
@msehnout that would be great!
Ubuntu packages could be automated https://www.reddit.com/r/rust/comments/6o57em/distributing_binaries_through_ppas/
@msehnout did you take a look at https://github.com/sozu-proxy/sozu/pull/181 ? Now building RPM should work.
@badboy any chance you could send a PR for the arch PKGBUILD? Please put it in https://github.com/sozu-proxy/sozu/tree/master/os-build and add a script to build the package in one command
will take care of it tonight!
@Geal I'll send a PR with few changes. I'm currently trying to make it build on my Fedora 26 machine, so I can build it on https://copr.fedorainfracloud.org/. The main problem now is that it downloads dependencies from crates.io during build time, which is fine for Copr repository, but all dependencies must be packaged into RPM if we want to get this package directly into Fedora repositories.
@msehnout take a look at cargo-vendor or cargo-local-registry for this. You can use it to download all dependencies in advance
debian is working on packaging rust crates: https://alioth-lists.debian.net/pipermail/pkg-rust-maintainers/2018-June/001412.html
any plan to deliver a docker container (under hub.docker.com)?
@gjaegle We already have one under hub.docker.com. But we have some trouble with #470. I'll try to fix that as quickly as possible.