This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 1ab486d1d040dfa8243dff9368c1f0b6bf73cc5f Author: Arjav Patel <[email protected]> AuthorDate: Thu Feb 12 17:30:41 2026 +0530 netutils/cjson: update download URL for cJSON tarball to include refs/tags Modified the CMakeLists.txt and Makefile to ensure the correct format for downloading the cJSON tarball from GitHub by including 'refs/tags/' in the URL. This change addresses issues with fetching the correct version of the library. Signed-off-by: Arjav Patel <[email protected]> --- netutils/cjson/CMakeLists.txt | 3 ++- netutils/cjson/Makefile | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/netutils/cjson/CMakeLists.txt b/netutils/cjson/CMakeLists.txt index 83a6475cd..b497e4a01 100644 --- a/netutils/cjson/CMakeLists.txt +++ b/netutils/cjson/CMakeLists.txt @@ -30,12 +30,13 @@ if(CONFIG_NETUTILS_CJSON) set(CONFIG_NETUTILS_CJSON_VERSION "1.7.10") endif() + # GitHub requires refs/tags/ in the archive URL for tag downloads if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/cJSON) FetchContent_Declare( cJSON DOWNLOAD_NAME "v${CONFIG_NETUTILS_CJSON_VERSION}.tar.gz" DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR} - URL "${CONFIG_NETUTILS_CJSON_URL}/v${CONFIG_NETUTILS_CJSON_VERSION}.tar.gz" + URL "${CONFIG_NETUTILS_CJSON_URL}/refs/tags/v${CONFIG_NETUTILS_CJSON_VERSION}.tar.gz" SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/cJSON BINARY_DIR diff --git a/netutils/cjson/Makefile b/netutils/cjson/Makefile index d8993373d..683bdb3da 100644 --- a/netutils/cjson/Makefile +++ b/netutils/cjson/Makefile @@ -49,10 +49,12 @@ CSRCS = $(CJSON_SRCDIR)$(DELIM)cJSON.c CSRCS += $(CJSON_SRCDIR)$(DELIM)cJSON_Utils.c # Download and unpack tarball if no git repo found +# GitHub requires refs/tags/ in the archive URL for tag downloads (see +# https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives) ifeq ($(wildcard $(CJSON_UNPACKNAME)/.git),) $(CJSON_TARBALL): @echo "Downloading: $(CJSON_TARBALL)" - $(Q) curl -O -L $(CONFIG_NETUTILS_CJSON_URL)/$(CJSON_TARBALL) + $(Q) curl -O -L $(CONFIG_NETUTILS_CJSON_URL)/refs/tags/$(CJSON_TARBALL) $(CJSON_UNPACKNAME): $(CJSON_TARBALL) @echo "Unpacking: $(CJSON_TARBALL) -> $(CJSON_UNPACKNAME)"
