Fix use of GIT_SHALLOW in external components
External component cmake files are specifying GIT_SHALLOW TRUE for
the content fetch options for fetching upstream content. This
option is intended for cases where a remote branch is being
tracked and only the tip needs to be fetched. To maintain
control over the versions of external components used, a
specific tag or hash should be used as the refspec. For this
behaviour, GIT_SHALLOW TRUE cannot be used as fetches will
fail when the upstream repo changes. This change fixes the
problem.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I61cefb295352b0d2c46f6a426577605b6a3cfae6
diff --git a/external/CppUTest/CppUTest.cmake b/external/CppUTest/CppUTest.cmake
index 061e030..8fd8ab1 100644
--- a/external/CppUTest/CppUTest.cmake
+++ b/external/CppUTest/CppUTest.cmake
@@ -14,7 +14,7 @@
set(GIT_OPTIONS
GIT_REPOSITORY ${CPPUTEST_URL}
GIT_TAG ${CPPUTEST_REFSPEC}
- GIT_SHALLOW TRUE
+ GIT_SHALLOW FALSE
PATCH_COMMAND git stash
COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/cpputest-cmake-fix.patch
)
diff --git a/external/LinuxFFAUserShim/LinuxFFAUserShim.cmake b/external/LinuxFFAUserShim/LinuxFFAUserShim.cmake
index dbc3e28..7ba64af 100644
--- a/external/LinuxFFAUserShim/LinuxFFAUserShim.cmake
+++ b/external/LinuxFFAUserShim/LinuxFFAUserShim.cmake
@@ -25,7 +25,7 @@
set(GIT_OPTIONS
GIT_REPOSITORY ${LINUX_FFA_USER_SHIM_URL}
GIT_TAG ${LINUX_FFA_USER_SHIM_REFSPEC}
- GIT_SHALLOW TRUE
+ GIT_SHALLOW FALSE
)
include(${TS_ROOT}/tools/cmake/common/LazyFetch.cmake REQUIRED)
LazyFetch_MakeAvailable(
diff --git a/external/MbedTLS/MbedTLS.cmake b/external/MbedTLS/MbedTLS.cmake
index ec39e83..6cc1fa2 100644
--- a/external/MbedTLS/MbedTLS.cmake
+++ b/external/MbedTLS/MbedTLS.cmake
@@ -65,7 +65,7 @@
BINARY_DIR ${MBEDTLS_BINARY_DIR}
GIT_REPOSITORY ${MBEDTLS_URL}
GIT_TAG ${MBEDTLS_REFSPEC}
- GIT_SHALLOW TRUE
+ GIT_SHALLOW FALSE
)
# FetchContent_GetProperties exports mbedtls_SOURCE_DIR and mbedtls_BINARY_DIR variables
diff --git a/external/firmware_test_builder/FirmwareTestBuilder.cmake b/external/firmware_test_builder/FirmwareTestBuilder.cmake
index 798e417..f5450c6 100644
--- a/external/firmware_test_builder/FirmwareTestBuilder.cmake
+++ b/external/firmware_test_builder/FirmwareTestBuilder.cmake
@@ -12,7 +12,7 @@
set(GIT_OPTIONS
GIT_REPOSITORY ${FIRMWARE_TEST_BUILDER_URL}
GIT_TAG ${FIRMWARE_TEST_BUILDER_REFSPEC}
- GIT_SHALLOW TRUE)
+ GIT_SHALLOW FALSE)
include(${TS_ROOT}/tools/cmake/common/LazyFetch.cmake REQUIRED)
LazyFetch_MakeAvailable(
diff --git a/external/nanopb/nanopb.cmake b/external/nanopb/nanopb.cmake
index 2eead70..ea4ffdd 100644
--- a/external/nanopb/nanopb.cmake
+++ b/external/nanopb/nanopb.cmake
@@ -44,7 +44,7 @@
set(GIT_OPTIONS
GIT_REPOSITORY ${NANOPB_URL}
GIT_TAG ${NANOPB_REFSPEC}
- GIT_SHALLOW TRUE
+ GIT_SHALLOW FALSE
#See the .patch file for details on why it is needed.
PATCH_COMMAND git stash
COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/fix-pyhon-name.patch
diff --git a/external/newlib/newlib.cmake b/external/newlib/newlib.cmake
index 48736e5..2ea01e4 100644
--- a/external/newlib/newlib.cmake
+++ b/external/newlib/newlib.cmake
@@ -142,7 +142,7 @@
SOURCE_DIR ${NEWLIB_SOURCE_DIR}
GIT_REPOSITORY ${NEWLIB_URL}
GIT_TAG ${NEWLIB_REFSPEC}
- GIT_SHALLOW TRUE
+ GIT_SHALLOW FALSE
PATCH_COMMAND git stash
COMMAND ${GIT_COMMAND} am ${CMAKE_CURRENT_LIST_DIR}/0001-Allow-aarch64-linux-gcc-to-compile-bare-metal-lib.patch
COMMAND ${GIT_COMMAND} reset HEAD~1
diff --git a/external/psa_arch_tests/psa_arch_tests.cmake b/external/psa_arch_tests/psa_arch_tests.cmake
index 03c0376..36ff26d 100644
--- a/external/psa_arch_tests/psa_arch_tests.cmake
+++ b/external/psa_arch_tests/psa_arch_tests.cmake
@@ -12,7 +12,7 @@
set(GIT_OPTIONS
GIT_REPOSITORY ${PSA_ARCH_TESTS_URL}
GIT_TAG ${PSA_ARCH_TESTS_REFSPEC}
- GIT_SHALLOW TRUE
+ GIT_SHALLOW FALSE
PATCH_COMMAND git stash
COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/modify_attest_config.patch
)
diff --git a/external/qcbor/qcbor.cmake b/external/qcbor/qcbor.cmake
index 3342aaf..11749b6 100644
--- a/external/qcbor/qcbor.cmake
+++ b/external/qcbor/qcbor.cmake
@@ -14,7 +14,7 @@
set(GIT_OPTIONS
GIT_REPOSITORY ${QCBOR_URL}
GIT_TAG ${QCBOR_REFSPEC}
- GIT_SHALLOW TRUE
+ GIT_SHALLOW FALSE
PATCH_COMMAND git stash
COMMAND git branch -f bf-patch
diff --git a/external/t_cose/t_cose.cmake b/external/t_cose/t_cose.cmake
index 2458a3f..9ed14c4 100644
--- a/external/t_cose/t_cose.cmake
+++ b/external/t_cose/t_cose.cmake
@@ -14,7 +14,7 @@
set(GIT_OPTIONS
GIT_REPOSITORY ${T_COSE_URL}
GIT_TAG ${T_COSE_REFSPEC}
- GIT_SHALLOW TRUE
+ GIT_SHALLOW FALSE
PATCH_COMMAND git stash
COMMAND git branch -f bf-patch