From 57bc15c149ec7ee135eff4d8b06478c5bc98c7a4 Mon Sep 17 00:00:00 2001 From: Alexis Grojean Date: Thu, 12 Oct 2023 13:00:43 +0200 Subject: [PATCH 1/4] full : add ledgerctl (it is a dependency of cargo ledger) --- CHANGELOG.md | 5 +++++ full/Dockerfile | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a6ec93..e46926c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [3.9.3] - 2023-12-06 + +### Added + - Add ledgerctl to full image so that we can use cargo ledger sideload and apdu dump features. + ## [3.10.2] - 2023-12-07 ### Changed diff --git a/full/Dockerfile b/full/Dockerfile index 2f880ed..a5e3de4 100644 --- a/full/Dockerfile +++ b/full/Dockerfile @@ -27,6 +27,16 @@ RUN rustup target add thumbv6m-none-eabi --toolchain $RUST_NIGHTLY_VERSION # Adding rust-src component to nightly channel RUN rustup component add rust-src --toolchain $RUST_NIGHTLY_VERSION +# Python packages building dependencies, can be removed afterwards +RUN apk add -t python_build_deps python3-dev \ + libffi-dev + +# Install ledgerctl, which is used by cargo ledger for loading or dumping an APDU app file. +RUN pip3 install git+https://github.com/LedgerHQ/ledgerctl + +# Cleanup, remove packages that aren't needed anymore +RUN apk del python_build_deps + # Add cargo ledger (needs a version of Rust >= 1.70) RUN cargo +$RUST_STABLE_VERSION install --locked --git=https://github.com/LedgerHQ/cargo-ledger.git --rev 1.1.1 cargo-ledger From 81ae878aa29b6235e5baffaefd624484ade73dfb Mon Sep 17 00:00:00 2001 From: Alexis Grojean Date: Mon, 11 Dec 2023 13:34:52 +0100 Subject: [PATCH 2/4] Use pypi to install latest ledgerwallet version and crates io for latest cargo-ledger version. --- full/Dockerfile | 4 ++-- legacy/Dockerfile | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/full/Dockerfile b/full/Dockerfile index a5e3de4..5728ee3 100644 --- a/full/Dockerfile +++ b/full/Dockerfile @@ -32,13 +32,13 @@ RUN apk add -t python_build_deps python3-dev \ libffi-dev # Install ledgerctl, which is used by cargo ledger for loading or dumping an APDU app file. -RUN pip3 install git+https://github.com/LedgerHQ/ledgerctl +RUN pip3 install ledgerwallet # Cleanup, remove packages that aren't needed anymore RUN apk del python_build_deps # Add cargo ledger (needs a version of Rust >= 1.70) -RUN cargo +$RUST_STABLE_VERSION install --locked --git=https://github.com/LedgerHQ/cargo-ledger.git --rev 1.1.1 cargo-ledger +RUN cargo +$RUST_STABLE_VERSION install cargo-ledger # Setup cargo ledger (install JSON target files) RUN cargo ledger setup diff --git a/legacy/Dockerfile b/legacy/Dockerfile index 0b226e9..8c8c2ce 100644 --- a/legacy/Dockerfile +++ b/legacy/Dockerfile @@ -62,6 +62,9 @@ RUN rustup target add thumbv6m-none-eabi --toolchain $RUST_NIGHTLY_VERSION # Adding rust-src component to nightly channel RUN rustup component add rust-src --toolchain $RUST_NIGHTLY_VERSION +# Add ledgerwallet python package used by cargo ledger to generate the app APDU file +RUN pip3 install ledgerwallet + # Add cargo ledger (needs a version of Rust >= 1.70) RUN cargo +$RUST_STABLE_VERSION install --locked --git=https://github.com/LedgerHQ/cargo-ledger.git --rev 1.1.1 cargo-ledger From ba2dfeb4bd3d6985423ad6f07cae7f5e12d392b4 Mon Sep 17 00:00:00 2001 From: Alexis Grojean Date: Mon, 11 Dec 2023 14:04:40 +0100 Subject: [PATCH 3/4] Lock cargo-ledger and ledgerwallet versions. --- full/Dockerfile | 4 ++-- legacy/Dockerfile | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/full/Dockerfile b/full/Dockerfile index 5728ee3..61d22a6 100644 --- a/full/Dockerfile +++ b/full/Dockerfile @@ -32,13 +32,13 @@ RUN apk add -t python_build_deps python3-dev \ libffi-dev # Install ledgerctl, which is used by cargo ledger for loading or dumping an APDU app file. -RUN pip3 install ledgerwallet +RUN pip3 install ledgerwallet==0.4.0 # Cleanup, remove packages that aren't needed anymore RUN apk del python_build_deps # Add cargo ledger (needs a version of Rust >= 1.70) -RUN cargo +$RUST_STABLE_VERSION install cargo-ledger +RUN cargo +$RUST_STABLE_VERSION install --version 1.2.1 cargo-ledger # Setup cargo ledger (install JSON target files) RUN cargo ledger setup diff --git a/legacy/Dockerfile b/legacy/Dockerfile index 8c8c2ce..d57262e 100644 --- a/legacy/Dockerfile +++ b/legacy/Dockerfile @@ -63,10 +63,10 @@ RUN rustup target add thumbv6m-none-eabi --toolchain $RUST_NIGHTLY_VERSION RUN rustup component add rust-src --toolchain $RUST_NIGHTLY_VERSION # Add ledgerwallet python package used by cargo ledger to generate the app APDU file -RUN pip3 install ledgerwallet +RUN pip3 install ledgerwallet==0.4.0 # Add cargo ledger (needs a version of Rust >= 1.70) -RUN cargo +$RUST_STABLE_VERSION install --locked --git=https://github.com/LedgerHQ/cargo-ledger.git --rev 1.1.1 cargo-ledger +RUN cargo +$RUST_STABLE_VERSION install --version 1.2.1 cargo-ledger # Setup cargo ledger (install JSON target files) RUN cargo ledger setup From ad1814eddc8c77f4c52df81f032fb2e254c8fd1b Mon Sep 17 00:00:00 2001 From: Alexis Grojean Date: Mon, 11 Dec 2023 14:04:57 +0100 Subject: [PATCH 4/4] Update CHANGELOG --- CHANGELOG.md | 8 ++++++-- lite/Dockerfile | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e46926c..aee257a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [3.9.3] - 2023-12-06 +## [3.11.0] - 2023-12-11 ### Added - - Add ledgerctl to full image so that we can use cargo ledger sideload and apdu dump features. + - Add ledgerctl to full and legacy images so that we can use cargo ledger sideload and apdu dump features. + +### Changed + - Lock installed version of cargo-ledger in full and legacy images. + - Bump Stax SDK version in lite image. ## [3.10.2] - 2023-12-07 diff --git a/lite/Dockerfile b/lite/Dockerfile index 03f6302..9afc762 100644 --- a/lite/Dockerfile +++ b/lite/Dockerfile @@ -86,7 +86,7 @@ RUN echo nanos2 > $NANOSP_SDK/.target # Latest Stax SDK (OS stax_1.4.0-rc1 => based on API_LEVEL 14) ENV STAX_SDK=/opt/stax-secure-sdk -RUN git -C "$LEDGER_SECURE_SDK" worktree add "$STAX_SDK" v14.1.0 +RUN git -C "$LEDGER_SECURE_SDK" worktree add "$STAX_SDK" v14.1.1 RUN echo stax > $STAX_SDK/.target # Default SDK