From ebab6c5f860f83072767fd0ee1ed937fc371136e Mon Sep 17 00:00:00 2001 From: William Brown Date: Tue, 2 Aug 2022 13:27:17 +1000 Subject: [PATCH] Fix cargo.lock + Docker --- Cargo.lock | 25 +++++++------------------ Cargo.toml | 1 + kanidmd/Dockerfile | 27 +++++++++++++++++---------- 3 files changed, 25 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ffd4f01ac..0c1662829 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -454,17 +454,6 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" -[[package]] -name = "base64urlsafedata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d02340c3f25c8422ba85d481123406dd7506505485bac1c694b26eb538da8daf" -dependencies = [ - "base64 0.13.0", - "serde", - "serde_json", -] - [[package]] name = "base64urlsafedata" version = "0.1.1" @@ -740,7 +729,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9417bb4f581b7a5e08fabb4398b910064363bbfd7b75a10d1da3bfff3ef9b36" dependencies = [ "base64 0.13.0", - "base64urlsafedata 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64urlsafedata", "openssl", "serde", "serde_json", @@ -2088,7 +2077,7 @@ dependencies = [ "async-std", "async-trait", "base64 0.13.0", - "base64urlsafedata 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64urlsafedata", "chrono", "compact_jwt", "compiled-uuid", @@ -2163,7 +2152,7 @@ name = "kanidm_proto" version = "1.1.0-alpha.9" dependencies = [ "base32", - "base64urlsafedata 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "base64urlsafedata", "serde", "serde_json", "time 0.2.27", @@ -4539,7 +4528,7 @@ version = "0.4.2-beta.3" source = "git+https://github.com/kanidm/webauthn-rs.git?rev=7a8e6c6b351ab7544f08cf8ba48424baacee1360#7a8e6c6b351ab7544f08cf8ba48424baacee1360" dependencies = [ "authenticator", - "base64urlsafedata 0.1.1 (git+https://github.com/kanidm/webauthn-rs.git?rev=7a8e6c6b351ab7544f08cf8ba48424baacee1360)", + "base64urlsafedata", "nom 7.1.1", "openssl", "rpassword 5.0.1", @@ -4555,7 +4544,7 @@ name = "webauthn-rs" version = "0.4.2-beta.3" source = "git+https://github.com/kanidm/webauthn-rs.git?rev=7a8e6c6b351ab7544f08cf8ba48424baacee1360#7a8e6c6b351ab7544f08cf8ba48424baacee1360" dependencies = [ - "base64urlsafedata 0.1.1 (git+https://github.com/kanidm/webauthn-rs.git?rev=7a8e6c6b351ab7544f08cf8ba48424baacee1360)", + "base64urlsafedata", "serde", "tracing", "url", @@ -4569,7 +4558,7 @@ version = "0.4.2-beta.3" source = "git+https://github.com/kanidm/webauthn-rs.git?rev=7a8e6c6b351ab7544f08cf8ba48424baacee1360#7a8e6c6b351ab7544f08cf8ba48424baacee1360" dependencies = [ "base64 0.13.0", - "base64urlsafedata 0.1.1 (git+https://github.com/kanidm/webauthn-rs.git?rev=7a8e6c6b351ab7544f08cf8ba48424baacee1360)", + "base64urlsafedata", "compact_jwt", "der-parser", "nom 7.1.1", @@ -4591,7 +4580,7 @@ name = "webauthn-rs-proto" version = "0.4.2-beta.3" source = "git+https://github.com/kanidm/webauthn-rs.git?rev=7a8e6c6b351ab7544f08cf8ba48424baacee1360#7a8e6c6b351ab7544f08cf8ba48424baacee1360" dependencies = [ - "base64urlsafedata 0.1.1 (git+https://github.com/kanidm/webauthn-rs.git?rev=7a8e6c6b351ab7544f08cf8ba48424baacee1360)", + "base64urlsafedata", "js-sys", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 7d69b9b24..24d0a5f3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,6 +32,7 @@ exclude = [ # ldap3_server = { path = "../ldap3_server" } +base64urlsafedata = { git = "https://github.com/kanidm/webauthn-rs.git", rev = "7a8e6c6b351ab7544f08cf8ba48424baacee1360" } # webauthn-rs = { path = "../webauthn-rs/webauthn-rs" } webauthn-rs = { git = "https://github.com/kanidm/webauthn-rs.git", rev = "7a8e6c6b351ab7544f08cf8ba48424baacee1360" } # webauthn-rs-core = { path = "../webauthn-rs/webauthn-rs-core" } diff --git a/kanidmd/Dockerfile b/kanidmd/Dockerfile index 006efd72a..cd8afc0f3 100644 --- a/kanidmd/Dockerfile +++ b/kanidmd/Dockerfile @@ -6,7 +6,7 @@ RUN /usr/sbin/mirrorsorcerer -x; true RUN zypper refresh --force RUN zypper dup -y - +# ====================== FROM repos AS builder RUN zypper install -y \ @@ -19,6 +19,7 @@ RUN zypper install -y \ sccache \ gcc \ rsync \ + findutils \ which RUN zypper clean -a @@ -36,7 +37,11 @@ RUN echo $KANIDM_FEATURES ENV CARGO_HOME=/scratch/.cargo +# ====================== + WORKDIR /usr/src/kanidm/kanidmd_web_ui +# This can't be used in the wasm build for now. +# ENV RUSTFLAGS="-Clinker=clang" RUN if [ "${SCCACHE_REDIS}" != "" ]; \ then \ export CARGO_INCREMENTAL=false && \ @@ -44,15 +49,16 @@ RUN if [ "${SCCACHE_REDIS}" != "" ]; \ sccache --start-server; \ fi && \ ./build_wasm.sh -# This has to be after the WASM build because weird reasons. -# Set the build profile -ENV KANIDM_BUILD_PROFILE="${KANIDM_BUILD_PROFILE}" -ENV RUSTFLAGS="-Clinker=clang" + +# ====================== WORKDIR /usr/src/kanidm/kanidmd/daemon +# Set the build profile +ENV KANIDM_BUILD_PROFILE="${KANIDM_BUILD_PROFILE}" ENV RUSTFLAGS="-Clinker=clang -Clink-arg=-fuse-ld=/usr/bin/ld.lld" +# Exports don't persist through RUN statements. RUN if [ "${SCCACHE_REDIS}" != "" ]; \ then \ export CARGO_INCREMENTAL=false && \ @@ -61,9 +67,8 @@ then \ sccache --start-server; \ else \ export CC="/usr/bin/clang"; \ -fi - -RUN if [ -z "${KANIDM_FEATURES}" ]; then \ +fi && \ +if [ -z "${KANIDM_FEATURES}" ]; then \ cargo build -p daemon ${KANIDM_BUILD_OPTIONS} \ --target-dir="/usr/src/kanidm/target/" \ --release; \ @@ -72,11 +77,13 @@ else \ --target-dir="/usr/src/kanidm/target/" \ --features="${KANIDM_FEATURES}" \ --release; \ -fi -RUN if [ "${SCCACHE_REDIS}" != "" ]; then sccache -s; fi +fi && \ +if [ "${SCCACHE_REDIS}" != "" ]; then sccache -s; fi RUN ls -al /usr/src/kanidm/target/release +# ====================== + FROM repos RUN zypper install -y \