From 59a896b4997db903998c99f17759889141ab0a19 Mon Sep 17 00:00:00 2001 From: "Zheng, Qi" Date: Sun, 26 Sep 2021 14:06:51 +0800 Subject: [PATCH] Update local_attestation demo with copy_bom tool Signed-off-by: Zheng, Qi --- demos/local_attestation/Makefile | 8 +++----- demos/local_attestation/bom.yaml | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 demos/local_attestation/bom.yaml diff --git a/demos/local_attestation/Makefile b/demos/local_attestation/Makefile index 49484666..404dd058 100644 --- a/demos/local_attestation/Makefile +++ b/demos/local_attestation/Makefile @@ -13,12 +13,10 @@ occlum_=$(CUR_DIR)/../.. all: occlum_instance occlum_instance: build_src - @mkdir -p occlum_instance + @rm -rf occlum_instance && mkdir -p occlum_instance @cd occlum_instance && \ - occlum init && \ - cp $(CUR_DIR)/AppResponder/responder image/bin/ && \ - cp $(OPENSSL)/libcrypto.so.1.1 image/lib/ && \ - cp $(CUR_DIR)/DiffieHellmanLibrary/libecdh.so image/lib/ && \ + occlum init && rm -rf image && \ + copy_bom -f ../bom.yaml --root image --include-dir /opt/occlum/etc/template && \ occlum build @cp -t occlum_instance $(APP) $(BUILD_DIR)/libenclave_initiator.signed.so diff --git a/demos/local_attestation/bom.yaml b/demos/local_attestation/bom.yaml new file mode 100644 index 00000000..659142b0 --- /dev/null +++ b/demos/local_attestation/bom.yaml @@ -0,0 +1,14 @@ +includes: + - base.yaml +# local attestation +targets: + # copy bins + - target: /bin + copy: + - files: + - ../AppResponder/responder + # copy lib + - target: /lib + copy: + - files: + - ../DiffieHellmanLibrary/libecdh.so \ No newline at end of file