From 7760e39b1a386e6f49a86a9c54f22abddec867e3 Mon Sep 17 00:00:00 2001 From: kienn6034 Date: Thu, 18 Jan 2024 22:37:00 +0700 Subject: [PATCH] feat: add checksum for wasmvm download --- Dockerfile | 10 +++++----- Makefile | 9 ++------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 240d4701..cad7ebb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,12 +15,12 @@ WORKDIR /code COPY . /code/ # See https://github.com/CosmWasm/wasmvm/releases -ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.5.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a -ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.5.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a +ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.5.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a +ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.5.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a -# TODO: add checksums later -# RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 86bc5fdc0f01201481c36e17cd3dfed6e9650d22e1c5c8983a5b78c231789ee0 -# RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep a00700aa19f5bfe0f46290ddf69bf51eb03a6dfcd88b905e1081af2e42dbbafc +# check sums +RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep b89c242ffe2c867267621a6469f07ab70fc204091809d9c6f482c3fdf9293830 +RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep c0f4614d0835be78ac8f3d647a70ccd7ed9f48632bc1374db04e4df2245cb467 # Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc` RUN cp "/lib/libwasmvm_muslc.$(uname -m).a" /lib/libwasmvm_muslc.a diff --git a/Makefile b/Makefile index b4c6d803..51c14d9d 100644 --- a/Makefile +++ b/Makefile @@ -248,19 +248,14 @@ proto-format: @if docker ps -a --format '{{.Names}}' | grep -Eq "^${containerProtoFmt}$$"; then docker start -a $(containerProtoFmt); else docker run --name $(containerProtoFmt) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/docker-build-proto \ find ./ -not -path "./third_party/*" -name "*.proto" -exec clang-format -i {} \; ; fi - - - ############################################################################### ### Localnet ### ############################################################################### build-linux: mkdir -p $(BUILDDIR) - @if [ -z "$(docker images -q migalood 2> /dev/null)" ]; then \ - docker build --platform linux/amd64 --tag migalood ./; \ - fi - docker create --platform limux/amd64 --name temp migalood:latest + docker build --platform linux/amd64 --tag migalood ./ + docker create --platform linux/amd64 --name temp migalood:latest docker cp temp:/usr/bin/migalood $(BUILDDIR)/ docker rm temp