sneak preview: uv, Click, Rich, tui; flavors#62
Closed
rpardini wants to merge 93 commits into
Closed
Conversation
ebf51be to
afd50fa
Compare
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
- .editorconfig for shell scripts and shell templates Signed-off-by: Ricardo Pardini <[email protected]>
…tools tree across invocations Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
- this will allow using a generic/distro kernel instead of building one Signed-off-by: Ricardo Pardini <[email protected]>
- hack until it uses the mkosi-supplied kernel for everything - artifacts: look for mkosi-supplied vmlinuz first Signed-off-by: Ricardo Pardini <[email protected]>
- self-built kernel from source will come back at a later stage, as a .deb package Signed-off-by: Ricardo Pardini <[email protected]>
- just do everything at once Signed-off-by: Ricardo Pardini <[email protected]>
…racut/initramfs-tools) Signed-off-by: Ricardo Pardini <[email protected]>
- also: show info about modules and full rootfs Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
- later to be reborn as standard apt package Signed-off-by: Ricardo Pardini <[email protected]>
- mkosi.finalize: clean up logging a bit - mkosi.postinst: debugs Signed-off-by: Ricardo Pardini <[email protected]>
gha: fix Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
gha: pass DEFAULT_FLAVOR_ID as KERNEL_VERSION for publish-combined - retry Signed-off-by: Ricardo Pardini <[email protected]>
- `--flavor-id` Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
but logging sucks and no dataclass better, logging still sucks for Full -> Common much better in-package this sucks less cosmetics some static and template rendering and hardcoded cleanup kinda-works kinda works Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
- reduce suffering while I juggle Click Signed-off-by: Ricardo Pardini <[email protected]>
- uv: split `Config::verbose_uv` from --verbose/Logging.DEBUG; use --quiet otherwise - use `shutil.get_terminal_size` to obtain and pass-down-Docker COLUMNS - nicer logging format, use a whale emoji for in-Docker logs - show Rich Table with Docker environment vars if --verbose - show Rich Panel and Rich Syntax for `util.run()` if --verbose Signed-off-by: Ricardo Pardini <[email protected]>
- we've a separate artifact for .iso Signed-off-by: Ricardo Pardini <[email protected]>
…lavors - also build them - `trixie-armbian-rpi` strays from standard naming as I think we might need to build our own kernel for RPi to achieve small-enough-for-eeprom-netboot eventually Signed-off-by: Ricardo Pardini <[email protected]>
- so time is set to something more reasonable, otherwise pulling fails with date-related TLS issues Signed-off-by: Ricardo Pardini <[email protected]>
… preset files - doing this in postinst has no effect, as mkosi applies presets _after_ postinst - it _could_ be done in finalize, but that would un-do the presets applied by mkosi - so instead do it all in two preset files: - one for generic OS-related enablement and disablement (20-captainos-base) - one for tink-agent related stuff (10-captainos-tink) Signed-off-by: Ricardo Pardini <[email protected]>
…and 15s timeout - otherwise hangs and delays on machines with multiple interfaces Signed-off-by: Ricardo Pardini <[email protected]>
- time-set.target is _not_ enough for machines without an RTC and working battery - time-sync.target requires timesyncd to be fully sync'ed - so time is set to something more reasonable, otherwise pulling fails with date-related TLS issues Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
Signed-off-by: Ricardo Pardini <[email protected]>
…xtra_docker_args` - also introduce `cfg.verbose_docker` for setting env `CAPTAIN_VERBOSE=1` when relaunching Signed-off-by: Ricardo Pardini <[email protected]>
… DEBUG Signed-off-by: Ricardo Pardini <[email protected]>
- which runs bash interactively under Docker - using same envs / volumes / mounts as regular run_in_builder() Signed-off-by: Ricardo Pardini <[email protected]>
- kernel packaging code already knows how to: - strip modules - zstd modules - handle Image name differences - handle depmod - produce a .deb package - but we gotta go 2-deep as .deb's are output in parent directory by kbuild - Dockerfile: add layers with deps: - rust compiler layer (inevitable after 7.0.y) - debhelper + etc needed for kernel deb packaging Signed-off-by: Ricardo Pardini <[email protected]>
- using the Docker builder, so depend on that - abuse GHA caches and artifacts - the whole matrix will wait on kernel builds - but only a few will actually download and use the artifact Signed-off-by: Ricardo Pardini <[email protected]>
- so flavors can assert their requirements are built/met Signed-off-by: Ricardo Pardini <[email protected]>
- ... since we already paid the price of Pygments... Signed-off-by: Ricardo Pardini <[email protected]>
- specify a CROSS_COMPILE for x86_64 Signed-off-by: Ricardo Pardini <[email protected]>
…Directories=` - this allows flavors to add .deb's in directories as a local apt repo - .deb's can then be installed by name - mkosi handles the repo creation and usage directly (via apt-utils) Signed-off-by: Ricardo Pardini <[email protected]>
- cross libssl-dev needed for `make bindeb-pkg` to work cross-arch - apt-utils needed for mkosi's PackageDirectories= Signed-off-by: Ricardo Pardini <[email protected]>
- this skews package protection to allow flavors to reuse code - also expose function `build_kernel_stage()` Signed-off-by: Ricardo Pardini <[email protected]>
- this one uses the captain-build-from-source kernel .deb - let's violate some package boundaries: - cli acrobatics: delegates to kernel build stage before initramfs build - impls package_directories() by calling kernel Signed-off-by: Ricardo Pardini <[email protected]>
- add gha builds for `trixie-slim` flavors (using captainos-kernel) - we've two kinds of build-captainos jobs: - ones that depend on kernel-build (trixie-slim) - ones that don't (all the others) - use YAML anchor trick to avoid duplicating 95% of code (envs: and steps: are defined only once) - matrix and needs (dependencies) are the only difference - artifact download is common but conditional on matrix values Signed-off-by: Ricardo Pardini <[email protected]>
- so it is the one included in the combined images - this does not change the CLI defaults, ofc Signed-off-by: Ricardo Pardini <[email protected]>
- (Docker) builder will end up being built multiple times for PR workflows, but such is life - it's also too huge for GHA artifact or GHA cache - don't push any captainos artifacts either (simple or combined) - also: only push those when building `main` branch Signed-off-by: Ricardo Pardini <[email protected]>
afd50fa to
f2f6080
Compare
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.
sneak preview: uv, Click, Rich, tui; flavors; Secure Boot?
in-docker:prefixdtbmkosi.outputfolder intoout/--flavor-idDpkg::Use-Pty "0";to mkosi sandbox tree--tls-verify=falseregistry:2for testing pushesclick_cliuv run captain ...obtain_builderclickpackagescommon-debian > common-acpi > trixie-fullcommon-debian > common-acpi > trixie-mainlinehas_iso()as TrueConfig::verbose_uvfrom --verbose/Logging.DEBUG; use --quiet otherwiseshutil.get_terminal_sizeto obtain and pass-down-Docker COLUMNSutil.run()if --verbosetrixie-rockchip64-vendorandtrixie-armbian-rpiflavorstrixie-armbian-rpistrays from standard naming as I think we might need to build our own kernel for RPi to achieve small-enough-for-eeprom-netboot eventuallyCONFIG_MODULE_COMPRESS_ZSTD=yrun()'s env vars in a Rich Tablerun_in_builder()with bothcommand_and_argsandextra_docker_argscfg.verbose_dockerfor setting envCAPTAIN_VERBOSE=1when relaunching--verbosesets root level as well as current logger to DEBUGshellsubcommandmake bindeb-pkginto a .deb outputpackage_directories()for mkosi'sPackageDirectories=make bindeb-pkgto work cross-archstages(nee_stages) modulebuild_kernel_stage()trixie-slimflavor, using captainos kerneltrixie-slimflavors (using captainos-kernel)trixie-slimthe default flavormainbranch