-
Notifications
You must be signed in to change notification settings - Fork 13
Cryptoki etas integration #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
efbb032
1fbe4c6
a73c01e
477b6e0
ff7af47
e89bfe4
910be16
1442241
609cb83
ffc0de4
0968186
bc0b26b
b548e3a
4786f7b
e80933e
7d7506a
42d6ce8
a55e6c0
3758437
253e959
74bd865
1711631
8e1dc3d
478aea9
a8c1413
2e8eab5
88d3a65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Ignore the submodule | ||
| cpp/pkcs11test | ||
|
|
||
| # ignore Bazel's own output symlinks | ||
| bazel-inc_security_crypto | ||
| bazel-bin | ||
| bazel-out | ||
| bazel-testlogs | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |||||||||||||||
| try-import %workspace%/user.bazelrc | ||||||||||||||||
|
|
||||||||||||||||
| build --per_file_copt=external/score_baselibs.*/.*@-Wno-deprecated-declarations | ||||||||||||||||
| build --per_file_copt=external/score_logging.*/.*@-Wno-deprecated-declarations | ||||||||||||||||
| common --@score_baselibs//score/json:base_library=nlohmann # TODO : https://github.com/eclipse-score/baselibs/issues/57 | ||||||||||||||||
|
|
||||||||||||||||
| build --java_language_version=17 | ||||||||||||||||
|
|
@@ -28,6 +29,7 @@ common --action_env=QNX_LICENSE_EXTSERVER_DELAY=59 | |||||||||||||||
| # Disable for the moment as this leads to "warning: Cannot find Build server key, the value of QNX_LICENSE_QUEUE_TIMEOUT will be ignored." | ||||||||||||||||
|
|
||||||||||||||||
| test --test_output=errors | ||||||||||||||||
| test --test_env=CRYPTOKI_WEAK_PIN_HASHING=1 | ||||||||||||||||
|
|
||||||||||||||||
| # Bazel registry configuration | ||||||||||||||||
| common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry/main/ | ||||||||||||||||
|
|
@@ -37,6 +39,7 @@ common --credential_helper=*.qnx.com=%workspace%/.github/tools/qnx_credential_he | |||||||||||||||
| common --credential_helper_timeout="60s" | ||||||||||||||||
|
|
||||||||||||||||
| # Shared configuration for simple test execution | ||||||||||||||||
| common --experimental_isolated_extension_usages | ||||||||||||||||
| build:shared --incompatible_strict_action_env | ||||||||||||||||
| build:shared --sandbox_writable_path=/var/tmp | ||||||||||||||||
| build:shared --host_platform=@score_bazel_platforms//:x86_64-linux | ||||||||||||||||
|
|
@@ -53,6 +56,7 @@ build:shared_qnx --cxxopt=-DGRPC_POSIX_SOCKET | |||||||||||||||
| build:shared_qnx --cxxopt=-DGRPC_POSIX_SOCKETUTILS | ||||||||||||||||
| build:shared_qnx --cxxopt=-DGRPC_POSIX_WAKEUP_FD | ||||||||||||||||
| build:shared_qnx --cxxopt=-DIP_PKTINFO=0 | ||||||||||||||||
| build:shared_qnx --@score_baselibs//score/memory/shared/flags:use_typedshmd=false | ||||||||||||||||
|
|
||||||||||||||||
| # ------------------------------------------------------------------------------- | ||||||||||||||||
| # Config dedicated to host platform CPU:x86_64 and OS:Linux | ||||||||||||||||
|
|
@@ -83,6 +87,14 @@ build:x86_64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene | |||||||||||||||
| test:x86_64-qnx --run_under=@score_qnx_unit_tests//src:run_under_qnx | ||||||||||||||||
| test:x86_64-qnx --test_lang_filters=cc,rust | ||||||||||||||||
|
|
||||||||||||||||
| # ------------------------------------------------------------------------------- | ||||||||||||||||
| # Different toolchain configuration for x86_64-qnx | ||||||||||||||||
| # ------------------------------------------------------------------------------- | ||||||||||||||||
| build:target_config_1 --config=x86_64-qnx | ||||||||||||||||
| build:target_config_1 --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0 | ||||||||||||||||
| build:target_config_1 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu | ||||||||||||||||
| build:target_config_1 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800 | ||||||||||||||||
|
|
||||||||||||||||
|
Comment on lines
+90
to
97
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the updated bazelrc from main these changes should not longer be necessary.
Suggested change
|
||||||||||||||||
| # ------------------------------------------------------------------------------- | ||||||||||||||||
| # Config dedicated to target platform CPU:aarch64 and OS:QNX | ||||||||||||||||
| # ------------------------------------------------------------------------------- | ||||||||||||||||
|
|
@@ -95,3 +107,24 @@ build:aarch64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocen | |||||||||||||||
| test:aarch64-qnx --run_under=@score_qnx_unit_tests//src:run_under_qnx | ||||||||||||||||
| test:aarch64-qnx --test_lang_filters=cc,rust | ||||||||||||||||
| test:aarch64-qnx --test_timeout=180,900,2700,10800 # Increase default test timeout by factor 3 | ||||||||||||||||
|
|
||||||||||||||||
| # ------------------------------------------------------------------------------- | ||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same point as above the |
||||||||||||||||
| # Different toolchain configuration for aarch64-qnx | ||||||||||||||||
| # ------------------------------------------------------------------------------- | ||||||||||||||||
| build:target_config_2 --config=aarch64-qnx | ||||||||||||||||
| build:target_config_2 --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0 | ||||||||||||||||
| build:target_config_2 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu | ||||||||||||||||
| build:target_config_2 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_nto_qnx800 | ||||||||||||||||
|
|
||||||||||||||||
|
|
||||||||||||||||
| # Clippy linting | ||||||||||||||||
| build --aspects=@score_rust_policies//clippy:linters.bzl%clippy_strict | ||||||||||||||||
| build --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu | ||||||||||||||||
| build --output_groups=+rules_lint_human | ||||||||||||||||
| build:lint --@aspect_rules_lint//lint:fail_on_violation=true | ||||||||||||||||
| build:lint --config=per-x86_64-linux | ||||||||||||||||
| test --test_output=errors | ||||||||||||||||
|
|
||||||||||||||||
| # Run Cargo build.rs scripts locally so openssl-sys can access host license files | ||||||||||||||||
| build:aarch64-qnx --strategy=CargoBuildScriptRun=local | ||||||||||||||||
| build:host_config_1 --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu | ||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -11,8 +11,10 @@ | |||
| # SPDX-License-Identifier: Apache-2.0 | ||||
| # ******************************************************************************* | ||||
|
|
||||
| load("@rules_shell//shell:sh_binary.bzl", "sh_binary") | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please check if this is really needed.
Suggested change
|
||||
| load("@score_docs_as_code//:docs.bzl", "docs") | ||||
| load("@score_tooling//:defs.bzl", "copyright_checker", "use_format_targets") | ||||
| load("//:project_config.bzl", "PROJECT_CONFIG") | ||||
|
|
||||
| docs( | ||||
| data = [ | ||||
|
|
@@ -21,6 +23,20 @@ docs( | |||
| source_dir = ".", | ||||
| ) | ||||
|
|
||||
| package(default_visibility = ["//visibility:public"]) | ||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please apply target specific and keep the default private, also for other BUILD files accordingly. |
||||
|
|
||||
| exports_files([ | ||||
| "Cargo.toml", | ||||
| "Cargo.lock", | ||||
| "README.md", | ||||
| "LICENSE", | ||||
| "NOTICE", | ||||
| "CONTRIBUTION.md", | ||||
| "MODULE.bazel", | ||||
| "project_config.bzl", | ||||
| "pyproject.toml", | ||||
| ]) | ||||
|
|
||||
| copyright_checker( | ||||
| name = "copyright", | ||||
| srcs = [ | ||||
|
|
@@ -36,4 +52,5 @@ copyright_checker( | |||
| visibility = ["//visibility:public"], | ||||
| ) | ||||
|
|
||||
| # Top-level aliases for ergonomic `bazel build/test //:foo` invocations | ||||
| use_format_targets() | ||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -261,13 +261,62 @@ filegroup( | |
| urls = ["https://github.com/softhsm/SoftHSMv2/archive/refs/tags/2.7.0.tar.gz"], | ||
| ) | ||
|
|
||
| # ******************************************************************************* | ||
| # Valeo - Cryptoki | ||
| # ******************************************************************************* | ||
| git_override( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please move the rust toolchain specific parts to section within this file. |
||
| module_name = "rules_rust", | ||
| commit = "2b171a7376e69cb1207eced1f66904ce4ae0c819", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the difference to "0.68.2-score" ? |
||
| remote = "https://github.com/pawelrutkaq/rules_rust.git", | ||
| ) | ||
|
|
||
| rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") | ||
| rust.toolchain( | ||
| edition = "2021", | ||
| extra_target_triples = [ | ||
| "x86_64-unknown-linux-gnu", | ||
| "aarch64-unknown-linux-gnu", | ||
| "aarch64-unknown-nto-qnx800", | ||
| "x86_64-pc-nto-qnx800", | ||
| ], | ||
| versions = ["nightly/2024-04-16"], | ||
| ) | ||
| use_repo(rust, "rust_toolchains") | ||
|
|
||
| register_toolchains("@rust_toolchains//:all") | ||
|
|
||
| bazel_dep(name = "rules_shell", version = "0.8.0") | ||
|
|
||
| bazel_dep(name = "score_rust_policies", version = "0.0.5", dev_dependency = True) | ||
|
|
||
| bazel_dep(name = "score_crates", version = "0.0.7") | ||
|
|
||
| crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate", isolate = True) | ||
| crate.from_cargo( | ||
| name = "crates", | ||
| cargo_lockfile = "//score/cryptoki:Cargo.lock", | ||
| manifests = ["//score/cryptoki:Cargo.toml"], | ||
| supported_platform_triples = [ | ||
| "aarch64-unknown-linux-gnu", | ||
| "x86_64-unknown-linux-gnu", | ||
| "aarch64-unknown-nto-qnx710", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we specify qnx 7.1 here? |
||
| "x86_64-pc-nto-qnx710", | ||
| ], | ||
| ) | ||
| crate.annotation( | ||
| crate = "openssl-sys", | ||
| patch_args = ["-p0"], | ||
| patches = ["@@//third_party/patches:openssl_sys_build_rs.patch"], | ||
| deps = ["@@//third_party/openssl:openssl"], | ||
| ) | ||
| use_repo(crate, "crates") | ||
|
|
||
| # =============================================================================== | ||
| # S C O R E M O D U L E S | ||
| # =============================================================================== | ||
|
|
||
| # tooling | ||
| bazel_dep(name = "score_tooling", version = "1.2.0") | ||
| bazel_dep(name = "score_rust_policies", version = "0.0.5") | ||
| bazel_dep(name = "aspect_rules_lint", version = "2.3.0") | ||
| bazel_dep(name = "buildifier_prebuilt", version = "8.5.1.2") | ||
|
|
||
|
|
@@ -278,10 +327,7 @@ bazel_dep(name = "score_docs_as_code", version = "4.6.0") | |
| bazel_dep(name = "score_process", version = "1.6.0") | ||
| bazel_dep(name = "score_platform", version = "0.6.0") | ||
|
|
||
| # s-core baselibs | ||
| bazel_dep(name = "score_baselibs", version = "0.2.7") | ||
|
|
||
| # Testing | ||
| # GoogleTest | ||
| bazel_dep(name = "googletest", version = "1.17.0.bcr.2") | ||
|
|
||
| bazel_dep(name = "score_qnx_unit_tests", version = "0.2.0", dev_dependency = True) | ||
|
|
@@ -293,4 +339,12 @@ git_override( | |
| remote = "https://github.com/eclipse-score/qnx_unit_tests.git", | ||
| ) | ||
|
|
||
| # s-core baselibs | ||
| bazel_dep(name = "score_baselibs", version = "0.2.7") | ||
| bazel_dep(name = "score_baselibs_rust", version = "0.1.2") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. score_baselibs_rust is deprecated and got merged into score_baselibs with version 0.2.9 please create a follow up issue to bump the version and drop the score_baselibs_rust dependency. |
||
|
|
||
| # Integration testing | ||
| bazel_dep(name = "score_itf", version = "0.1.0", dev_dependency = True) | ||
|
|
||
| bazel_dep(name = "score_python_basics", version = "0.3.4") | ||
| bazel_dep(name = "score_logging", version = "0.2.0") | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be default bazel behaviour?