Add xgenext2fs installation support to setup-action - #5
Merged
Conversation
Adds an `xgenext2fs-version` input (default `latest`, `none` to skip) and a matching output. On Linux the `xgenext2fs_<arch>.deb` asset of a cartesi/genext2fs release is downloaded, verified against the digest published by the releases API, and installed with `apt-get` so its `libarchive13` dependency is resolved; on macOS the `cartesi/tap/xgenext2fs` formula is used. Every genext2fs release is published as a GitHub pre-release, which `/releases/latest` ignores, so `latest` resolves through the release list instead. The Homebrew helpers (quiet CI environment, per-formula trust, `brew --prefix`) and the `apt-get` invocation move out of machine.ts into shared modules, with `apt-get update` now running once per job rather than once per package. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ppjY7CLutdweVSPRAYVwd
The genext2fs releases are no longer published as pre-releases, so `/releases/latest` resolves them and the release-list walk added to work around that is no longer needed. `xgenext2fs-version: latest` now goes through the same client method as the emulator. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016ppjY7CLutdweVSPRAYVwd
endersonmaia
approved these changes
Aug 11, 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.
This PR adds support for installing
xgenext2fs, the ext2 filesystem generator used to build Cartesi Machine rootfs images, as part of the setup-action workflow.Summary
The action now installs
xgenext2fsby default (latest version) alongside the Cartesi Machine emulator and CLI. Users can specify a custom version, skip installation withnone, or uselatest(the default).Key Changes
xgenext2fs-versioninput: Added toaction.ymlwith default valuelatest, supporting version pinning and skip functionalitysrc/xgenext2fs.tsmodule: Implements installation logic for Linux (via Debian packages) and macOS (via Homebrew formula)src/brew.tswith shared Homebrew installation logic (brewPrefix,installFormula,trustFormula)src/apt.tswith shared Debian package installation logic (aptInstall)src/inputs.ts: Generalized version parsing withparseReleaseVersion()function to support both machine and xgenext2fs version inputssrc/checksum.ts: EnhancedverifyChecksum()to accept optionalpinInputparameter for flexible checksum pinning messagessrc/machine.ts: Refactored to use newaptInstallandinstallFormulautilities, removed duplicated Homebrew logicsrc/main.ts: Added xgenext2fs installation orchestration with output reportingtest/xgenext2fs.test.tsfor version output parsing andtest/inputs.test.tsfor version input validationImplementation Details
apt-getwhich automatically resolves dependenciesvprefix andlatest/nonesentinelshttps://claude.ai/code/session_016ppjY7CLutdweVSPRAYVwd