~nickbp/originz

27f2ec4fb4e7a1a52357a0a07743e4b6930e1b15 — Nick Parker 2 months ago 9081d23
Bump dependencies, break image build into deps vs project for caching
3 files changed, 37 insertions(+), 26 deletions(-)

M Cargo.lock
M Cargo.toml
M Dockerfile
M Cargo.lock => Cargo.lock +16 -16
@@ 39,9 39,9 @@ dependencies = [

[[package]]
name = "anyhow"
version = "1.0.53"
version = "1.0.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0"
checksum = "7a99269dff3bc004caa411f38845c20303f1e393ca2bd6581576fa3a7f59577d"

[[package]]
name = "async-channel"


@@ 116,9 116,9 @@ dependencies = [

[[package]]
name = "async-lock"
version = "2.4.0"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b"
checksum = "e97a171d191782fba31bb902b14ad94e24a68145032b7eedf871ab0bc0d077b6"
dependencies = [
 "event-listener",
]


@@ 1046,9 1046,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"

[[package]]
name = "libc"
version = "0.2.118"
version = "0.2.119"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06e509672465a0504304aa87f9f176f2b2b716ed8fb105ebe5c02dc6dce96a94"
checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4"

[[package]]
name = "lock_api"


@@ 1683,9 1683,9 @@ dependencies = [

[[package]]
name = "rkyv"
version = "0.7.32"
version = "0.7.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e3791595bf1ee951356964271bea7dafd1e1730e8be812f44a31afc38fa7bba"
checksum = "bf98e3e6c7ed44e474b454b1ebded3193ee5aba3428e29c55d59b1d65e49945e"
dependencies = [
 "bytecheck",
 "hashbrown 0.12.0",


@@ 1697,9 1697,9 @@ dependencies = [

[[package]]
name = "rkyv_derive"
version = "0.7.32"
version = "0.7.33"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca655472e721430bfb5c995a5602278e089c329cde96a0a53e1f711e3ba39c55"
checksum = "cc9940ec6a7c62b1d1f476f607c6caf0d7fbf74e43f77bc022143b878fcd3266"
dependencies = [
 "proc-macro2",
 "quote",


@@ 1857,9 1857,9 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"

[[package]]
name = "sha2"
version = "0.10.1"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99c3bd8169c58782adad9290a9af5939994036b76187f7b4f0e6de91dbbfc0ec"
checksum = "55deaec60f81eefe3cce0dc50bda92d6d8e88f2a27df7c5033b42afeb1ed2676"
dependencies = [
 "cfg-if",
 "cpufeatures",


@@ 2102,9 2102,9 @@ checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6"

[[package]]
name = "tracing"
version = "0.1.30"
version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d8d93354fe2a8e50d5953f5ae2e47a3fc2ef03292e7ea46e3cc38f549525fb9"
checksum = "f6c650a8ef0cd2dd93736f033d21cbd1224c5a967aa0c258d00fcf7dafef9b9f"
dependencies = [
 "cfg-if",
 "pin-project-lite",


@@ 2156,9 2156,9 @@ dependencies = [

[[package]]
name = "tracing-subscriber"
version = "0.3.8"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74786ce43333fcf51efe947aed9718fbe46d5c7328ec3f1029e818083966d9aa"
checksum = "9e0ab7bdc962035a87fba73f3acca9b8a8d0034c2e6f60b84aeaaddddc155dce"
dependencies = [
 "ansi_term",
 "lazy_static",

M Cargo.toml => Cargo.toml +6 -6
@@ 12,9 12,9 @@ repository = "https://sr.ht/~nickbp/originz/"
exclude = ["README.md"]

[dependencies]
anyhow = "1.0"
anyhow = "1.0.54"
async-channel = "1.5"
async-lock = "2.3"
async-lock = "2.5.0"
async-net = "1.5"
# Use upstream once PR is merged+released: https://github.com/async-email/async-native-tls/pull/32
async-native-tls = { git = "https://github.com/nickbp/async-native-tls", rev = "29acd5a" }


@@ 31,7 31,7 @@ git-testament = "0.2"
http = "0.2.1"
hyper = { version = "0.14", default-features = false, features = ["client", "http1", "http2", "stream", "tcp"] }
lazy_static = "1.4"
libc = "0.2"
libc = "0.2.119"
nix = "0.23"
packed_struct = "0.10"
packed_struct_codegen = "0.10"


@@ 44,15 44,15 @@ retainer_nickbp = "0.2.2-nickbp"
rkyv = { version = "0.7", features = ["validation"] }
scopeguard = "1.1"
serde = { version = "1.0", features = ["derive"] }
sha2 = "0.10"
sha2 = "0.10.2"
signal-hook = "0.3"
smol = "1.2"
tokio = { version = "1.0.1", default-features = false } # for hyper-smol compatibility shim
toml = "0.5"
tracing = "0.1"
tracing = "0.1.31"
tracing-attributes = "0.1"
tracing-futures = "0.2"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tracing-subscriber = { version = "0.3.9", features = ["env-filter"] }
zstd = "0.10"

[dev-dependencies]

M Dockerfile => Dockerfile +15 -4
@@ 1,17 1,28 @@
# Builds an image containing the binary and little else.

# Builder image, with openssl added for native-tls
# Builder image, with openssl added for native-tls, and initial project for Cargo.* deps to build in

FROM docker.io/library/rust:slim
COPY . /originz
RUN apt-get update \
  && apt-get install -y libssl-dev pkg-config \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists /var/cache/apt/archives \
  && cd /originz \
  && cargo --version \
  && cargo build --release
  && cargo install cargo-build-deps \
  && cd / \
  && cargo new --bin originz

# Build dependencies on their own as separate step to improve cached builds
# (only copy Cargo.* to avoid source changes breaking this cache)
COPY Cargo.toml Cargo.lock /originz
RUN cd /originz && cargo build-deps --release

COPY . /originz
RUN cd /originz && cargo build --release

# Release image: copy executable from builder
# Debian version needs to match builder image to avoid linker issues.

FROM docker.io/library/debian:bullseye-slim
COPY --from=0 /originz/target/release/originz /originz
RUN chmod +x /originz && /originz --version