netutils/cjson: update download URL for cJSON tarball to include refs/tags#3402
netutils/cjson: update download URL for cJSON tarball to include refs/tags#3402arjav1528 wants to merge 2 commits intoapache:masterfrom
Conversation
linguini1
left a comment
There was a problem hiding this comment.
Seems fine. Which build host did you use?
Host: [e.g. macOS / Linux, CPU, compiler]
And which NuttX configuration did you build to test?
Host: macOS, Apple M4 Air, clang (Xcode). |
Sounds good! Just asking since you left it as a placeholder in the description! |
Yess, may be I forgot to change the tenplate PR |
cederom
left a comment
There was a problem hiding this comment.
Thank you @arjav1528 :-) Just please provide git commit message, this part is required, see https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md :-)
Both URLs work for me, but true, old URL has 302 redirection and releases contain reference to one with refs/tags already, thanks for the update! :-)
Do you have some spare time to take a look at other github packages too? :-)
And.. if you use cJSON.. there is a 1.7.19 release already out there.. do you know if that would build and run on NuttX? There were many fixes since 1.7.10 and the only breaking stuff seems linked list change in 1.7.14 (I really like cJSON announces quick fix in the release notes! https://github.com/DaveGamble/cJSON/releases).
% wget https://github.com/DaveGamble/cJSON/archive/v1.7.10.tar.gz
--2026-02-08 23:18:57-- https://github.com/DaveGamble/cJSON/archive/v1.7.10.tar.gz
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/DaveGamble/cJSON/tar.gz/refs/tags/v1.7.10 [following]
--2026-02-08 23:18:57-- https://codeload.github.com/DaveGamble/cJSON/tar.gz/refs/tags/v1.7.10
Resolving codeload.github.com (codeload.github.com)... 140.82.121.9
Connecting to codeload.github.com (codeload.github.com)|140.82.121.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘v1.7.10.tar.gz’
v1.7.10.tar.gz [ <=> ] 338,93K 1,77MB/s in 0,2s
2026-02-08 23:18:58 (1,77 MB/s) - ‘v1.7.10.tar.gz’ saved [347063]
% wget https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.10.tar.gz
--2026-02-08 23:23:14-- https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.10.tar.gz
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/DaveGamble/cJSON/tar.gz/refs/tags/v1.7.10 [following]
--2026-02-08 23:23:14-- https://codeload.github.com/DaveGamble/cJSON/tar.gz/refs/tags/v1.7.10
Resolving codeload.github.com (codeload.github.com)... 140.82.121.9
Connecting to codeload.github.com (codeload.github.com)|140.82.121.9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-gzip]
Saving to: ‘v1.7.10.tar.gz.1’
v1.7.10.tar.gz.1 [ <=> ] 338,93K 1,73MB/s in 0,2s
2026-02-08 23:23:14 (1,73 MB/s) - ‘v1.7.10.tar.gz.1’ saved [347063]
sure, will love to contribute |
|
Question: https://github.com/apache/nuttx-apps/blob/master/netutils/cjson/Kconfig |
…/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 <arjav1528@gmail.com>
|
Hi @arjav1528 please fix |
Modified CMakeLists.txt, Kconfig, and Makefile to change the cJSON download URL to include 'refs/tags/' for proper version fetching. This ensures compatibility with GitHub's archive download requirements. Signed-off-by: Arjav Patel <arjav1528@gmail.com>
Yes, updating the Kconfig default is indeed the cleaner approach,
done |
cederom
left a comment
There was a problem hiding this comment.
Thank you @arjav1528.. and @simbit18 for finding even better solution! :-)


Summary
GitHub changed how source code archives for tags are served. The previous URL format for downloading a release tarball (e.g.
https://github.com/DaveGamble/cJSON/archive/v1.7.10.tar.gz) no longer works; GitHub now requiresrefs/tags/in the path for tag-based archive downloads.This change updates the cJSON download URL in both the Makefile and CMakeLists.txt build paths to use the correct format:
.../archive/refs/tags/v${VERSION}.tar.gz. Without this, the cJSON tarball download fails during the apps build when the source is fetched from GitHub.References:
Impact
Testing
CONFIG_NETUTILS_CJSON=y, cleaned the cJSON source directory and tarball, then ran the apps build to trigger download and build of cJSON.