internal/rosa: create metadata alongside artifact

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>
This commit is contained in:
2026-05-19 00:03:42 +09:00
parent 0e95573f18
commit 8807cbc730
88 changed files with 612 additions and 874 deletions

View File

@@ -19,9 +19,7 @@ chmod -R +w /work/usr/src/linux/
`, pkg.Path(AbsUsrSrc.Append("linux"), false, kernelSource)), kernelVersion
}
func init() {
native.MustRegister(&Artifact{
f: Toolchain.newKernelSource,
native.mustRegister(Toolchain.newKernelSource, &Metadata{
Name: "kernel-source",
Description: "a writable kernel source tree installed to /usr/src/linux",
Website: "https://kernel.org/",
@@ -70,9 +68,7 @@ cat \
), kernelVersion
}
func init() {
native.MustRegister(&Artifact{
f: Toolchain.newKernelHeaders,
native.mustRegister(Toolchain.newKernelHeaders, &Metadata{
Name: "kernel-headers",
Description: "an installation of kernel headers",
Website: "https://kernel.org/",
@@ -1275,9 +1271,7 @@ rm -v /work/system/lib/modules/` + kernelVersion + `/build
), kernelVersion
}
func init() {
native.MustRegister(&Artifact{
f: Toolchain.newKernel,
native.mustRegister(Toolchain.newKernel, &Metadata{
Name: "kernel",
Description: "the generic Rosa OS linux kernel",
Website: "https://kernel.org/",
@@ -1293,9 +1287,7 @@ cc -o /work/system/bin/gen_init_cpio /usr/src/linux/usr/gen_init_cpio.c
`, pkg.Path(AbsUsrSrc.Append("linux"), false, kernelSource)), kernelVersion
}
func init() {
native.MustRegister(&Artifact{
f: Toolchain.newGenInitCPIO,
native.mustRegister(Toolchain.newGenInitCPIO, &Metadata{
Name: "gen_init_cpio",
Description: "a program in the kernel source tree for creating initramfs archive",
})
@@ -1340,9 +1332,7 @@ func (t Toolchain) newFirmware() (pkg.Artifact, string) {
), version
}
func init() {
native.MustRegister(&Artifact{
f: Toolchain.newFirmware,
native.mustRegister(Toolchain.newFirmware, &Metadata{
Name: "firmware",
Description: "firmware blobs for use with the Linux kernel",
Website: "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/",