From 3ee6fdaf99c9abcc21564f177249e4deaf899fc4 Mon Sep 17 00:00:00 2001 From: George Poulios Date: Sat, 2 Aug 2025 07:52:00 +0300 Subject: [PATCH] tee/libteec: Remove downloaded zip file on distclean Initially, leaving the .zip around seemed like a good idea to avoid re-downloading often. But it turns out deleting downloaded packages during distclean is standard practice and some CI scripts depend on the git local copy being clean, including ignored files. Change also CMakeLists.txt to download the zip instead of the tarball. Signed-off-by: George Poulios --- tee/libteec/CMakeLists.txt | 4 +++- tee/libteec/Makefile | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tee/libteec/CMakeLists.txt b/tee/libteec/CMakeLists.txt index d748d5ad3..f94bb4b48 100644 --- a/tee/libteec/CMakeLists.txt +++ b/tee/libteec/CMakeLists.txt @@ -24,9 +24,11 @@ if(CONFIG_LIBTEEC) set(OPTEE_CLIENT_DIR ${CMAKE_CURRENT_LIST_DIR}/optee_client) if(NOT EXISTS ${OPTEE_CLIENT_DIR}) + set(OPTEE_CLIENT_URL https://github.com/OP-TEE/optee_client/archive/refs/tags) + set(OPTEE_CLIENT_VER ${CONFIG_LIBTEEC_VERSION}) FetchContent_Declare( optee_client_fetch - URL https://github.com/OP-TEE/optee_client/archive/refs/tags/${CONFIG_LIBTEEC_VERSION}.tar.gz + URL ${OPTEE_CLIENT_URL}/${OPTEE_CLIENT_VER}.zip SOURCE_DIR ${OPTEE_CLIENT_DIR} BINARY_DIR diff --git a/tee/libteec/Makefile b/tee/libteec/Makefile index 1fe12a0df..df08a696c 100644 --- a/tee/libteec/Makefile +++ b/tee/libteec/Makefile @@ -46,7 +46,8 @@ ifeq ($(wildcard $(LIBTEEC_UNPACKNAME)/.git),) context:: $(LIBTEEC_UNPACKNAME) distclean:: - $(Q) rm -rf $(LIBTEEC_UNPACKNAME) + $(call DELDIR, $(LIBTEEC_UNPACKNAME)) + $(call DELFILE, $(LIBTEEC_ZIP)) endif include $(APPDIR)/Application.mk