inclavared/dist: add the rustc anc cargo check in the %build section rather than in the BuildRequires section
@@ -14,7 +14,6 @@ License: Apache License 2.0
URL: https://github.com/alibaba/%{PROJECT}
Source0: https://github.com/alibaba/%{PROJECT}/archive/v%{version}.tar.gz
-BuildRequires: rust
BuildRequires: enclave-tls == %{version}
ExclusiveArch: x86_64
@@ -26,7 +25,12 @@ inclavared is a coordinator which creates a m-TLS(Mutal Transport Layer Security
%build
if ! [ -x "$(command -v rustc)" ]; then
- echo 'Error: Rust is not installed. Please install Rust firstly'
+ echo 'Error: Rust is not installed. Please type the "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; source $HOME/.cargo/env" command to install Rust firstly'
+ exit 1
+fi
+
+if ! [ -x "$(command -v cargo)" ]; then
+ echo 'Error: Cargo is not installed. Please type the "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; source $HOME/.cargo/env" command to install Cargo firstly'
exit 1
fi
