Skip to content

Commit

Permalink
AS: Make verifier configurable differently for s390x
Browse files Browse the repository at this point in the history
We are encountering an issue on s390x when compiling AS with
`all-verifier`. The error message is as follows:

```
error: failed to run custom build command for `tss-esapi-sys v0.5.0`
```

A platform-specific verifier (e.g., `se-verifier`) is used here.
(confidential-containers/guest-components#492)

Although we can easily configure the verifier using `--features`,
this approach lacks flexibility when the crate is selectively called
from outside (e.g., kbs) based on `target_arch`.

The optimal solution would be to open up room for configuring the
verifier at a `dependencies` level rather than a `features` level.
This commit aims to remove `all-verifier` from the default feature
set and configure it differently for s390x.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
  • Loading branch information
BbolroC committed Jun 3, 2024
1 parent 6adb838 commit b5b9a32
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions attestation-service/attestation-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[features]
default = [ "restful-bin", "rvps-grpc", "rvps-builtin", "all-verifier" ]
default = [ "restful-bin", "rvps-grpc", "rvps-builtin" ]
all-verifier = [ "verifier/all-verifier" ]
tdx-verifier = [ "verifier/tdx-verifier" ]
sgx-verifier = [ "verifier/sgx-verifier" ]
Expand Down Expand Up @@ -62,7 +62,12 @@ thiserror = { workspace = true, optional = true }
tokio.workspace = true
tonic = { workspace = true, optional = true }
uuid = { version = "1.1.2", features = ["v4"] }
verifier = { path = "../verifier", default-features = false }

[target.'cfg(not(target_arch = "s390x"))'.dependencies]
verifier = { path = "../verifier", default-features = false, features = ["all-verifier"] }

[target.'cfg(target_arch = "s390x")'.dependencies]
verifier = { path = "../verifier", default-features = false, features = ["se-verifier"] }

[build-dependencies]
shadow-rs.workspace = true
Expand Down

0 comments on commit b5b9a32

Please sign in to comment.