44 Commits

Author SHA1 Message Date
a0c1641e2f cmd/mbf: integrate pkgserver into command info
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-02 05:05:56 +09:00
09e23b8822 cmd/pkgserver: move API implementation to package
For moving into cmd/mbf.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-02 04:38:54 +09:00
4ed20098c9 cmd/pkgserver: use IR cache for ident
This removes requirement to open full cache.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-02 03:32:43 +09:00
6d8fd7ec3b cmd/pkgserver: flatten static site
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-02 03:21:02 +09:00
5e50fede9a cmd/pkgserver: move ui internal
This avoids inadvertently exporting a go package. This change also cleans up generate layout.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-02 03:15:07 +09:00
mae
1c277d30a6 cmd/pkgserver: update 2026-04-18 11:32:08 -05:00
mae
6421fac22c cmd/pkgserver: fix gitignore 2026-04-18 11:06:52 -05:00
mae
f78b6b883c cmd/pkgserver: better no results handling 2026-04-18 10:57:04 -05:00
mae
77bf8cd146 cmd/pkgserver: better no results handling 2026-04-18 10:57:04 -05:00
mae
af0ecc6971 cmd/pkgserver: finish search implementation 2026-04-18 02:07:52 -05:00
mae
02c3bc3d79 cmd/pkgserver: remove get endpoint count field 2026-03-13 20:41:53 -05:00
mae
f66e6f6987 cmd/pkgserver: search endpoint 2026-03-13 20:32:19 -05:00
mae
34dba86fc9 cmd/pkgserver: pagination bugfix 2026-03-13 01:01:23 -05:00
18c9d5a670 cmd/pkgserver: guard sass/ts behind build tag
Packaging nodejs and ruby is an immense burden for the Rosa OS base system, and these files diff poorly.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-12 01:40:04 +09:00
mae
17ce12ce5c cmd/pkgserver: add size 2026-03-10 15:10:05 -05:00
491ee72857 cmd/pkgserver: expose size and store pre-encoded ident
This change also handles SIGSEGV correctly in newStatusHandler, and makes serving status fully zero copy.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 03:32:09 +09:00
518f1aabf8 cmd/pkgserver: look up status by name once
This has far less overhead.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 03:17:56 +09:00
613ffcd69e cmd/pkgserver: refer to preset in index
This enables referencing back to internal/rosa through an entry obtained via the index.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 03:06:30 +09:00
b123fb5e1c cmd/pkgserver: handle unversioned value
This omits the field for an unversioned artifact, and only does so once on startup.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 02:52:23 +09:00
4f052aef81 cmd/pkgserver: determine disposition route in mux
This removes duplicate checks and uses the more sound check in mux.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 02:33:34 +09:00
99f8b571dd cmd/pkgserver: format get error messages
This improves source code readability on smaller displays.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 02:29:27 +09:00
9c0fc93f81 cmd/pkgserver: constant string in pattern
This resolves patterns at compile time.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 02:23:43 +09:00
1f12cd315a cmd/pkgserver: satisfy handler signature in method
This is somewhat cleaner.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 02:18:21 +09:00
5cfc30aebd cmd/pkgserver: log instead of write encoding error
This message is unlikely to be useful to the user, and output may be partially written at this point, causing the error to be even less intelligible.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 02:10:40 +09:00
ec0166653e cmd/pkgserver: appropriately mark test helpers
This improves usefulness of test log messages.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 02:04:13 +09:00
6e37672976 cmd/pkgserver: do not omit report field
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 02:03:47 +09:00
7b1d66bb54 cmd/pkgserver: gracefully shut down on signal
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 02:00:55 +09:00
36fd991d2a cmd/pkgserver: specify full addr string in flag
This allows greater flexibility.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 01:49:42 +09:00
dafeb93905 cmd/pkgserver: make report argument optional
This allows serving metadata only without a populated report. This also removes the out-of-bounds read on args when no arguments are passed.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 01:47:49 +09:00
b8adeeb676 cmd/pkgserver: embed internal/rosa metadata
This change also cleans up and reduces some unnecessary copies.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-11 01:36:54 +09:00
a2b5206d98 cmd/pkgserver: do not assume default mux
This helps with testing.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-10 23:59:16 +09:00
b58591d9b1 cmd/pkgserver: create index without report
This is useful for testing, where report testdata is not available.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-10 22:31:59 +09:00
mae
d74f3341a3 cmd/pkgserver: add sort orders, change pagination rules 2026-03-10 05:18:55 -05:00
mae
8fc03aee8e cmd/pkgserver: add /status endpoint 2026-03-10 04:24:49 -05:00
mae
953e00c428 cmd/pkgserver: minimum viable frontend 2026-03-10 03:31:14 -05:00
mae
c68d1656c1 cmd/pkgserver: api versioning 2026-03-09 23:41:16 -05:00
mae
de860fedd6 cmd/pkgserver: add get endpoint 2026-03-09 18:18:51 -05:00
mae
bd88b6c29a cmd/pkgserver: add count endpoint and restructure 2026-03-09 15:41:21 -05:00
mae
e51beac557 cmd/pkgserver: add status endpoint 2026-03-09 04:09:18 -05:00
mae
bf2ebaab91 cmd/pkgserver: add createPackageIndex 2026-03-09 01:27:46 -05:00
mae
1924fcee91 cmd/pkgserver: add command handler 2026-03-08 22:28:08 -05:00
mae
ea754e8650 cmd/pkgserver: replace favicon 2026-03-05 01:12:17 -06:00
mae
9c72e0d771 cmd/pkgserver: pagination 2026-03-05 00:32:25 -06:00
mae
5fdeadcfe0 cmd/pkgserver: basic web ui 2026-03-04 22:50:58 -06:00
12 changed files with 125 additions and 539 deletions

