Skip to content

Bare repos and hardhat helpers - #80

Open
pothos wants to merge 3 commits into
mainfrom
barerepo-hardhat-helpers-sysupdate-rework
Open

pothos wants to merge 3 commits into
mainfrom
barerepo-hardhat-helpers-sysupdate-rework

Conversation

@pothos

@pothos pothos commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

This introduces support for bare repos as build system outputs that are then imported into proper repositories and function as build system contract binding all files together. They can also be used directly for development purposes. A few helper options are added to hardhat to embed the transfer files (with a shorthand for confexts) and custom metadata such as the versions.

A build publishes its own signed targets_<arch>.json next to its files,
but a client could only consume full TUF repositories with snapshot and
timestamp metadata. Reading one build's artifacts, as the CVE scanner
does, therefore required a whole repository per build.

A repository can now be configured with targets_url pointing at such a
signed targets file, which is verified against the targets keys of the
trusted root. It has no freshness guarantees, which is acceptable for a
build's own listing. A Repo type covers both kinds, and quarry-client
uses it for refreshing, expiry and target lookups.
@pothos
pothos force-pushed the barerepo-hardhat-helpers-sysupdate-rework branch from f9b92d4 to e929f89 Compare October 12, 2026 11:40
quarry-sysupdate takes the sysupdate definitions of a component from
special targets under .quarry/sysupdate[.<component>].d/, but every
producer had to lay out these paths and inline the files itself. That
duplicates the layout detail and can drift from what the client expects.

hardhat targets gains --quarry-transfer-dir <component dir>=<source>,
which publishes the files of a definitions directory as inline targets
in that layout. A source may also be confext:<name>, for which hardhat
generates the transfer installing the confext DDI, and several sources
merge into one directory. A named component without its own component
file gets a generated one, which is enabled like sysupdate's default.
The layout rules live in internal/transferlayout so that quarry-sysupdate
can share them.
A build has to mark its targets for consumers, for example which version
they belong to. hardhat could hash the files but offered no way to
attach such metadata, so a producer would have to post-process the
signed targets file and resign.

Add hardhat targets --custom-from <file>, which merges per-target
"custom" objects from a JSON file and fails on a path that is not a
target, so that a typo cannot drop metadata silently. --custom-version
sets custom.quarry.version on every file target.
@pothos
pothos force-pushed the barerepo-hardhat-helpers-sysupdate-rework branch from e929f89 to 54f64bb Compare October 13, 2026 04:12
@pothos
pothos marked this pull request as ready for review October 13, 2026 04:21
@pothos
pothos requested a review from cyphar October 13, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant