-
Notifications
You must be signed in to change notification settings - Fork 12
docs: support for stores and bins #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
upils
wants to merge
6
commits into
canonical:main
Choose a base branch
from
upils:bin-slices
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+194
−31
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,9 +38,11 @@ jaotc | |
| jsonwall | ||
| libs | ||
| linters | ||
| lookups | ||
| manpages | ||
| openssl | ||
| optimize | ||
| prepended | ||
| recognized | ||
| repo | ||
| rootfs | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,7 +1,7 @@ | ||||||
| --- | ||||||
| myst: | ||||||
| html_meta: | ||||||
| description: "Explanation of how Chisel works: reading chisel-releases, fetching packages from Ubuntu archives, and extracting selected files into a root file system." | ||||||
| description: "Explanation of how Chisel works: reading chisel-releases, fetching packages from Ubuntu archives and stores, and extracting selected files into a root file system." | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What about this?
Suggested change
|
||||||
| --- | ||||||
|
|
||||||
| (chisel_mo_explanation)= | ||||||
|
|
@@ -53,11 +53,14 @@ definitions<slice_definitions_ref>` while validating the release and checking fo | |||||
| </td> | ||||||
| <td> | ||||||
|
|
||||||
| Chisel talks to the {ref}`chisel_yaml_format_spec_archives` directly. | ||||||
| It fetches, validates and parses their `InRelease` files. | ||||||
| It then resolves which archive holds the **requested** packages and fetches | ||||||
| the corresponding package tarballs. | ||||||
|
|
||||||
| Chisel resolves the source of each **requested** package and fetches it. | ||||||
| Packages are typically fetched from {ref}`archives<chisel_yaml_format_spec_archives>`, | ||||||
| which are Debian archives Chisel talks to directly by fetching, validating and | ||||||
| parsing their `InRelease` files. Packages may also be fetched from | ||||||
| {ref}`stores<chisel_yaml_format_spec_stores>`, which serve packages via a store | ||||||
|
asanvaq marked this conversation as resolved.
|
||||||
| API rather than from a Debian archive. Stores are used to distribute packages | ||||||
| that are not available in the standard Ubuntu archives, such as `bin` packages. | ||||||
|
|
||||||
| </td> | ||||||
| </tr> | ||||||
|
|
||||||
|
|
||||||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,9 +28,9 @@ directory. | |
|
|
||
| ### `format` | ||
|
|
||
| | Field | Type | Required | Supported values | | ||
| | -------- | -------- | -------- | ---------------- | | ||
| | `format` | `string` | Required | `v1`, `v2`, `v3` | | ||
| | Field | Type | Required | Supported values | | ||
| | -------- | -------- | -------- | ---------------------- | | ||
| | `format` | `string` | Required | `v1`, `v2`, `v3`, `v4` | | ||
|
|
||
| Used to define the supported schemas for the {ref}`chisel-releases_ref`. | ||
| For example: | ||
|
|
@@ -55,21 +55,23 @@ that support said `format`. | |
|
|
||
| ```{eval-rst} | ||
|
|
||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------+ | ||
| | chisel-release | .. centered:: Format | | ||
| +=============================================================================+=======================================================+===================================================================+===================================================================+ | ||
| | | **V1** | **V2** | **V3** | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------+ | ||
| | `20.04 <https://github.com/canonical/chisel-releases/tree/ubuntu-20.04>`_ | `all <https://github.com/canonical/chisel/releases>`_ | x | x | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------+ | ||
| | `22.04 <https://github.com/canonical/chisel-releases/tree/ubuntu-22.04>`_ | `all <https://github.com/canonical/chisel/releases>`_ | x | x | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------+ | ||
| | `24.04 <https://github.com/canonical/chisel-releases/tree/ubuntu-24.04>`_ | `all <https://github.com/canonical/chisel/releases>`_ | x | x | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------+ | ||
| | `25.10 <https://github.com/canonical/chisel-releases/tree/ubuntu-25.10>`_ | x | >= `v1.2.0 <https://github.com/canonical/chisel/releases/v1.2.0>`_| x | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------+ | ||
| | `26.04 <https://github.com/canonical/chisel-releases/tree/ubuntu-26.04>`_ | x | x | >= `v1.4.0 <https://github.com/canonical/chisel/releases/v1.4.0>`_| | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+-------------------------------------------------------------------+-------------------------------------------------------------------+ | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------+ | ||
| | chisel-release | .. centered:: Format | | ||
| +=============================================================================+=======================================================+====================================================================+====================================================================+=====================================================================+ | ||
| | | **V1** | **V2** | **V3** | **V4** | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------+ | ||
| | `20.04 <https://github.com/canonical/chisel-releases/tree/ubuntu-20.04>`_ | `all <https://github.com/canonical/chisel/releases>`_ | x | x | x | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------+ | ||
| | `22.04 <https://github.com/canonical/chisel-releases/tree/ubuntu-22.04>`_ | `all <https://github.com/canonical/chisel/releases>`_ | x | x | x | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------+ | ||
| | `24.04 <https://github.com/canonical/chisel-releases/tree/ubuntu-24.04>`_ | `all <https://github.com/canonical/chisel/releases>`_ | x | x | x | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------+ | ||
| | `25.10 <https://github.com/canonical/chisel-releases/tree/ubuntu-25.10>`_ | x | >= `v1.2.0 <https://github.com/canonical/chisel/releases/v1.2.0>`_ | x | x | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------+ | ||
| | `26.04 <https://github.com/canonical/chisel-releases/tree/ubuntu-26.04>`_ | x | x | >= `v1.4.0 <https://github.com/canonical/chisel/releases/v1.4.0>`_ | x | | ||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------+ | ||
| | `26.10 <https://github.com/canonical/chisel-releases/tree/ubuntu-26.10>`_ | x | x | x | >= `v1.5.0 <https://github.com/canonical/chisel/releases/v1.5.0>`_ | | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Note to reviewer]: I did this under the assumption the next minor version will be cut to release the whole feature supporting bins. |
||
| +-----------------------------------------------------------------------------+-------------------------------------------------------+--------------------------------------------------------------------+--------------------------------------------------------------------+---------------------------------------------------------------------+ | ||
|
|
||
| ``` | ||
|
|
||
|
|
@@ -362,6 +364,82 @@ The `armor` field contains the multi-line armored ASCII data of OpenPGP public | |
| key. | ||
|
|
||
|
|
||
| (chisel_yaml_format_spec_stores)= | ||
|
|
||
| ### `stores` | ||
|
|
||
| | Field | Type | Required | Compatibility | | ||
| | ---------- | -------- | -------- | ------------- | | ||
| | `stores` | `object` | Optional | >= `v3` | | ||
|
|
||
| Tells Chisel which stores to fetch packages from. A store is an alternative | ||
| package source to {ref}`archives<chisel_yaml_format_spec_archives>`, serving | ||
| packages via a store API rather than from a Debian archive. Stores are used to | ||
| distribute packages that are not available in the standard Ubuntu archives, | ||
| such as `bin` packages. | ||
|
|
||
| For example: | ||
|
|
||
| ```yaml | ||
| stores: | ||
| bin: | ||
| kind: bin | ||
| version: 26.10 | ||
| default-prefix: "bin-" | ||
| ``` | ||
|
|
||
| ```{note} | ||
| In format `v3`, bin slice definitions must be stored in a separate, top-level, | ||
| `bin-slices/` directory. This is a backwards compatibility mechanism for Chisel | ||
| versions that do not support stores: those old versions only read `slices/` and | ||
| are unaware of `bin-slices/`, so they are not affected by the new store fields. | ||
| From format `v4` onwards, bin slice definitions live in `slices/` alongside | ||
| regular ones, so `bin-slices/` is not read. | ||
| ``` | ||
|
|
||
|
|
||
| (chisel_yaml_format_spec_stores_version)= | ||
|
|
||
| ### `stores.<name>.version` | ||
|
|
||
| | Field | Type | Required | Supported values | Compatibility | | ||
| | --------- | -------- | -------- | ------------------------------------------------------- | ------------- | | ||
| | `version` | `string` | Required | Ubuntu release in `xx.yy` format e.g. 22.04, 24.04 etc. | >= `v3` | | ||
|
asanvaq marked this conversation as resolved.
|
||
|
|
||
| Indicates the Ubuntu release this store should fetch the packages for. | ||
|
|
||
|
|
||
| (chisel_yaml_format_spec_stores_kind)= | ||
|
|
||
| ### `stores.<name>.kind` | ||
|
|
||
| | Field | Type | Required | Supported values | Compatibility | | ||
| | ------ | -------- | -------- | ---------------- | ------------- | | ||
| | `kind` | `string` | Required | `bin` | >= `v3` | | ||
|
|
||
| Specifies the kind of store. The `bin` kind refers to bin packages | ||
| distributed via a store API. | ||
|
|
||
|
|
||
| (chisel_yaml_format_spec_stores_default_prefix)= | ||
|
|
||
| ### `stores.<name>.default-prefix` | ||
|
|
||
| | Field | Type | Required | Compatibility | | ||
| | ---------------- | -------- | -------- | ------------- | | ||
| | `default-prefix` | `string` | Required | >= `v3` | | ||
|
|
||
| Specifies the prefix prepended to the bare package name (as defined by the | ||
| `package` field in the slice definitions file) to form the unique package | ||
| identifier used across the release. For example, with `default-prefix: "bin-"` | ||
| and a slice definitions file declaring `package: curl`, the unique package | ||
| identifier becomes `bin-curl`. | ||
|
|
||
| This unique identifier is used in slice references (e.g. in {ref}`essential<slice_definitions_format_slices_essential>` | ||
| dependencies and {ref}`prefer<slice_definitions_format_slices_contents_prefer>`), while the bare name is used for package lookups | ||
| in the store. | ||
|
|
||
|
|
||
| (chisel_yaml_example)= | ||
|
|
||
| ## Example | ||
|
|
||
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metadata should be max. 160 characters long. This updated increased it to 163, so I propose the following:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep the "selected" term as this is an important concept in Chisel. Using slices is doing a selection of files from packages. Chisel only extract the selected files.