summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-12-20 12:16:07 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-01-10 12:47:02 +0100
commitbe7e745870b529bc1e342f2315f9bc5af62b384b (patch)
tree68057386ca7a36de5b5e3fd441ebf61a9a515302 /doc
parentce2c7c14489435b72840b6a3e8f38c163bb69b04 (diff)
downloadjustbuild-be7e745870b529bc1e342f2315f9bc5af62b384b.tar.gz
just-lock design: Add fields 'type','mirrors','subdir' to 'archive' source
The 'type' field is optional and informs both the way to unpack the archive and which type imported file repositories should be rewritten as in the output configuration. Mirrors the 'just-mr' types, with options for tarballs and zip-like archives, defaulting to tarballs if missing. The 'mirrors' field is treated the same as for 'git' sources. The 'subdir' field is optional and accounts for the fact that the actual root of the source repository might be a subpath in the unpacked archive, as opposed to Git repositories where it is reasonable to expect that the sources root is the top-level directory.
Diffstat (limited to 'doc')
-rw-r--r--doc/future-designs/just-lock.md13
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/future-designs/just-lock.md b/doc/future-designs/just-lock.md
index c2b44bed..097e03ac 100644
--- a/doc/future-designs/just-lock.md
+++ b/doc/future-designs/just-lock.md
@@ -294,6 +294,9 @@ The type of a _source_ is defined by the string value of the mandatory subfield
being that the referenced source repository is not a Git remote, but an
archive, such as a release tarball.
+ A field `"subdir"` is provided to account for the fact that source repository
+ root often is not the root directory of the unpacked archive.
+
Proposed format:
``` jsonc
{ "source": "archive"
@@ -311,9 +314,13 @@ The type of a _source_ is defined by the string value of the mandatory subfield
]
// fields related to obtaining source config
, "fetch": "<URL>" // mandatory
- , "content": "<HASH>" // optional; if missing, always fetch
- , "sha256": "<HASH>" // optional checksum
- , "sha512": "<HASH>" // optional checksum
+ , "type": "tar|zip" // optional; type of archive in set ["tar", "zip"]; if missing, default to "tar"
+ , "mirrors": ["..."] // optional
+ , "subdir": "<REL_PATH>" // optional; relative path defining the actual root of the source repository;
+ // if missing, the source root is the root directory of the unpacked archive
+ , "content": "<HASH>" // optional; if missing, always fetch; if given, will be checked
+ , "sha256": "<HASH>" // optional checksum; if given, will be checked
+ , "sha512": "<HASH>" // optional checksum; if given, will be checked
, "config": "<foreign_repos.json>" // optional; corresponds to `foreign_repository_config` var (option -R)
, "as_plain": false // optional; corresponds to `plain` var (option --plain)
}