system/nxpkg: Fetch the catalog and artifacts over the network. - #3719
Conversation
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx-apps/actions/runs/31526642262 |
24db760 to
022f5d5
Compare
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx-apps/actions/runs/31812527831 |
17624bb to
593f8b3
Compare
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx-apps/actions/runs/31878516657 |
593f8b3 to
7305777
Compare
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx-apps/actions/runs/31879828238 |
Download catalogs and artifacts with bounded buffers and atomic staging. Prepare storage before taking the lock so first-run syncs are safe. Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
7305777 to
bd89092
Compare
🔗 Cross-repo PR dependenciesThe read-only Build run reported the following dependent PR(s) and fetched head SHA(s): CI run: https://github.com/apache/nuttx-apps/actions/runs/31955916735 |
Note: Please adhere to Contributing Guidelines.
Depends-On: /pull/3718
Summary
A package could only be installed from a catalog that was already on the
device, so getting one there meant copying it by hand.
This adds a synchronization path that reads an index from an
http://orhttps://source and stores it locally, along with the artifact downloadthat install needs. The catalog and the source it came from are written
under one lock, so the two cannot end up describing different syncs, and
the lock is renewed as data arrives so a slow download over a slow link is
not mistaken for an abandoned one and reclaimed while it is still running.
A repository is plain static files. Any host that can serve an
index.jsonand the artifacts it names works; no server-side logic is involved.
This is the third of four parts of #3642, which was one commit covering
several unrelated changes.
Impact
system/nxpkg.corrupted or substituted artifact is rejected before it is installed.
Plain HTTP carries no confidentiality; the digest covers integrity.
Testing
Build host: macOS 26.5, arm64,
xtensa-esp-elf-gcc 14.2.0(
esp-14.2.0_20251107).Target: Xtensa / ESP32-S3, Waveshare ESP32-S3-Touch-LCD-7.
nxstyle,tools/checkpatch.sh,codespellandgit diff --checkonevery changed file
system/nxpkgsources compiled for the target with this commitapplied on top of system/nxpkg: Validate catalog and database contents before use. #3718
This commit does not build on
masteralone because it uses declarationsand helpers added by #3642 and #3718; the
Depends-Online above lets CIapply those first.
PR verification Self-Check