From 7649bd24ea30ccad96e500d9813e05c1a082505f Mon Sep 17 00:00:00 2001 From: houmingyong Date: Wed, 12 Mar 2025 16:10:04 +0800 Subject: [PATCH] generate cargo vendor on prep stage (cherry picked from commit 150b64134db0b5ba24c9bde53efcf0bdf7233eb7) --- secGear.spec | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/secGear.spec b/secGear.spec index 5c41f32..bd5b278 100644 --- a/secGear.spec +++ b/secGear.spec @@ -1,6 +1,6 @@ Name: secGear Version: 0.1.0 -Release: 52 +Release: 53 Summary: secGear is an SDK to develop confidential computing apps based on hardware enclave features @@ -157,8 +157,20 @@ The %{name}-as is package contains attestation service %ifnarch x86_64 cd %{_builddir}/%{name}/service/attestation/attestation-agent/ tar xf %{SOURCE1} +mkdir -p .cargo +touch .cargo/config.toml +cat << EOF >> ./.cargo/config.toml +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" +EOF + cd %{_builddir}/%{name}/service/attestation/attestation-service/ tar xf %{SOURCE1} +mkdir -p .cargo +cp %{_builddir}/%{name}/service/attestation/attestation-agent/.cargo/config.toml .cargo/ %endif %build @@ -172,22 +184,9 @@ cmake -DCMAKE_BUILD_TYPE=Debug -DENCLAVE=GP make cd %{_builddir}/%{name}/service/attestation/attestation-agent/ -mkdir -p .cargo -touch .cargo/config.toml -cat << EOF >> ./.cargo/config.toml -[source.crates-io] -replace-with = "vendored-sources" - -[source.vendored-sources] -directory = "vendor" -EOF - %{_cargo} build --features virtcca-attester --bins --release -mkdir -p %{_builddir}/%{name}/service/attestation/attestation-service/.cargo/ -cp %{_builddir}/%{name}/service/attestation/attestation-agent/.cargo/config.toml %{_builddir}/%{name}/service/attestation/attestation-service/.cargo/ cd %{_builddir}/%{name}/service/attestation/attestation-service/ %{_cargo} build --bins --release - %endif %install @@ -295,6 +294,9 @@ popd systemctl restart rsyslog %changelog +* Wed Mar 12 2025 houmingyong - 0.1.0-53 +- generate cargo vendor on %prep stage + * Tue Nov 26 2024 houmingyong - 0.1.0-52 - fix evidence decode typos -- Gitee