Skip to content

Commit

Permalink
Makefile: remove --locked
Browse files Browse the repository at this point in the history
Now that we are using a more flexible version of the CSV crate
we aren't required to use lock the versions of the packages
anymore.

We do track our Cargo lock files so people can still build with
--locked if they need to, but it doesn't need to be the default.

Signed-off-by: Tobin Feldman-Fitzthum <[email protected]>
  • Loading branch information
fitzthum committed Nov 7, 2024
1 parent eeb581e commit 4a6dffe
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion attestation-service/docker/as-grpc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN if [ "${ARCH}" = "x86_64" ]; then curl -L https://download.01.org/intel-sgx/
apt-get update && apt-get install -y libsgx-dcap-quote-verify-dev; fi

# Build and Install gRPC attestation-service
RUN cargo install --path attestation-service --bin grpc-as --features grpc-bin --locked
RUN cargo install --path attestation-service --bin grpc-as --features grpc-bin


FROM ubuntu:22.04
Expand Down
2 changes: 1 addition & 1 deletion attestation-service/docker/as-restful/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN if [ "${ARCH}" = "x86_64" ]; then curl -L https://download.01.org/intel-sgx/
apt-get update && apt-get install -y libsgx-dcap-quote-verify-dev; fi

# Build and Install RESTful attestation-service
RUN cargo install --path attestation-service --bin restful-as --features restful-bin --locked
RUN cargo install --path attestation-service --bin restful-as --features restful-bin

FROM ubuntu:22.04
ARG ARCH=x86_64
Expand Down
4 changes: 2 additions & 2 deletions deps/verifier/src/se/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ openssl pkey -in kbs.key -pubout -out kbs.pem

- Build KBS
```bash
cargo install --locked --debug --path kbs/src/kbs --no-default-features --features coco-as-builtin,resource,opa
cargo install --debug --path kbs/src/kbs --no-default-features --features coco-as-builtin,resource,opa
```

- Prepare the material retrieved above, similar as:
Expand Down Expand Up @@ -252,4 +252,4 @@ Where the values `se.version`, `se.attestation_phkh`, `se.image_phkh` and `se.ta
#### Set the attestation policy
```bash
kbs-client --url http://127.0.0.1:8080 config --auth-private-key ./kbs/kbs.key set-attestation-policy --policy-file ./ibmse-policy.rego
```
```
9 changes: 4 additions & 5 deletions kbs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,28 @@ build: background-check-kbs

.PHONY: background-check-kbs
background-check-kbs:
cargo build -p kbs --locked --release --no-default-features --features $(FEATURES),$(AS_FEATURE)
cargo build -p kbs --release --no-default-features --features $(FEATURES),$(AS_FEATURE)

.PHONY: passport-issuer-kbs
passport-issuer-kbs:
cargo build -p kbs --locked --release --no-default-features --features $(AS_FEATURE),$(FEATURES)
cargo build -p kbs --release --no-default-features --features $(AS_FEATURE),$(FEATURES)
mv ../target/release/kbs ../target/release/issuer-kbs

.PHONY: passport-resource-kbs
passport-resource-kbs:
cargo build -p kbs --locked --release --no-default-features --features $(FEATURES),
cargo build -p kbs --release --no-default-features --features $(FEATURES),
mv ../target/release/kbs ../target/release/resource-kbs

.PHONY: cli
cli:
cargo build -p kbs-client --locked --release --no-default-features --features $(CLI_FEATURES)
cargo build -p kbs-client --release --no-default-features --features $(CLI_FEATURES)

.PHONY: cli-static-linux
cli-static-linux:
cargo build \
-p kbs-client \
--target=$(ARCH)-unknown-linux-gnu \
--config "target.$(ARCH)-unknown-linux-gnu.rustflags = '-C target-feature=+crt-static'" \
--locked \
--release \
--no-default-features \
--features sample_only
Expand Down
2 changes: 1 addition & 1 deletion kbs/docker/rhel-ubi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ WORKDIR /usr/src/kbs
COPY . .
ARG KBS_FEATURES=coco-as-builtin
RUN \
cargo install --locked --root /usr/local/ --path kbs --bin kbs --no-default-features --features ${KBS_FEATURES} && \
cargo install --root /usr/local/ --path kbs --bin kbs --no-default-features --features ${KBS_FEATURES} && \
# Collect linked files necessary for the binary to run.
mkdir -p /root/trustee/lib64 && \
ldd /usr/local/bin/kbs | sed 's@.*\s/@/@' | sed 's/\s.*//' | xargs -I {} cp {} /root/trustee/lib64
Expand Down

0 comments on commit 4a6dffe

Please sign in to comment.