Skip to content

[bazel] Migrate hsmtool dependency to opentitan-signing-infra - #343

Merged
willyzha merged 1 commit into
lowRISC:mainfrom
willyzha:update-hsmtool-signing-infra
Oct 23, 2026
Merged

willyzha merged 1 commit into
lowRISC:mainfrom
willyzha:update-hsmtool-signing-infra

Conversation

@willyzha

@willyzha willyzha commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Replaces the legacy @lowrisc_opentitan_head http_archive, hsmtool_head_index crate universe, and lowrisc_serde_annotate archive workarounds with the standalone lowRISC/opentitan-signing-infra Bzlmod module (2026-09-03-release-1).

Changes

  • MODULE.bazel / MODULE.bazel.lock:
    • Add bazel_dep + archive_override for opentitan_signing_infra pinned to release tag 2026-09-03-release-1.
    • Remove lowrisc_opentitan_head, hsmtool_head_index, and lowrisc_serde_annotate.
    • Register nightly/2025-09-18 host Rust toolchain (rust_host, default edition = "2021") compatible with both @opentitan_signing_infra//hsmtool and @lowrisc_opentitan//sw/host/opentitanlib.
    • Update direct bazel_skylib (1.8.2) and rules_cc (0.2.19) versions and regenerate MODULE.bazel.lock.
  • rules/hsm.bzl & release/BUILD.bazel:
    • Point _hsmtool and release bundle targets to @opentitan_signing_infra//hsmtool.
  • src/ate/test_programs/otlib_wrapper/BUILD.bazel:
    • Switch otlib_wrapper from rust_library (rlib) to rust_static_library (staticlib) so rustc bundles its own allocator shim when linking into C++ ATE test binaries (cp, ft) under rules_rust 0.59.2.
  • nix/bazel.nix:
    • Drop obsolete OPENSSL_STATIC and @lowrisc_opentitan_head pkg-config flags, update hsmtool build/install paths to @opentitan_signing_infra//hsmtool, and update sha256Hash.

Verification

  • bazelisk test //quality/...
  • bazelisk build //..., --//src/pa/services:use_vendor_shim //src/pa/services:pa, //release:release_bundle --define pq=true, and --stamp //release:release --define "env=prod"
  • bazelisk test --test_tag_filters=-lint,-fpga //... and bazelisk test //src/ate/test_programs:ate_dll_smoke_test
  • ./tests/run_pa_loadtest.sh --pq and ./tests/run_pa_loadtest.sh
  • nix build path:.#bazel-deps-cache path:.#all and nix flake check

Fixes #342

Replace the legacy @lowrisc_opentitan_head http_archive, hsmtool_head_index Cargo universe, and lowrisc_serde_annotate archive workarounds with the standalone @opentitan_signing_infra Bzlmod module (2026-09-03-release-1):

- Add bazel_dep + archive_override for opentitan_signing_infra (tag 2026-09-03-release-1) in MODULE.bazel, register nightly/2025-09-18 host Rust toolchain (edition 2021) compatible with both @opentitan_signing_infra//hsmtool and @lowrisc_opentitan//sw/host/opentitanlib, and regenerate MODULE.bazel.lock.
- Update hsmtool target references in rules/hsm.bzl and release/BUILD.bazel to @opentitan_signing_infra//hsmtool.
- Switch otlib_wrapper to rust_static_library so rustc bundles its allocator shim when linking into C++ ATE test binaries under rules_rust 0.59.2.
- Remove obsolete OpenSSL hsmtool flags in nix/bazel.nix, update hsmtool target/install paths, and update the vendor FOD sha256Hash.

Fixes lowRISC#342

Signed-off-by: Willy Zhang <willyzhang@google.com>
@willyzha
willyzha force-pushed the update-hsmtool-signing-infra branch from 89471cd to 7ee2f63 Compare October 22, 2026 03:06
@willyzha
willyzha merged commit 8b79904 into lowRISC:main Oct 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port update hsmtool dependancy to https://github.com/lowRISC/opentitan-signing-infra

2 participants