View File

@@ -471,9 +471,6 @@ func main() {
flagExport string
flagRemote bool
flagNoReply bool
flagBoot bool
flagStd bool
)
c.NewCommand(
"cure",
@@ -487,18 +484,11 @@ func main() {
return fmt.Errorf("unknown artifact %q", args[0])
}
t := rosa.Std
if flagBoot {
t -= 2
} else if flagStd {
t -= 1
}
switch {
default:
var pathname *check.Absolute
err := cm.Do(func(cache *pkg.Cache) (err error) {
pathname, _, err = cache.Cure(t.Load(p))
pathname, _, err = cache.Cure(rosa.Std.Load(p))
return
})
if err != nil {
@@ -551,7 +541,7 @@ func main() {
return cm.Do(func(cache *pkg.Cache) error {
return cache.EnterExec(
ctx,
t.Load(p),
rosa.Std.Load(p),
true, os.Stdin, os.Stdout, os.Stderr,
rosa.AbsSystem.Append("bin", "mksh"),
"sh",
@@ -563,7 +553,7 @@ func main() {
if flagNoReply {
flags |= remoteNoReply
}
a := t.Load(p)
a := rosa.Std.Load(p)
pathname, err := cureRemote(ctx, &addr, a, flags)
if !flagNoReply && err == nil {
log.Println(pathname)
@@ -601,14 +591,6 @@ func main() {
&flagNoReply,
"no-reply", command.BoolFlag(false),
"Do not receive a reply from the daemon",
).Flag(
&flagBoot,
"boot", command.BoolFlag(false),
"Build on the stage0 toolchain",
).Flag(
&flagStd,
"std", command.BoolFlag(false),
"Build on the intermediate toolchain",
)
}

View File

@@ -118,10 +118,6 @@ func errnoFallback(op, path string, err error) (syscall.Errno, *os.PathError) {
// mount wraps syscall.Mount for error handling.
func mount(source, target, fstype string, flags uintptr, data string) error {
if max(len(source), len(target), len(data))+1 > os.Getpagesize() {
return &MountError{source, target, fstype, flags, data, syscall.ENOMEM}
}
err := syscall.Mount(source, target, fstype, flags, data)
if err == nil {
return nil

View File

@@ -72,10 +72,7 @@ const (
HakureiDist
IPTables
Kmod
LIT
LibX11
LibXau
LibXext
Libbsd
Libcap
Libdrm
@@ -95,10 +92,8 @@ const (
Libtool
Libucontext
Libunistring
Libxshmfence
Libxml2
Libxslt
Libxtrans
M4
MPC
MPFR
@@ -153,7 +148,6 @@ const (
Rsync
Sed
SPIRVHeaders
SPIRVLLVMTranslator
SPIRVTools
SquashfsTools
Strace
@@ -170,27 +164,14 @@ const (
XCBProto
XDGDBusProxy
XZ
XorgProto
Xproto
Zlib
Zstd
// PresetUnexportedStart is the first unexported preset.
PresetUnexportedStart
llvmSource = iota - 1
// earlyCompilerRT is an early, standalone compiler-rt installation for the
// standalone runtimes build.
//
// earlyCompilerRT must only be loaded by [LLVM].
earlyCompilerRT
// earlyRuntimes is an early, standalone installation of LLVM runtimes to
// work around the cmake build system leaking the system LLVM installation
// when invoking the newly built toolchain.
//
// earlyRuntimes must only be loaded by [LLVM].
earlyRuntimes
buildcatrust
buildcatrust = iota - 1
utilMacros
// Musl is a standalone libc that does not depend on the toolchain.

View File

@@ -122,8 +122,6 @@ type CMakeHelper struct {
// Path elements joined with source.
Append []string
// Value of CMAKE_BUILD_TYPE. The zero value is equivalent to "Release".
BuildType string
// CMake CACHE entries.
Cache []KV
// Runs after install.
@@ -166,7 +164,14 @@ func (*CMakeHelper) wantsDir() string { return "/cure/" }
// script generates the cure script.
func (attr *CMakeHelper) script(name string) string {
if attr == nil {
attr = new(CMakeHelper)
attr = &CMakeHelper{
Cache: []KV{
{"CMAKE_BUILD_TYPE", "Release"},
},
}
}
if len(attr.Cache) == 0 {
panic("CACHE must be non-empty")
}
generate := "Ninja"
@@ -184,13 +189,6 @@ func (attr *CMakeHelper) script(name string) string {
script += "\n" + test
}
cache := make([]KV, 1, 1+len(attr.Cache))
cache[0] = KV{"CMAKE_BUILD_TYPE", "Release"}
if attr.BuildType != "" {
cache[0][1] = attr.BuildType
}
cache = append(cache, attr.Cache...)
return `
cmake -G ` + generate + ` \
-DCMAKE_C_COMPILER_TARGET="${ROSA_TRIPLE}" \
@@ -198,7 +196,7 @@ cmake -G ` + generate + ` \
-DCMAKE_ASM_COMPILER_TARGET="${ROSA_TRIPLE}" \
-DCMAKE_INSTALL_LIBDIR=lib \
` + strings.Join(slices.Collect(func(yield func(string) bool) {
for _, v := range cache {
for _, v := range attr.Cache {
if !yield("-D" + v[0] + "=" + v[1]) {
return
}

View File

@@ -17,6 +17,10 @@ func (t Toolchain) newSPIRVHeaders() (pkg.Artifact, string) {
"vulkan-sdk-"+version,
checksum,
), nil, &CMakeHelper{
Cache: []KV{
{"CMAKE_BUILD_TYPE", "Release"},
},
// upstream has no tests
SkipTest: true,
}), version
@@ -63,6 +67,7 @@ func (t Toolchain) newSPIRVTools() (pkg.Artifact, string) {
checksum,
), nil, &CMakeHelper{
Cache: []KV{
{"CMAKE_BUILD_TYPE", "Release"},
{"SPIRV-Headers_SOURCE_DIR", "/system"},
},
},
@@ -104,6 +109,7 @@ func (t Toolchain) newGlslang() (pkg.Artifact, string) {
Chmod: true,
}, &CMakeHelper{
Cache: []KV{
{"CMAKE_BUILD_TYPE", "Release"},
{"BUILD_SHARED_LIBS", "ON"},
{"ALLOW_EXTERNAL_SPIRV_TOOLS", "ON"},
},
@@ -126,65 +132,3 @@ func init() {
ID: 205796,
}
}
func (t Toolchain) newSPIRVLLVMTranslator() (pkg.Artifact, string) {
const (
version = "22.1.2"
checksum = "JZAaV5ewYcm-35YA_U2BM2IcsQouZtX1BLZR0zh2vSlfEXMsT5OCtY4Gh5RJkcGy"
)
return t.NewPackage("spirv-llvm-translator", version, newFromGitHub(
"KhronosGroup/SPIRV-LLVM-Translator",
"v"+version, checksum,
), &PackageAttr{
Patches: []KV{
{"remove-early-prefix", `diff --git a/CMakeLists.txt b/CMakeLists.txt
index c000a77e..86f79b03 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -172,5 +172,5 @@ install(
FILES
${CMAKE_BINARY_DIR}/LLVMSPIRVLib.pc
DESTINATION
- ${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}/pkgconfig
+ lib${LLVM_LIBDIR_SUFFIX}/pkgconfig
)
`},
},
// litArgs emits shell syntax
ScriptEarly: `
export LIT_OPTS=` + litArgs(true,
// error: line 13: OpTypeCooperativeMatrixKHR Scope is limited to Workgroup and Subgroup
"cooperative_matrix_constant_null.spvasm") + `
`,
}, &CMakeHelper{
Cache: []KV{
{"CMAKE_SKIP_BUILD_RPATH", "ON"},
{"BUILD_SHARED_LIBS", "ON"},
{"LLVM_SPIRV_ENABLE_LIBSPIRV_DIS", "ON"},
{"LLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR", "/system"},
{"LLVM_EXTERNAL_LIT", "/system/bin/lit"},
{"LLVM_INCLUDE_TESTS", "ON"},
},
},
Bash,
LIT,
SPIRVTools,
), version
}
func init() {
artifactsM[SPIRVLLVMTranslator] = Metadata{
f: Toolchain.newSPIRVLLVMTranslator,
Name: "spirv-llvm-translator",
Description: "bi-directional translation between SPIR-V and LLVM IR",
Website: "https://github.com/KhronosGroup/SPIRV-LLVM-Translator",
Dependencies: P{
SPIRVTools,
},
ID: 227273,
}
}

View File

@@ -2,157 +2,20 @@ package rosa
import (
"regexp"
"runtime"
"slices"
"strings"
"hakurei.app/internal/pkg"
)
// litArgs returns [LIT] arguments for optional verbosity and check skipping.
func litArgs(verbose bool, skipChecks ...string) string {
args := []string{"-sv"}
if verbose {
args[0] = "--verbose"
}
if len(skipChecks) > 0 {
skipChecks = slices.Clone(skipChecks)
for i, s := range skipChecks {
s = regexp.QuoteMeta(s)
s = strings.ReplaceAll(s, "/", "\\/")
skipChecks[i] = s
}
args = append(args,
"--filter-out='\\''"+strings.Join(skipChecks, "|")+"'\\''")
}
return "'" + strings.Join(args, " ") + "'"
}
func (t Toolchain) newEarlyCompilerRT() (pkg.Artifact, string) {
version := t.Version(llvmSource)
major, _, _ := strings.Cut(version, ".")
return t.NewPackage("early-compiler-rt", version, t.Load(llvmSource), &PackageAttr{
Flag: TExclusive,
}, &CMakeHelper{
Append: []string{"compiler-rt"},
Cache: []KV{
// libc++ not yet available
{"CMAKE_CXX_COMPILER_TARGET", ""},
{"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`},
{"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`},
{"LLVM_ENABLE_PER_TARGET_RUNTIME_DIR", "ON"},
{"COMPILER_RT_BUILD_BUILTINS", "ON"},
{"COMPILER_RT_DEFAULT_TARGET_ONLY", "OFF"},
{"COMPILER_RT_SANITIZERS_TO_BUILD", "asan"},
// does not work without libunwind
{"COMPILER_RT_BUILD_CTX_PROFILE", "OFF"},
{"COMPILER_RT_BUILD_LIBFUZZER", "OFF"},
{"COMPILER_RT_BUILD_MEMPROF", "OFF"},
{"COMPILER_RT_BUILD_PROFILE", "OFF"},
{"COMPILER_RT_BUILD_XRAY", "OFF"},
},
SkipTest: true,
Script: `
mkdir -p "/work/system/lib/clang/` + major + `/lib/"
ln -s \
"../../../${ROSA_TRIPLE}" \
"/work/system/lib/clang/` + major + `/lib/"
ln -s \
"clang_rt.crtbegin-` + linuxArch() + `.o" \
"/work/system/lib/${ROSA_TRIPLE}/crtbeginS.o"
ln -s \
"clang_rt.crtend-` + linuxArch() + `.o" \
"/work/system/lib/${ROSA_TRIPLE}/crtendS.o"
`,
},
Python,
muslHeaders,
KernelHeaders,
), version
}
func init() {
artifactsM[earlyCompilerRT] = Metadata{
f: Toolchain.newEarlyCompilerRT,
Name: "early-compiler-rt",
Description: "early LLVM runtime: compiler-rt",
Dependencies: P{
Musl,
},
}
}
func (t Toolchain) newEarlyRuntimes() (pkg.Artifact, string) {
version := t.Version(llvmSource)
return t.NewPackage("early-runtimes", version, t.Load(llvmSource), &PackageAttr{
Flag: TExclusive,
}, &CMakeHelper{
Append: []string{"runtimes"},
Cache: []KV{
// libc++ not yet available
{"CMAKE_CXX_COMPILER_WORKS", "ON"},
{"LLVM_HOST_TRIPLE", `"${ROSA_TRIPLE}"`},
{"LLVM_DEFAULT_TARGET_TRIPLE", `"${ROSA_TRIPLE}"`},
{"LLVM_ENABLE_RUNTIMES", "'libunwind;libcxx;libcxxabi'"},
{"LIBUNWIND_USE_COMPILER_RT", "ON"},
{"LIBCXX_HAS_MUSL_LIBC", "ON"},
{"LIBCXX_USE_COMPILER_RT", "ON"},
{"LIBCXX_HAS_ATOMIC_LIB", "OFF"},
{"LIBCXXABI_USE_COMPILER_RT", "ON"},
{"LIBCXXABI_USE_LLVM_UNWINDER", "ON"},
{"LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL", "OFF"},
{"LLVM_ENABLE_ZLIB", "FORCE_ON"},
{"LLVM_ENABLE_ZSTD", "FORCE_ON"},
{"LLVM_ENABLE_LIBXML2", "OFF"},
},
SkipTest: true,
},
Python,
Zlib,
Zstd,
earlyCompilerRT,
KernelHeaders,
), version
}
func init() {
artifactsM[earlyRuntimes] = Metadata{
f: Toolchain.newEarlyRuntimes,
Name: "early-runtimes",
Description: "early LLVM runtimes: libunwind, libcxx, libcxxabi",
Dependencies: P{
earlyCompilerRT,
},
}
}
func (t Toolchain) newLLVM() (pkg.Artifact, string) {
var early PArtifact = muslHeaders
if t.isStage0() {
// The LLVM build system is buggy around LLVM_LINK_LLVM_DYLIB and leaks
// the system installation when invoking the newly built toolchain. This
// is worked around in stage0 by providing standalone builds of
// runtimes. Later stages rely on 3-stage determinism and allows the
// system installation from its previous stage to leak through.
early = earlyRuntimes
}
const (
version = "22.1.4"
checksum = "Bk3t-tV5sD5T0bqefFMcLeFuAwXnhFipywZmqst5hAZs97QQWGKB_5XyAFjj5tDB"
)
cache := []KV{
{"CMAKE_BUILD_TYPE", "Release"},
{"ENABLE_LINKER_BUILD_ID", "ON"},
{"COMPILER_RT_USE_BUILTINS_LIBRARY", "ON"},
{"COMPILER_RT_DEFAULT_TARGET_ONLY", "ON"},
@@ -230,14 +93,10 @@ func (t Toolchain) newLLVM() (pkg.Artifact, string) {
// unwind: fails on musl
"eh_frame_fde_pc_range",
}
switch runtime.GOARCH {
case "arm64":
skipChecks = append(skipChecks,
// LLVM: intermittently crashes
"ExecutionEngine/OrcLazy/multiple-compile-threads-basic.ll",
// unwind: unexpectedly passes
"unwind_leaffunction",
)
for i, s := range skipChecks {
s = regexp.QuoteMeta(s)
s = strings.ReplaceAll(s, "/", "\\/")
skipChecks[i] = s
}
if presetOpts&OptLLVMNoLTO == 0 {
@@ -251,20 +110,25 @@ func (t Toolchain) newLLVM() (pkg.Artifact, string) {
// symbols: clock_gettime, mallopt
{"COMPILER_RT_INCLUDE_TESTS", "OFF"},
{"LLVM_BUILD_TESTS", "ON"},
{"LLVM_LIT_ARGS", litArgs(true, skipChecks...)},
{"LLVM_LIT_ARGS", "'" + strings.Join([]string{
"--verbose",
"--filter-out='\\''" + strings.Join(skipChecks, "|") + "'\\''",
}, " ") + "'"},
}...)
}
version := t.Version(llvmSource)
return t.NewPackage("llvm", version, t.Load(llvmSource), nil, &CMakeHelper{
return t.NewPackage("llvm", version, t.NewPatchedSource("llvm", version, newFromGitHub(
"llvm/llvm-project",
"llvmorg-"+version,
checksum,
), true, llvmPatches...), nil, &CMakeHelper{
Append: []string{"llvm"},
Cache: cache,
Script: `
ln -s ld.lld /work/system/bin/ld
ln -s clang /work/system/bin/cc
ln -s clang /work/system/bin/cpp
ln -s clang++ /work/system/bin/c++
`,
@@ -295,31 +159,11 @@ ninja ` + jobsFlagE + ` check-all
Zlib,
Zstd,
early,
muslHeaders,
KernelHeaders,
), version
}
func init() {
const (
version = "22.1.4"
checksum = "Bk3t-tV5sD5T0bqefFMcLeFuAwXnhFipywZmqst5hAZs97QQWGKB_5XyAFjj5tDB"
)
artifactsM[llvmSource] = Metadata{
f: func(t Toolchain) (pkg.Artifact, string) {
return t.NewPatchedSource("llvm", version, newFromGitHub(
"llvm/llvm-project",
"llvmorg-"+version,
checksum,
), true, llvmPatches...), version
},
Name: "llvm-project",
Description: "LLVM monorepo with Rosa OS patches",
ID: 1830,
}
artifactsM[LLVM] = Metadata{
f: Toolchain.newLLVM,
@@ -332,5 +176,7 @@ func init() {
Zstd,
Musl,
},
ID: 1830,
}
}

View File

@@ -351,29 +351,6 @@ func init() {
)
}
func init() {
artifactsM[LIT] = Metadata{
f: func(t Toolchain) (pkg.Artifact, string) {
version := t.Version(LLVM)
return t.NewPackage("lit", version, t.Load(llvmSource), nil, &PipHelper{
Append: []string{"llvm", "utils", "lit"},
// already checked during llvm
SkipCheck: true,
},
PythonSetuptools,
), version
},
Name: "lit",
Description: "a portable tool for executing LLVM and Clang style test suites",
Website: "https://llvm.org/docs/CommandGuide/lit.html",
Dependencies: P{
Python,
},
}
}
func init() {
const (
version = "1.1.1"

View File

@@ -47,7 +47,6 @@ func NewStage0() pkg.Artifact {
"stage0-"+triplet()+".tar.bz2",
perArch[string]{
"amd64": "ldz-WkSx2wxUK4ndi-tlaaU8ykOowbpGRcBsciAcIDdnX6-QfzQg_se3lsZYuzuK",
"arm64": "_mo39S_sgzPYaIQ_Wi13O46KPQuWqCCiZdildpz6a8MTh2khIt68tNIulyUGBV2z",
}.unwrap(),
pkg.TarBzip2,
)

View File

@@ -26,50 +26,19 @@ func init() {
}
}
func (t Toolchain) newLibxtrans() (pkg.Artifact, string) {
func (t Toolchain) newXproto() (pkg.Artifact, string) {
const (
version = "1.6.0"
checksum = "1cxDCF59fLf1HyGDMcjR1L50ZbjD0RTTEDUpOJYcHXu6HUK_Ds0x-KREY7rLNxu9"
version = "7.0.31"
checksum = "Cm69urWY5RctKpR78eGzuwrjDEfXGkvHRdodj6sjypOGy5FF4-lmnUttVHYV1ydg"
)
return t.NewPackage("libxtrans", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxtrans",
"xtrans-"+version,
return t.NewPackage("xproto", version, newTar(
"https://www.x.org/releases/individual/proto/"+
"xproto-"+version+".tar.bz2",
checksum,
pkg.TarBzip2,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
), version
}
func init() {
artifactsM[Libxtrans] = Metadata{
f: Toolchain.newLibxtrans,
Name: "libxtrans",
Description: "X Window System Protocols Transport layer shared code",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxtrans",
ID: 13441,
}
}
func (t Toolchain) newXorgProto() (pkg.Artifact, string) {
const (
version = "2025.1"
checksum = "pTwJiBJHKA6Rgm3cVDXy1lyvXNIUzTRaukvvYdk1xWoJ_1G-Dfjm9MyewuyIjoHz"
)
return t.NewPackage("xorgproto", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/proto/xorgproto",
"xorgproto-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
// ancient configure script
Generate: "autoreconf -if",
},
Automake,
PkgConfig,
@@ -78,14 +47,14 @@ func (t Toolchain) newXorgProto() (pkg.Artifact, string) {
), version
}
func init() {
artifactsM[XorgProto] = Metadata{
f: Toolchain.newXorgProto,
artifactsM[Xproto] = Metadata{
f: Toolchain.newXproto,
Name: "xorgproto",
Name: "xproto",
Description: "X Window System unified protocol definitions",
Website: "https://gitlab.freedesktop.org/xorg/proto/xorgproto",
ID: 17190,
ID: 13650,
}
}
@@ -108,7 +77,7 @@ func (t Toolchain) newLibXau() (pkg.Artifact, string) {
PkgConfig,
utilMacros,
XorgProto,
Xproto,
), version
}
func init() {
@@ -120,186 +89,13 @@ func init() {
Website: "https://gitlab.freedesktop.org/xorg/lib/libxau",
Dependencies: P{
XorgProto,
Xproto,
},
ID: 1765,
}
}
func (t Toolchain) newXCBProto() (pkg.Artifact, string) {
const (
version = "1.17.0"
checksum = "_NtbKaJ_iyT7XiJz25mXQ7y-niTzE8sHPvLXZPcqtNoV_-vTzqkezJ8Hp2U1enCv"
)
return t.NewPackage("xcb-proto", version, newTar(
"https://xcb.freedesktop.org/dist/xcb-proto-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
Python,
), version
}
func init() {
artifactsM[XCBProto] = Metadata{
f: Toolchain.newXCBProto,
Name: "xcb-proto",
Description: "XML-XCB protocol descriptions used by libxcb for the X11 protocol & extensions",
Website: "https://gitlab.freedesktop.org/xorg/proto/xcbproto",
ID: 13646,
}
}
func (t Toolchain) newXCB() (pkg.Artifact, string) {
const (
version = "1.17.0"
checksum = "hjjsc79LpWM_hZjNWbDDS6qRQUXREjjekS6UbUsDq-RR1_AjgNDxhRvZf-1_kzDd"
)
return t.NewPackage("xcb", version, newTar(
"https://xcb.freedesktop.org/dist/libxcb-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
Python,
PkgConfig,
XCBProto,
LibXau,
), version
}
func init() {
artifactsM[XCB] = Metadata{
f: Toolchain.newXCB,
Name: "xcb",
Description: "The X protocol C-language Binding",
Website: "https://xcb.freedesktop.org/",
Dependencies: P{
XCBProto,
LibXau,
},
ID: 1767,
}
}
func (t Toolchain) newLibX11() (pkg.Artifact, string) {
const (
version = "1.8.13"
checksum = "ARh-cuZY_U2v3DbPS1byc7ybh9NInZc-yav7SJiusk_C7408s058qWV83ocMd2pT"
)
return t.NewPackage("libX11", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libx11",
"libX11-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
Configure: []KV{
{"enable-static"},
{"without-xmlto"},
},
},
Automake,
Libtool,
PkgConfig,
utilMacros,
Libxtrans,
XorgProto,
XCB,
), version
}
func init() {
artifactsM[LibX11] = Metadata{
f: Toolchain.newLibX11,
Name: "libX11",
Description: `Core X11 protocol client library (aka "Xlib")`,
Website: "https://gitlab.freedesktop.org/xorg/lib/libx11",
Dependencies: P{
XCB,
},
ID: 1764,
}
}
func (t Toolchain) newLibXext() (pkg.Artifact, string) {
const (
version = "1.3.7"
checksum = "-0wvUDaucLPLNOrK1pcKhHNoO-5nUqQyyw6JAbhx65gRjuMiNKKaF2_tcrbC_KNq"
)
return t.NewPackage("libXext", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxext",
"libXext-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
LibX11,
), version
}
func init() {
artifactsM[LibXext] = Metadata{
f: Toolchain.newLibXext,
Name: "libXext",
Description: "Xlib-based library for common extensions to the X11 protocol",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxext",
Dependencies: P{
LibX11,
},
ID: 1774,
}
}
func (t Toolchain) newLibxshmfence() (pkg.Artifact, string) {
const (
version = "1.3.3"
checksum = "JamExTPg81By2fs3vWdeo_dzlpBQeAwXr2sDXeHJqm9XBoLW5pamiD6FgAWtAKyA"
)
return t.NewPackage("libxshmfence", version, newFromGitLab(
"gitlab.freedesktop.org",
"xorg/lib/libxshmfence",
"libxshmfence-"+version,
checksum,
), nil, &MakeHelper{
Generate: "NOCONFIGURE=1 ./autogen.sh",
},
Automake,
Libtool,
PkgConfig,
utilMacros,
XorgProto,
), version
}
func init() {
artifactsM[Libxshmfence] = Metadata{
f: Toolchain.newLibxshmfence,
Name: "libxshmfence",
Description: "shared memory 'SyncFence' synchronization primitive",
Website: "https://gitlab.freedesktop.org/xorg/lib/libxshmfence",
ID: 1792,
}
}
func (t Toolchain) newLibpciaccess() (pkg.Artifact, string) {
const (
version = "0.19"

62
internal/rosa/xcb.go Normal file
View File

@@ -0,0 +1,62 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newXCBProto() (pkg.Artifact, string) {
const (
version = "1.17.0"
checksum = "_NtbKaJ_iyT7XiJz25mXQ7y-niTzE8sHPvLXZPcqtNoV_-vTzqkezJ8Hp2U1enCv"
)
return t.NewPackage("xcb-proto", version, newTar(
"https://xcb.freedesktop.org/dist/xcb-proto-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
Python,
), version
}
func init() {
artifactsM[XCBProto] = Metadata{
f: Toolchain.newXCBProto,
Name: "xcb-proto",
Description: "XML-XCB protocol descriptions used by libxcb for the X11 protocol & extensions",
Website: "https://gitlab.freedesktop.org/xorg/proto/xcbproto",
ID: 13646,
}
}
func (t Toolchain) newXCB() (pkg.Artifact, string) {
const (
version = "1.17.0"
checksum = "hjjsc79LpWM_hZjNWbDDS6qRQUXREjjekS6UbUsDq-RR1_AjgNDxhRvZf-1_kzDd"
)
return t.NewPackage("xcb", version, newTar(
"https://xcb.freedesktop.org/dist/libxcb-"+version+".tar.gz",
checksum,
pkg.TarGzip,
), nil, (*MakeHelper)(nil),
Python,
PkgConfig,
XCBProto,
LibXau,
), version
}
func init() {
artifactsM[XCB] = Metadata{
f: Toolchain.newXCB,
Name: "xcb",
Description: "The X protocol C-language Binding",
Website: "https://xcb.freedesktop.org/",
Dependencies: P{
XCBProto,
LibXau,
},
ID: 1767,
}
}

View File

@@ -13,6 +13,8 @@ func (t Toolchain) newZlib() (pkg.Artifact, string) {
pkg.TarGzip,
), nil, &CMakeHelper{
Cache: []KV{
{"CMAKE_BUILD_TYPE", "Release"},
{"CMAKE_C_FLAGS", "-fPIC"},
{"ZLIB_BUILD_TESTING", "ON"},
{"ZLIB_BUILD_SHARED", "ON"},

View File

@@ -19,6 +19,9 @@ func (t Toolchain) newZstd() (pkg.Artifact, string) {
Chmod: true,
}, &CMakeHelper{
Append: []string{"build", "cmake"},
Cache: []KV{
{"CMAKE_BUILD_TYPE", "Release"},
},
Test: `
make -C /usr/src/zstd/tests datagen
ZSTD_BIN=/cure/programs/zstd /usr/src/zstd/tests/playTests.sh