Repository navigation
feat: add linglong.lock for reproducible builds - #2177
Open
reddevillg wants to merge 1 commit into
Open
reddevillg wants to merge 1 commit into
reddevillg wants to merge 1 commit into
Conversation
reddevillg
requested review from
ComixHe,
dengbo11 and
myml
and removed request for
myml
October 14, 2026 02:03
Introduce a project lock file that pins the resolved source hashes and the selected base/runtime references: - ll-builder build writes linglong.lock on the first build once sources are verified and dependencies are acquired, and reuses it on later builds; --locked requires an existing, complete lock and never rewrites it, while the new generate-lockfile/update-lockfile subcommands create or refresh the lock on demand - source entries record the normalized declaration together with the resolved hash (sha256 for file/archive/dsc sources, the commit for git sources); dependency entries record the requested declaration and the resolved reference/modules; the lock also records the target build architecture and is rejected when it does not match - the digest of file/archive/dsc sources is now optional: when omitted, the first build pins the hash of the fetched source and later builds verify against it Rework source fetching into per-kind handlers (git/file/archive/dsc) backed by a content-addressed cache under linglong/cache/sources/v1/. Cache entries are guarded by a per-entry file lock, published via atomic rename, and re-validated on every read; the fetch scripts move to an action-based interface (download/materialize/verify). As a result, --offline no longer implies --skip-fetch-source: it re-materializes sources from the validated cache and discards manual edits under linglong/sources/; use --skip-fetch-source to keep them. Build integration: - dependencies are pulled at the locked reference and modules; the module set now comes from the lock instead of best-effort mounting - when base is omitted from linglong.yaml it follows the base declared by the runtime layer metadata, and non-locked builds may rewrite the base entry of an existing lock when that metadata changes - build container overlay reuse is keyed on the locked dependency state (build_overlay.state), so dependency changes reset the overlays Signed-off-by: reddevillg <reddevillg@gmail.com>
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.
Introduce a project lock file that pins the resolved source hashes and the selected base/runtime references:
Rework source fetching into per-kind handlers (git/file/archive/dsc) backed by a content-addressed cache under linglong/cache/sources/v1/. Cache entries are guarded by a per-entry file lock, published via atomic rename, and re-validated on every read; the fetch scripts move to an action-based interface (download/materialize/verify). As a result, --offline no longer implies --skip-fetch-source: it re-materializes sources from the validated cache and discards manual edits under linglong/sources/; use --skip-fetch-source to keep them.
Build integration: