aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/rosa.go
AgeCommit message (Collapse)Author
2 daysinternal/rosa: record package externalityOphestra
This allows the packaging infrastructure to distinguish between externally registered azalea packages and built-in packages, allowing for more assumptions to be made, and more sanity checks. Signed-off-by: Ophestra <cat@gensokyo.uk>
3 daysinternal/rosa: net helperOphestra
This is mostly useful for fetching dependencies before a build. Signed-off-by: Ophestra <cat@gensokyo.uk>
7 daysinternal/rosa: optionally reject cross-compilationOphestra
This provides a generic way for any package to reject cross-compilation without going through its helper. Signed-off-by: Ophestra <cat@gensokyo.uk>
8 daysinternal/rosa: remove /usr/srcOphestra
There is only one primary source directory per package, so naming the directory after the package makes little sense, and introduces many complications and ugliness of having to refer to their own name. This change also moves extras to /extra, preserving the relative pathnames. Signed-off-by: Ophestra <cat@gensokyo.uk>
9 daysinternal/rosa: replace non-error panicsOphestra
These used to never accept user input, so unrecovered panics were considered an acceptable way to notify a bad API usage. These now accept user input via registered azalea files, so make them more elegant by panicking errors only, which enables error recovery via the azalea evaluator, and enables better error messages pointing to azalea source code, if the error originated from azalea. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-11-12internal/rosa: replace GNU patchOphestra
This does a bunch of unnecessary things and is another heavy piece of GNU software we can get rid of. Toybox patch works just fine. This causes rebuilds due to backup files no longer being created. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-11-12internal/rosa: set common cross-compile environmentOphestra
This change avoids duplicating this piece of code all over the place. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-10-31internal/rosa: document toolchains and azaleaOphestra
This is quite difficult to figure out just from reading source code. This change documents as much of azalea as possible, excluding some fields intended for internal use only. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-10-28internal/rosa: do not hard code prefixOphestra
This allows the prefix to be changed, at runtime if needed. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-10-26internal/rosa: LLVM-specific arch nameOphestra
This is different from linuxArch for PowerPC. While the alternative usually works fine, compiling compiler-rt builtins produces no output with linuxArch. The musl installation also uses this name. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-10-26internal/rosa: use native toolchain for patchingOphestra
This must bypass the cross-compiling infrastructure, a patched source tree is not arch-specific. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-10-23internal/rosa/meson: support cross-compilationOphestra
Meson does not want to play nice and accept arguments or environment variables for cross-compiling configuration, so a so-called mfile had to be generated and placed here. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-10-23internal/rosa: cross-only native toolsOphestra
For situations where a package uses a just-built program as part of its own build process. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-10-23internal/rosa: insert musl when cross-compilingOphestra
This is otherwise never added to the cross root. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-10-22internal/rosa: optionally bypass cross-compilationOphestra
Cross-compilation is not applicable to everything, and it is quite wasteful rebuilding the same thing for every architecture when it is just using host tools to create arch-independent files. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-10-22internal/rosa: initial cross-compilation supportOphestra
This successfully cross-compiles the toolchain. More work is needed to support cross-compilation on all native helpers and existing packages. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-10-20internal/rosa: remove triple from environmentOphestra
This is cleaner and prepares for cross-compilation support. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-09-05internal/rosa: separate native tools from librariesOphestra
This removes most redundant runtime arguments and is useful for cross-compilation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-08-29pkg: move from internalOphestra
Closes #43. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-08-25internal/rosa/llvm: early-runtimes for gentoo stage onlyOphestra
This bootstrap step is not required for a native Rosa OS stage0 distribution. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-08-25internal/rosa: optionally load built-ins from filesystemOphestra
This avoids having to rebuild cmd/mbf over and over. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-08-25internal/rosa: read-only access to built-insOphestra
This removes potential footguns caused by mutable builtins without requiring unnecessary clones. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-08-10internal/rosa: optionally block packages from early stagesOphestra
This helps avoid inadvertently increasing bootstrap input count. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-30internal/rosa: force output colouringOphestra
This sets known de facto standard environment variables to enable colours during builds. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-30internal/rosa: remove legacy exec helperOphestra
This change also adds a fourth stage to the bootstrap machinery, offering more correct toolchain validation that works around LLVM dynamic linking flaws. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-27internal/rosa: remove calls to low-level exec helperOphestra
This method predates the helper infrastructure, it is awkward to use and difficult to maintain for the replacement bootstrap mechanism. This change prepares for its removal. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-25internal/rosa: remove xz utils hackOphestra
This replaces all xz invocations with the native decompressor. This also significantly cleans up the Gentoo stage3 bootstrap path. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-23internal/rosa: make build script executableOphestra
This makes it slightly easier to invoke when working on a package via --enter. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-10internal/rosa: apply patches in specified orderOphestra
This seems more intuitive than letting the filesystem decide, and having to use awkward names. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-01internal/rosa: create /bin symlinks via helperOphestra
This centralises the workaround for surprisingly common buggy scripts with nonstandard hardcoded paths. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-28internal/rosa: handle nil sourceOphestra
Source is not always required. This improves flexibility. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-10internal/rosa/package/python: add kernel-headersOphestra
Missing kernel headers implicitly disables many useful things. This change also enables PGO and installs symlink, since a rebuild is unavoidable. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-10internal/rosa: export etc native artifactOphestra
This is useful for external container tooling. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-09internal/rosa: expose supported architecturesOphestra
This information is useful to external tooling and makes a lot more sense in this package than cmd/mbf. This change also fixes non-native artifact resolution during clean. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-23internal/rosa/package: migrate stage0Ophestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-21internal/rosa: move azalea builtinsOphestra
This improves readability. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-21internal/rosa: do not register stage0Ophestra
Nothing can depend on this, so remove it from the namespace. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-21internal/rosa/go: migrate to generic helperOphestra
The go toolchain predates all abstractions currently available. This migration causes rebuilds due to internal cleanups affecting the final build script. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-21internal/rosa/package: migrate toyboxOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-21internal/rosa: expose in-place behaviour in generic helperOphestra
This change also combines the createDir and wantsDir methods, and replaces the non-inplace target of the generic helper with a deterministic path. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-21internal/rosa/package: migrate nssOphestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-20internal/rosa: remove global handlesOphestra
These no longer serve any purpose. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-20internal/rosa/package: migrate remaining trivial packagesOphestra
The rest are migrated individually. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-19internal/rosa/package: migrate mkshOphestra
This benefits greatly from the new generic helper. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-19internal/rosa/package: migrate makeOphestra
This also introduces the generic helper for unusual build scripts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-19internal/rosa/perl: Makefile.PL helperOphestra
This can be invoked from azalea. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-19internal/rosa: evaluate packages lateOphestra
This also enables concurrent evaluation. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-19internal/rosa: create metadata alongside artifactOphestra
This enables deferring evaluation of azalea-based packages and fixes the longstanding quirk of version being disjoint from other metadata. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-18internal/rosa: track evaluation timeOphestra
Useful to track performance regressions over migrations. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-18internal/rosa: migrate GNU softwareOphestra
These are quite trivial, so migrate them in one pass. Signed-off-by: Ophestra <cat@gensokyo.uk>