system/nxpkg: Fetch the catalog and artifacts over the network. - #3719
Open
aviralgarg05 wants to merge 1 commit into
Open
system/nxpkg: Fetch the catalog and artifacts over the network.#3719aviralgarg05 wants to merge 1 commit into
aviralgarg05 wants to merge 1 commit into
Conversation
Packages could only be installed from a catalog already present on the device, which meant putting one there by hand. Add a synchronization path that reads an index from an http or https source and stores it locally, together with the artifact download the install path needs. A single lock covers the whole read-fetch-write sequence so the catalog and the source it came from are committed together, and the lock is renewed as data arrives so a slow download is not reclaimed while it is still making progress. Assisted-by: OpenAI Codex:gpt-5.6-sol Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
This was referenced Aug 11, 2026
🔗 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 |
xiaoxiang781216
approved these changes
Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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