b72f6a743a
internal/rosa/package: replace assignment syntax
2026-05-23 23:15:20 -05:00
dcfcc9992c
internal/rosa/package: create az.mod and remove preprocessor directive
2026-05-23 22:55:21 -05:00
0307f781a2
internal/rosa/package: azalea proposal
2026-05-23 20:50:35 -05:00
689f972976
internal/rosa/package: migrate stage0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 17:53:05 +09:00
3f33b62dfd
internal/rosa/package: migrate system image
...
The overlay argument also enables migration of stage0.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 17:44:38 +09:00
ac5488eef6
internal/rosa/package: migrate initramfs image
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 17:30:39 +09:00
77a15130c7
internal/rosa/package: foot
...
Used by vm test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 16:51:32 +09:00
4c1e823908
internal/rosa/package: fcft
...
Required by foot.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 16:45:42 +09:00
5f5a398a5b
internal/rosa/package: utf8proc
...
Required by foot.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 16:35:38 +09:00
d5e4a2e6a7
internal/rosa/package: tllist
...
Required by foot.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 16:35:24 +09:00
57c6b84b60
internal/rosa/package: fontconfig
...
Required by foot.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 16:23:06 +09:00
4269627b4b
internal/rosa/package: xkbcommon
...
Required by foot.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 16:22:51 +09:00
d50e3c3d5b
internal/rosa/package/glib: 2.88.1 to 2.89.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 14:33:37 +09:00
eae2890d98
internal/rosa/package/python: trove-classifiers 2026.5.7.17 to 2026.5.22.10
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 14:33:20 +09:00
f8ebfd71a7
internal/rosa/package/spirv: spirv-headers 1.4.341.0 to 1.4.350.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 14:32:52 +09:00
dce1a05f6c
internal/rosa/package/firmware: 20260410 to 20260519
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 14:32:16 +09:00
eff265837c
internal/rosa/package/mesa: 26.1.0 to 26.1.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 14:32:01 +09:00
7d809eb15f
internal/rosa/package/nss: 3.123.1 to 3.124
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 14:31:36 +09:00
9accc2f961
internal/rosa/package/nss: nspr 4.38.2 to 4.39
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 14:31:19 +09:00
e5a4094298
internal/rosa: remove unused helpers
...
These are no longer needed after migration.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 14:00:18 +09:00
410c4f8bb0
internal/rosa/package/cmake: 4.3.2 to 4.3.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 13:02:23 +09:00
2e23c6d367
internal/rosa/package/kernel: 6.12.87 to 6.12.90
...
Unfortunately this causes rebuilds due to a single io_uring API change.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 13:01:44 +09:00
f5e9a0c04e
internal/pkg: destroy new substitution status on fault
...
This avoids leaving behind the substitution status path of a faulted cure.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 01:31:13 +09:00
3bd4ef616c
internal/pkg: report errors exiting cure
...
This makes ongoing errors more obvious when multiple failures occur.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 01:25:42 +09:00
41402fd578
internal/rosa/package/util-linux: 2.42 to 2.42.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-23 01:00:27 +09:00
b47fa1a214
internal/rosa: IR-curable source override
...
This creates a tarball in-memory for overriding hakurei-source.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-22 22:24:16 +09:00
9e363cb2c9
internal/rosa/go: runtime dependencies for alterative path
...
The GCC toolchain is not dependency-free, so append them here.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-22 13:42:02 +09:00
1389c77022
internal/rosa/package/hakurei: 0.4.2 to 0.4.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-22 03:16:56 +09:00
e231341e48
release: 0.4.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-22 02:18:10 +09:00
70f977627d
internal/pkg: arch-specific expected offline substituted
...
IR includes the target architecture name.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-22 01:51:15 +09:00
f3a6f7ddf9
internal/rosa/package: migrate hakurei
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-22 00:07:25 +09:00
2a9aa3b400
cmd/dist: include version in release
...
This makes HAKUREI_VERSION optional during build.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 23:37:08 +09:00
68a91523b9
internal/rosa/package: migrate bison
...
This is the final remaining trivial legacy artifact.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 23:06:34 +09:00
5647321622
internal/rosa: move azalea builtins
...
This improves readability.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 22:51:50 +09:00
cdd31dd27b
internal/rosa/azalea: integer arrays
...
This is useful for some helper functions. Performance is unaffected.
Before:
BenchmarkStage3-128 8308 1960687 ns/op 1023794 B/op 14755 allocs/op
BenchmarkAll-128 3331 5518571 ns/op 2902320 B/op 37993 allocs/op
After:
BenchmarkStage3-128 8330 1946273 ns/op 1023046 B/op 14750 allocs/op
BenchmarkAll-128 3296 5585805 ns/op 2901746 B/op 37991 allocs/op
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 22:47:41 +09:00
0615899e56
internal/rosa: do not register stage0
...
Nothing can depend on this, so remove it from the namespace.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 22:20:01 +09:00
0914569e62
internal/rosa/go: migrate to generic helper
...
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-21 19:55:38 +09:00
25d9edfc64
internal/rosa/package: migrate tamago
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 19:40:16 +09:00
af4c3bbff2
internal/rosa/package: migrate toybox
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 18:10:02 +09:00
54aae9d72a
internal/rosa/package: migrate llvm patches
...
LLVM itself is unlikely to ever be migrated due to complexity of the bootstrap, so migrate patches instead.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 17:51:23 +09:00
58646f8ea5
internal/rosa/package/googletest: 1.16.0 to 1.17.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 17:02:40 +09:00
9d7a27d8ac
internal/rosa/package: migrate ninja
...
The ninja package predates all abstractions currently available. This migration causes rebuilds due to the old package being nonreproducible.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 16:48:10 +09:00
6546ddc64b
internal/rosa: expose in-place behaviour in generic helper
...
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-21 16:11:38 +09:00
cbf18b302d
internal/rosa/package: migrate nss
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 15:36:10 +09:00
1acb5b0105
internal/rosa: extra inputs in alternative path
...
This works around particularly unwieldy build systems.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 15:05:12 +09:00
40b33f9fc7
internal/rosa: enforce exclusions
...
This restores unexported artifact behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 14:48:16 +09:00
443a7a30f6
internal/rosa: use string pair for files
...
This is a much cleaner representation than the separator syntax.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 14:07:20 +09:00
497e4a5642
internal/rosa/package/git: disable flaky test
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 13:35:21 +09:00
c0e3841ddb
internal/rosa/llvm: 22.1.5 to 22.1.6
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-21 10:39:42 +09:00
9ce2c325db
internal/rosa/package/kernel: populate riscv64 checksum
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 21:25:15 +09:00
9836030c59
internal/rosa: reinitialise frame alongside cache
...
The cached frame can contain information made outdated by the DropCaches call.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 09:01:40 +09:00
b482fd4abf
internal/rosa: remove global handles
...
These no longer serve any purpose.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 08:15:23 +09:00
2e502ede6c
internal/rosa/package: migrate X packages
...
This also improves naming consistency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 07:44:17 +09:00
4bec0b890c
internal/rosa/package: migrate unzip
...
This is now possible via the generic helper.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 06:21:49 +09:00
7770ccf0aa
internal/rosa/package: migrate wayland
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 06:12:19 +09:00
656059278d
internal/rosa/package: migrate remaining trivial packages
...
The rest are migrated individually.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 05:57:26 +09:00
1a9974ffdc
internal/rosa/package: migrate qemu
...
This has many dependencies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 05:10:41 +09:00
1a2699b486
internal/rosa/package: migrate multiple packages
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 05:01:06 +09:00
1d3d621e2f
internal/rosa/package: migrate perl Module::Build
...
This is now possible via the generic helper.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 04:48:03 +09:00
47f4e287fc
internal/rosa/package: migrate multiple libraries
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 04:37:58 +09:00
2e710328a4
internal/rosa/package: migrate musl
...
This removes some legacy cruft, causing 2 rebuilds per stage.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 04:13:10 +09:00
2e7b52d701
internal/rosa/package: migrate mesa
...
This has many dependencies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 04:02:02 +09:00
d728607505
internal/rosa/package: migrate mesa dependencies
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 03:51:48 +09:00
ef414ab01a
internal/rosa/package: migrate many libraries
...
This also adds more string helpers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 03:33:15 +09:00
96abf266dd
internal/rosa/package: migrate hwdata, kmod, libarchive
...
This removes a blank line in CTestCustom.cmake, causing a libarchive rebuild. Resulting IR is identical otherwise.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 02:25:41 +09:00
fcba32e9c4
internal/rosa/package: migrate glib
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 02:09:12 +09:00
a7f5a5802d
internal/rosa/package: migrate spirv-llvm-translator
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-20 00:01:03 +09:00
bb230378e0
internal/rosa/package: migrate glslang
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 23:48:39 +09:00
f638c73933
internal/rosa: bind anitya functions
...
This is far more scalable than individual fields.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 23:34:21 +09:00
98d915af3d
internal/rosa/package: migrate argp-standalone, dtc, elfutils, flex, freetype, fuse
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 23:26:34 +09:00
c0593e8325
internal/rosa/package: migrate dbus
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 22:51:08 +09:00
608d8303ec
internal/rosa/package: migrate git
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 22:37:24 +09:00
1c6f30379e
internal/rosa/package: migrate bzip2, curl, connman
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 22:26:40 +09:00
009a4e0d58
internal/rosa/hakurei: migrate to helper
...
This predates the helper infrastructure, so migrate it.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 22:10:39 +09:00
e7c8656691
internal/rosa: remove fakeroot
...
This is unused and broken, so remove it.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 21:54:40 +09:00
d6be116ff8
internal/rosa/package: migrate firmware
...
This does not depend on the kernel.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 21:46:40 +09:00
962b02cf25
internal/rosa/package: migrate kernel
...
This introduces bindings for extra paths and KnownChecksum, and exposes a passthrough special case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 21:40:15 +09:00
6fd6d971ed
internal/rosa/package: migrate mksh
...
This benefits greatly from the new generic helper.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 19:47:57 +09:00
548c96c7ec
internal/rosa/package: migrate make
...
This also introduces the generic helper for unusual build scripts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 19:28:18 +09:00
6e8bfa6c4c
internal/rosa/package: migrate cmake
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 18:42:54 +09:00
a770d62b9b
internal/rosa/package: migrate meson
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 18:24:07 +09:00
ff44060763
internal/rosa/package: migrate python packages
...
This also migrates LLVM LIT via the newly implemented special case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 18:15:04 +09:00
3010a209b5
internal/rosa/azalea: pass through source ident
...
For source handle special case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 18:10:11 +09:00
e65a3b435c
internal/rosa/package/gnutls: 3.8.12 to 3.8.13
...
The new release came with new broken tests, but at least nettle3 can be removed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 04:36:32 +09:00
23515f67c8
internal/rosa/package: migrate perl packages
...
Most of these are currently unused.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 04:08:22 +09:00
4389df60ae
internal/rosa/perl: remove obsolete helper
...
This method predates the helper infrastructure.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 03:40:31 +09:00
8092492018
internal/rosa/perl: Makefile.PL helper
...
This can be invoked from azalea.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 03:24:27 +09:00
a7877844bf
internal/rosa/package: migrate perl interpreter
...
Packages will be migrated separtely.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 02:49:11 +09:00
1ed027846d
internal/rosa/package: migrate python interpreter
...
Packages will take quite some work.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 02:06:17 +09:00
2f376d4813
internal/rosa/package: rename buildcatrust
...
This causes a single rebuild due to substitution.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 01:50:03 +09:00
dc3810b530
internal/rosa/python: remove unnecessary input
...
This is added by the helper. Removing it has no effect since it is promoted by Append.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 01:48:24 +09:00
6e9e8c74f3
internal/rosa: migrate buildcatrust
...
Other nss-related packages are unlikely to be migrated any time soon.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 01:44:23 +09:00
4d60fa5632
internal/rosa: evaluate packages late
...
This also enables concurrent evaluation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-19 01:26:21 +09:00
8807cbc730
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 >
2026-05-19 00:44:24 +09:00
0e95573f18
internal/rosa/package: migrate acl
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-18 22:42:43 +09:00
eb2b53307a
internal/rosa/package: migrate gcc
...
The azalea implementation used an adaptation of this as testdata.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-18 22:29:53 +09:00
682b3a2ce5
internal/rosa: track evaluation time
...
Useful to track performance regressions over migrations.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-18 22:18:09 +09:00
594221eb78
internal/rosa/package: migrate gnutls
...
This is the first nontrivial package to be migrated to azalea. Validated to generate identical IR.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-18 22:06:00 +09:00
34822925e1
internal/rosa: migrate GNU software
...
These are quite trivial, so migrate them in one pass.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-18 21:23:19 +09:00
37df040d85
internal/rosa: evaluate packages from fs
...
This migrates GNU sed to azalea, and resulting IR matches.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-18 17:54:01 +09:00
0360e779f3
internal/rosa: initial azalea bindings
...
Supported fields are still rather minimal, but evaluation works, and resulting artifacts cure correctly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-18 02:56:38 +09:00
3e236333a7
internal/rosa: panic error for invalid handle
...
This enables recovery and better error handling for errors originating from external azalea files.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-18 00:07:39 +09:00
f24ae21af1
internal/rosa/azalea: package special case
...
This is more efficient for the inputs array and packages in general.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-17 23:49:19 +09:00
99b324fb17
cmd/mbf: update pkgserver title text
...
This makes more sense for its purpose.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-17 18:57:26 +09:00
6f50811dc9
cmd/mbf: bring back pkgserver's favicon!
...
It existed in mae's #33 , but ozy was not satisfied with including
a binary file identical to https://hakurei.app's favicon, and hence
removed it. However, it's possible to explicitly specify the favicon
with a link tag [1]; provided a content security policy that isn't too
strong, this should work fine.
[1]: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel#icon
2026-05-17 19:47:42 +10:00
6b87bac401
cmd/mbf: clone pkgserver order slices
...
These are no longer arrays, so must be cloned for sorting.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-17 18:30:57 +09:00
a967aa3b6e
internal/rosa/kernel: arch-specific headers checksum
...
These headers differ by target architecture.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-17 18:01:11 +09:00
38bc2c7508
internal/rosa: pass stage alongside state
...
This cleans up many function signatures.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-17 17:50:30 +09:00
30eb0d6a61
internal/rosa: key metadata by string
...
For upcoming azalea integration. The API is quite ugly right now to ease migration.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-17 15:56:53 +09:00
c2ff9c9fa5
internal/rosa/azalea: evaluator
...
Performance is sufficient for the use case, despite the fact that I could not even think of a lower-effort way to do this:
BenchmarkParse-128 55100 21494 ns/op
BenchmarkEvaluate-128 131670 9248 ns/op
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-17 12:44:34 +09:00
d38d306147
internal/rosa/azalea: ast and parser
...
This syntax is not final, but acts as a stopgap solution and a proof of concept.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-16 14:29:28 +09:00
c32c06b2e8
internal/rosa: mesa artifact
...
This has many dependencies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 05:12:35 +09:00
61199f734c
internal/rosa/glslang: remove headers prefix
...
Maintainers tried to be clever with this and breaks cmake paths.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 04:57:38 +09:00
87cf0d4e6b
internal/rosa/mesa: libva artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 04:40:04 +09:00
cf0dffa0f5
internal/rosa/mesa: libglvnd enable glx
...
Required to break circular dependency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 04:35:50 +09:00
686d7ec63a
internal/rosa/x: xserver artifact
...
Required by libglvnd test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 04:15:48 +09:00
4c653b1151
internal/rosa/x: xkeyboard-config artifact
...
Required by xserver test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 03:59:22 +09:00
0b0a63d151
internal/rosa/x: libxcb-util-wm artifact
...
Required by xserver xephyr.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 03:46:04 +09:00
6231cfe2aa
internal/rosa/x: libxcb-util-image artifact
...
Required by xserver xephyr.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 03:36:45 +09:00
712e80890b
internal/rosa/x: libxcb-util artifact
...
Required by xserver xephyr.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 03:25:24 +09:00
3fe7d48014
internal/rosa/x: libxcb-render-util artifact
...
Required by xserver.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 03:09:37 +09:00
16f9d39427
internal/rosa: libepoxy artifact
...
Required by xserver.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 02:16:55 +09:00
c1cd5ba07b
internal/rosa: libtirpc artifact
...
Required by xserver.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 02:07:25 +09:00
7b0cd2e472
internal/rosa/x: libXdmcp artifact
...
Required by xserver.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 01:44:37 +09:00
e580307528
internal/rosa/x: libxcvt artifact
...
Required by xserver.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 01:24:00 +09:00
ee1dffb676
internal/rosa/x: libXfont2 artifact
...
Required by xserver.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 01:17:27 +09:00
f095fcf181
internal/rosa/x: font-util and libfontenc artifact
...
Required by libXfont2.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 01:14:12 +09:00
ca8a130130
internal/rosa: freetype artifact
...
Required by libXfont.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-14 00:54:42 +09:00
0ad6b00e41
internal/rosa/x: xkbcomp artifact
...
Required by xserver.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 22:24:08 +09:00
ad0f1cf36b
internal/rosa/x: libxkbfile artifact
...
Required by xkbcomp.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 22:22:02 +09:00
b12d924fa2
internal/rosa: pixman artifact
...
Required by xserver.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 22:07:53 +09:00
c31d8ae41a
internal/rosa/x: libXfixes artifact
...
Required by libva.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 21:36:47 +09:00
6dbbf15c0e
internal/rosa: lm_sensors artifact
...
Generally useful, and an optional dependency of mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 20:11:37 +09:00
be7de68a42
internal/rosa/perl: Test::Cmd artifact
...
Required by lm_sensors test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 20:05:43 +09:00
a759cf3666
internal/pkg: check exec substitution
...
This relies on the testtool having ident as relevant input to assert successful substitution.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 19:43:53 +09:00
8c2dd3e984
internal/pkg: verify status kind
...
While it is still impossible to reliably determine the expected contents of these status files, this checks their nature for expected substitution behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 19:27:58 +09:00
67038d5af4
internal/pkg: log fault in tests when available
...
This would otherwise only be available in verbose output, interleaved with everything else.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 18:58:18 +09:00
53d8d12e7f
internal/rosa/git: disable flaky test
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 18:51:11 +09:00
7997d79e56
cmd/mbf: display and destroy fault entries
...
This change extends cmd/mbf commands for working with fault entries.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 19:06:09 +09:00
f2f1726190
internal/pkg: record cure faults
...
These are useful for troubleshooting. This change records them in a separate directory.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 17:58:18 +09:00
f63203cb0a
internal/pkg: populate substitute status
...
These are not created when taking the fast path, but should be inherited from the alternative.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 16:16:37 +09:00
19555c7670
internal/rosa/gtk: glib 2.88.0 to 2.88.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 00:48:38 +09:00
a3beab8959
internal/rosa/libucontext: 1.5 to 1.5.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 00:48:15 +09:00
2ea786d6a9
internal/rosa/libbsd: libmd 1.1.0 to 1.2.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 00:47:57 +09:00
747d4ec4b0
internal/rosa/libexpat: 2.8.0 to 2.8.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 00:47:32 +09:00
b76e6f6519
internal/rosa/tamago: 1.26.2 to 1.26.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 00:47:05 +09:00
840d8f68bf
internal/rosa/git: disable flaky test
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 00:38:59 +09:00
4bede7ecdd
internal/pkg: discontinue DCE resolution on signal
...
This serves as a stopgap measure to skip long-running DCE resolutions.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 00:29:01 +09:00
487a03b5a3
internal/pkg: deduplicate DCE by ident
...
This eliminates edge cases where target artifacts do not compare equal.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-13 00:18:27 +09:00
8f3c22896a
internal/pkg: DCE benchmark unwrap only
...
This eliminates noise at lower depths.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 19:56:59 +09:00
a167c1aba5
internal/pkg: hold artifact in DCE
...
This is significantly slower but enables much better error reporting.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 19:45:25 +09:00
a6008ef68b
internal/pkg: benchmark early DCE
...
This error has never had decent performance, now is a good time to improve that.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 18:59:25 +09:00
5228b27362
internal/rosa/glslang: 16.2.0 to 16.3.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 17:53:35 +09:00
f00d3a07ad
internal/rosa/python: trove-classifiers 2026.4.28.13 to 2026.5.7.17
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 17:53:17 +09:00
f9538bc21b
internal/rosa/python: 3.14.4 to 3.14.5
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 17:52:53 +09:00
6ae5efec56
internal/rosa/gnu: gcc 15.2.0 to 16.1.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 17:52:31 +09:00
14f4c59c8c
internal/rosa/llvm: 22.1.4 to 22.1.5
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 17:52:13 +09:00
688d43417b
internal/pkg: rename measured exec type
...
This type is no longer exclusive to KindExecNet.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 15:23:33 +09:00
9f8fafa39b
internal/rosa: measure kernel headers
...
This makes version bumps robust and much less tedious.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 15:19:57 +09:00
6643cfbeee
internal/pkg: optionally measure exec artifact
...
Useful for verifying deterministic output without enabling network access.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 15:11:17 +09:00
dcde38f2e9
internal/rosa/llvm: set exclusive bit
...
This was missed when improving bootstrap.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 15:08:09 +09:00
deebbf6b1a
internal/rosa/git: disable more flaky tests
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 04:13:02 +09:00
0c557798bc
internal/rosa/curl: 8.19.0 to 8.20.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 04:12:40 +09:00
327e6ed5a2
internal/rosa/kernel: 6.12.84 to 6.12.87
...
This change also pins header version constants to the same values, to be updated manually on a real API change. This eliminates rebuilds on bumping kernel version.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 04:05:30 +09:00
76c7a423a9
internal/rosa/git: disable more flaky tests
...
Again, causing too many spurious failures.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 03:18:12 +09:00
6e113b8836
internal/pkg: content-based dependency substitution
...
This change introduces a new fast path for FloodArtifact. It is taken when a curing artifact has identical-by-content controlled relevant inputs and are otherwise identical to an already-cured artifact.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-12 00:19:42 +09:00
ce9f4b5f71
internal/rosa: vim artifact
...
Very useful for troubleshooting.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-10 21:45:56 +09:00
8f727273ef
internal/pkg: add riscv64 sums
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-10 17:12:30 +09:00
d0a63b942e
internal/pkg: add arm64 sums
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-10 16:42:42 +09:00
7f2126df32
internal/rosa/hakurei: 0.4.1 to 0.4.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-10 16:30:12 +09:00
0cf0e18e35
release: 0.4.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-10 16:16:59 +09:00
ee5c0dd135
cmd/dist: optionally skip tests
...
Works around incomplete syscall translation by qemu.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-10 04:15:07 +09:00
92c48d82e2
internal/rosa/go: respect check flag
...
These tests are also quite expensive, so optionally skip them.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-10 04:01:06 +09:00
c79a4fe7f8
internal/rosa/stage0: add riscv64 tarball
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-09 10:51:19 +09:00
0aeb2bccfb
internal/rosa: libconfig artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-09 00:33:27 +09:00
50e079b99f
internal/rosa: xcb-util-keysyms artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-09 00:16:06 +09:00
fb2cb5005a
internal/rosa: libdisplay-info artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-09 00:07:43 +09:00
6e73c28a92
internal/rosa: hwdata artifact
...
Required by libdisplay-info.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-09 00:05:40 +09:00
2c08aa3674
internal/rosa/glslang: disable broken arm64 tests
...
These just fail on arm64, so disable them.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-08 23:56:19 +09:00
1af73ae7b4
internal/rosa/go: 1.26.2 to 1.26.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-08 23:25:57 +09:00
c9aa5e04b1
internal/rosa/go: bootstrap 1.25.9 to 1.25.10
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-08 23:20:39 +09:00
70a38bd3b0
internal/rosa: libarchive artifact
...
Required by mesa, also a cleaner implementation than GNU.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-08 23:16:33 +09:00
533b15da89
internal/rosa/mksh: respect check flag
...
This skips the test suite when OptSkipCheck is set.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-08 21:20:20 +09:00
a890e1d0e5
cmd/mbf: optionally override non-native flags
...
This is a clean workaround for configuration differences to save time during development.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-08 13:45:36 +09:00
e3520835bb
cmd/mbf: optionally register all targets
...
This enables non-native cures from the daemon.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-08 13:29:58 +09:00
0e56847754
cmd/mbf: add arm64 magic
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-08 00:23:09 +09:00
145d03b366
cmd/mbf: optional emulated target architecture
...
This enables transparent cross-compilation without breaking purity.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-07 20:29:31 +09:00
2886228d40
internal/rosa/qemu: build static binaries
...
Dynamic linking here barely saves space, and this is required for binfmt.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-07 20:25:13 +09:00
e1e499b79e
internal/rosa/git: disable more broken tests
...
These are causing many spurious failures.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-07 20:06:11 +09:00
65b7dd8b37
internal/rosa: configurable architecture
...
This enables curing via binfmt.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-07 20:01:44 +09:00
8d72b9e5bd
internal/pkg: optionally register binfmt
...
This transparently supports curing foreign exec artifacts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-07 19:43:06 +09:00
8a3c3d145a
internal/pkg: correctly generate cure expects
...
This needs to dereference the identifier symlink.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-07 15:57:45 +09:00
575ef307ad
container: binfmt registration
...
This arranges for binfmt entries to be registered for the container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-07 15:55:19 +09:00
d4144fcf7f
container: optionally map uid/gid 0 as init
...
Unfortunately required to work around flawed APIs like binfmt_misc.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-07 15:15:47 +09:00
bad66facbc
container: improve capability handling
...
This cleans up preserving caps for expansion and correctly sets privileged caps.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-07 14:27:28 +09:00
4aba014eac
container: abandon response on termination
...
This prevents blocking on early failure.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-07 00:58:02 +09:00
779ba994ce
container: check capability in test helper
...
This makes corresponding nixos tests redundant.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-06 21:05:54 +09:00
917be2de93
internal/pkg/exec: close early failure before wait
...
This avoids a deadlock on an early container failure.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-06 18:38:16 +09:00
9aad98d409
internal/rosa: suppress init verbosity in tests
...
This is generally the preferred option.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-06 06:54:20 +09:00
b0d06b67dc
internal/pkg: centralise exec testdata checksums
...
This significantly reduces maintenance burden.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-06 06:37:58 +09:00
089100f29d
internal/rosa/stage0: add arm64 tarball
...
This was bootstrapped from the old tarball, but with the new patchset.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-06 05:47:14 +09:00
dfd26abf6c
internal/pkg: improve output measuring
...
This significantly improves readability and maintainability.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-06 05:44:04 +09:00
617ee21647
container/init: mount intermediate before early
...
This is usable as scratch space during early.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-06 00:55:45 +09:00
15cdb37ec2
cmd/mbf: optional init verbosity
...
This output is generally not needed and only useful when debugging container machinery itself.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 23:56:16 +09:00
1f0bdc7aca
internal/rosa/meson: disable fallback
...
For some reason nodownload still allows fallback in some cases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 21:32:19 +09:00
e3ffe85670
internal/rosa/python: pycparser artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 20:37:09 +09:00
f4403ba5cd
internal/rosa: libpng artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 20:23:50 +09:00
5a26895a22
internal/pkg: optionally suppress init verbosity
...
This flag applies to every exec artifact cured by the cache. It has no effect on cure outcome.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 20:03:06 +09:00
09d9f766a9
container: optionally suppress init verbosity
...
This change also removes verbose output no longer considered useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 19:59:44 +09:00
6558169666
internal/rosa/x: libXrandr artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 19:39:19 +09:00
cccf970c57
internal/rosa/x: libXrender artifact
...
Required by libXrandr.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 19:37:11 +09:00
57ffb21690
internal/rosa/x: libXxf86vm artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 19:27:59 +09:00
9c560b455a
internal/rosa/stage0: replace amd64 tarball
...
This toolchain is built with the new patchset.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 04:39:53 +09:00
4c7c0fbfc6
internal/rosa/llvm: update configuration for early runtimes
...
These were never updated when the bootstrap was moved to stage0-only.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 04:38:17 +09:00
18b3b7904e
internal/rosa/llvm: exclude benchmarks
...
These are being built despite LLVM_BUILD_BENCHMARKS defaulting to off.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 03:11:26 +09:00
fefefdf734
internal/rosa/llvm: insert Rosa OS paths via musl ldso
...
This is cleaner than unconditionally adding rpath, and avoids breaking rpath priority.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-05 02:44:26 +09:00
b84bb09a80
internal/rosa/hakurei: 0.4.0 to 0.4.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-04 05:28:14 +09:00
337bf20f50
release: 0.4.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-04 05:04:00 +09:00
1cb792cf6e
cmd/dist: increase gzip level
...
Performance does not matter in this case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-04 04:04:18 +09:00
b2b40b07e8
cmd/dist: optional verbosity
...
This makes output less noisy. The build is fast enough not to require progress indication.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-04 04:02:02 +09:00
da11b26ec1
container/initoverlay: configure via fsconfig
...
This works around the page size limit at the cost of negligible performance regressions.
Closes #34 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-04 02:29:56 +09:00
024489e800
ext: wrap file-descriptor-based mount facilities
...
This only implements what is required by package container for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-04 01:54:35 +09:00
0f795712b0
internal/rosa/llvm: enable LLVM_BUILD_TESTS
...
This arranges for tests to be built early, and is more efficient towards the end of the build.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-03 20:05:30 +09:00
7e2210ff71
internal/rosa/llvm: provide runtimes early in stage0
...
The LLVM build system fails to handle a dynamically linked toolchain correctly, and leaks the system installation during builds.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-03 19:48:49 +09:00
a71a008f3c
cmd/mbf: optionally build on early stages
...
This makes debugging the bootstrap process much less cumbersome.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-03 18:46:47 +09:00
162265b47e
container: reject strings larger than a page
...
The vfs stores these values in a page obtained via GFP, and silently stops copying once the page is filled. This check prevents confusing behaviour in such cases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-03 17:30:25 +09:00
3fa7ac04e4
internal/rosa/x: combine with xcb
...
Separating them no longer makes sense.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-03 04:38:00 +09:00
bf2867d653
internal/rosa/x: libxshmfence artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-03 04:35:39 +09:00
ec0f0f6507
internal/rosa/x: libXext artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-03 04:23:20 +09:00
a77a802955
internal/rosa/x: xlib artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-03 04:15:21 +09:00
4407e14dfc
internal/rosa/x: migrate to xorgproto
...
This is much cleaner than the many protocol packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-03 04:09:36 +09:00
e024d3184a
internal/rosa/clang: install cpp symlink
...
Required by some buggy autotools scripts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-03 00:41:23 +09:00
8e1bf00c2d
internal/rosa/stage0: add arm64 tarball
...
This replaces the previous, much larger stage0 distribution.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 23:53:08 +09:00
b111e22050
internal/rosa/x: libxtrans artifact
...
Required by many X libraries.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 23:42:00 +09:00
1fa458c0be
internal/rosa/glslang: SPIRV-LLVM-Translator artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 22:47:51 +09:00
2c7ae67a67
internal/rosa/llvm: LIT args helper
...
This is useful for other projects using LIT.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 22:17:57 +09:00
3826621b21
internal/rosa/python: lit artifact
...
Used by LLVM-related projects.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 22:15:37 +09:00
041b505c2e
internal/rosa/cmake: implicit CMAKE_BUILD_TYPE
...
Lack of this behaviour is a holdover from when the helper was first split from the (now removed) LLVM helper.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 21:53:38 +09:00
e6debce649
internal/rosa/llvm: make source independently available
...
This is unfortunately still required, due to the monorepo nature of LLVM.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 21:47:01 +09:00
aa26b86fce
internal/rosa/llvm: skip multiple-compile-threads-basic on arm64
...
This intermittently crashes.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 12:39:46 +09:00
a57a8fd5d8
internal/rosa/llvm: skip unwind_leaffunction on arm64
...
This unexpectedly passes.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 05:53:00 +09:00
1d5d063d6a
cmd/mbf: package status dashboard
...
This displays package metadata with optional status from a report.
2026-05-02 05:05:56 +09:00
e61628a34e
cmd/mbf: test cure all via daemon
...
This is the daemon equivalent of CureAll in internal/rosa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 02:39:12 +09:00
5a18f14929
internal/rosa/gnu: bison disable broken test
...
This is miscompiled by the current toolchain.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 02:23:51 +09:00
f12880688d
internal/rosa/gnu: test skip helper
...
The terribleness of GNU invites interesting helpers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 05:19:54 +09:00
bb5bbfe16a
internal/rosa/go: disable tsan test
...
The newly enabled tsan does not play well with go126, so disable for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-02 00:12:41 +09:00
427e1ca37c
internal/rosa/go: bootstrap 1.25.7 to 1.25.9
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-01 23:24:07 +09:00
96fdd9ecc5
internal/rosa: disable LTO in tests
...
This is too expensive and not feasible for development.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-01 20:08:26 +09:00
02771b655b
internal/rosa/stage0: replace amd64 tarball
...
This is a non-LTO distribution with the new layer configuration.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-01 18:57:28 +09:00
d1c8d2c39b
internal/rosa/gnu: skip libtool tests in stage0
...
This upsets the linker in stage0.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-01 05:26:40 +09:00
0efd742e8a
internal/rosa/llvm: enable libclc as a runtime
...
Enabling this as a project is deprecated.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-01 05:17:02 +09:00
ae1fe638d5
internal/rosa/stage0: remove unused layers
...
The stage0 toolchain no longer requires bundled dependencies other than the bare toolchain and environment itself.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-01 03:52:41 +09:00
445d95023b
internal/rosa: global preset flags
...
These changes preset behaviour globally. Useful for ad hoc workarounds for development or bootstrapping on resource-constrained systems.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-01 03:42:48 +09:00
fc66f0bb47
internal/rosa/llvm: use llvm build system
...
This removes the multistep bootstrap hack. Stage0 exceptions are also eliminated for a later change to bring the stage0 distribution down to just a bare toolchain, toybox and shell. This change also enables dynamic linking and ThinLTO.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-01 03:36:58 +09:00
2cd6b35bee
internal/rosa/cmake: run tests
...
This uses the standard CMake test target.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-05-01 03:04:59 +09:00
09a216c6ec
internal/rosa/perl: make /system/bin writable
...
This enables cure in stage0 where /system/bin is read-only.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-30 19:25:46 +09:00
44d17325c2
internal/rosa: raise stage0 extra layers
...
This enables extras to override stage0 tarball.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-30 18:58:42 +09:00
544ce77cbc
internal/rosa/make: do not attempt check
...
This is circular during bootstrap, and tests are silently skipped without perl, so disable them explicitly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-30 17:36:46 +09:00
63c3c30b23
internal/rosa/zlib: compile with -fPIC
...
For static linking into shared libraries. This was missed when migrating to CMake.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-30 15:55:46 +09:00
d23c4ecc7c
internal/rosa/llvm: use correct triple for rpath
...
MultiarchTriple produces a generic glibc triple string.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-30 00:39:13 +09:00
a46656dff8
internal/rosa/python: mako 1.3.11 to 1.3.12
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-29 14:25:26 +09:00
77db153ff5
internal/rosa/python: trove-classifiers 2026.1.14.14 to 2026.4.28.13
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-29 14:25:07 +09:00
520d95bc07
internal/rosa/libxslt: fetch source tarball
...
This does not have submodules, so the overhead of git is unnecessary.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 18:31:44 +09:00
451df3f4e7
internal/rosa/libxml2: fetch source tarball
...
This does not have submodules, so the overhead of git is unnecessary.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 18:31:28 +09:00
011fac15ed
internal/rosa/git: 2.53.0 to 2.54.0
...
This release broke httpd detection and job control on mksh.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 18:23:20 +09:00
347682ad0b
internal/rosa/kernel: 6.12.83 to 6.12.84
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 17:44:20 +09:00
1a2b979add
internal/rosa/rsync: 3.4.1 to 3.4.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 16:37:47 +09:00
b1c90cc380
internal/rosa/libexpat: 2.7.5 to 2.8.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 16:37:16 +09:00
3a66b8143a
internal/rosa/nss: 3.123 to 3.123.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 16:15:14 +09:00
64bbd3aabd
internal/rosa/mesa: libdrm 2.4.131 to 2.4.133
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 16:03:49 +09:00
08799a13d0
internal/rosa/glslang: spirv-tools check stable versions
...
This hides release candidates.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 16:03:29 +09:00
1aef9c3bbb
internal/rosa/python: pathspec 1.0.4 to 1.1.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 16:02:19 +09:00
1f38303747
internal/rosa/python: packaging 26.1 to 26.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 16:01:56 +09:00
640777b00c
internal/rosa/gnu: parallel 20260322 to 20260422
...
This pulls in bash with nonstandard hardcoded path.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 15:58:59 +09:00
1d657193cf
internal/rosa/kernel: disable md
...
This is entirely unused and is a somewhat large attack surface, so disable it.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 15:48:20 +09:00
bab5406295
internal/rosa/go: require popcnt for x86
...
This backports https://go.dev/cl/746640 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-28 14:36:59 +09:00
725ae7d64d
nix: remove all explicit timeouts
...
These were useful during development because timing out is often the only indication of failure due to the terrible design of nixos vm test harness. This has become a nuisance however especially when the system is under load, so remove explicit values and fall back to the ludicrously high default.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 13:07:22 +09:00
37a0c3967e
internal/rosa/gnu: mpc fetch source tarball
...
This does not have submodules, so the overhead of git is unnecessary.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 12:57:11 +09:00
ea0692548f
internal/rosa/gnu: coreutils 9.10 to 9.11
...
Test regression was fixed, dropping patch.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 12:30:46 +09:00
48ea23e648
internal/rosa/gnu: sed 4.9 to 4.10
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 12:30:06 +09:00
40320e4920
internal/rosa/meson: 1.11.0 to 1.11.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 12:29:17 +09:00
3ca0f61632
internal/rosa/llvm: 22.1.3 to 22.1.4
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 12:28:55 +09:00
6ffaac96e3
internal/rosa/cmake: 4.3.1 to 4.3.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 12:28:34 +09:00
13c7713d0c
internal/rosa/kernel: 6.12.82 to 6.12.83
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 12:28:14 +09:00
42389f7ec5
internal/rosa/qemu: 10.2.2 to 11.0.0
...
This pulls in some python packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 01:15:13 +09:00
30f130c691
internal/rosa/python: wheel artifact
...
No idea why this ended up as a package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 01:07:14 +09:00
ceb4d26087
internal/pkg: record cache variant on-disk
...
This makes custom artifacts much less error-prone to use.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-23 00:53:21 +09:00
852f3a9b3d
internal/rosa/kernel: 6.12.81 to 6.12.82
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-20 22:11:13 +09:00
5e02dbdb0d
internal/rosa/python: remove pypi helpers
...
Pypi is disallowed by policy so these helpers are no longer useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-20 02:37:10 +09:00
6a3248d472
internal/rosa/python: install pyyaml from source
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-20 02:35:30 +09:00
67404c98d9
internal/rosa/nss: install buildcatrust from source
...
Dependencies are now available, so this no longer has to rely on the release.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-20 02:09:24 +09:00
b9bf69cfce
internal/rosa/python: install mako from source
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-20 01:55:23 +09:00
4648f98272
internal/rosa/python: run tests via helper
...
Despite the lack of standards, pytest seems somewhat widely agreed upon.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-20 01:50:57 +09:00
11d99439ac
internal/rosa/python: install markupsafe from source
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-20 01:26:11 +09:00
39e4c5b8ac
internal/rosa/python: optionally install before check
...
Some test suites require package to be installed globally.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-20 01:25:43 +09:00
e8f6db38b6
internal/rosa/python: install pytest from source
...
Used by many python packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 23:17:38 +09:00
20d5b71575
internal/rosa/python: install iniconfig from source
...
This also required the setuptools-scm hack.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 22:53:32 +09:00
e903e7f542
internal/rosa/python: install pygments from source
...
This finally has its dependencies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 22:40:43 +09:00
1caa051f4d
internal/rosa/python: hatchling artifact
...
Required by many python packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 22:35:18 +09:00
dcdc6f7f6d
internal/rosa/python: trove-classifiers artifact
...
Required by hatchling.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 22:32:12 +09:00
5ad6f26b46
internal/rosa/python: install packaging from source
...
This is required by many packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 22:12:49 +09:00
7ba75a79f4
internal/rosa/python: install pluggy from source
...
This finally has all its dependencies at this point.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 21:55:55 +09:00
9ef84d3904
internal/rosa/python: setuptools-scm artifact
...
Awful hack required by many packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 21:38:44 +09:00
3b7b6e51fb
internal/rosa/python: pass build dependencies separately
...
This is cleaner with less duplicate code.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 20:26:41 +09:00
b1b4debb82
internal/rosa/python: pathspec artifact
...
Required by hatchling, which is required by many python packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 20:13:26 +09:00
021cbbc2a8
cmd/mbf: default daemon socket in cache
...
This location makes more sense than the current directory.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 19:50:54 +09:00
a4a54a4a4d
cmd/mbf: remove pointless recover
...
This used to scrub the cache, and was not fully removed when that became nonviable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 19:49:01 +09:00
04a344aac6
internal/rosa/python: flirt_core artifact
...
A build system required by a dependency of another build system, which is required by yet another build system.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 19:25:04 +09:00
6b98156a3d
internal/rosa/python: change insane strict_timestamps default
...
There is no scenario where this is useful, and it breaks builds.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 18:56:22 +09:00
753432cf09
cmd/mbf: optionally wait for cancel
...
Synchronisation is not needed here during interactive use.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 18:24:11 +09:00
f8902e3679
internal/rosa/python: append to source path
...
This gets around messy projects with multiple packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 17:51:00 +09:00
8ee53a5164
internal/rosa: use builtin for checksum warning
...
This avoids having to configure the logger early.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 17:50:12 +09:00
3981d44757
internal/rosa/python: migrate setuptools to wrapper
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 15:36:43 +09:00
9fd67e47b4
internal/rosa/python: wrap python package
...
Metadata for this is somewhat boilerplate-heavy, so wrap it to create metadata in one call.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 15:22:18 +09:00
4dcec40156
cmd/mbf: close on cancel completion
...
Like the previous change, this enables synchronisation on the client side via epoll.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 15:03:52 +09:00
9a274c78a3
cmd/mbf: close on abort completion
...
This enables synchronisation on the client side via epoll.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 14:53:28 +09:00
5647c3a91f
internal/rosa/meson: run meson test suite
...
Tests requiring internet access or unreasonable dependencies are removed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 01:07:20 +09:00
992139c75d
internal/rosa/python: extra script after install
...
This is generally for test suite, due to the lack of standard or widely agreed upon convention.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 00:35:24 +09:00
57c69b533e
internal/rosa/meson: migrate to helper
...
This also migrates to source from the Microsoft Github release.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 00:16:22 +09:00
6f0c2a80f2
internal/rosa/python: migrate setuptools to helper
...
This is much cleaner, and should be functionally equivalent.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 00:04:19 +09:00
08dfefb28d
internal/rosa/python: pip helper
...
Binary pip releases are not considered acceptable, this more generic helper is required for building from source.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-19 00:03:36 +09:00
b081629662
internal/rosa/libxml2: 2.15.2 to 2.15.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-18 09:05:49 +09:00
fba541f301
internal/rosa/nss: 3.122.1 to 3.123
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-18 09:05:23 +09:00
5f0da3d5c2
internal/rosa/gnu: mpc 1.4.0 to 1.4.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-18 09:04:33 +09:00
4d5841dd62
internal/rosa: elfutils 0.194 to 0.195
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-18 09:03:49 +09:00
9e752b588a
internal/pkg: drop cached error on cancel
...
This avoids disabling the artifact when using the individual cancel method. Unfortunately this makes the method blocking.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-18 03:24:48 +09:00
27b1aaae38
internal/pkg: pending error alongside done channel
...
This significantly simplifies synchronisation of access to identErr.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-18 03:10:37 +09:00
9e18de1dc2
internal/pkg: flush cached errors on abort
...
This avoids disabling the artifact until cache is reopened. The same has to be implemented for Cancel in a future change.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-18 02:59:44 +09:00
b80ea91a42
cmd/mbf: abort remote cures
...
This command arranges for all pending cures to be aborted. It does not wait for cures to complete.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 22:47:02 +09:00
30a9dfa4b8
internal/pkg: abort all pending cures
...
This cancels all current pending cures without closing the cache.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 22:40:35 +09:00
8d657b6fdf
cmd/mbf: cancel remote cure
...
This exposes the new fine-grained cancel API in cmd/mbf.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 22:00:04 +09:00
ae9b9adfd2
internal/rosa: retry in SIGSEGV test
...
Munmap is not always immediate.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 20:45:19 +09:00
dd6a480a21
cmd/mbf: handle flags in serve
...
This enables easier expansion of the protocol.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 20:14:09 +09:00
3942272c30
internal/pkg: fine-grained cancellation
...
This enables a specific artifact to be targeted for cancellation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 19:33:21 +09:00
9036986156
cmd/mbf: optionally ignore reply
...
An acknowledgement is not always required in this use case. This change also adds 64 bits of connection configuration for future expansion.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 16:46:49 +09:00
a394971dd7
cmd/mbf: do not abort cache acquisition during testing
...
This can sometimes fire during testing due to how short the test is.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 02:06:51 +09:00
9daba60809
cmd/mbf: daemon command
...
This services internal/pkg artifact IR with Rosa OS extensions originating from another process.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 02:05:59 +09:00
bcd79a22ff
cmd/mbf: do not open cache for IR encoding
...
This can now be allocated independently.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 01:04:39 +09:00
0ff7ab915b
internal/pkg: move IR primitives out of cache
...
These are memory management and caching primitives. Having them as part of Cache is cumbersome and requires a temporary directory that is never used. This change isolates them from Cache to enable independent use.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-17 01:02:13 +09:00
823575acac
cmd/mbf: move info command
...
This is cleaner with less shared state.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-16 17:43:52 +09:00
136bc0917b
cmd/mbf: optionally open cache
...
Some commands do not require the cache. This change also makes acquisition of locked cache cancelable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-16 15:59:34 +09:00
d6b082dd0b
internal/rosa/ninja: bootstrap with verbose output
...
This otherwise outputs nothing, and appears to hang until the (fully single-threaded) bootstrap completes.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 22:19:05 +09:00
89d6d9576b
internal/rosa/make: optionally format value as is
...
This enables correct formatting for awkward configure scripts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 22:17:58 +09:00
fafce04a5d
internal/rosa/kernel: firmware 20260309 to 20260410
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 22:16:47 +09:00
5d760a1db9
internal/rosa/kernel: 6.12.80 to 6.12.81
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 22:16:30 +09:00
d197e40b2a
internal/rosa/python: mako 1.3.10 to 1.3.11
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 22:21:54 +09:00
2008902247
internal/rosa/python: packaging 26.0 to 26.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 22:15:18 +09:00
30ac985fd2
internal/rosa/meson: 1.10.2 to 1.11.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 22:14:52 +09:00
e9fec368f8
internal/rosa/nss: 3.122 to 3.122.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 22:13:45 +09:00
46add42f58
internal/rosa/openssl: disable building docs
...
These take very long and are never used in the Rosa OS environment.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 22:13:18 +09:00
377b61e342
internal/rosa/openssl: do not double test job count
...
The test suite is racy, this reduces flakiness.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 22:12:36 +09:00
520c36db6d
internal/rosa: respect preferred job count
...
This discontinues use of nproc, and also overrides detection behaviour in ninja.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 18:49:36 +09:00
3352bb975b
internal/pkg: job count in container environment
...
This exposes preferred job count to the container initial process.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 15:49:21 +09:00
f7f48d57e9
internal/pkg: pass impure job count
...
This is cleaner than checking cpu count during cure, it is impossible to avoid impurity in both situations but this is configurable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-15 15:36:44 +09:00
5c2345128e
internal/rosa/llvm: autodetect stage0 target
...
This is fine, now that stages beyond stage0 have explicit target.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-14 03:10:26 +09:00
78f9676b1f
internal/rosa/llvm: centralise llvm source
...
This avoids having to sidestep the NewPackage name formatting machinery to take the cache fast path.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-14 03:03:06 +09:00
5b5b676132
internal/rosa/cmake: remove variant
...
This has no effect outside formatting of name and is a remnant of the old llvm helpers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-14 02:57:47 +09:00
78383fb6e8
internal/rosa/llvm: migrate libclc
...
This eliminates newLLVMVariant.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-14 02:40:13 +09:00
e97f6a393f
internal/rosa/llvm: migrate runtimes and clang
...
This eliminates most newLLVM family of functions.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-14 02:07:13 +09:00
eeffefd22b
internal/rosa/llvm: migrate compiler-rt helper
...
This also removes unused dependencies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-14 01:12:56 +09:00
ac825640ab
internal/rosa/llvm: migrate musl
...
This removes the pointless special treatment given to musl.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-14 00:35:42 +09:00
a7f7ce1795
internal/rosa/llvm: migrate compiler-rt
...
The newLLVM family of functions predate the package system. This change migrates compiler-rt without changing any resulting artifacts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-14 00:19:33 +09:00
38c639e35c
internal/rosa/llvm: remove project/runtime helper
...
More remnants from early days, these are not reusable at all but that was not known at the time.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-14 00:03:23 +09:00
b2cb13e94c
internal/rosa/llvm: centralise patches
...
This enables easier reuse of the patchset.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 23:52:44 +09:00
46f98d12d6
internal/rosa/llvm: remove conditional flags in helper
...
The llvm helper is a remnant from very early days, and ended up not being very useful, but was never removed. This change begins its removal, without changing the resulting artifacts for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 23:38:11 +09:00
503c7f953c
internal/rosa/x: libpciaccess artifact
...
Required by userspace gpu drivers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 19:04:38 +09:00
15c9f6545d
internal/rosa/perl: populate anitya identifiers
...
These are also tracked by Anitya.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 18:44:43 +09:00
83b0e32c55
internal/rosa: helpers for common url formats
...
This cleans up call site of NewPackage.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 18:02:57 +09:00
eeaf26e7a2
internal/rosa: wrapper around git helper
...
This results in much cleaner call site for the majority of use cases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 15:20:51 +09:00
b587caf2e8
internal/rosa: assume file source is xz-compressed
...
XZ happens to be the only widely-used format that is awful to deal with, everything else is natively supported.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 15:07:30 +09:00
f1c2ca4928
internal/rosa/mesa: libdrm artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 03:27:09 +09:00
0ca301219f
internal/rosa/python: pyyaml artifact
...
Mesa unfortunately requires this horrible format.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 03:18:47 +09:00
e2199e1276
internal/rosa/python: mako artifact
...
This unfortunately pulls in platform-specific package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 03:11:38 +09:00
86eacb3208
cmd/mbf: checksum command
...
This computes and encodes sha384 checksum of data streamed from standard input.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 03:09:21 +09:00
8541bdd858
internal/rosa: wrap per-arch values
...
This is cleaner syntax in some specific cases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 02:59:55 +09:00
46be0b0dc8
internal/rosa/nss: buildcatrust 0.4.0 to 0.5.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 02:18:21 +09:00
cbe37e87e7
internal/rosa/python: pytest 9.0.2 to 9.0.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 02:18:02 +09:00
66d741fb07
internal/rosa/python: pygments 2.19.2 to 2.20.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 02:13:04 +09:00
0d449011f6
internal/rosa/python: use predictable URLs
...
This is much cleaner and more maintainable than specifying URL prefix manually. This change also populates Anitya project identifiers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 02:08:22 +09:00
46428ed85d
internal/rosa/python: url pip wheel helper
...
This enables a cleaner higher-level helper.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-13 01:59:28 +09:00
081d6b463c
internal/rosa/llvm: libclc artifact
...
This is built independently of llvm build system to avoid having to build llvm again.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-12 22:57:04 +09:00
11b3171180
internal/rosa/glslang: glslang artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-12 22:34:17 +09:00
adbb84c3dd
internal/rosa/glslang: spirv-tools artifact
...
Required by glslang.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-12 22:27:49 +09:00
1084e31d95
internal/rosa/glslang: spirv-headers artifact
...
Required by spirv-tools.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-12 22:16:29 +09:00
27a1b8fe0a
internal/rosa/mesa: libglvnd artifact
...
Required by mesa.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-12 21:27:30 +09:00
b2141a41d7
internal/rosa/dbus: xdg-dbus-proxy artifact
...
This is currently a hakurei runtime dependency, but will eventually be removed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-12 19:41:49 +09:00
c0dff5bc87
internal/rosa/gnu: gcc set with-multilib-list as needed
...
This breaks riscv64.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-12 18:03:45 +09:00
04513c0510
internal/rosa/gnu: gmp explicit CC
...
The configure script is hard coded to use gcc without fallback on riscv64.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-12 17:25:15 +09:00
28ebf973d6
nix: add sharefs supplementary group
...
This works around vfs inode file attribute race.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-11 23:28:18 +09:00
41aeb404ec
internal/rosa/hakurei: 0.3.7 to 0.4.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-11 10:53:29 +09:00
0b1009786f
release: 0.4.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-11 10:49:43 +09:00
b390640376
internal/landlock: relocate from package container
...
This is not possible to use directly, so remove it from the public API.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 23:56:45 +09:00
ad2c9f36cd
container: unexport PR_SET_NO_NEW_PRIVS wrapper
...
This is subtle to use correctly. It also does not make sense as part of the container API.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 23:45:51 +09:00
67db3fbb8d
check: use encoding interfaces
...
This turned out not to require specific treatment, so the shared interfaces are cleaner.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 22:11:53 +09:00
560cb626a1
hst: remove enablement json adapter
...
The go116 behaviour of built-in new function makes this cleaner.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 20:47:30 +09:00
c33a6a5b7e
hst: optionally reject insecure options
...
This prevents inadvertent use of insecure compatibility features.
Closes #30 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 19:34:02 +09:00
952082bd9b
internal/rosa/python: 3.14.3 to 3.14.4
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 02:38:22 +09:00
24a9b24823
internal/rosa/openssl: 3.6.1 to 3.6.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 02:38:02 +09:00
c2e61e7987
internal/rosa/libcap: 2.77 to 2.78
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 02:37:04 +09:00
86787b3bc5
internal/rosa/tamago: 1.26.1 to 1.26.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 02:31:57 +09:00
cdfcfe6ce0
internal/rosa/go: 1.26.1 to 1.26.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 02:18:27 +09:00
68a2f0c240
internal/rosa/llvm: remove unused field
...
This change also renames confusingly named flags field and corrects its doc comment.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 02:13:26 +09:00
7319c7adf9
internal/rosa/llvm: use latest version on arm64
...
This also removes arch-specific patches because they were not useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 01:07:25 +09:00
e9c890cbb2
internal/rosa/llvm: enable cross compilation
...
This now passes the test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 00:59:14 +09:00
6f924336fc
internal/rosa/llvm: increase stack size
...
Some aarch64 regression tests fail intermittently on the default size.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-10 00:56:51 +09:00
bd88f10524
internal/rosa/llvm: 22.1.2 to 22.1.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-09 17:36:23 +09:00
e34e3b917e
internal/kobject: process uevent message
...
This deals with environment variables generally present in every message.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-08 18:00:04 +09:00
b0ba165107
cmd/sharefs: group-accessible permission bits
...
This works around the race in vfs via supplementary group.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-08 16:14:47 +09:00
351d6c5a35
cmd/sharefs: reproduce vfs inode file attribute race
...
This happens in the vfs permissions check only and stale data appears to never reach userspace.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-08 15:51:36 +09:00
f23f73701c
cmd/mbf: optional host abstract
...
This works around kernels with Landlock LSM disabled. Does not affect cure outcome.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 18:15:49 +09:00
876917229a
internal/rosa/go: enable riscv64 bootstrap path
...
This is quite expensive, but no other option, unfortunately.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 18:11:42 +09:00
0558032c2d
container: do not set static deadline
...
This usually ends up in the buffer, or completes well before the deadline, however this can still timeout on a very slow system.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 17:00:20 +09:00
c61cdc505f
internal/params: relocate from package container
...
This does not make sense as part of the public API, so make it internal.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 16:37:44 +09:00
062edb3487
container: remove setup pipe helper
...
The API forces use of finalizer to close the read end of the setup pipe, which is no longer considered acceptable. Exporting this as part of package container also imposes unnecessary maintenance burden.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 16:05:33 +09:00
e4355279a1
all: optionally forbid degrading in tests
...
This enables transparently degradable tests to be forced on in environments known to support them.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 15:22:52 +09:00
289fdebead
container: transparently degrade landlock in tests
...
Explicitly requiring landlock in tests will be supported in a future change.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 15:03:48 +09:00
9c9e190db9
ldd: remove timeout
...
The program generally never blocks, and it is more flexible to leave it up to the caller to set a timeout.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 14:49:20 +09:00
d7d42c69a1
internal/pkg: transparently degrade landlock in tests
...
This does not test package container, so should transparently cope with Landlock LSM being unavailable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 14:44:34 +09:00
c758e762bd
container: skip landlock on hostnet
...
This overlaps with net namespace, so can be skipped without degrading security.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 14:36:44 +09:00
10f8b1c221
internal/pkg: optional landlock LSM
...
The alpine linux riscv64 kernel does not enable Landlock LSM, and kernel compilation is not yet feasible.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-07 12:44:07 +09:00
6907700d67
cmd/dist: set hsu tar header mode bits
...
This has no effect, but is nice to have.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-06 23:37:38 +09:00
0243f3ffbd
internal/rosa/stage0: add riscv64 tarball
...
This had not yet passed all test suites because emulator is prohibitively slow.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-06 13:57:43 +09:00
cd0beeaf8e
internal/uevent: optionally pass UUID during coldboot
...
This enables rejection of non-coldboot synthetic events.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-06 12:42:47 +09:00
a69273ab2a
cmd/dist: replace dist/release.sh
...
This is much more robust than a shell script.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 23:58:08 +09:00
4cd0f57e48
dist: remove redundant cleanup
...
This breaks on shells that do not evaluate pathnames.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 16:16:37 +09:00
33a0e6c01b
hst: conditionally skip root remount
...
This enables the writable root overlay use case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 14:04:21 +09:00
d58f5c7590
dist: destroy workdir on exist
...
This no longer relies on the hermetic build system to clean up.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 13:32:16 +09:00
1da992e342
dist: prefix from environment
...
These are baked in, so make them configurable for the build.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 13:11:44 +09:00
9641805ec2
container/init: ignore finished process
...
This is not considered an error, if the process finishes while the signal is being delivered.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 00:38:33 +09:00
0738f4889a
internal/rosa/gnu: fetch mpc source via git
...
Eliminates the xz dependency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 00:35:15 +09:00
7de3cfe221
internal/rosa/netfilter: fetch iptables source via git
...
Eliminates the xz dependency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 00:19:40 +09:00
8b0648dd5d
internal/rosa/netfilter: fetch libnftnl source via git
...
Eliminates the xz dependency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 00:14:45 +09:00
4667fac76c
internal/rosa/libbsd: fetch source via git
...
Eliminates the xz dependency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 00:05:56 +09:00
52e5443b0e
internal/rosa/libbsd: fetch libmd source via git
...
Eliminates the xz dependency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-05 00:02:56 +09:00
130e470b60
internal/rosa/libxslt: fetch source via git
...
Eliminates the xz dependency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-04 23:05:10 +09:00
ba5ee8e3ee
internal/rosa/libxml2: fetch source via git
...
Eliminates the xz dependency. This also switches to meson to avoid pulling in autotools.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-04 22:58:29 +09:00
d1cef30877
internal/rosa/gtk: fetch glib source via git
...
This eliminates xz dependency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-04 22:47:10 +09:00
0188a3f0c7
internal/rosa/gnu: gnutls disable arm64 hardware acceleration
...
Hardware on arm64 is quite messy, this miscompiles.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-04 23:37:18 +09:00
04fe3b24ce
internal/rosa/gnu: gnutls configure trust store
...
The test suite is somehow happy on amd64 but fails on arm64.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-04 22:33:51 +09:00
93ad551054
internal/rosa/git: shallow clone
...
The .git directory is destroyed anyway, so no point fetching more than the bare minimum.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-04 20:14:40 +09:00
3d54d1f176
internal/rosa: drop caches
...
This enables accurate benchmarking of the toolchain abstraction.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 20:58:23 +09:00
9feac7738f
internal/pkg: optionally suppress via assumed checksum
...
This is quite error-prone and causes cache inconsistency similar to the store inconsistency seen on nix when a similar condition happens. Keep this behind a flag in case it is ever beneficial.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 20:33:59 +09:00
591a60bac9
internal/pkg: per-cache SCHED_IDLE
...
This is cleaner than setting it globally, and is impossible to race.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 16:49:34 +09:00
5093a06026
internal/pkg: cache flags
...
This is cleaner for extending the API.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 16:16:55 +09:00
50c1d7f880
internal/rosa/kernel: 6.12.78 to 6.12.80
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 16:14:16 +09:00
9e63633fbc
container: remove test timeouts
...
These timeouts are no longer useful, and causes spurious test failures under load.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 10:51:37 +09:00
61f981a34a
internal/rosa/perl: 5.42.1 to 5.42.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 10:45:25 +09:00
d717c41bbe
internal/rosa/cmake: 4.3.0 to 4.3.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 10:45:07 +09:00
b896eec9b7
internal/rosa/gnu: parallel 20260222 to 20260322
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 10:44:48 +09:00
8ab99e5e40
internal/rosa/util-linux: 2.41.3 to 2.42
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 10:44:25 +09:00
2b6160ef7d
internal/rosa/wayland: wayland-protocols 1.47 to 1.48
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 10:44:04 +09:00
4dcac7f133
internal/rosa/xz: 5.8.2 to 5.8.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 10:43:37 +09:00
966fd4df9e
internal/rosa: connman artifact
...
Will be gradually replaced with a native implementation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 01:17:10 +09:00
a2cf59b989
internal/rosa/ncurses: also build dynamic library
...
GNU readline breaks without this.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 01:13:04 +09:00
e87f59c4e4
internal/rosa/gnu: readline artifact
...
Nice to have library for command line programs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 00:42:59 +09:00
3b221c3e77
internal/rosa/gnu: gnutls artifact
...
Incredibly ugly and expensive package, but unfortunately required by some packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 00:36:28 +09:00
ff3b385b12
internal/rosa: libunistring artifact
...
Required by GnuTLS.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-03 00:00:13 +09:00
c6920e6ab7
cmd/mbf: pick up $TERM
...
This improves behaviour of some programs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-02 23:59:15 +09:00
59b25d45fe
internal/pkg: pick up $TERM if attaching stdin
...
This improves behaviour of some programs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-02 23:50:07 +09:00
9b99650eb1
internal/rosa: libev artifact
...
Required by gnutls.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-02 23:35:01 +09:00
15bff9e1a6
internal/rosa/git: determine reporting name from url
...
This is generally correct, and is a lot cleaner to call.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-02 22:42:16 +09:00
b948525c07
internal/rosa: nettle3 artifact
...
Removed after all packages upgrade for nettle 4.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-02 22:12:39 +09:00
9acbd16e9a
internal/rosa/p11: explicitly enable libffi
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-02 22:05:07 +09:00
64e5a1068b
internal/rosa: libtasn1 artifact
...
Optional dependency of p11-kit.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-01 17:20:12 +09:00
b6cbd49d8c
internal/rosa: p11-kit artifact
...
Another package distributed in xz only. This is fetched from the git remote directly to avoid XZ Utils.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-01 16:34:30 +09:00
6913b9224a
internal/rosa/git: recursively clone submodules
...
There is generally no reason to disable this, so it was not made optional.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-01 16:21:46 +09:00
9584958ecc
internal/rosa/pkg-config: generate build system
...
This unfortunately pulls automake, libtool and their dependencies into stage2.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-04-01 15:31:24 +09:00
389844b1ea
internal/rosa/gnu: mpc 1.3.1 to 1.4.0
...
This package now unfortunately switched to xz as well.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-31 23:56:20 +09:00
5b7ab35633
internal/rosa: iptables artifact
...
This also pulls in netlink libraries from netfilter project.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-31 23:47:16 +09:00
52b1a5a725
internal/rosa: use type P in helper interface
...
This is easier to type and serialises correctly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-31 23:45:01 +09:00
6b78df8714
internal/rosa: libmd and libbsd artifacts
...
These provide headers that are provided by glibc but not musl.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-31 22:57:08 +09:00
dadf170a46
internal/rosa: dbus artifact
...
Unfortunate ugly indirect dependency we cannot yet get rid of.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-31 21:47:05 +09:00
9594832302
internal/rosa/meson: disallow download
...
This will fail and waste time on KindExec, and cause nondeterminism in KindExecNet.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-31 21:38:09 +09:00
91a2d4d6e1
internal/uevent: integrate error handling in event loop
...
There are many subtleties when recovering from errors in the event loop, and coldboot requires internals to drain the receive buffer as synthetic uevents are being arranged.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-31 00:10:14 +09:00
a854719b9f
internal/netlink: optional recvmsg without netpoll
...
For draining the socket receive buffer.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-30 23:18:43 +09:00
f03c0fb249
internal/uevent: synthetic events for coldboot
...
This causes the kernel to regenerate events that happened before earlyinit started.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-30 23:01:08 +09:00
a6600be34a
all: use filepath
...
This makes package check portable, and removes nonportable behaviour from package pkg, pipewire, and system. All other packages remain nonportable due to their nature. No latency increase was observed due to this change on amd64 and arm64 linux.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-30 18:24:53 +09:00
b5592633f5
internal/uevent: separate recvmsg helper
...
This enables messages to be received separately.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-30 02:53:26 +09:00
584e302168
internal/netlink: set receive buffer size
...
This is done by both systemd sd-device and AOSP ueventd to improve robustness. Rosa OS will still handle ENOBUFS via coldboot but a big buffer should mitigate this as well.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-30 02:14:47 +09:00
141958656f
internal/uevent: handle state divergence
...
This requires the caller to arrange for a coldboot to happen, some time after this error is encountered, and to resume event processing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-30 01:50:09 +09:00
648079f42c
internal/netlink: switch to recvmsg/sendmsg
...
These are more flexible than recvfrom/sendto.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-29 23:36:00 +09:00
19c76e0831
cmd: document Rosa OS programs
...
The earlyinit and mbf program are not covered by the compatibility promise, so specify that here.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-28 22:43:25 +09:00
71fcc972ba
cmd/hsu: alternative hsurc path for Rosa OS
...
Rosa OS does not have /etc.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-28 18:22:55 +09:00
62002efd08
cmd/hsu: document hsurc format and internals
...
This was previously only documented via an unexported function.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-28 18:17:31 +09:00
e33294db9c
cmd/hakurei: document stable behaviour
...
These are undocumented anywhere else and is required by tools invoking hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-28 17:31:46 +09:00
b1ea3b4acf
cmd/hakurei: rename app to run
...
The run command was a legacy holdover from very early days and is only useful for testing and demonstration these days. This change also renames it to exec.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-28 16:48:26 +09:00
2c254c70b8
cmd/hakurei: remove linkname directive
...
This used to be a function that did much more, and was later relocated to another package and exported.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-28 16:20:02 +09:00
ea014d6af2
internal/uevent: consume kernel-originated events
...
These are not possible to cover outside integration vm. Extreme care is required when dealing with this method, so keep it simple.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-28 15:39:16 +09:00
1b48484c16
internal/uevent: exclusive socket access
...
This is a much simplified mutex, since blocking is not required.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-28 01:01:06 +09:00
713bff3eb0
internal/uevent: decode uevent messages
...
The wire format and behaviour is entirely undocumented. This is implemented by reading lib/kobject_uevent.c, with testdata collected from the internal/rosa kernel.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-28 00:49:34 +09:00
30f459e690
internal/uevent: nontrivial errors
...
These errors are best represented as JSON.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-28 00:07:56 +09:00
8766fddcb3
internal/uevent: recoverable errors
...
This runs in the Rosa OS init, so recover as much as possible, as otherwise it is likely to require a full system reboot to resume event processing. The caller is responsible for reporting the error.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-27 22:58:16 +09:00
2745602be3
internal/uevent: wrap netlink socket
...
Unfortunately these messages do not have the same format as rtnetlink.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-27 22:46:18 +09:00
ee22847dde
internal/uevent: kobject_action lookup
...
This is encoded as part of kobject uevent message headers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-27 22:39:43 +09:00
c61188649b
internal/netlink: export generic connection
...
This enables abstractions around some families to be implemented in a separate package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-27 19:08:48 +09:00
6a87a96838
internal/rosa/kernel: 6.12.77 to 6.12.78
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-27 10:40:27 +09:00
2548a681e9
internal/rosa: key-value type
...
This type is used very frequently. The new type is much easier to type and can receive helper methods eventually if needed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 16:23:15 +09:00
d514d0679f
internal/rosa: set PYTHONUNBUFFERED=1
...
Some python tools try to be clever and buffers output. This makes the build process appear to hang and is quite frustrating. Instead of trying to address this on a case-by-case basis, this is turned off globally for the interpreter.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 15:29:29 +09:00
4407892632
cmd/mbf: optionally enter cure container
...
This is very useful for troubleshooting failing tests and such. The ephemeral state is cleaned up by internal/pkg.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 15:10:11 +09:00
e661260607
internal/pkg: enter exec container
...
This enables much easier troubleshooting of failing cures.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 15:05:04 +09:00
044490e0a5
cmd/mbf: retain session by default
...
This almost never make sense to be turned off.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 14:59:17 +09:00
af038c89ff
internal/pkg: collection helper-artifact
...
This was moved from internal/rosa because it is considered generally useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 14:11:10 +09:00
d2f30173cd
internal/pkg: isolate container params
...
This enables exporting container params for interactive troubleshooting within the cure container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 14:02:58 +09:00
5319ea994c
internal/rosa/libseccomp: fix upstream out-of-bounds read
...
This was revealed by optimisation changes in the latest toolchain.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 10:43:11 +09:00
bbe178be3e
internal/rosa/llvm: 22.1.1 to 22.1.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 09:56:34 +09:00
ca28e9936b
internal/rosa/musl: 1.2.5 to 1.2.6
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 09:56:06 +09:00
f61c6ade56
internal/rosa/nss: 3.121 to 3.122
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 09:55:27 +09:00
fce3d63823
internal/rosa/gnu: autoconf 2.72 to 2.73
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-26 09:54:44 +09:00
722c3cc54f
internal/netlink: optional check header as reply
...
Not every received message is a reply.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-25 19:33:01 +09:00
372d509e5c
internal/netlink: expose multicast groups
...
This also gets rid of the cached pid value for port since that prevents multiple sockets from being open at once.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-25 17:55:35 +09:00
d62516ed1e
internal/netlink: enlarge recvfrom buffer
...
This also uses an array type for the buffer since its size now uses the hardcoded value found in the kernel.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-25 17:18:56 +09:00
d2b635eb55
cmd/mbf: correctly describe --with-toolchain
...
The behaviour of this was changed to include the stage2 toolchain instead, but the help text was never updated.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-25 15:41:28 +09:00
50403e9d60
internal/netlink: wrap netpoll via context
...
This removes netpoll boilerplate for the most common use case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-25 15:39:29 +09:00
b98c5f2e21
internal/netlink: nonblocking socket I/O
...
This enables use with blocking calls like when used with NETLINK_KOBJECT_UEVENT.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-25 14:06:59 +09:00
d972cffe5a
internal/netlink: make full response available
...
The previous API makes it impossible to retrieve remaining messages in the current iteration.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-23 16:39:25 +09:00
d8648304bb
internal/netlink: isolate receive method
...
This enables use with epoll for receiving events only.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-23 15:03:15 +09:00
f7bfa9a6c2
internal/rosa/go: disable go1.25.7 smtp test
...
This uses certs that had just expired.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-20 17:52:54 +09:00
7035b4b598
internal/rosa/cmake: 4.2.3 to 4.3.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-20 16:39:57 +09:00
094b8400dd
internal/rosa/qemu: 10.2.1 to 10.2.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-20 16:13:51 +09:00
4652d921d8
internal/rosa/wayland: 1.24.91 to 1.25.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-20 16:13:28 +09:00
066213c245
internal/rosa/libexpat: 2.7.4 to 2.7.5
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-20 16:00:50 +09:00
98832c21ee
internal/rosa/fuse: 3.18.1 to 3.18.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-20 15:57:49 +09:00
6cdb6a652b
internal/rosa/gtk: glib 2.87.5 to 2.88.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 20:58:39 +09:00
7c932cbceb
internal/rosa: strace artifact
...
This is not part of the system, but a useful development tool. The test suite is quite broken but that is considered acceptable for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 20:40:17 +09:00
20ebddd9bf
internal/rosa: export source kind
...
This is set for an exported field, so export the constants as well.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 20:09:44 +09:00
420c721c7d
all: raise timeout defaults
...
This avoids timing out on systems running very slowly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 17:04:06 +09:00
bac583f89e
internal/stub: move from container
...
This package solves a very specific stubbing use case, in a less than elegant manner.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 16:09:14 +09:00
722989c682
fhs: move from container
...
This package is not container-specific.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 15:56:36 +09:00
b852402f67
ext: move syscall wrappers from container
...
These are generally useful, and none of them are container-specific. Syscalls subtle to use and requiring container-specific setup remains in container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 15:48:40 +09:00
6d015a949e
check: move from container
...
This package is not container specific, and widely used across the project.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 15:39:03 +09:00
e9a72490db
vfs: move from container
...
This package is not container-specific.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 15:30:30 +09:00
0a12d456ce
container: set CLOEXEC via close_range
...
This is guarded behind the close_range build tag for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 14:19:00 +09:00
d1fc1a3db7
ext: wrap close_range syscall
...
This is useful for container when called with CLOSE_RANGE_CLOEXEC.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 14:15:16 +09:00
1c2d5f6b57
ext: integer limit values
...
For portably using C integers without cgo.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 14:09:38 +09:00
faea1f4bd6
all: remove deprecated packages
...
Closes #24 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 13:54:56 +09:00
0cb1007daa
ldd: remove deprecated API
...
Closes #25 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 13:53:14 +09:00
e292031624
ext: move lookup test
...
This was kept in-place to reduce patch size in the previous patch.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 13:44:59 +09:00
cd5959fe5a
ext: isolate from container/std
...
These are too general to belong in the container package. This targets the v0.4 release to reduce the wrapper maintenance burden.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-17 13:39:26 +09:00
08c35ca24f
container: use new netlink implementation
...
This is adapted from the container netlink implementation and is much more reusable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-16 23:33:52 +09:00
72bd3fb05e
internal/netlink: generalise implementation from container
...
This is useful for uevent implementation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-16 23:07:51 +09:00
59c66747df
internal/rosa/kernel: 6.12.76 to 6.12.77
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-16 15:21:33 +09:00
9e6fe8db4b
internal/rosa/meson: 1.10.1 to 1.10.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-16 13:41:06 +09:00
5168ee3e13
internal/rosa/python: remove pre_commit
...
This is unused and introduces many dependencies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-16 13:39:56 +09:00
c8313c2dc4
internal/rosa/tamago: disable cgo
...
This toolchain does not support cgo for the new target, anyway, and disabling it altogether avoids adding a dependency on arm64.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-16 13:22:10 +09:00
3fcdadb669
internal/rosa/curl: remove broken test
...
Upstream testdata is not broken on the arm64 builder, but breaks reproducibly on amd64.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-16 12:54:03 +09:00
3966bc5152
internal/rosa/hakurei: 0.3.6 to 0.3.7
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-15 21:43:55 +09:00
b208af8b85
release: 0.3.7
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-15 21:04:55 +09:00
8d650c0c8f
all: migrate to rosa/hakurei
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-15 20:12:51 +09:00
a720efc32d
internal/rosa/llvm: arch-specific versions
...
This enables temporarily avoiding a broken release on specific targets.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-15 15:06:36 +09:00
400540cd41
internal/rosa/llvm: arch-specific patches
...
Broken aarch64 tests in LLVM seem unlikely to be fixed soon.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-15 11:37:24 +09:00
1113efa5c2
internal/rosa/kernel: enable arm64 block drivers
...
These are added separately to the amd64 patch due to the arm64 toolchain not being available at that time.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-15 00:22:05 +09:00
8b875f865c
cmd/earlyinit: remount root and set firmware path
...
The default search paths cannot be configured, configuring them here is most sound for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-14 19:50:04 +09:00
8905d653ba
cmd/earlyinit: mount pseudo-filesystems
...
The proposal for merging both init programs was unanimously accepted, so this is set up here alongside devtmpfs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-14 19:43:42 +09:00
9c2fb6246f
internal/rosa/kernel: enable FW_LOADER
...
This wants to be loaded early, so having it as a dlkm is not helpful as it will always be loaded anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-14 19:32:14 +09:00
9c116acec6
internal/rosa/kernel: enable amd64 block drivers
...
These have to be built into initramfs, anyway, so build them into the kernel instead. The arm64 toolchain is not yet ready, so will be updated in a later patch.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-14 19:22:56 +09:00
988239a2bc
internal/rosa: basic system image
...
This is a simple image for debugging and is not yet set up for dm-verity.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-14 15:54:13 +09:00
bc03118142
cmd/earlyinit: handle args from cmdline
...
These are set by the bootloader.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-14 15:13:52 +09:00
74c213264a
internal/rosa/git: install libexec symlinks
...
This is less clumsy to represent.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 20:43:23 +09:00
345cffddc2
cmd/mbf: optionally export output
...
This is for debugging for now, as no program consumes this format yet.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 19:53:55 +09:00
49163758c8
internal/rosa/llvm: 22.1.0 to 22.1.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 16:08:49 +09:00
ad22c15fb1
internal/rosa/perl: 5.42.0 to 5.42.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 16:08:24 +09:00
9c774f7e0a
internal/rosa/python: setuptools 82.0.0 to 82.0.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 15:32:00 +09:00
707f0a349f
internal/rosa/gtk: glib 2.87.3 to 2.87.5
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 15:26:42 +09:00
7c35be066a
internal/rosa/tamago: 1.26.0 to 1.26.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 15:23:29 +09:00
f91d55fa5e
internal/rosa/curl: 8.18.0 to 8.19.0
...
The test suite now depends on python to run mock servers. SMB is disabled because it is completely unused, and pulls in a python dependency for tests. A broken test is fixed and the patch hopefully upstreamed before next release.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 15:23:07 +09:00
5862cc1966
internal/rosa/kernel: firmware 20260221 to 20260309
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 14:06:21 +09:00
b3f0360a05
internal/rosa: populate runtime dependencies
...
This also removes manually resolved indirect dependencies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 13:23:30 +09:00
8938994036
cmd/mbf: display runtime dependency info
...
This only presents top-level dependencies, resolving indirect dependencies can be misleading in this context.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 10:46:37 +09:00
96d382f805
cmd/mbf: resolve runtime dependencies
...
This also adds the collection meta-artifact for concurrent curing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 10:41:22 +09:00
5c785c135c
internal/rosa: collection meta-artifact
...
This is a stub FloodArtifact for concurrently curing multiple artifacts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 10:34:45 +09:00
0130f8ea6d
internal/rosa: represent runtime dependencies
...
This also resolves indirect dependencies, reducing noise.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-13 10:31:14 +09:00
faac5c4a83
internal/rosa: store artifact results in struct
...
This is cleaner and makes adding additional values easier.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-12 18:08:41 +09:00
620062cca9
hst: expose scheduling priority
...
This is useful when limits are configured to allow it.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-12 02:15:14 +09:00
196b200d0f
container: expose priority and SCHED_OTHER policy
...
The more explicit API removes the arbitrary limit preventing use of SCHED_OTHER (referred to as SCHED_NORMAL in the kernel). This change also exposes priority value to set.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-12 01:14:03 +09:00
04e6bc3c5c
hst: expose scheduling policy
...
This is primarily useful for poorly written music players for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-12 00:52:18 +09:00
5c540f90aa
internal/outcome: improve doc comments
...
This improves readability on smaller displays.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-11 21:04:02 +09:00
1e8ac5f68e
container: use policy name in log message
...
This is more helpful than having the user resolve the integer.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-11 20:20:34 +09:00
fd515badff
container: move scheduler policy constants to std
...
This avoids depending on cgo.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-11 20:03:08 +09:00
330a344845
hst: improve doc comments
...
These now read a lot better both in source and on pkgsite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-11 19:21:55 +09:00
48cdf8bf85
go: 1.26
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-10 03:29:19 +09:00
7fb42ba49d
internal/rosa/llvm: set LLVM_LIT_ARGS
...
This replaces the progress bar, which was worse than useless.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-10 02:05:11 +09:00
19a2737148
container: sched policy string representation
...
This also uses priority obtained via sched_get_priority_min, and improves bounds checking.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-09 18:38:31 +09:00
baf2def9cc
internal/rosa/kmod: prefix moduledir
...
This change also works around the kernel build system being unaware of this option.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-09 16:40:55 +09:00
242e042cb9
internal/rosa/nss: rename from ssl
...
The SSL name came from earlier on and is counterintuitive.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-09 14:58:31 +09:00
6988c9c4db
internal/rosa: firmware artifact
...
Required for generic hardware.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 22:50:36 +09:00
d6e0ed8c76
internal/rosa/python: various pypi artifacts
...
These are dependencies of pre-commit.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 22:25:16 +09:00
53be3309c5
internal/rosa: rdfind artifact
...
Required by linux firmware.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 20:26:15 +09:00
644dd18a52
internal/rosa: nettle artifact
...
Required by rdfind, which is required by linux firmware.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 20:22:09 +09:00
27c6f976df
internal/rosa/gnu: parallel artifact
...
Used by linux firmware.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 19:56:40 +09:00
279a973633
internal/rosa: build independent earlyinit
...
This avoids unnecessarily rebuilding hakurei during development.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 18:29:04 +09:00
9c1b522689
internal/rosa/hakurei: optional hostname tool
...
This makes it more efficient to reuse the helper for partial builds.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 18:26:03 +09:00
5c8cd46c02
internal/rosa: update arm64 kernel config
...
This was not feasible during the bump, now there is a viable toolchain.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 03:17:53 +09:00
2dba550a2b
internal/rosa/zlib: 1.3.1 to 1.3.2
...
This also switches to the CMake build system because upstream broke their old build system.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 02:36:59 +09:00
8c64812b34
internal/rosa: add zlib runtime dependency
...
For transitioning to dynamically linking zlib.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 02:36:09 +09:00
d1423d980d
internal/rosa/cmake: bake in CMAKE_INSTALL_LIBDIR
...
There is never a good reason to set this to anything else, and the default value of lib64 breaks everything. This did not manifest on LLVM (which the CMake helper was initially written for) because it did not use this value.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 01:20:41 +09:00
104da0f66a
internal/rosa/cmake: pass correct prefix
...
This can change build output similar to autotools --prefix and DESTDIR, but was not clearly indicated to do so.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 01:04:02 +09:00
d996d9fbb7
internal/rosa/cmake: pass parallel argument for make
...
This uses the default value for each build system, which is parallel for ninja but not for make.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 00:55:58 +09:00
469f97ccc1
internal/rosa/gnu: libiconv 1.18 to 1.19
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-08 00:36:38 +09:00
af7a6180a1
internal/rosa/cmake: optionally use makefile
...
This breaks the dependency loop in zlib.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 22:47:30 +09:00
03b5c0e20a
internal/rosa/tamago: populate Anitya project id
...
This had to wait quite a while due to Microsoft Github rate-limiting.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 19:37:03 +09:00
6a31fb4fa3
internal/rosa: hakurei 0.3.5 to 0.3.6
...
This also removes the backport patch.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 18:53:48 +09:00
bae45363bc
release: 0.3.6
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 16:32:04 +09:00
2c17d1abe0
cmd/mbf: create report with reasonable perm
...
Making it inaccessible certainly is not reasonable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 16:16:47 +09:00
0aa459d1a9
cmd/mbf: check for updates concurrently
...
Runs much faster this way.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 16:05:16 +09:00
00053e6287
internal/rosa: set User-Agent for Anitya requests
...
This is cleaner than using the default string.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 16:03:06 +09:00
3a0c020150
internal/rosa/gnu: coreutils 9.9 to 9.10
...
This breaks two tests, one of them is fixed and the other disabled. Additionally, two fixed tests are re-enabled.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 14:31:03 +09:00
78655f159e
internal/rosa/ncurses: use stable Anitya project
...
The alpine mapping points to ncurses~devel for some reason.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 13:43:38 +09:00
30bb52e380
internal/rosa/x: libXau 1.0.7 to 1.0.12
...
This also switches to individual releases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 13:39:48 +09:00
66197ebdb2
internal/rosa/x: xproto 7.0.23 to 7.0.31
...
This also switches to individual releases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 13:39:23 +09:00
f7a2744025
internal/rosa/x: util-macros 1.17 to 1.20.2
...
This also switches to individual releases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 13:38:54 +09:00
f16b7bfaf0
internal/rosa: do not keep underlying file
...
No operation require further filesystem interaction for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 13:04:06 +09:00
6228cda7ad
cmd/mbf: optionally read report in info
...
This is a useful frontend for the report files before web server is ready.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 02:26:35 +09:00
86c336de88
cmd/mbf: cure status report command
...
This emits a report stream for the opened cache into the specified file.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 02:20:40 +09:00
ba5d882ef2
internal/rosa: stream format for cure report
...
This is for efficient cure status retrieval by the package website server.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-07 02:18:00 +09:00
1e0d68a29e
internal/pkg: move output buffer to reader
...
This side is the read end of a pipe and buffering reads from it ended up performing better than buffering one half of the TeeReader (which already goes through the kernel page cache anyway).
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 23:39:12 +09:00
80f2367c16
cmd/mbf: merge status and info commands
...
This is cleaner, and offers better integration with the work-in-progress report file.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 23:20:00 +09:00
5ea4dae4b8
cmd/mbf: info accept multiple names
...
This also improves formatting for use with multiple info blocks.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 23:10:43 +09:00
eb1a3918a8
internal/rosa/gnu: texinfo 7.2 to 7.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 22:09:00 +09:00
349011a5e6
internal/rosa/perl: compile dynamic libperl
...
Required by texinfo 7.3.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 22:08:38 +09:00
861249751a
internal/rosa/openssl: 3.5.5 to 3.6.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 21:39:52 +09:00
e3445c2a7e
internal/rosa/libffi: 3.4.5 to 3.5.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 21:39:25 +09:00
7315e64a8a
internal/rosa/ssl: nss 3.120 to 3.121
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 21:38:41 +09:00
7d74454f6d
internal/rosa/python: 3.14.2 to 3.14.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 21:38:17 +09:00
96956c849a
internal/rosa/gnu: gawk 5.3.2 to 5.4.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 21:30:37 +09:00
aabdcbba1c
internal/rosa/gnu: m4 1.4.20 to 1.4.21
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 21:22:33 +09:00
38cc4a6429
internal/rosa/openssl: check stable versions
...
This has a bunch of strange malformed tags.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 19:22:41 +09:00
27ef7f81fa
internal/rosa/perl: check stable versions
...
This uses odd-even versioning.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 19:16:07 +09:00
f7888074b9
internal/rosa/util-linux: check stable versions
...
Anitya appears to get confused when seeing release candidates.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 19:15:16 +09:00
95ffe0429c
internal/rosa: overridable version check
...
For projects with strange versioning practices.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 19:13:55 +09:00
16d0cf04c1
internal/rosa/python: setuptools 80.10.1 to 82.0.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 18:40:55 +09:00
6a2b32b48c
internal/rosa/libxml2: 2.15.1 to 2.15.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 18:36:06 +09:00
c1472fc54d
internal/rosa/wayland: 1.24.0 to 1.24.91
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 18:33:26 +09:00
179cf07e48
internal/rosa/git: 2.52.0 to 2.53.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 18:32:41 +09:00
c2d2795e2b
internal/rosa/libexpat: 2.7.3 to 2.7.4
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 18:22:39 +09:00
2c1d7edd7a
internal/rosa/squashfs: 4.7.4 to 4.7.5
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 17:47:23 +09:00
1ee8d09223
internal/rosa/pcre2: 10.43 to 10.47
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 17:46:59 +09:00
7f01cb3d59
internal/rosa/gtk: glib 2.86.4 to 2.87.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 17:46:32 +09:00
65ae4f57c2
internal/rosa/go: 1.26.0 to 1.26.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 17:46:05 +09:00
77110601cc
internal/rosa/gnu: binutils 2.45 to 2.46.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 17:45:10 +09:00
c5b1949430
internal/rosa/kernel: backport AMD display patches
...
These reduce stack usage in dml30_ModeSupportAndSystemConfigurationFull enough to fix compile on clang 22.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 16:22:20 +09:00
17805cdfa8
internal/rosa/kernel: 6.12.73 to 6.12.76
...
Toolchain is broken on arm64 at the moment so the configuration is not updated.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-06 15:01:01 +09:00
9c9befb4c9
internal/rosa/llvm: separate major version
...
For pathname formatting at compile time.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 22:59:51 +09:00
fcdf9ecee4
internal/rosa/llvm: 21.1.8 to 22.1.0
...
New patch should not be affected next time.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 22:42:27 +09:00
fbd97b658f
cmd/mbf: display metadata
...
For viewing package metadata before the website is ready.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 22:11:26 +09:00
c93725ac58
internal/rosa: prefix python constants
...
These have confusing names.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 21:37:06 +09:00
f14ab80253
internal/rosa: populate Anitya project ids
...
This enables release monitoring for all applicable projects.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 21:32:15 +09:00
9989881dd9
internal/rosa/llvm: populate metadata
...
This enables use of release monitoring for LLVM.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 21:27:33 +09:00
a36b3ece16
internal/rosa: release monitoring via Anitya
...
This is much more sustainable than manual package flagging.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 20:57:05 +09:00
75970a5650
internal/rosa: check name uniqueness
...
This should prevent adding packages with nonunique names.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 18:37:55 +09:00
572c99825d
Revert "internal/rosa/zlib: 1.3.1 to 1.3.2"
...
The bump broke elfutils build.
This reverts commit 0eb2bfa12e .
2026-03-05 17:06:15 +09:00
ebdf9dcecc
cmd/mbf: preset status command
...
This exposes the new OpenStatus cache method.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 16:59:47 +09:00
8ea2a56d5b
internal/pkg: expose status file
...
This is useful for external tooling.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 16:58:52 +09:00
159a45c027
internal/rosa: export preset bounds
...
These are useful for external tooling.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 16:34:25 +09:00
0eb2bfa12e
internal/rosa/zlib: 1.3.1 to 1.3.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 15:49:18 +09:00
e19a98244a
internal/rosa: zlib use stable archive url
...
These do not get removed on new release.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 15:46:10 +09:00
7e2f13fa1b
internal/rosa: cure checks
...
This cures all presets if a cache directory is supplied and verbose is set.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 00:47:39 +09:00
97448e2104
internal/rosa/squashfs: enter correct directory
...
This was missed during the make helper migration.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 00:43:50 +09:00
a87ad28b8b
internal/pkg: scrub for dangling status
...
These cause build to fail to start.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 00:39:15 +09:00
883d4ee4af
internal/pkg: return writer after sync
...
This fixes a use-after-free.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 00:23:24 +09:00
d2c6d486b0
internal/rosa: provide package metadata
...
This had to be done out-of-band because there was no way to efficiently represent these within Artifact.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-05 00:20:27 +09:00
6fdd800b2b
internal/pkg: check filtered error
...
This avoids filtering some unrelated os.ErrExist.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-04 17:43:17 +09:00
94e3debc63
internal/pkg: write per-artifact logs
...
This is currently only used by execArtifact. A later patch will add additional logging facilities.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-04 17:27:54 +09:00
ea87664a75
internal/pkg: cancel on scanner error
...
This avoids discarding output thus appearing unresponsive.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-03 22:20:43 +09:00
04d9984da0
internal/rosa/meson: migrate to helper interface
...
This change also removes some unused options.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-02 14:07:16 +09:00
145ccd1c92
remove .github
...
This is no longer needed after discontinuation of the Microsoft GitHub mirror.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-02 13:46:24 +09:00
c5089cad78
cmd: remove hpkg
...
This proof-of-concept was abandoned long ago. Its test suite is flaky, heavy on I/O and does not increase test coverage. This change fully removes hpkg and supporting code.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-02 13:42:49 +09:00
c83905f311
internal/rosa/cmake: enable check
...
CMake was packaged very early, before the current infrastructure existed to support this. This change patches out broken tests and enables the test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-02 13:12:20 +09:00
b7cc14f296
internal/rosa/cmake: 4.2.1 to 4.2.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-02 13:09:21 +09:00
57e1e5141d
internal/rosa/ninja: remove cmake dependency
...
This does not actually depend on cmake. This is left over from very early on.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-02 13:08:18 +09:00
1440195c3f
internal/rosa/llvm: pass patches via helper
...
This was missed while migrating LLVM to the new interface.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-02 01:30:14 +09:00
cc60e0d15d
internal/rosa/make: migrate to helper interface
...
This also updates all affected artifacts to use new behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-02 01:24:50 +09:00
9deaf853f0
internal/rosa/cmake: migrate to helper interface
...
This change also removes some unused options.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-01 23:50:22 +09:00
2baa9df133
internal/rosa: general helper abstraction
...
This greatly increases code sharing and makes implementations far simpler.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-01 23:39:43 +09:00
51d3df2419
internal/rosa/make: split build and check
...
Doing these together breaks far too many buggy makefiles.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-01 14:41:34 +09:00
1d0fcf3a75
internal/rosa/perl: migrate to make helper
...
This uses the new configure helper behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-01 10:45:25 +09:00
e92971e0c2
internal/rosa/make: alternative configure script
...
This enables using the configure helper with non-autotools configure scripts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-01 10:42:20 +09:00
6159c74e96
internal/rosa/toybox: migrate to make helper
...
A previous change caused world rebuild, so it is a good time to do this.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-03-01 10:02:36 +09:00
2a34a269d0
internal/rosa: stricter cure-script options
...
This change also moves .cure-script out of /system/bin.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-28 23:29:22 +09:00
ef130adb27
internal/rosa/kernel: early serial
...
Having serial driver before initramfs is helpful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-28 23:22:18 +09:00
5694e528e6
cmd/mbf: use standalone musl in container
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-28 23:12:13 +09:00
b4e82e68a7
internal/rosa/images: initramfs via gen_init_cpio
...
This is much cleaner than hacking around the cpio tool.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-28 23:04:58 +09:00
d041fee791
internal/rosa: export musl
...
This can be useful externally.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-28 22:49:54 +09:00
cefd02e960
internal/rosa: gen_init_cpio artifact
...
This works much better than hacking around the toybox cpio implementation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-28 21:19:03 +09:00
ad8f799703
container/std: rename seccomp types
...
Aliases will be kept until 0.4.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-28 20:48:30 +09:00
c74c269b66
container: use /proc/self/exe directly
...
This is a more reliable form of pathname to self and also cheaper than os.Executable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-28 20:44:44 +09:00
4b0cce4db5
ldd: treat nil pathname as self
...
This is a helpful shortcut for examining a test program's ldd output.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-28 20:37:01 +09:00
cd9b534d6b
container: improve documentation
...
This change removes inconsistencies collected over time in this package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-28 20:18:30 +09:00
84e6922f30
cmd/mbf: optionally set SCHED_IDLE
...
None of the other supported policies are applicable here.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-26 16:50:35 +09:00
c16725a679
internal/pkg: set container scheduling policy
...
This is not as necessary as it was for nix, since internal/pkg only unblocks exclusive artifacts one at a time. Still, this is useful when running alongside an unprivileged music player which cannot set itself to a higher priority.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-26 16:35:23 +09:00
a6160cd410
container: set scheduling policy
...
This is thread-directed so cannot be done externally. The glibc wrapper exposes this behaviour so most multithreaded programs using this is straight up incorrect.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-26 16:29:47 +09:00
826347fe1f
internal/rosa: expose standalone musl
...
This is useful in the system image and might also be used elsewhere.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-26 14:21:32 +09:00
085eaed7ba
cmd/earlyinit: early /dev/ and io setup
...
This establishes an environment where devtmpfs is mounted, and if the kernel fails to set up console, 1 and 2 is pointed at /dev/kmsg.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-25 16:37:42 +09:00
37d368a7f9
internal/rosa: initramfs artifact
...
This constructs a single-program initramfs and populates /dev/null so the runtime does not throw if the kernel fails to set up console.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-25 16:31:52 +09:00
2aeac7f582
internal/rosa: fakeroot artifact
...
XSLT is untamable and extremely unpleasant to work with. This patches out the broken docs for now in the interest of getting some work done.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-25 01:20:31 +09:00
2b93631f52
cmd/mbf: use stage2 musl when possible
...
This avoids pulling in the stage3 toolchain when it is not requested.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-25 01:05:49 +09:00
b3749aaf0b
internal/rosa/kernel: arm64 configuration
...
These new dependencies do not apply to amd64, but adding them anyway in case they are needed some day.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-24 23:57:28 +09:00
c8bb88cced
internal/rosa: libxslt artifact
...
For building documentation that cannot be turned off.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-24 23:41:54 +09:00
f7f80f95b9
internal/rosa/perl: various perl module artifacts
...
This change includes helpers for both Makefile.PL and Build.PL as well as various modules.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-24 23:09:55 +09:00
6ea6c794fb
internal/rosa/gnu: build single-binary coreutils
...
This enables more fine-grained toybox replacements.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-24 16:15:15 +09:00
6c2da4c4b2
internal/rosa: libcap artifact
...
Required by fakeroot. Quite refreshing to package a non-autotools project.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-24 16:02:54 +09:00
90f915a708
internal/rosa/kernel: disable DEBUG_STACK_USAGE
...
This is no longer needed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-24 14:10:37 +09:00
a5fea4686e
internal/rosa: make toolchain optional
...
The final Rosa OS image does not need the toolchain.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-23 18:07:38 +09:00
ae8c365c0f
internal/rosa/hakurei: optionally use embedded source
...
This builds hakurei in Rosa OS between releases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-23 17:56:16 +09:00
485db515f7
internal/pkg/ir: raise string limit to 16 MiB
...
A string holds "current" hakurei source code. For now the compressed tarball is 4.9 MiB long.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-23 15:12:19 +09:00
ec7ee0789e
internal/rosa/fuse: fix init script path
...
The default value is quite misleading.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-23 14:39:36 +09:00
42c93a57a4
internal/rosa: fix patches
...
Turns out alacritty clobbers output. It turns tabs into spaces and also removes whitespace-only lines for some reason.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-23 02:12:09 +09:00
b1b14810ac
internal/rosa/kernel: increase audio powersave timeout
...
This feature is incredibly annoying as some amplifiers take time to wake up, and causes a non-insignificant amount of audio to be dropped.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-22 21:28:39 +09:00
de117ef365
internal/rosa: ncurses artifact
...
For running menuconfig.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-22 18:07:24 +09:00
5e4bf23e0c
internal/rosa/musl: migrate to make helper
...
This is much cleaner and eliminates the early ugliness.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-22 15:53:41 +09:00
d4519e2075
internal/rosa/make: expose --host
...
This should be set alongside --build.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-22 15:14:09 +09:00
7f1e4cf43c
internal/rosa: kernel artifact
...
The configuration still wants some cleanup, but this works fine as a generic kernel for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-21 23:19:16 +09:00
d021621fba
internal/rosa: install kernel headers out-of-tree
...
This is somewhat cheaper than the implementation with extra artifact and is more friendly to the make helper.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-21 19:16:10 +09:00
56567307ec
internal/rosa: gnu tar artifact
...
Initially, libarchive was going to be used, but its test suite simply does not want to work under musl, not even with libiconv. The ticket last discussing this ceased any activity in 2020.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-21 18:09:51 +09:00
0264a1ef09
internal/rosa: libiconv artifact
...
For software that assumes glibc.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-21 14:35:32 +09:00
0123bbee3d
internal/rosa: bc artifact
...
Required by the kernel.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-21 00:30:40 +09:00
771adad603
internal/rosa: texinfo artifact
...
Yet another wheel reinvented by GNU. Required to shut some GNU programs up.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-21 00:28:21 +09:00
178305cb22
internal/rosa: elfutils artifact
...
Required by the kernel.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-20 21:51:07 +09:00
c2456e252c
internal/rosa: musl-obstack artifact
...
Yet another nonstandard glibc extension used by elfutils.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-20 21:34:59 +09:00
273068b90c
internal/rosa: musl-fts artifact
...
Another nonstandard glibc extension used by elfutils.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-20 21:29:09 +09:00
16b20e1d34
internal/rosa: argp-standalone artifact
...
Nonstandard glibc extension used by elfutils.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-20 21:19:34 +09:00
b983917a6e
internal/rosa: expose kernel source
...
This also removes the unused kernel helper.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-20 18:45:42 +09:00
e1b8f40add
cmd/mbf: cache dir via environment
...
This is much less cumbersome than dragging the flag around all the time.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-19 15:32:25 +09:00
6df0d37c5a
cmd/mbf: Rosa OS container helper
...
This sets up a Rosa OS container with its shell as the initial process.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-19 15:12:16 +09:00
1619b06541
internal/pkg: export layer promotion
...
This is a useful helper for external tooling.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-19 15:06:10 +09:00
e335d99c6b
internal/pkg: export seccomp presets
...
This is useful for external tooling providing an execArtifact-like environment.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-19 14:30:31 +09:00
d888d09b6d
cmd/mbf: explicit help command
...
Not having this command is counterintuitive.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-19 13:55:05 +09:00
54176e7315
internal/rosa: use LTS kernel
...
For out-of-tree modules.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-19 01:22:08 +09:00
3bfe99d3d8
internal/lockedfile: keep objects alive while stopping cleanups
...
Fixes https://go.dev/issues/74780 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-18 20:00:32 +09:00
149dfbb6af
internal/rosa: tamago toolchain artifact
...
Currently used by the (wip) bootloader, might not make it into the final OS.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-18 19:26:42 +09:00
58801b44d4
internal/rosa: util-linux artifact
...
This stuff will likely be implemented natively in the final system. For now, it is useful for debugging.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-18 14:21:59 +09:00
e065bbf792
internal/rosa: procps artifact
...
Generally pretty useful, and required by util-linux test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-18 14:07:36 +09:00
a883e57e7d
internal/rosa: qemu artifact
...
This is still a quite minimal build. More features will be enabled as dependencies become available. The powerpc failure will be investigated if it is ever needed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-17 17:34:25 +09:00
ef9bd8ecbf
internal/rosa/go: 1.25.7 to 1.26.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-17 14:40:24 +09:00
a40527dcb2
internal/pkg/ir: document reason for avoiding ident cache
...
This got brought up earlier today as a potential optimisation. This change documents why it is not viable, and hopefully clears up some performance implications of using IRDecoder, namely that its decoding costs do not amortise.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-17 14:38:42 +09:00
88d9a6163e
container/initplace: return nil for createTemp error injection
...
This matches os package behaviour, and avoids adding the cleanup.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-17 14:16:54 +09:00
47860b0387
internal/rosa/python: enable bzip2 and xz
...
This is required by qemu test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-17 02:39:11 +09:00
50c9da8b6d
internal/rosa/python: enable openssl
...
This is required by qemu test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-17 02:01:57 +09:00
16966043c7
internal/rosa: dtc artifact
...
Required by qemu.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-17 00:54:34 +09:00
a3515a6ef5
internal/rosa: bison artifact
...
Required by dtc, which is required by qemu.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-17 00:32:04 +09:00
7f05baab28
internal/rosa: flex artifact
...
Required by dtc, which is required by qemu.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-16 23:55:36 +09:00
d4d5e631ae
internal/rosa: glib artifact
...
Unfortunately required by many programs, even non-gtk ones.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-16 19:01:02 +09:00
1df3bcc3b9
nix: mount tmpfs on /tmp
...
This hopefully eliminates spurious test failures caused by /tmp running out of space.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-16 18:22:29 +09:00
1809b53e52
internal/rosa/wayland: build-only tests patch
...
This patch last had any discussion eight months ago and is still not merged.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-16 13:55:34 +09:00
67b2914c94
internal/rosa: meson helper
...
This is used by quite a few projects.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-16 13:49:13 +09:00
74dee11822
internal/rosa/cmake: optional variant string
...
This improves consistency with other helpers and removes the usually unnecessary variant suffix.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-16 12:44:40 +09:00
a58c9258cc
internal/rosa/pcre2: downgrade to 10.43
...
Latest release breaks assumptions made by GLib.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-16 01:51:38 +09:00
710b164c91
internal/pkg: allow devel syscalls
...
This is required by the GLib test suite, and possibly others.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-16 01:46:28 +09:00
93911d6015
internal/rosa: pcre2 artifact
...
Required by GLib.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-16 01:20:52 +09:00
bb097536d4
internal/rosa: remove libcxxabi hack
...
This was caused by stack overflow which was resolved many commits ago.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-15 21:59:09 +09:00
49b6526a38
internal/rosa: remove redundant meson flags
...
These have no effect.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-15 20:18:34 +09:00
f9c31df94d
internal/rosa: fixed-size toolchain enum
...
This fits in an inlined uint32 IR value.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-15 00:58:14 +09:00
4f570cc5c9
internal/pkg: expose extra methods to file
...
This is useful for FileArtifact processing another stream.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-15 00:45:37 +09:00
5828631e79
internal/pkg: split off context common
...
For making these methods available to RContext.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-15 00:39:24 +09:00
4f9f4875d7
internal/rosa/openssl: scale jobs based on cpu count
...
The hardcoded value of 256 causes test failures due to excessive load on some machines. Twice the cpu count appears to almost saturate all cpus without causing spurious failures.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-13 03:34:08 +09:00
d49e654482
internal/rosa: kmod artifact
...
Required by the kernel.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-13 03:15:27 +09:00
b746e352e5
internal/rosa/zstd: fix libdir
...
CMake implicitly changes it to lib64 which is not supported.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-13 03:14:30 +09:00
c620d88dce
update README document
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-13 01:38:50 +09:00
7cd14b8865
internal/rosa: squashfs-tools artifact
...
The Makefile is very poorly written, so had to be configured through the environment.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-12 02:33:33 +09:00
3e18a4b397
internal/rosa: zstd artifact
...
Optional dependency of many programs, and generally useful to have around.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-12 01:48:21 +09:00
1791b604b5
internal/rosa/make: configurable configure and install
...
This makes the helper useful for non-autotools build systems.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-12 01:19:40 +09:00
59ff6db7ec
internal/rosa: toolchain type methods
...
This improves readability for toolchain-specific checks.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-11 18:18:11 +09:00
430e099556
internal/rosa/stage0: add arm64 tarball
...
This took far longer to complete because the aarch64 development machine is much slower.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-11 17:57:54 +09:00
17b64bb42c
internal/pkg: skip resolved cure errors
...
This significantly improves error resolution performance.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-11 17:50:18 +09:00
dbb89dfb0f
internal/pkg: buffer tar reader
...
This significantly improves performance and is a good assumption since the primary use case of FileArtifact is over the network.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-11 02:08:44 +09:00
de06ea2be4
internal/pkg: read buffer free list
...
Reader has a non-insignificant buffer that is worth saving as well.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-11 02:02:46 +09:00
1ef7bedfb5
internal/rosa/toybox: do not assume bash location
...
For compatibility with Gentoo stage3 as bootstrap seed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-11 01:36:41 +09:00
05a828c474
internal/pkg: validate tar pathnames
...
TContext no longer validates FileArtifact ahead of time, validation outcome is instead determined after consuming the reader to EOF. All data must therefore be treated as untrusted input until the reader is closed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-11 00:40:54 +09:00
0061d11f93
internal/rosa: use self-hosted stage0
...
This removes the bootstrap dependency on Gentoo stage3 tarball.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-10 22:31:08 +09:00
fb101a02f2
internal/rosa: self-host stage0 tarball
...
This replaces gentoo stage3 tarballs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-10 21:22:46 +09:00
3dbd67d113
internal/rosa: consistent stage0 paths
...
This makes using the gentoo stage3 as our stage0 compatible with Rosa OS stage0 tarballs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-10 19:28:47 +09:00
f511f0a9e9
internal/rosa: bzip2 artifact
...
For creating the stage0 tarball. Might be replaced by a custom artifact at some point.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-09 02:26:52 +09:00
47995137b3
internal/rosa/perl: skip installing manpages
...
Perl manpages ignore prefix and gets installed to /. This change does not use the configure script because it is completely broken and specifying either "none" or a single space character (undocumented) has no effect.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-09 01:50:52 +09:00
e1b8607101
internal/rosa: rename stage0 toolchain
...
This is stage0 relative to Rosa OS, and stage3 relative to the toolchain it is compiled on (Gentoo in this case). Referring to the toolchain itself as stage3 is counterintuitive and misleading.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-09 00:55:07 +09:00
3d3bd45b95
internal/rosa/hakurei: 0.3.4 to 0.3.5
...
This removes all backport patches.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-09 00:27:45 +09:00
9fb0b2452e
release: 0.3.5
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-09 00:11:20 +09:00
a3e87dd0ef
container: ignore uninterpreted source
...
These can be set to anything by the distribution.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-08 19:39:39 +09:00
90a38c0708
container: strip host-dependent opts in test cases
...
This change also improves plumbing for stripping options.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-08 19:35:20 +09:00
39cc8caa93
container: add riscv64 constants
...
This target is unlikely to become viable any time soon.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-08 19:03:47 +09:00
c4f64f7606
dist: include target in filename
...
Backport patch will be removed in the next release.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-08 16:03:41 +09:00
a9e2a5e59f
internal/rosa/go: 1.25.6 to 1.25.7
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-08 15:42:58 +09:00
9fb0722cdf
internal/rosa/go: alternative bootstrap path
...
For targets where the bootstrap toolchain is not available.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-08 15:04:03 +09:00
2f3e323c46
internal/rosa/gnu: gcc toolchain artifact
...
This toolchain is hacked to pieces. It works well enough to bootstrap Go, though.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-08 01:00:15 +09:00
1fc9c3200f
internal/rosa: libucontext artifact
...
Required by GCC on musl.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-07 22:33:12 +09:00
096a25ad3a
cmd/mbf: dump IR of artifact presets
...
This exposes IR outside test cases, useful for verifying correctness of alternative IR emitters.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-07 17:21:43 +09:00
ffd2f979fb
internal/pkg: skip duplicate early
...
This significantly increases IR generation performance.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-07 17:11:41 +09:00
31a8cc9b5c
internal/rosa/gnu: binutils artifact
...
Appears to be required by GCC? It complains with stuff installed by LLVM.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-07 14:02:23 +09:00
bb3f60fc74
internal/rosa/gnu: gmp, mpfr, mpc artifacts
...
Required by GCC.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-07 13:55:40 +09:00
697c91e04d
internal/rosa/cmake: expose earlier build script
...
This allows for more flexible build setups.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-07 13:23:13 +09:00
3f7b8b4332
internal/rosa/git: git clone helper
...
For obtaining sources of projects that stubbornly refuse to provide release tarballs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-06 21:10:59 +09:00
fa94155f42
internal/rosa/etc: resolv.conf
...
Required by programs that download from the internet in measured execArtifact.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-06 21:04:59 +09:00
233bd163fb
internal/rosa/git: disable flaky test
...
This fails intermittently.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-06 20:45:52 +09:00
f9b69c94bc
internal/rosa/ssl: prefix CA paths
...
This makes prefixes consistent with everything else since this will end up in the final Rosa OS image.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-06 20:41:58 +09:00
68aefa6d59
internal/rosa/openssl: fix paths
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-06 19:53:51 +09:00
159fd55dbb
internal/rosa/ssl: fix dependencies
...
These used to be provided by busybox.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 19:12:48 +09:00
ce6b3ff53b
internal/rosa: unzip artifact
...
Because the zip format is too awful and cannot be streamed anyway, supporting it natively comes with no benefit.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 19:10:32 +09:00
30afa0e2ab
internal/rosa/git: compile with http support
...
This should be able to fetch repositories deterministically.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 18:51:02 +09:00
9b751de078
internal/rosa/gnu: fix test suite flags
...
This sets the correct flag and also avoids changing ident per system.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 18:29:47 +09:00
d77ad3bb6e
internal/rosa: curl artifact
...
Required for http support in git.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 18:15:16 +09:00
0142fc90b0
internal/rosa/make: post-configure script
...
Required for some projects with broken build scripts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 18:13:48 +09:00
3c9f7cfcd0
internal/rosa: libpsl artifact
...
Required by curl.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 18:06:33 +09:00
a3526b3ceb
internal/rosa: openssl artifact
...
Optional for many programs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 18:03:18 +09:00
6ad21e2288
internal/rosa: register custom artifacts
...
This also encodes extra information for iana-etc.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 17:50:48 +09:00
27e2e3f996
internal/rosa/llvm: drop git dependency
...
This was added quite early and has no effect. Remove it to avoid compiling git early.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 17:44:58 +09:00
e0c720681b
internal/pkg: standardise artifact IR
...
This should hopefully provide good separation between the artifact curing backend implementation and the (still work in progress) language. Making the IR parseable also guarantees uniqueness of the representation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-05 08:24:09 +09:00
f982b13a59
internal/pkg: improve error resolution
...
This was taking way too long for early failures.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-03 10:01:44 +09:00
443911ada1
internal/rosa: use stage3 mirror
...
These get taken down periodically and causes way too many rebuilds when they are taken down. Use mirror until a more elegant solution is available.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-02 23:43:34 +09:00
d7a3706db3
internal/rosa/x: regenerate build system
...
These come with 16-year-old scripts that do not understand aarch64 or really anything else relevant to Rosa OS.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-02 19:57:39 +09:00
3226dc44dc
internal/rosa/gnu: libtool artifact
...
Required when generating autotools build systems.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-02 19:52:08 +09:00
9f98d12ad8
internal/rosa/gnu: automake artifact
...
This is very expensive. Avoid.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-02 18:49:18 +09:00
550e83dda9
internal/rosa/gnu: grep artifact
...
Some GNU software do not like the grep in toybox.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-02 18:38:01 +09:00
7877b4e627
cmd/mbf: print extra stage3 information
...
This includes ident of all three stages and the matching checksum if check is passing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-02 18:33:16 +09:00
47ce6f5bd0
internal/rosa/llvm: conditionally add Rosa OS paths
...
This change also moves rpath flags to a more appropriate method.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-02-02 07:29:35 +09:00
48f4ccba33
internal/rosa/llvm: add rosa vendor
...
This cleans up checks specific to Rosa OS, and fixes stack overflow in llvm under certain conditions.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 22:47:13 +09:00
c31884bee4
internal/rosa: disable broken tests
...
These fail when running as users with supplementary groups, since they are unmapped in the container. This was not the case in the development container where all groups were dropped, so the failure was missed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 14:12:40 +09:00
f8661ad479
internal/rosa/hakurei: backport test case fix
...
This patch will be removed in the next release.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 12:00:21 +09:00
536f0cbae6
internal/rosa/gnu: gettext 0.26 to 1.0
...
This now requires kernel headers for some reason.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 11:41:07 +09:00
8d872ff1cd
internal/rosa: fetch from gnu mirror
...
GNU infrastructure is extraordinarily flaky and fetching from it killed the server too many times.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 11:26:48 +09:00
bf14a412e4
container: fix host-dependent test cases
...
These are not fully controlled by hakurei and may change depending on host configuration.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 10:59:56 +09:00
8b4576bc5f
internal/rosa: migrate to make helper
...
This migrates artifacts that the helper cannot produce an identical instance of.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 08:55:33 +09:00
29ebc52e26
internal/rosa/hakurei: suffix variants
...
This makes log output more useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 05:03:15 +09:00
5f81aac0e2
internal/rosa: make helper
...
This change only migrates artifacts that remain unchanged under the helper, so this change should not cause any rebuilds.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 05:01:22 +09:00
47490823be
internal/rosa: improve cmake interface
...
This should make the call site look better for new artifacts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 02:42:01 +09:00
1ac8ca7a80
internal/rosa: isolate make implementation
...
This will come with a helper eventually.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-31 02:33:14 +09:00
fd8b2fd522
internal/rosa: fix up dependencies
...
These are no longer provided by the (incomplete) toybox implementations, so they need to be specified explicitly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-30 03:11:16 +09:00
20a8519044
internal/rosa/mksh: also build lksh
...
This is better suited for /system/bin/sh. Full mksh is still included, installed at /system/bin/mksh.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-30 00:54:30 +09:00
8c4fd00c50
internal/rosa/ninja: build in $TMPDIR
...
This used to build in /work/system/bin/ and unfortunately leaves its garbage there. This behaviour is from very early stages of this package, and was never fixed. This change updates it to use the "$(mktemp -d)" convention that every other artifact uses.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-30 00:36:43 +09:00
bc3dd6fbb0
internal/rosa: chmod via patch helper
...
This works around the zfs overlay mount overhead and significantly reduces I/O in general.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-30 00:29:44 +09:00
616ed29edf
internal/rosa: early toybox variant
...
This is a variant of toybox with unfinished tools enabled, for artifacts that will end up in a dependency loop without them.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-30 00:24:14 +09:00
9d9b7294a4
internal/rosa: flags for toolchain-dependent artifact
...
This is much cleaner to add extra flags to.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 20:44:43 +09:00
6c1e2f10a7
internal/rosa: remove busybox artifact
...
This is no longer used and its implementation is unacceptably shaky.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 19:58:51 +09:00
abf96d2283
internal/rosa: replace busybox with toybox
...
The busybox artifact does not run on aarch64, and the workarounds required for it to compile successfully on x86_64 is unacceptably shaky. This change fully replaces it with toybox.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 19:51:18 +09:00
6c90e879da
internal/rosa/llvm: enable asan
...
This is required by test suite of latest toybox.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 18:30:37 +09:00
d1b404dc3a
internal/rosa: findutils artifact
...
Required by llvm test suite, compiler-rt sanitisers-related tests fail on toybox xargs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 18:24:01 +09:00
744e4e0632
internal/rosa: sed artifact
...
Required by various GNU programs as they are not happy with toybox sed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 18:17:18 +09:00
85eda49b2b
internal/rosa: xz artifact
...
Wanted to avoid this as much as possible. Unfortunately newer versions of GNU findutils only come in xz and is required for llvm compiler-rt sanitisers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 18:06:17 +09:00
b26bc05bb0
internal/rosa: remove unused receiver
...
This returns the preset itself, it is up to the caller to load the underlying artifact.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 17:52:50 +09:00
2d63ea8fee
internal/rosa: gzip artifact
...
Toybox does not implement this, and it is used by many programs, including toybox itself.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 17:46:30 +09:00
dd4326418c
internal/rosa: toybox artifact
...
This compiles surprisingly quickly and required no workarounds, unlike busybox.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 17:44:30 +09:00
79c0106ea0
internal/rosa: replace busybox dash with mksh
...
Toybox does not provide a shell, mksh fills that gap.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 02:00:32 +09:00
536db533de
internal/rosa: install bash as sh
...
This works around software relying on bashisms even when explicitly invoking sh.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 01:25:44 +09:00
07927006a8
internal/pkg: set User-Agent header
...
Avoid living under the default user agent and be at the mercy of some IDS.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 01:17:35 +09:00
77ea27b038
internal/rosa: mksh artifact
...
This provides a shell, as part of the effort to replace busybox.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-29 00:51:32 +09:00
e76bc6a13a
internal/rosa: resolve preset by name
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-28 20:57:51 +09:00
cc403c96d8
internal/rosa: remove busybox patch
...
This allows different versions of busybox to be attempted, to find one that works on arm.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-28 01:24:56 +09:00
66118ba941
internal/rosa: gawk artifact
...
Replaces broken awk in busybox.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-28 01:22:42 +09:00
823ba08dbc
internal/rosa: use patch helper
...
This is significantly cleaner and runs somewhat faster.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-28 00:58:34 +09:00
660835151e
internal/rosa: disable busybox SHA1_HWACCEL
...
This also pretties up the build output and sets correct linker path.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-28 00:51:09 +09:00
53e6df7e81
internal/rosa: remove uname
...
This does not change ident based on target.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 23:37:29 +09:00
bd80327a8f
internal/rosa: add arm64 strings
...
This enables building on arm64.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 21:12:39 +09:00
41f9aebbb7
internal/pkg: allow multiarch
...
The armv8l busybox binary release needs this to run correctly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 21:07:18 +09:00
a2a0e36802
internal/rosa: cross-platform stage3
...
The stage3 binary seed is arch-specific.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 20:58:31 +09:00
fbe93fc771
internal/rosa/busybox: cross-platform binary
...
The initial binary seed is arch-specific.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 20:54:11 +09:00
968d8dbaf1
internal/pkg: encode checksum in ident
...
This also rearranges the ident ir to be more predictable, and avoids an obvious and somewhat easy to get into inconsistent state.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 20:18:34 +09:00
f1758a6fa8
internal/rosa: nss artifacts
...
Not used by anything for now, but will be part of Rosa OS.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 08:17:58 +09:00
88aaa4497c
internal/rosa/hakurei: dist tarball
...
The patch will be removed in the next release.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 07:34:45 +09:00
b7ea68de35
internal/rosa/hakurei: isolate hakurei helper
...
For creating the dist tarball, which runs in the same environment.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 07:28:13 +09:00
67e453f5c4
dist: run tests
...
This used to be impossible due to nix jank which has been addressed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 07:00:39 +09:00
67092c835a
internal/rosa/hakurei: v0.3.3 to v0.3.4
...
This now contains the sharefs program which pulls in fuse.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 05:40:53 +09:00
18918d9a0d
internal/rosa: fuse artifact
...
Required by hakurei for sharefs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 05:34:42 +09:00
380ca4e022
internal/rosa: pytest artifact
...
Required by libfuse. This pulls in many dependencies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 05:20:37 +09:00
887aef8514
internal/rosa: python pip helper
...
Fuse requires pytest which depends on many packages. This helper eases the pain of packaging them.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 05:14:59 +09:00
d61faa09eb
release: 0.3.4
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 03:56:06 +09:00
50153788ef
internal/rosa: hakurei artifact
...
This does not yet have fuse from staging. Everything else works perfectly, though.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 02:24:49 +09:00
c84fe63217
internal/rosa: various X artifacts
...
Required by xcb which is required by hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 02:02:49 +09:00
eb67e5e0a8
internal/pkg: exclusive artifacts
...
This alleviates scheduler overhead when curing many artifacts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 01:23:50 +09:00
948afe33e5
internal/rosa/acl: use patch helper
...
This is significantly less ugly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-27 00:30:50 +09:00
76c657177d
internal/rosa: patch ignore whitespace
...
This makes it work better with patches emitted by git.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 21:56:36 +09:00
4356f978aa
internal/rosa: kernel patching
...
The side effect of this is to work around zfs performance issue with chmod on overlay mount.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 21:20:52 +09:00
4f17dad645
internal/rosa: isolate patching helper
...
This is useful outside llvm as well.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 21:00:29 +09:00
68b7d41c65
internal/rosa: parallel autoconf tests
...
These take forever and run sequentially by default for some reason.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 19:52:59 +09:00
e48f303e38
internal/rosa: parallel perl tests
...
This is found in the github action, the test target does not appear to support parallelisation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 19:45:50 +09:00
f1fd406b82
internal/rosa: link libc ldd
...
Musl appears to implement this behaviour but does not install the symlink by default.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 08:00:03 +09:00
53b1de3395
internal/rosa: enable static on various artifacts
...
This is implicitly enabled sometimes, but better to be explicit.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 07:56:14 +09:00
92dcadbf27
internal/acl: connect getfacl stderr
...
This shows whatever failure is happening in the cure container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 07:51:16 +09:00
0bd6a18326
internal/rosa: acl artifact
...
Required by hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 07:38:56 +09:00
67d592c337
internal/pkg: close gzip reader on success
...
The Close method panics otherwise.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 07:06:38 +09:00
fdc8a8419b
internal/rosa: static libwayland
...
Required by hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 06:49:08 +09:00
122cfbf63a
internal/rosa: run wayland tests
...
Broken test is disabled for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 06:39:45 +09:00
504f5d28fe
internal/rosa: libseccomp artifact
...
Required by hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 05:28:36 +09:00
3eadd5c580
internal/rosa: gperf artifact
...
Required by libseccomp.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 05:25:39 +09:00
4d29333807
internal/rosa: wayland-protocols artifact
...
Required by hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 05:13:30 +09:00
e1533fa4c6
internal/rosa: wayland artifact
...
Required by hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 05:10:35 +09:00
9a74d5273d
internal/rosa: libgd artifact
...
Required by graphviz which is required by wayland.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 04:20:11 +09:00
2abc8c454e
internal/pkg: absolute hard link
...
This cannot be relative since the curing process is not in the temp directory.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 04:03:05 +09:00
fecb963e85
internal/rosa: libxml2 artifact
...
Required by wayland. Release tarball is xz only, unfortunately.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 03:47:42 +09:00
cd9da57f20
internal/rosa: libexpat artifact
...
Required by wayland.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 03:15:25 +09:00
c6a95f5a6a
internal/rosa: meson artifact
...
Required by wayland and pipewire.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 03:03:21 +09:00
228489371d
internal/rosa: setuptools artifact
...
Apparently the only way to install python stuff offline.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 02:28:47 +09:00
490471d22b
cmd/mbf: verbose by default
...
It usually does not make sense to use this without verbose.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 02:12:56 +09:00
763d2572fe
internal/rosa: pkg-config artifact
...
Used by hakurei and many other programs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 01:26:54 +09:00
bb1b6beb87
internal/rosa: name suffix by toolchain
...
This makes output more useful during bootstrap.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 00:57:03 +09:00
3224a7da63
cmd/mbf: disable threshold by default
...
This is not very useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-26 00:05:59 +09:00
8a86cf74ee
internal/rosa/go: symlink executables
...
This avoids having to fix up $PATH for every artifact.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-25 23:59:08 +09:00
e34a59e332
internal/rosa/go: run toolchain tests
...
LLVM patches and a TMPDIR backed by tmpfs fixed most tests. Broken tests in older versions are disabled.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-25 21:21:53 +09:00
861801597d
internal/pkg: expose response body
...
This uses the new measured reader provided by Cache. This should make httpArtifact zero-copy.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-25 16:10:34 +09:00
334578fdde
internal/pkg: expose underlying reader
...
This will be fully implemented in httpArtifact in a future commit.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-25 14:48:25 +09:00
20790af71e
internal/rosa: lazy initialise all artifacts
...
This improves performance, though not as drastically as lazy initialising llvm.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-25 01:43:18 +09:00
43b8a40fc0
internal/rosa: lazy initialise llvm
...
This significantly improves performance.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-25 00:29:46 +09:00
87c3059214
internal/rosa: run perl tests
...
A broken test with unexplainable failure is disabled.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-24 18:58:09 +09:00
6956dfc31a
internal/pkg: block on implementation entry
...
This avoids blocking while not in Cure method of the implementation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-24 16:02:50 +09:00
d9ebaf20f8
internal/rosa: stage3 special case helper
...
This makes it cleaner to specify non-stage3 and stage3-exclusive dependencies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-24 12:23:35 +09:00
acee0b3632
internal/pkg: increase output buffer size
...
This avoids truncating unreasonably long lines from llvm.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-24 11:45:44 +09:00
5e55a796df
internal/rosa: gnu patch artifact
...
This is more robust than the busybox implementation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-24 11:32:27 +09:00
f6eaf76ec9
internal/rosa: patch library paths
...
This removes the need for reference LDFLAGS in the standard toolchain.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-24 11:22:25 +09:00
5c127a7035
internal/rosa: patch header search paths
...
This removes the need for reference CFLAGS in the standard toolchain.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-23 01:56:52 +09:00
8a26521f5b
internal/rosa/go: run bootstrap toolchain tests
...
The objdump test will be re-enabled after fixing llvm search paths.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-22 07:05:48 +09:00
0fd4556e38
internal/rosa/llvm: fix broken test patch
...
Both stage1 and stage2 passes at this point.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-22 06:42:04 +09:00
50b82dcf82
internal/rosa/gnu: coreutils artifact
...
Required by llvm unit and regression tests.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-22 05:42:23 +09:00
20a8d30821
internal/rosa/busybox: link /usr/bin/env
...
This is required by many scripts which uses bash but still pretends to be portable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-22 04:21:06 +09:00
cdf2e4a2fb
internal/rosa: bash artifact
...
Required by llvm unit and regression tests.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-22 04:06:48 +09:00
dcb8a6ea06
internal/rosa: fix toolchain layer order
...
This allows extras to override toolchain artifacts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-22 03:37:46 +09:00
094a62ba9d
internal/rosa: diffutils artifact
...
LLVM tests are not happy with busybox diff.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-22 03:00:59 +09:00
6420b6e6e8
internal/rosa: libffi artifact
...
Required by python during llvm test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-22 02:47:47 +09:00
d7d058fdc5
internal/rosa/gnu: disable broken tests
...
These are documented as broken via comments yet not disabled on musl for some reason.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 23:31:45 +09:00
84795b5d9f
internal/rosa/git: add dependencies
...
These are required outside the stage3 toolchain.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 22:14:48 +09:00
f84d30deed
internal/rosa/gnu: run checks
...
Checks are not run for gettext for now since it contains broken tests.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 22:07:08 +09:00
77821feb8b
internal/rosa: gettext artifact
...
Compile time dependency of git.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 21:52:50 +09:00
eb1060f395
internal/rosa: autoconf artifact
...
Required by git to reconfigure some options.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 21:44:49 +09:00
0e08254595
internal/rosa: m4 artifact
...
Autotools dependency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 21:42:25 +09:00
349d8693bf
internal/rosa: perl artifact
...
This runs without tests for now, will be enabled after some toolchain patches.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 21:33:12 +09:00
e88ae87e50
internal/rosa/llvm: run unit and regression tests
...
Two tests are marked expected to fail for Rosa OS.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 08:25:36 +09:00
7cd4aa838c
internal/rosa/llvm: patch source tree
...
A few patches are required for disabling broken tests and changing default search paths.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 08:25:17 +09:00
641942a4e3
internal/rosa/cmake: chmod entire source tree
...
This works around builds that traverse out of the appended pathname.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 07:26:36 +09:00
b6a66acfe4
internal/rosa: git artifact
...
This is required by the clang unit and regression tests.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 07:00:14 +09:00
b72dc43bc3
internal/pkg: report dependency graph size
...
This is an interesting value to know when profiling.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 05:35:28 +09:00
8e59ff98b5
internal/rosa: include iana-etc
...
This is used by some programs and will likely end up in the Rosa OS system image anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 05:28:41 +09:00
f06d7fd387
cmd/mbf: expose some artifacts for curing
...
This will remain until dist is successfully bootstrapped.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 05:18:08 +09:00
ba75587132
internal/pkg: allow user namespace creation
...
No good reason to filter this in the execArtifact container, and the extended filter breaks certain programs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-21 04:49:25 +09:00
9a06ce2db0
internal/rosa: bootstrap go toolchain
...
This runs without tests for now. Will be fixed in a later commit.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-20 07:14:11 +09:00
3ec15bcdf1
internal/rosa/cmake: use hardcoded build directory
...
This eliminates some nondeterminism. Still getting 3-stage non-determinism in runtimes and clang, though.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 22:51:34 +09:00
d933234784
internal/pkg: make checksum available to cure
...
This enables deduplication by value as implemented in execArtifact.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 21:29:56 +09:00
1c49c75f95
cmd/mbf: toolchain 3-stage non-determinism check
...
This unfortunately fails right now. Requires further investigation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 04:40:44 +09:00
6a01a55d7e
internal/rosa: parallel cmake bootstrap
...
This takes a very long time otherwise.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 03:21:29 +09:00
b14964a66d
internal/rosa: standard toolchain via 2-stage bootstrap
...
This implements the 2-stage bootstrap build without clumping the stages together in the cmake target.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 02:57:28 +09:00
ff98c9ded9
internal/rosa: llvm bootstrap artifacts
...
This bootstraps the LLVM toolchain across multiple artifacts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 02:48:44 +09:00
7f3d1d6375
internal/rosa: llvm artifact abstraction
...
The llvm bootstrap is multi-stage by nature, and cannot be completed in a single artifact.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 02:29:06 +09:00
3a4f20b759
internal/rosa: cmake abstraction
...
This is a helper for generating cure script for a cmake-based project.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 02:20:37 +09:00
21858ecfe4
internal/rosa: ninja artifact
...
Generated by cmake, recommended format for llvm toolchain.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 02:08:17 +09:00
574a64aa85
internal/rosa: cpython artifact
...
Dependency of llvm build scripts, also an optional cure dependency of ninja.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 01:58:53 +09:00
85d27229fd
internal/rosa: zlib artifact
...
Dependency of llvm build scripts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 01:48:27 +09:00
83fb80d710
internal/rosa: cmake artifact
...
This is required for compiling the toolchain and many other programs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 01:36:38 +09:00
fe6dc62ebf
internal/rosa: musl libc artifact
...
This will likely be included in Rosa OS. The installation is modified to be entirely contained in prefix.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 01:25:41 +09:00
823f9c76a7
internal/rosa: busybox from source
...
This will be part of the standard toolchain.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 01:12:47 +09:00
2df913999b
internal/rosa: kernel headers
...
This is required by the toolchain and many other programs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 01:03:19 +09:00
52c959bd6a
internal/rosa: minimal rsync artifact
...
For installing kernel headers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 00:58:34 +09:00
d258dea0bf
internal/rosa: bootstrap on gentoo stage3
...
This contains a fully working musl+llvm toolchain and many build systems in a pretty small package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 00:51:49 +09:00
dc96302111
internal/rosa: GNU make artifact
...
This compiles GNU make from source. This is unfortunately required by many programs, but is a cure dependency only.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 00:40:25 +09:00
88e9a143d6
internal/rosa: toolchain abstraction
...
This provides a clean and easy to use API over toolchains. A toolchain is an opaque set of artifacts and environment fixups. Exported toolchains should be functionally indistinguishable from each other.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 00:28:16 +09:00
8d06c0235b
internal/rosa: busybox binary artifact
...
This installs a statically linked busybox binary distribution for decompressing the gentoo stage3 tarball, since there is no native xz implementation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-19 00:07:56 +09:00
4155adc16a
internal/rosa: static etc artifact
...
This places configuration files with hardcoded content in /etc to silence test suites expecting them to be present.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-18 23:51:45 +09:00
2a9525c77a
cmd/mbf: command handling
...
This tool is a frontend for bootstrapping hakurei via internal/pkg. Named mbf for now for "maiden's best friend" as a tribute to the DOOM source port.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-18 22:19:19 +09:00
efc90c3221
internal/pkg: deduplicate dependency errors
...
This significantly simplifies error reporting for caller.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-17 14:41:00 +09:00
610ee13ab3
internal/pkg: lock on-filesystem cache
...
Any fine-grained file-based locking here significantly hurts performance and is not part of the use case of the package. This change guarantees exclusive access to prevent inconsistent state on the filesystem.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-16 18:12:51 +09:00
5936e6a4aa
internal/pkg: parallelise scrub
...
This significantly improves scrubbing performance. Since the cache directory structure is friendly to simultaneous access, this is possible without synchronisation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-16 02:47:59 +09:00
3499a82785
internal/pkg: cache computed identifiers
...
This eliminates duplicate identifier computations. The new implementation also significantly reduces allocations while computing identifier for a large dependency tree.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-15 23:30:43 +09:00
088d35e4e6
internal/pkg: optional dependency graph size limit
...
This provides a quick check against cyclic dependencies without hurting cure performance.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-14 18:25:46 +09:00
1667df9c43
internal/pkg: zero atime and mtime
...
This is significantly more practical than keeping track of them in directory flattening format and setting this in every non-artifact implementation. Only tarArtifact can have meaningful deterministic checksums that are not zero and zeroing them still keeps autotools happy.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-13 01:30:30 +09:00
156dd767ef
internal/pkg: remove typeflag promotion loop
...
Expanding this enables sharing of code common between types.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-13 00:33:13 +09:00
5fe166a4a7
internal/pkg: exec prefix verbose output
...
This proxies program output through msg with a name and fd prefix. This also avoids introducing additional information to the container via process stdout/stderr.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-12 22:15:01 +09:00
41a8d03dd2
internal/pkg: cure completion verbose messages
...
This reports cure completions to the user.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-12 21:56:00 +09:00
610572d0e6
internal/pkg: optionally named static file
...
These are generally for generating configuration files or build scripts, naming them is quite useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-12 04:34:50 +09:00
29951c5174
internal/pkg: caller-supplied reporting name for exec
...
This does not have a reasonable way of inferring the underlying name. For zero value it falls back to base of executable pathname.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-12 04:17:47 +09:00
91c3594dee
internal/pkg: append user-facing name in messages
...
This makes verbose messages much more useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-12 03:53:19 +09:00
7ccc2fc5ec
internal/pkg: exec with specific timeout
...
This change also updates the documentation of NewExec.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-11 17:46:04 +09:00
63e137856e
internal/pkg: do not discard the result of compact
...
This result was mistakenly unused resulting in incorrect identifiers for artifacts with duplicate dependencies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-11 04:40:24 +09:00
e1e46504a1
container/check: return error backed by string type
...
The struct turned out not necessary during initial implementation but was not unwrapped into its single string field. This change replaces it with the underlying string and removes the indirection.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-11 04:23:55 +09:00
ec9343ebd6
container/check: intern absolute pathnames
...
This improves performance in heavy users like internal/pkg.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-11 04:18:11 +09:00
423808ac76
nix: use package from module in default
...
This makes overriding hakurei easier. Also avoids building hakurei twice since nix does that for some reason.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-11 03:50:08 +09:00
2494ede106
container/init: configure interface lo
...
This enables loopback networking when owning the net namespace.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-11 03:36:20 +09:00
da3848b92f
internal/pkg: compare interfaces for host net
...
An upcoming improvement in the container init makes the current host net check return the same result for both cases. This change
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-11 00:30:32 +09:00
34cb4ebd3b
internal/pkg: pass context to file cure
...
This removes the left over embedded contexts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-09 05:31:38 +09:00
f712466714
internal/pkg: move dependency flooding to cache
...
This imposes a hard upper limit to concurrency during dependency satisfaction and moves all dependency-related code out of individual implementations of Artifact. This change also includes ctx and msg as part of Cache.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-09 05:20:34 +09:00
f2430b5f5e
internal/pkg: use short wait delay
...
The cure is condemned at the point of cancellation and all of its state is destroyed by the deferred cleanup, so it makes little sense to wait for it much.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-08 18:58:51 +09:00
863e6f5db6
internal/pkg: use correct artifact count
...
This updates buffer sizes and counters to use correct total artifact count.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-08 08:45:37 +09:00
23df2ab999
internal/pkg: place ephemeral upperdir in tmp
...
This enables the use of directories made writable this way as scratch space.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-08 08:23:16 +09:00
7bd4d7d0e6
internal/pkg: support explicit overlay mount
...
This removes all but the /work/ auto overlay behaviour and enables much greater flexibility. This also renames ExecContainerPath to ExecPath so it is easier to type.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-08 07:55:09 +09:00
b3c30bcc51
internal/pkg: set container WaitDelay
...
This prevents a container from blocking forever after context is canceled.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-08 06:23:57 +09:00
38059db835
internal/pkg: make tar temporary directory writable
...
This allows it to be renamed to work directory.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-08 04:32:14 +09:00
409fd3149e
internal/pkg: reserve kind range
...
This is useful for custom implementations of Artifact.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-08 01:21:51 +09:00
4eea136308
internal/pkg: do not connect stdin
...
This introduces external state when verbose.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-07 23:17:58 +09:00
c86ff02d8d
internal/pkg: tar optional file
...
This allows tar to take a single-file directory Artifact as input.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-07 22:16:26 +09:00
e8dda70c41
internal/pkg: return reader for files
...
This improves efficiency for cache hits.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-07 21:36:47 +09:00
7ea4e8b643
internal/pkg: support tarball compressed via bzip2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-07 20:18:28 +09:00
5eefebcb48
internal/pkg: reject entry types disallowed in the cache
...
These are not encoded in the format, they are rejected here to serve as a check for cache since checksum is computed for every directory.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-07 03:22:44 +09:00
8e08e8f518
internal/pkg: automatic overlay mount on work
...
This directly submits the upperdir to cache. It is primarily used in bootstrapping where tools are limited and should not be used unless there is a very good reason to.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-07 03:14:33 +09:00
54da6ce03d
internal/pkg: respect mount order for overlay temp
...
Setting it up after everything else prevents covering files in /tmp.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-07 01:03:49 +09:00
3a21ba1bca
internal/pkg: implement file artifact
...
This is an Artifact implementing File, backed by a constant, caller-supplied byte slice.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-07 00:39:29 +09:00
45301559bf
internal/pkg: fail on empty output directory
...
This works around the fact that execArtifact always creates the work directory when setting up the bind mount.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-07 00:04:32 +09:00
0df87ab111
internal/pkg: automatic overlay mount on tmp
...
This sets up the last Artifact to target /tmp as a writable overlay mount backed by the host side temp directory. This is useful for an Artifact containing source code to be built for another Artifact for example.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 23:45:08 +09:00
aa0a949cef
internal/pkg: do not clear execute bit
...
Only write should be cleared here, clearing execute causes execArtifact to be unable to start anything since no Artifact is able to produce an executable file.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 22:31:44 +09:00
ce0064384d
internal/pkg: automatic overlay mount on root
...
This makes it possible to use an Artifact as root without arranging for directory creation in the Artifact ahead of time.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 22:19:47 +09:00
53d80f4b66
internal/pkg/testdata: check network
...
This validates hostNet state.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 21:32:10 +09:00
156096ac98
internal/pkg: known checksum exec artifact
...
This optionally attaches an output checksum to an execArtifact and enables host networking for the resulting container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 20:58:34 +09:00
ceb75538cf
internal/pkg: update http checksum signature
...
This was using the old pre-KnownChecksum function signature. It did not affect correctness since httpArtifact performs internal validation to avoid the strict mode vfs roundtrip, but it prevented content-addressed cache hits.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 18:24:31 +09:00
0741a614ed
internal/pkg: relocate testtool workaround
...
This can be reused in other test cases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 18:06:56 +09:00
e7e9b4caea
internal/pkg: exec nil path check during cure
...
This results in os.ErrInvalid instead of a panic, which hopefully improves user experience.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 17:46:12 +09:00
f6d32e482a
internal/pkg: ensure parent for non-directory entries
...
This works around streams containing out of order entries.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 05:55:24 +09:00
79adf217f4
internal/pkg: implement exec artifact
...
This runs a program in a container environment. Artifacts can be made available to the container, they are cured concurrently and mounted in order.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 05:05:34 +09:00
8efffd72f4
internal/pkg: destroy temp during deferred cleanup
...
This avoids missing the cleanup when cure returns an error.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 04:24:54 +09:00
86ad8b72aa
internal/pkg: expose cure through cure context
...
This allows a curing Artifact to cure Artifact it depends on.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 01:04:06 +09:00
e91049c3c5
internal/pkg: pass cure context as single value
...
This cleans up the function signature and makes backwards compatible API changes possible.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-06 00:56:49 +09:00
3d4d32932d
internal/pkg: verify checksum after uneventful scrub
...
This checks that scrub did not condemn any entry without reporting it.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-05 22:54:16 +09:00
0ab6c13c77
internal/pkg: consistency check for on-disk cache
...
This change adds a method to check on-disk cache consistency and destroy inconsistent entries as they are encountered. This primarily helps verify artifact implementation correctness, but can also repair a cache that got into an inconsistent state from curing a misbehaving artifact, without having to destroy the entire cache.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-05 05:30:29 +09:00
834cb0d40b
internal/pkg: override "." for directory checksum
...
This makes the checksum consistent with the final resting state of artifact directories without incurring the cost of an extra pair of chown syscalls.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-05 04:00:13 +09:00
7548a627e5
internal/pkg: delete stale done channels
...
There is no reason to keep these around.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-05 02:12:34 +09:00
b98d27f773
internal/pkg: expand single directory tarball
...
This enables much cleaner use of their output without giving up any meaningful data.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-05 01:43:23 +09:00
f3aa31e401
internal/pkg: temporary scratch space for cure
...
This allows for more flexibility during implementation. The use case that required this was for expanding single directory tarballs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-05 01:39:18 +09:00
4da26681b5
internal/pkg: compute http identifier from url
...
The previous implementation exposes arbitrary user input to the cache as an identifier, which is highly error-prone and can cause the cache to enter an inconsistent state if the user is not careful. This change replaces the implementation to compute identifier late, using url string as params.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-05 00:43:21 +09:00
4897b0259e
internal/pkg: improve artifact interface
...
This moves all cache I/O code to Cache. Artifact now only contains methods for constructing their actual contents.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-05 00:01:23 +09:00
d6e4f85864
internal/pkg: ignore typeflag 'g'
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-04 12:46:56 +09:00
3eb927823f
internal/pkg: create symlinks for files
...
These are much easier to handle than hard links and should be just as transparent for this use case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-04 01:48:53 +09:00
d76b9d04b8
internal/pkg: implement tar artifact
...
This is useful for unpacking tarballs downloaded from the internet.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-04 01:34:30 +09:00
fa93476896
internal/pkg: override working directory perms
...
This must be writable to enable renaming, and the final result is conventionally read-only alongside the entire directory contents. This change overrides the permission bits as part of Store.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-04 00:55:52 +09:00
bd0ef086b1
internal/pkg: enable cache access during store
...
This is still not ideal as it makes entry into Store sequential. This will be improved after more usage code is written.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-04 00:39:14 +09:00
05202cf994
internal/pkg: pass context in request wrapper
...
This method is for the most common use case, and in actual use there will always be an associated context.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-03 23:53:52 +09:00
40081e7a06
internal/pkg: implement caching for directories
...
This works on any directories and should be robust against any bad state the artifact curing process might have failed at.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-03 22:54:46 +09:00
863d3dcf9f
internal/pkg: wrap checksum string encoding
...
This wraps base64.URLEncoding.EncodeToString for cleaner call site.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-03 22:03:25 +09:00
8ad9909065
internal/pkg: compute identifier from deps
...
This provides infrastructure for computing a deterministic identifier based on current artifact kind, opaque parameters data, and optional dependency kind and identifiers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-03 21:26:25 +09:00
deda16da38
internal/pkg: create work directory
...
This is used for artifacts that cure into directories.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-03 20:56:11 +09:00
55465c6e72
internal/pkg: optionally validate flat pathnames
...
This makes the decoder safe against untrusted input without hurting performance for a trusted stream. This should still not be called against untrusted input though.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-03 18:59:18 +09:00
ce249d23f1
internal/pkg: implement http artifact
...
This is useful for downloading source tarballs from the internet.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-03 15:29:58 +09:00
dd5d792d14
go: 1.25
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-03 15:25:28 +09:00
d15d2ec2bd
internal/pkg: relocate cache test helper
...
This is useful for other tests that need a cache instance.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-02 16:08:43 +09:00
3078c41ce7
internal/pkg: encode entry in custom format
...
The fact that Gob serialisation is deterministic is an implementation detail. This change replaces Gob with a simple custom format.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-02 15:39:42 +09:00
e9de5d3aca
internal/pkg: implement caching for files
...
This change contains primitives for validating and caching single-file artifacts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-02 12:57:19 +09:00
993afde840
dist: install sharefs
...
This also removes the deprecated hpkg program.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2026-01-02 00:57:51 +09:00
c9cd16fd2a
cmd/sharefs: prepare directory early
...
This change also checks against filesystem daemon running as root early.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-27 23:17:02 +09:00
e42ea32dbe
nix: configure sharefs via fileSystems
...
Turns out this did not work because in the vm test harness, virtualisation.fileSystems completely and silently overrides fileSystems, causing its contents to not even be evaluated anymore. This is not documented as far as I can tell, and is not obvious by any stretch of the imagination. The current hack is cargo culted from nix-community/impermanence and hopefully lasts until this project fully replaces nix.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-27 23:14:08 +09:00
e7982b4ee9
cmd/sharefs: create directory as root
...
This optional behaviour is required on NixOS as it is otherwise impossible to set this up: systemd.mounts breaks startup order somehow even though my unit looks identical to generated ones, fileSystems does not support any kind of initialisation or ordering other than against other mount points.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-27 22:14:33 +09:00
ef1ebf12d9
cmd/sharefs: handle mount -t fuse.sharefs
...
This should have been handled in a custom option parsing function, but that much extra complexity is unnecessary for this edge case. Honestly I do not know why libfuse does not handle this itself.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-27 20:49:27 +09:00
775a9f57c9
cmd/sharefs: check option parsing behaviour
...
This change makes it possible to check parseOpts behaviour as part of Go tests.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-27 17:33:12 +09:00
2f8ca83376
cmd/sharefs: containerise filesystem daemon
...
This replaces the forking daemonise libfuse function which prevents Go callbacks from calling into the runtime. This also enforces least privilege on the daemon process.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-27 10:16:35 +09:00
3d720ada92
container: optionally allow orphan
...
This is required for the typical daemonise use case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-27 09:12:02 +09:00
2e5362e536
cmd/sharefs: opaque setup state
...
This allows unrestricted use of the type system and prepares setup code for cross-process initialisation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-27 04:14:00 +09:00
6d3bd27220
cmd/sharefs: expand fuse_main
...
This change should not change behaviour other than making output more consistent.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-27 02:30:28 +09:00
a27305cb4a
cmd/sharefs: improve help message
...
This improves consistency with the fuse_main help message.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-27 02:20:41 +09:00
0e476c5e5b
cmd/sharefs: allocate sharefs_private early
...
This also removes global state used by sharefs_init.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-26 08:08:41 +09:00
54712e0426
nix: set noatime on sharefs
...
Could improve performance, atime is not useful for this filesystem anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-26 05:34:05 +09:00
b77c1ecfdb
cmd/sharefs/test: check option handling
...
This verifies behaviour related to setuid/setgid when starting as root.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-26 05:28:45 +09:00
dce5839a79
nix: do not restart sharefs
...
This avoids disrupting running containers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-26 04:12:14 +09:00
d597592e1f
cmd/sharefs: rename fuse-helper to fuse-operations
...
This is not really just library wrapper functions, but instead implements the callbacks, so fuse-operations makes more sense.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-26 03:19:32 +09:00
056f5b12d4
cmd/sharefs: move translate_pathname body to macro wrapper
...
This is never called directly anywhere and it is simple enough to be included in the macro. This avoids passing the pointer around and dereferencing errno location, resulting in over 5% increase in throughput on the clang build. No change in the gcc build though.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-26 02:10:59 +09:00
da2bb546ba
cmd/sharefs: remove readlink
...
This filesystem does not support symbolic links, so readlink is not useful, and unreachable in this case because of the check in getattr.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-25 06:00:58 +09:00
7bfbd59810
cmd/sharefs: implement shared filesystem
...
This is for passing files between applications, similar to android /sdcard.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-25 05:13:02 +09:00
ea815a59e8
nix: disable source fortification in devShell
...
This generates warnings when compiling without optimisation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-21 02:22:28 +09:00
28a8dc67d2
internal/pipewire: raise Core::Sync timeout
...
Hopefully relieves spurious failures on a very overloaded system.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-19 00:49:33 +09:00
ec49c63c5f
internal/pipewire: EPOLL_CTL_ADD instead of EPOLL_CTL_MOD
...
Implementation is no longer tied down by the limitations of SyscallConn.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-19 00:43:44 +09:00
5a50bf80ee
internal/pipewire: hold socket fd directly
...
The interface provided by net is not used here and is a leftover from a previous implementation. This change removes it.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-19 00:28:24 +09:00
ce06b7b663
internal/pipewire: inform conn of blocking intent
...
The interface does not expose underlying kernel notification mechanisms. This change removes the need to poll in situations were the next call might block.
This is made cumbersome by the SyscallConn interface left over from a previous implementation, it will be replaced in a later commit as the current implementation does not make use of any net.Conn methods other than Close.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-19 00:00:33 +09:00
08bdc68f3a
internal/pipewire: sendmsg/recvmsg errors are fatal
...
When returned wrapped as a syscall error, these are impossible to recover from, so wrap them as a fatal error.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-18 23:33:12 +09:00
8cb0b433b2
release: 0.3.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-15 20:34:45 +09:00
767f1844d2
test: check shim private dir cleanup
...
This asserts that no shim private dir was left behind after all containers terminate.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-15 20:30:19 +09:00
54610aaddc
internal/outcome: expose pipewire via pipewire-pulse
...
This no longer exposes the pipewire socket to the container, and instead mediates access via pipewire-pulse. This makes insecure parts of the protocol inaccessible as explained in the doc comment in hst.
Closes #29 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-15 12:57:06 +09:00
2e80660169
internal/outcome: look up pipewire-pulse path
...
This is for setting up the pipewire-pulse container in shim, for #29 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-15 12:38:39 +09:00
d0a3c6a2f3
internal/outcome: optional shim private dir
...
This is a private work directory owned by the specific shim. Useful for sockets owned by this instance of the shim and requires no direct assistance from the priv-side process.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-15 12:32:46 +09:00
0c0e3d6fc2
hst: add direct hardware option
...
This is unfortunately the only possible setup to securely expose PipeWire to the container. Further explanation explained in the doc comment and #29 .
This will be implemented in a future commit.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-15 12:29:32 +09:00
fae910a1ad
container: sync stubbed wait4 loop after notify
...
This ensures consistent state observed by wait4 loop when running against stub.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 10:22:48 +09:00
178c8bc28b
internal/pipewire: handle SecurityContext::Create error
...
This method can result in an error targeting it, so it is handled here. This change also causes a call to Create to also Core::Sync, as it should have done.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 09:41:28 +09:00
30dcab0734
internal/pipewire: SecurityContext as destructible
...
This proxy can be destroyed by sending a Core::Destroy targeting it. This change implements the Destroy method by embedding destructible.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 09:31:50 +09:00
0ea051062b
internal/pipewire: reorder context struct
...
This change reorders and groups struct elements. This improves readability since this struct holds a lot of state loosely related to each other.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 09:26:30 +09:00
b0f2ab6fff
internal/pipewire: implement Core::Destroy
...
This change also implements pending destructible check on Sync. Destruction method should always be implemented as a wrapper of destructible.destroy.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 09:20:58 +09:00
00a5bdf006
internal/pipewire: do not emit None for spa_dict
...
Turns out the PipeWire server does not expect a value of type None here at all.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 09:06:44 +09:00
a27dfdc058
internal/pipewire: implement Core::CreateObject
...
Nothing uses this right now, this would have to be called by wrapper methods on Registry that would search the objects
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 08:10:57 +09:00
6d0d9cecd1
internal/pipewire: handle nil spa_dict correctly
...
This now marshals into a value of type None when the slice is nil, and correctly unmarshals from type None.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 07:12:00 +09:00
17248d7d61
internal/pipewire: unmarshal nil pointer correctly
...
This now calls unmarshalCheckTypeBounds to advance to the next message. Additionally, handling for None value is relocated to a function for reuse by other types.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 06:58:53 +09:00
41e5628c67
internal/pipewire: return correct size for nil spa_dict
...
A nil spa_dict results in a None type value being sent over the wire.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 06:07:46 +09:00
ffbec828e1
internal/pipewire: move Core wrapper methods under Core
...
These do not belong under Context, and is an early implementation limitation that carried over.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-14 05:37:21 +09:00
de0467a65e
internal/pipewire: treat noAck violation as fatal
...
Receiving this event indicates something has gone terribly wrong somehow, and ignoring Core::BoundProps causes inconsistent state anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-13 22:30:06 +09:00
b5999b8814
internal/pipewire: implement Core::RemoveId
...
This is emitted by the server when a proxy id is removed for any reason. Currently, the only path for this to be emitted is when a global object is destroyed while some proxy is still bound to it.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-13 21:50:32 +09:00
ebc67bb8ad
nix: update flake lock
...
NixOS 25.11 introduces a crash in cage and an intermittent crash in foot.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-12 08:39:55 +09:00
e60ff660f6
internal/pipewire: treat unknown opcode as fatal
...
Skipping events can cause local state to diverge from the server.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-11 04:22:03 +09:00
47db461546
internal/pipewire: generic Core::Error handling
...
This flushes message buffer before queueing the event expecting the error. Since this is quite useful and relatively complex, it is relocated to a method of Context.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-11 04:07:55 +09:00
0a3fe5f907
internal/pipewire: export Registry::Destroy
...
This handles the error returned by Sync.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-11 03:34:33 +09:00
b72d502f1c
internal/outcome: populate instance metadata for PipeWire
...
These have similar semantics to equivalent Wayland security-context-v1 fields.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-10 03:01:30 +09:00
f8b3db3f66
internal/pipewire: cleaner error message for unsupported type
...
The error string itself is descriptive enough, so use it as the error message directly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-10 01:51:06 +09:00
0e2fb1788f
internal/pipewire: implement Registry::Destroy
...
This requires error handling infrastructure in Core that does not yet exist, so it is not exported for now. It has been manually tested via linkname against PipeWire.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-10 01:25:30 +09:00
d8417e2927
internal/pipewire: implement Registry::GlobalRemove
...
This is emitted by PipeWire when a global object disappears, because PipeWire insists that all clients that had called Core::GetRegistry must constantly sync its local registry state with the remote.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-10 01:00:03 +09:00
ccc0d98bd7
release: 0.3.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-09 08:12:52 +09:00
a3fd05765e
container: load initial process started before syscall
...
This avoids a race between returning from syscall and checking the state.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-09 08:12:22 +09:00
c538df7daa
internal/pipewire: expose connection props
...
Unused in hakurei but could be useful when the package is moved out of internal.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-09 06:51:12 +09:00
44e5aa1a36
internal/pipewire: include remaining size in recvmsg wrapper
...
This otherwise truncates the received data by len(remaining) bytes.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-09 06:36:46 +09:00
cf0e7d8c27
internal/pipewire: reset per-roundtrip state once per call
...
This was left in consume when relocating per-roundtrip code out of the per-receive consume method.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-09 06:28:33 +09:00
130add21e5
internal/pipewire: increment remote sequence after establishing bounds
...
This avoids incrementing it twice proceeding from a partial message.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-09 06:21:41 +09:00
5ec4045e24
internal/pipewire: do not clobber error parsing SCMs
...
The error is handled later, clobbering it here breaks error handling when SCMs are present.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-09 06:02:15 +09:00
be2075f169
Revert "internal/pipewire: work around remote sequence quirk"
...
This reverts commit 564db6863b .
2025-12-09 05:25:41 +09:00
e9fb1d7be5
container/initdaemon: copy wstatus from wait4 loop
...
Due to the special nature of the init process, direct use of wait outside the wait4 loop is racy. This change copies the wstatus from wait4 loop state instead.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 22:58:42 +09:00
dafe9f8efc
container: spin instead of block on wait4 ECHILD
...
Blocking prevents further wait4 processing causing ops to never receive their signals.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 22:56:13 +09:00
96dd7abd80
container: improve error message fallback
...
This now falls back to message.Error if no other concrete type is matched.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 22:45:54 +09:00
d5fb179012
cmd/hakurei: exec instead of fork/exec from shell
...
There is no reason to keep the shell process around.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 22:29:41 +09:00
462863e290
container: friendlier error message for op timing out
...
This includes the string for the failing op which helps with troubleshooting.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 22:19:03 +09:00
2786611b88
test/interactive: add app with bad daemon
...
This is useful for testing daemon error handling behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 22:12:07 +09:00
791a1dfa55
container: make wait4 loop available to ops
...
Due to the special nature of the init process, regular wait calls are unavailable. This change provides infrastructure to access wait4 loop state from Op.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 21:43:49 +09:00
564db6863b
internal/pipewire: work around remote sequence quirk
...
Remote sequence sometimes start with a non-zero value, and keeps the same value for a while before going back to zero. Conditions for reproducing this behaviour is not yet known. This change works around this behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 20:10:01 +09:00
87781c7658
treewide: include PipeWire op and enforce PulseAudio check
...
This fully replaces PulseAudio with PipeWire and enforces the PulseAudio check and error message. The pipewire-pulse daemon is handled in the NixOS module.
Closes #26 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 08:53:04 +09:00
0c38fb7b6a
hst: expose daemon as fs entry
...
This is slightly counterintuitive, but it turned out well under this framework since the daemon backs its target file.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 07:38:47 +09:00
357cfcddee
container: start daemons within container
...
This is useful for daemons internal to the container. The only current use case is pipewire-pulse.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 07:21:04 +09:00
6bf245cf1b
container: pass context as setup state
...
This is useful currently for daemon Op, but could be used for many other things.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 06:06:19 +09:00
c8eeb4a4d1
internal/outcome: integrate pipewire server
...
This is very simple and takes almost no inputs. This is not yet hooked up to anything to prevent breaking any existing behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 05:03:16 +09:00
5785714b64
container: call op method right before initial process
...
This is at a point considered to be already "within" the container. Daemons internal to the container can be started here.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 04:57:24 +09:00
422efcf258
hst: check for insecure PulseAudio enablement
...
This is currently still a noop, but required for #26 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 03:13:02 +09:00
104eeecf65
cmd/hakurei: add pipewire flag
...
This is for "run" command, formerly permissive defaults behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-08 02:39:55 +09:00
bf856f06e5
internal/pipewire: constant for PIPEWIRE_REMOTE
...
This is not defined anywhere in upstream PipeWire, no idea why.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 23:35:29 +09:00
1931b54600
hst: add pipewire flag
...
These are for #26 . None of them are implemented yet. This fixes up test cases for the change to happen. Existing source code and JSON configuration continue to have the same effect. Existing flags get its EPulse bit replaced by EPipeWire.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 22:34:40 +09:00
093e30c788
internal/system: integrate PipeWire SecurityContext
...
Tests for this Op happens to be the best out of everything due to the robust infrastructure offered by internal/pipewire.
This is now ready to use in internal/outcome for implementing #26 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 17:39:34 +09:00
1b17ccda91
internal/system: optional op check parallelism
...
The PipeWire Op check cannot be made parallel due to the OS interaction.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 17:31:10 +09:00
7c6fc1128b
internal/pipewire: set finalizer on scc
...
This prevents leaking the socket and pipe fds.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 17:29:22 +09:00
8cdd659239
internal/pipewire: seq access method for consume
...
This improves readability as the offset is not immediately obvious.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 17:07:30 +09:00
15c2839a09
internal/pipewire: respond to Core::Ping
...
There is currently no known message that will get the PipeWire server to emit this event. It should be handled regardless.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 14:55:56 +09:00
b9b9705b52
internal/pipewire: specify opcode and file count with message
...
This adds checking of FileCount while writing a message. Message encoding is relocated to an exported method to be used externally, probably for test stubbing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 13:54:11 +09:00
246e04214a
internal/system: pass syscall error message
...
This makes wrapped syscall errors produce a cleaner error message.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 02:08:05 +09:00
503bfc6468
internal/system: port connect by name
...
This behaviour is a bit messy and checks what appears to be a windows-specific environment variable for some reason. Keeping everything intact regardless to match upstream behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 02:00:19 +09:00
d837628b4c
internal/system: remove ineffectual join reverting wayland
...
Removing the pathname socket used to be handled separately, now it is done during the Close call.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-07 00:43:50 +09:00
3cb58b4b72
internal/pipewire: high level SecurityContext helper
...
This sets up close pipe and socket internally, and exposes the resulting pathname socket and close_fd cleanup as an io.Closer.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-06 21:16:27 +09:00
bb1fc4c7bc
internal/pipewire: check pending ids after done
...
This is not guaranteed to have completed after a roundtrip. This is leftover from when Roundtrip also sent and waited for sync.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-06 21:09:55 +09:00
f44923da29
internal/pipewire: post-sync cleanup functions
...
This makes it easier to handle resources who only needs to stay alive before the next sync.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-06 21:03:21 +09:00
5e7861bb00
internal/pipewire: handle dangling files in roundtrip
...
This should not be handled on every receive as it could cause valid (though impossible in current upstream implementation) messages to be rejected and raise a protocol error.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-06 19:21:57 +09:00
7cb3308a53
internal/pipewire: store proxy errors in context
...
This change fixes handling of non-fatal errors during a roundtrip as there can be multiple receive calls per roundtrip.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-06 19:13:46 +09:00
490093a659
internal/pipewire: set errno on an empty message
...
This matches upstream behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-06 16:50:49 +09:00
2b22efcdf1
internal/pipewire: rename context consume method
...
This name is more correct since it does not roundtrip, but receives messages. This is also more consistent with the method on event proxies.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-06 16:44:39 +09:00
8a2f9edcf9
internal/pipewire: use sendmsg/recvmsg directly
...
The PipeWire protocol does not work with Go abstractions. This change makes relevant methods call sendmsg/recvmsg directly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-06 02:12:47 +09:00
0d3f332d45
internal/pipewire: do not send ancillary msg without files
...
This is unnecessary and does not match upstream behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-05 04:20:04 +09:00
d5509cc6e5
internal/pipewire: constants from pipewire/keys.h
...
These are PipeWire spa_dict keys. Interestingly many keys in the sample are undefined and appear as magic strings in upstream source code.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-05 03:27:30 +09:00
0d3ae6cb23
internal/pipewire: improve protocol error messages
...
These are mostly small formatting changes, with the biggest change being to UnexpectedEOFError where its kind is now described as part of the error type.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-04 03:15:58 +09:00
69b1131d66
internal/pipewire: use type name in error strings
...
This provides more useful messages for protocol errors.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-04 02:29:27 +09:00
2c0b92771a
internal/pipewire: relocate constants
...
This should make things easier to navigate, and possible to fully automatically generate the constants in the future.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-03 03:52:17 +09:00
054c91879f
internal/pipewire: finalizers for dangling files
...
This makes their handling much less error-prone.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-03 03:36:02 +09:00
c34439fc5f
internal/pipewire: collect non-protocol errors
...
These errors are recoverable and should not terminate event handling. Only terminate event handling for protocol errors or inconsistent state that makes further event handling impossible.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-03 01:35:43 +09:00
32fb137bb2
internal/pipewire: fail on unacknowledged proxies
...
These proxies (with special cases documented in the implementation) are only safe for use after acknowledgement from the server.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-02 21:17:46 +09:00
e7a665e043
internal/pipewire: handle Core::Error
...
This event is not encountered in the pw-container sample, but already has existing sample from an excerpt.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-02 06:16:18 +09:00
af741f20a0
internal/pipewire: implement client context
...
This consumes the entire sample, is validated to send identical messages and correctly handle received messages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-02 06:03:21 +09:00
39c6716fb0
internal/pipewire: use correct types in header
...
This was written when the protocol was still barely understood, so none of the types here are correct and match the rest of the protocol. This change corrects these types.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-02 03:32:10 +09:00
7bc73afadd
internal/pipewire: wrap EOF error for deserialisation
...
The io.ErrUnexpectedEOF error can be returned from multiple places. This change eases error handling.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-02 03:19:37 +09:00
647aa9d02f
internal/pipewire: preallocate for footer
...
This is useful during serialisation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-12-02 03:06:27 +09:00
91aaabaa1b
internal/pipewire: benchmarks against Gob and JSON
...
Performance does not matter for the use case of this library, but it is still interesting to know.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-30 12:13:46 +09:00
3d4c7cdd9e
internal/pipewire: implement Core::Error
...
Sample was captured from pw-cli.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-30 01:39:39 +09:00
4fd6d6c037
internal/pipewire: implement Core::Ping, Core::Pong
...
I could not get the server to produce these events, however I am confident enough with the implementation to do it by hand.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-29 23:25:29 +09:00
de3fc7ba38
internal/pipewire: implement SecurityContext::Create
...
This is finally the thing we are after.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-29 16:46:39 +09:00
5a5c4705dd
internal/pipewire: implement Registry::Bind
...
This change also adds test cases for messages before this one.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-29 03:01:53 +09:00
f703aa20a5
internal/pipewire: implement client generation footer
...
This corresponds with the core generation footer and seem to be the only other possible footer type.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-29 02:55:30 +09:00
5c12425d48
internal/pipewire: implement Registry::Global
...
Dealing with this event reawakened my burning hatred for OOP.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-28 02:32:45 +09:00
cbe86dc4f0
internal/pipewire: add json struct tags
...
These match the names found in documentation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-28 01:33:32 +09:00
d08a1081bd
internal/pipewire: do not store spa_dict fields
...
This is effectively a poor man's slice, it is entirely unnecessary here and can be handled internally.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-28 01:25:18 +09:00
72a2601d74
internal/pipewire: store sample iovec continuously
...
This removes the need for manual splitting. The understanding of the format is robust enough to allow this to happen anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-28 00:35:10 +09:00
1dab87aaf0
internal/pipewire: add missing constants
...
These did not appear useful at first since it was assumed to be filenames for loading modules.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-27 21:28:16 +09:00
2bafde99e3
internal/pipewire: shorten test data filenames
...
These were getting very annoying to type.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-27 20:06:01 +09:00
91efeb101a
internal/pipewire: spa_dict size nil check
...
This fixes serialisation of NULL spa_dict.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-27 02:51:36 +09:00
dcb22a61c0
internal/pipewire: require appending marshaler
...
This eliminates all non-reflect allocations.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-27 02:33:19 +09:00
e028a61fc1
internal/pipewire: preallocate for known size
...
This is still not efficient by any means, but it should eliminate most non-reflect allocation (all allocation if PODMarshaler is not used).
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-27 02:26:31 +09:00
73987be7d4
internal/pipewire: size without serialisation
...
This is required to achieve zero allocation (other than reflect).
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-27 02:17:38 +09:00
563b5e66fc
internal/pipewire: simplify spa_dict appends
...
This change uses the (somewhat) newly exposed MarshalAppend which improves readability.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-27 01:52:13 +09:00
2edcfe1e68
internal/pipewire: define size constants
...
This gets rid of magic numbers in marshal/unmarshal.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-27 00:54:56 +09:00
2698ca00e8
internal/pipewire: implement Core::Done
...
The message in the sample does not correspond to any known method call. The spec does not mention what to do with messages like this, but all existing usage code simply drops it.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-26 19:02:21 +09:00
1d0143386d
internal/pipewire: optional final trailing garbage check
...
Omitting the check is only useful for custom unmarshaler.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-26 18:50:39 +09:00
a55c209099
internal/pipewire: additional Client::Info test case
...
This appears to add *one single entry* compared to the message before it. The inefficiency of this protocol is beyond imagination.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-26 16:28:57 +09:00
10ff276da1
internal/pipewire: additional Client::Info test case
...
This message follows the other Client::Info event before it. No idea why.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-26 16:17:38 +09:00
fd4d379b67
internal/pipewire: implement Client::Info
...
Everything is already supported, as usual.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-26 16:05:46 +09:00
77f5b89a41
internal/pipewire: implement Core::BoundProps
...
Very straightforward type, everything is already supported.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 18:40:19 +09:00
14e33f17e5
internal/pipewire: check nil marshaler
...
NULL values have special case in the format. This check ensures correctness serialising nil pointers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 18:36:08 +09:00
cfeb7818eb
internal/pipewire: implement Core::Info and generation footer
...
These are not directly related but are first encountered on the same message in the capture.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 15:16:12 +09:00
05391da556
internal/pipewire: implement footer
...
The POD itself is serialised without requiring a special case, however its presence is only indicated by the difference in size recorded in the header and payload.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 15:11:22 +09:00
463f8836e6
internal/pipewire: implement Long type
...
Thankfully no special case here.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 15:05:37 +09:00
2e465c94da
internal/pipewire: implement Id type
...
This is, in fact, just a glorified Int type.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 15:01:58 +09:00
26009fd3f7
internal/pipewire: slice at POD boundary
...
This prevents incorrectly reading trailing data as part of the current POD.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 14:58:56 +09:00
2d7b896a8c
internal/pipewire: bounds check against wire size
...
This covers cases where wire size is not known ahead of time.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 13:42:31 +09:00
a0eb010aab
internal/pipewire: spa_dict trailing garbage within POD
...
This performs the check within the bounds of the POD only. This was not caught since spa_dict was only used as the final struct field until now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 13:39:02 +09:00
b1b27ac1df
internal/pipewire: zero size before validation
...
Leftover values from previous invocations cause incorrect behaviour here.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 12:21:37 +09:00
fc3d78fe01
internal/pipewire: implement Core::Sync
...
Once again, already entirely supported, the offset is not yet fully verified but makes intuitive sense. Will verify this on future occurrences of the message.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 08:52:06 +09:00
591637264a
internal/pipewire: implement Core::GetRegistry
...
This struct is entirely supported, so this change is very straightforward.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 08:34:19 +09:00
e77652bf89
internal/pipewire: move test data to files
...
These get very big later on, and would be painful to represent as the compound literal.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 08:09:10 +09:00
88d3e46413
internal/pipewire: implement Client::UpdateProperties
...
This is the second message on the captured sample.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 04:16:11 +09:00
e51e81bb22
internal/pipewire: implement spa_dict type
...
This is a terrible type that defies the type system. It is implemented on the concrete type to avoid special cases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 04:08:52 +09:00
8f4a3bcf9f
internal/pipewire: use custom marshaler when available
...
This reduces special cases. This change also exposes unmarshalled message size on the wire.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 04:05:22 +09:00
827dc9e1ba
internal/pipewire: implement string type
...
This is still NUL terminated strings, and an extra NUL character on an 8-byte string does cause an extra 7 bytes of padding.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 04:00:59 +09:00
d92de1c709
internal/pipewire: check for trailing garbage
...
This is useful during development.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 01:59:29 +09:00
5bcafcf734
internal/pipewire: implement Core::Hello
...
This implements enough types to correctly marshal and unmarshal Core::Hello.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-25 01:20:30 +09:00
9f7b0c2f46
internal/pipewire: add type constants
...
This change also centralises encoding testing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-24 22:00:09 +09:00
3e87187c4c
internal/pipewire: implement message header
...
Test cases are from interactions between pw-container and PipeWire. Results are validated against corresponding body.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-23 16:20:35 +09:00
b651d95e77
workflows: do not duplicate on pulls
...
This condition causes two runs to be created on a pull, as gitea does not check whether a run has already been created for the current commit.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-19 06:59:32 +09:00
aab92ce3c1
internal/wayland: clean up pathname socket
...
This is cleaner than cleaning up in internal/system as it covers the failure paths.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-19 06:37:04 +09:00
a495e09a8f
internal/wayland: do not double close fd
...
These are already closed during securityContextBindPipe on a non-nil error.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-17 22:03:29 +09:00
3afca2bd5b
internal/wayland: expose WAYLAND_VERSION
...
This might be useful troubleshooting information.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-17 01:46:01 +09:00
b73a789dfe
.clang-format: increase indent width
...
This significantly increases readability. This patch is pretty big so it is being done after mostly everything has settled.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-16 20:57:29 +09:00
38b5ff0cec
internal/wayland: check pathname size
...
This avoids passing a truncated pathname to the kernel.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-16 03:34:05 +09:00
3c204b9b40
internal/wayland: increase error detail
...
This includes targeted paths in the returned errors.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-16 02:09:50 +09:00
00771efeb4
internal/wayland: remove fd typecasts
...
These are no longer necessary since RawConn is no longer used.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-16 01:45:37 +09:00
61972d61f6
internal/wayland: reimplement connect/bind code
...
The old implementation is relocated to system/wayland/deprecated.go.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-16 01:23:16 +09:00
fe40af7b7e
internal/wayland: relocate connection struct
...
This interface is getting replaced, so relocating it to the deprecated wrapper package before working on its replacement.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-15 23:25:46 +09:00
12751932d1
internal/wayland: improve error handling
...
Note: wl_registry_add_listener is undocumented everywhere. Its implementation calls wl_proxy_add_listener which returns 0 on success or -1 on failure.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-15 21:26:31 +09:00
41b49137a8
.clang-format: do not limit line length
...
This hard limit destroys readability in some places.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-15 17:06:43 +09:00
c761e1de4d
nix: build with clang
...
Clang is better than gcc in various ways. This also pulls in clang-format which is very helpful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-15 16:36:36 +09:00
a91920310d
internal: relocate packages
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-15 13:58:34 +09:00
16e674782a
cmd/hakurei: reorder show entries
...
This order semantically makes more sense and generally looks tidier.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 22:14:49 +09:00
47244daefb
treewide: migrate ldd callers
...
This discontinues use of the deprecated ldd.Exec function for #25 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 21:59:59 +09:00
46fa104419
ldd: require absolute pathname
...
The sandbox which ldd(1) runs in does not inherit parent work directory, so relative pathnames will not work correctly. While it is trivial to support such a use case, the use of relative pathnames is highly error-prone and generally frowned against in this project. The Exec function remains available under the same signature until v0.4.0 where it will be removed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 21:53:10 +09:00
45953b3d9c
ldd: cancel on decoder error
...
This prevents blocking from failures caused by ldd(1) emitting output that is not anticipated by the decoder.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 21:43:34 +09:00
42759e7a9f
ldd: create musl entry representation
...
This mostly helps with debugging.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 21:38:35 +09:00
8e2d2c8246
ldd: check decoder scan guard
...
This was unreachable via the Parse wrapper.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 18:32:47 +09:00
299685775a
container: provide usage example
...
This requires cgo so unfortunately will not run in the playground.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 18:25:22 +09:00
b7406cc4c4
ldd: update package doc comment
...
This should hopefully deter misuse of this package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 17:49:01 +09:00
690a0ed0d6
ldd: decode from reader
...
This should reduce memory footprint of the parsing process and allow decoding part of the stream.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 08:33:19 +09:00
a9d72a5eb1
internal/outcome: rename run from main
...
The "main.go" name is quite confusing as this is often only present in main packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 01:06:14 +09:00
6d14bb814f
container/fhs: add constant for /dev/shm/
...
This is mounted for the default read-only /dev/ when programs want to use shm_open(3). Defining it here is less error-prone and saves the extra append at runtime.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-14 01:03:26 +09:00
be0e387ab0
internal/info: relocate from internal
...
This is cleaner and makes more sense. The longer LDFLAGS was never a valid concern since it is always inserted by a script.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-13 07:29:46 +09:00
abeb67964f
treewide: document linkname uses
...
These provide justification for each use of linkname. Poorly thought out uses of linkname are removed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-13 07:14:16 +09:00
bf5d10743f
treewide: import internal/system
...
For #24 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-13 01:22:47 +09:00
4e7aab07d5
internal/system: relocate from system
...
These packages are highly specific to hakurei and are difficult to use safely from other pieces of code.
Their exported symbols are made available until v0.4.0 where they will be removed for #24 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-13 01:17:47 +09:00
15a66a2b31
treewide: import internal/helper
...
For #24 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-12 23:19:34 +09:00
f347d44c22
internal/helper: relocate from helper
...
This package is ugly and is pending removal only kept alive by xdg-dbus-proxy.
Its exported symbols are made available until v0.4.0 where it will be removed for #24 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-12 23:16:13 +09:00
b5630f6883
test: move package sandbox internal
...
This should never be used outside vm tests.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-12 23:03:22 +09:00
17ffdb2dcf
release: 0.3.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-12 00:53:14 +09:00
ac34635890
container: set FD_CLOEXEC on all open files
...
While fd created from this side always has the FD_CLOEXEC flag, the same is not true for files left open by the parent. This change prevents those files from leaking into the container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-12 00:18:29 +09:00
9dec9dbc4b
container/init: close setup pipe early
...
This prevents leaking the setup pipe.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-11 07:31:58 +09:00
2f74adc8bd
container/init: close initial process files on termination
...
This closes them during the adopt wait delay. This also keeps them alive.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-10 20:35:59 +09:00
d7e0104ae4
treewide: reject impossible user-supplied fd
...
These are all trusted user input, however this check reduces the likelihood of hard to debug errors.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-10 20:31:26 +09:00
bb92e3ada9
cmd/hakurei: expose current instance identifier
...
This writes the 16-byte instance identifier to file descriptor specified by --identifier-fd if set, and closes the file.
This enables safely obtaining the new instance's identifier.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-10 07:52:35 +09:00
fad419c2a2
internal/outcome: handle group lookup message
...
This results in slightly less messy error reporting.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-09 02:15:48 +09:00
b1a1e73238
nix: update names to reflect new terminology
...
These are terminology from way early days. Update them now to be less confusing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-09 01:48:31 +09:00
38e9128a8c
container/std/seccomp: remove ineffectual typecast
...
This is no longer necessary since the return type changed.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-07 05:45:51 +09:00
7ee702a44e
container/seccomp/presets: add fields to literals
...
This keeps composites analysis happy.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-07 05:11:57 +09:00
3d188ef884
std: separate seccomp constants
...
This avoids inadvertently using PNRs as syscall numbers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-07 04:30:06 +09:00
34ccda84b2
release: 0.3.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-06 01:37:15 +09:00
042013bb04
container/std: syscall JSON adapter
...
This provides cross-platform JSON adapter for syscall number.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-06 00:57:53 +09:00
5c2b63a7f1
container: add 386 constants
...
While it is unlikely a use case for hakurei on i686 exists, it does not hurt to have this support.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-05 20:21:14 +09:00
9fd97e71d0
treewide: fit test untyped int literals in 32-bit
...
This enables hakurei test suite to run on 32-bit targets.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-05 20:13:19 +09:00
fba201c995
container/std: relocate rule types
...
This enables its use in hst for #15 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-05 06:00:39 +09:00
7f27a6dc51
container/seccomp: use native types
...
This prepares NativeRule for relocation to std for #15 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-05 05:48:59 +09:00
b65aba9446
container/seccomp: alias libseccomp types
...
This enables tests to refer to these types and check its size.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-05 05:21:43 +09:00
becaf8b6d7
std: relocate seccomp lookup tables
...
This should enable resolving NativeRule in hst.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-05 04:48:05 +09:00
54c0d6bf48
container/seccomp/pnr: define pseudo syscalls
...
This eliminates the cgo dependency from syscall lookup.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-05 04:32:41 +09:00
c1399f5030
std: rename from comp
...
Seccomp lookup tables are going to be relocated here, and PNR constants.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-05 02:47:43 +09:00
9ac63aac0c
hst/grp_pwd: add extra test cases
...
Does not change coverage but this helps me crosscheck with my phone.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-05 01:42:42 +09:00
cb9ebf0e15
hst/grp_pwd: specify new uid format
...
This leaves slots available for additional uid ranges in Rosa OS.
This breaks all existing installations! Users are required to fix ownership manually.
Closes #18 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-04 08:24:41 +09:00
9a2a7b749f
cmd/hakurei/print: handle nil config
...
There is nothing to print in this case, and such a nil check is missing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-03 02:20:18 +09:00
ec5cb9400c
cmd/hpkg/test: print share directory
...
This is more useful now that state is tracked here.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-03 01:51:57 +09:00
ae66b3d2fb
message: rename NewMsg to New
...
Should have done this when relocating this from container. Now is a good time to rename it before v0.3.x.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-03 01:49:27 +09:00
149bc3671a
internal/store: remove compat adapter
...
This is no longer used as everything has been migrated.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-03 01:26:01 +09:00
24435694a5
hst/config: make identifier omitempty
...
This is an optional field. Serialise it as such.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-03 01:23:15 +09:00
1c168babf2
cmd/hakurei/print: use new store interface
...
This removes the final uses of the compat interfaces.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-03 01:19:16 +09:00
0edcb7c1d3
test: print share directory
...
This is more useful now that state is tracked here.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 17:00:59 +09:00
0e5ca74b98
cmd/hakurei/print: serialise array for ps
...
Wanted to do this for a long time, since the key is redundant. This also makes it easier to migrate to the new store interface.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 16:37:08 +09:00
23ae7822bf
cmd/hakurei/parse: use new store interface
...
This greatly reduces overhead. The iterator also significantly cleans up the usage code.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 16:00:41 +09:00
898b5aed3d
internal/store: iterator over all entries
...
This is quite convenient for searching the store or printing active instance information.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 15:54:00 +09:00
7c3c3135d8
internal/outcome: track state in TMPDIR
...
The SharePath is a more stable path than RunDirPath, since it is available all the time and should remain consistent. This also fits better into the intended use case of XDG_RUNTIME_DIR.
Closes #17 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 12:40:58 +09:00
f33aea9ff9
internal/env: cleaner runtime dir fallback
...
This now places rundir inside the fallback runtime dir, so special case in internal/outcome is avoided.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 12:22:32 +09:00
e7fc311d0b
internal/outcome/shim: cover reparent and exit request paths
...
These test cases were missed when making the changes.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 11:58:09 +09:00
f5274067f6
internal/outcome/process: nil-safe unlock when failing to lock
...
This also prints a debug message which might be useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 11:47:51 +09:00
e7161f8e61
internal/outcome: measure finalise time
...
This also increases precision of state time output.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 05:17:33 +09:00
6931ad95c3
internal/outcome/shim: EOF as exit request fallback
...
In some cases the signal might be delivered before the signal handler is installed, and synchronising against such a case is too expensive. Instead, use the pipe being closed as a fallback to the regular exit request. This change also moves installation of the signal handler early.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 04:41:26 +09:00
2ba599b399
internal/outcome/process: use new store interface
...
This change also spawns shim before committing system state, leaving it blocking on the setup pipe. The internal/outcome/process structure is also entirely reworked to be much more readable and less error-prone, while enabling basic performance measurements. A long-standing bug where segment lock is not held during Commit is also resolved.
Closes #19 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-02 04:25:45 +09:00
d3d3417125
internal/outcome/process: relocate start and serve
...
This is useful for reordering these operations for further cleanup.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-11-01 19:14:59 +09:00
651cdf9ccb
internal/outcome: remove guard on main
...
This is no longer exported. Such a check is pointless.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-31 22:58:26 +09:00
68ff0a2ba6
container/params: expose pipe
...
This increases flexibility of how caller wants to handle the I/O. Also makes it no longer rely on finalizer.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-31 22:39:02 +09:00
6a0ecced90
internal/store: expose save via handle
...
The handle is otherwise inaccessible without the compat interface. This change also moves compatibility methods to separate adapter structs to avoid inadvertently using them.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-31 04:20:22 +09:00
b667fea1cb
internal/store: export new interface
...
This exposes store operations safe for direct access, and enables #19 to be implemented in internal/outcome.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-31 03:41:26 +09:00
b25ade5f3d
internal/store: rename compat interface
...
The new store implementation will be exported as Store.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-30 18:53:59 +09:00
ebdcff1049
internal/store: rename from state
...
This reduces collision with local variable names, and generally makes sense for the new store package, since it no longer specifies the state struct.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-30 18:43:55 +09:00
46c5ce4936
internal/outcome/shim: check full behaviour
...
This took significant effort to stub out, and achieves full coverage after c5aefe5e9d .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-30 05:20:49 +09:00
36f8064905
internal/outcome/process: output via msg
...
This makes it possible to instrument output behaviour through stub.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-30 03:41:38 +09:00
eeb9f98e5b
internal/outcome/shim: move signal constants
...
The magic numbers hurt readability.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-30 01:20:51 +09:00
3f9f331501
internal/outcome/shim: remove noop resume
...
The shim does not suspend output to begin with. These are leftovers from when container startup code suspends output.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-29 23:31:39 +09:00
2563391086
internal/outcome/shim: params check early
...
This is unreachable, but keeping it here as a failsafe until more test cases are added.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-29 23:10:12 +09:00
a0b4e47acc
internal/outcome: rename from app
...
This is less ambiguous, and more accurately describes the purpose of the package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-29 04:33:13 +09:00
a52f7038e5
internal/env: relocate from app
...
This package is much cleaner to stub independently, and makes no sense to lump into app.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-29 04:11:49 +09:00
274686d10d
internal/validate: relocate from app
...
These are free of the dispatcher from internal/app. This change relocates them into their own package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-29 03:40:09 +09:00
65342d588f
internal/app/state: improve store internals
...
This fully exposes the store internals for #19 and are final preparations for removing the legacy store interface.
This change also fixes a potential deadlock in the handle initialisation mkdir failure path. This however is never reachable in hakurei as the store is never accessed concurrently.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-29 03:21:00 +09:00
5e5826459e
internal/app/state: improve handles internals
...
This replaces the Store interface with something better reflecting the underlying data format for #19 . An implementation of Store is provided on top of the new code to ease transition.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-28 22:00:54 +09:00
4a463b7f03
internal/app/state: use absolute pathnames
...
This is less error-prone and fits better into internal/app which already uses check.Absolute for all pathnames.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-26 03:41:19 +09:00
dacd9550e0
internal/app/state: acquire big lock for toplevel operations
...
This avoids getting into an inconsistent state for simultaneous calls to List and Do on a previously unknown identity.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-26 03:27:56 +09:00
546b00429f
treewide: update doc comments
...
Some internal/app/state types were relocated to hst as part of the API. This change updates doc comments referring to them.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-26 03:00:04 +09:00
86f4219062
internal/app/state/data: check full entry behaviour
...
This eventually gets relocated to internal/app.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-26 01:49:14 +09:00
fe2929d5f7
internal/app/state: include et header
...
This is the initial step of implementing #19 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-25 22:01:26 +09:00
470e545d27
internal/app/state: use internal/lockedfile
...
This is a pretty solid implementation backed by robust tests, with a much cleaner interface.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-25 21:29:24 +09:00
8d3381821f
internal/app/state: export correct backend value
...
This references the underlying multiBackend due to a typo, making the whole dance with c a noop.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-25 21:11:05 +09:00
e9d00b9071
container/executable: handle nil msg
...
This is useful in some tests.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-25 21:08:54 +09:00
4f41afee0f
internal/app/state: fixed size et-only header
...
This header improves the robustness of the format and significantly reduces cleanup overhead.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-25 19:15:06 +09:00
7de593e816
cmd/hakurei: short identifier from lower half
...
The upper half is now a nanosecond timestamp. Lower half is still random bytes, so use lower half for short identifier.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-24 00:47:39 +09:00
2442eda8d9
hst/instance: embed config struct
...
This makes the resulting json easier to parse since it can now be deserialised into the config struct.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-24 00:42:16 +09:00
05488bfb8f
hst/instance: store priv side pid
...
This can receive signals, so is more useful to the caller.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-23 23:19:55 +09:00
dd94818f20
hst/instance: define instance state
...
This is now part of the hst API. This change also improves identifier generation and serialisation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-23 22:59:02 +09:00
0fd357e7f6
container/init: do not suspend output
...
Init is not very talkative after process start even when verbose. Suspending output here is pointless and does more harm than good.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-23 08:11:00 +09:00
57231d4acf
container/init: improve signal handling
...
The SIGTERM signal is delivered in many other cases and can lead to strange behaviour. The unconditional resume of the logger also causes strange behaviour in the cancellation forwarding path. This change also passes through additional signals.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-23 08:02:03 +09:00
c5aefe5e9d
internal/app/shim: check behaviour
...
This does not yet have full coverage. Test cases covering failsafe paths and error injection will be added eventually.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-23 06:07:41 +09:00
0f8ffee44d
internal/app: test case for hst template
...
This helps with other areas of the test suite as they're all based on hst.Template. This also helps contributors understand the behaviour of internal/app as hst.Template covers almost every aspect of it.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-23 04:46:58 +09:00
1685a4d000
cmd/hsu: reduce excessive test range
...
This is quite a simple piece of code, this many test cases is excessive and wastes time in the integration vm.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-23 04:32:32 +09:00
6c338b433a
internal/app: reduce test case indentation
...
This improves readability on narrower displays.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-22 07:40:32 +09:00
8accd3b219
internal/app/shim: use syscall dispatcher
...
This enables instrumented testing of the shim.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-22 06:58:45 +09:00
c5f59c5488
container/syscall: export prctl wrapper
...
This is useful as package "syscall" does not provide such a wrapper. This change also improves error handling to fully conform to the manpage.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-22 05:26:54 +09:00
fcd9becf9a
cmd/hsu: run in locked thread
...
Goroutine scheduling is not helpful in the setuid wrapper, it is not particularly harmful but lock here anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-22 05:09:08 +09:00
622f945c22
container/init: check msg in entrypoint
...
This covers invalid call to Init.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-22 04:20:08 +09:00
e94acc424c
container/comp: rename from bits
...
This package will also hold syscall lookup tables for seccomp.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-21 20:54:03 +09:00
b1a4d801be
hst/container: flags string representation
...
This is useful for a user-facing representation other than JSON. This also gets rid of the ugly, outdated flags string builder in cmd/hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-21 20:29:52 +09:00
56beae17fe
test: assert hst CGO_ENABLED=0
...
The hst package only deals with data serialisation, however since many parts of hakurei make use of C libraries in some way it can be easy to inadvertently depend on cgo.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-21 19:49:04 +09:00
ea978101b1
cmd/hakurei/parse: close config fd
...
This is cleaner than relying on the finalizer.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-21 06:05:36 +09:00
fbd1638e7f
test/interactive/trace: update nix attribute
...
Updated according to evaluation warning.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-21 06:03:09 +09:00
d42067df7c
cmd/hakurei/json: friendly error messages
...
This change handles errors returned by encoding/json and prints significantly cleaner messages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-21 05:17:25 +09:00
b9459a80c7
container/init: check use constants for open flags
...
These bits are arch-specific.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-21 03:13:58 +09:00
f8189d1488
container/syscall: dot-import syscall
...
This avoids having arch-specific constants for arm64.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-21 03:09:14 +09:00
5063b774c1
hst: expose version string
...
The hst API is tied to this version string.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-21 01:56:44 +09:00
766dd89ffa
internal: clean up build strings
...
These names are less ambiguous and should be understandable without reading the source code.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-21 01:49:36 +09:00
699c19e972
hst/container: optional runtime and tmpdir sharing
...
Sharing and persisting these directories do not always make sense. Make it optional here.
Closes #16 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-19 04:11:38 +09:00
b5b30aea2e
test: place marker in common path
...
This discontinues the dependency on shared tmpdir and xdg_runtime_dir implementation detail, for #16 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-19 03:50:48 +09:00
c0e860000a
internal/app: remove spfinal
...
This no longer needs to be an independent outcomeOp since spFilesystemOp is moved late.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-19 02:58:46 +09:00
d87020f0ca
hst/config: validate env early
...
This should happen in hst since it requires no system state.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-19 02:39:49 +09:00
e47aebb7a0
internal/app/outcome: apply configured filesystems late
...
This enables configured filesystems to cover system mount points.
Closes #8 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-19 01:41:52 +09:00
543bf69102
internal/app/spx11: check behaviour
...
This outcomeOp will likely never change.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-19 01:00:12 +09:00
4cfb1fda8f
internal/app/spwayland: check behaviour
...
This op is quite clean. Might get slightly more complex at some point passing socket fd.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-19 00:30:56 +09:00
c12183959a
internal/app/dispatcher: report correct field
...
This was mistakenly reporting sharePath on inequivalence causing very confusing output.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-18 23:59:10 +09:00
f5845e312e
internal/app/sptmpdir: check behaviour
...
Another simple one. This will change when shared tmpdir and xdg runtime dir becomes optional.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-18 23:46:10 +09:00
a103c4a7c7
internal/app/hsu: check behaviour
...
The stub exec.ExitError is hairy as usual, but internal/app is not cross-platform, so this is okay.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-18 20:45:42 +09:00
67ec82ae1b
ldd/exec: raise timeout
...
This mostly helps with tests.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-18 18:03:09 +09:00
f6f0cb56ae
internal/app/hsu: remove wrapper method
...
This was added to reduce the size of diffs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-18 17:35:20 +09:00
d4284c109d
internal/app/spruntime: emulate pam_systemd type
...
This sets XDG_SESSION_TYPE to the corresponding values specified in pam_systemd(8) according to enablements.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-18 04:33:04 +09:00
030ad2a73b
internal/app/spruntime: check behaviour
...
This one is quite simple and has no state. Needs to emulate pam_systemd behaviour so that will change.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-18 03:41:49 +09:00
78d7955abd
internal/app/sppulse: check cookie discovery
...
There's quite a bit of code duplication here, but since this is already quite simple it is best to leave it as is for now.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-18 01:30:33 +09:00
b066495a7d
internal/app/sppulse: check buf error injection
...
The loadFile behaviour does not guarantee the buffer to be zeroed or not clobbered if an error is returned, but for the current implementation it is good to check.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-18 01:01:52 +09:00
82299d34c6
internal/app/sppulse: correctly handle small cookie
...
The trailing zero bytes need to be sliced off, so send cookie size alongside buffer content.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-17 08:03:03 +09:00
792013cefb
internal/app/sppulse: check behaviour
...
Still needs to check the relocated functions separately.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-17 06:32:21 +09:00
3f39132935
internal/app/dispatcher: reduce check code duplication
...
This also improves readability of test cases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-17 05:47:12 +09:00
c922c3f80e
internal/app/sppulse: relocate hard to test code
...
These are better tested separately instead of creating many op test cases.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-16 05:47:49 +09:00
6cf58ca1b3
internal/app/spfinal: check behaviour
...
This will be merged with spFilesystemOp eventually.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-16 02:08:31 +09:00
425421d9b1
hst/container: rename constants
...
The shim is an implementation detail and should not be mentioned in the API.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-16 00:27:00 +09:00
5e0f15d76b
hst/container: additional shim exit codes
...
These are now considered stable, defined behaviour and can be used by external programs to determine shim outcome.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-15 22:09:33 +09:00
ae65491223
container/init: use one channel for wait4
...
When using two channels it is possible for the other case to be reached before all pending winfo are consumed, causing incorrect reporting.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-15 21:35:19 +09:00
52e3324ef4
test/sandbox: ignore nondeterministic mount point
...
No idea what systemd is doing with this to cause its options to change.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-14 07:08:39 +09:00
f95e0a7568
hst/config: hold acl struct by value
...
Doc comments are also reworded for clarity.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-14 07:02:14 +09:00
4c647add0d
hst/container: pack boolean options
...
The memory saving is relatively insignificant, however this increases serialisation efficiency.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-14 06:39:00 +09:00
a341466942
hst: separate container config
...
The booleans are getting packed into a single field. This requires non-insignificant amount of code for JSON serialisation to stay compatible.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-14 04:23:05 +09:00
e4ee8df83c
internal/app/spdbus: check behaviour
...
This is not done very cleanly, however this op is pending removal for the in-process dbus proxy so not worth spending too much effort here. As long as it checks all paths it is good enough.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-14 01:51:01 +09:00
048c1957f1
helper/args: variadic check function
...
This package turns out to be much less widely used than anticipated, and might be facing removal. This change makes test cases cleaner.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-14 01:48:56 +09:00
790d77075e
system/dbus: remove builder state leak
...
This enables external testing of system.I state.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-14 01:33:44 +09:00
e5ff40e7d3
container: synchronise after notify
...
This should eliminate intermittent failures in the forward test.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-13 19:17:19 +09:00
123d7fbfd5
container/seccomp: remove export pipe
...
This was only useful when wrapping bwrap.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-13 18:51:35 +09:00
7638a44fa6
treewide: parallel tests
...
Most tests already had no global state, however parallel was never enabled. This change enables it for all applicable tests.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-13 04:38:48 +09:00
a14b6535a6
helper/stub: write ready byte late
...
Hopefully eliminates spurious failures.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-13 01:55:44 +09:00
763ab27e09
system: remove tmpfiles
...
This is no longer used.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-13 01:12:44 +09:00
bff2a1e748
container/initplace: remove indirect method
...
This is no longer useful and is highly error-prone.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-13 01:06:45 +09:00
8a91234cb4
hst: reword and improve doc comments
...
This corrects minor mistakes in doc comments and adds them for undocumented constants.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-12 05:03:14 +09:00
db7051a368
internal/app/spcontainer: check fs init behaviour
...
This covers every statement. Some of them are unreachable unless the kernel returns garbage.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-12 03:58:53 +09:00
36f312b3ba
internal/app/spcontainer: resolve path through dispatcher
...
This prevents state from os tainting the test data.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-11 20:20:41 +09:00
037144b06e
system/dbus: use well-known address in spec
...
The session bus still performs non-standard formatting since it makes no sense for hakurei to start the session bus.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-11 18:52:06 +09:00
f5a597c406
hst: rename /.hakurei constant
...
This provides disambiguation from fhs.AbsTmp.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-11 14:32:35 +09:00
8874aaf81b
hst: remove template bind nix store
...
This does not add anything meaningful to the template, since there are already prior examples showing src-only bind ops. Remove this since it causes confusion by covering the previous mount point targeting /nix/store.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-11 13:59:10 +09:00
04a27c8e47
hst: use plausible overlay template
...
The current value is copied from a test case, and does not resemble its intended use case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-11 13:51:08 +09:00
9e3df0905b
internal/app/spcontainer: check params init behaviour
...
This change also significantly reduces duplicate information in test case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-11 02:44:02 +09:00
9290748761
internal/app/spaccount: check behaviour
...
This begins the effort of fully covering internal/app.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-11 00:54:04 +09:00
23084888a0
internal/app/spaccount: apply default in shim
...
The original code clobbers hst.Config, and was not changed when being ported over.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-11 00:38:06 +09:00
50f6fcb326
container/stub: mark test overrides as helper
...
This fixes line information in test reporting messages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-10 22:15:20 +09:00
070e346587
internal/app: relocate params state initialisation
...
This is useful for testing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-10 22:00:49 +09:00
24de7c50a0
internal/app: relocate state initialisation
...
This is useful for testing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-10 20:15:58 +09:00
f6dd9dab6a
internal/app: hold path hiding in op
...
This makes no sense to be part of the global state.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-10 19:56:30 +09:00
776650af01
hst/config: negative WaitDelay bypasses default
...
This behaviour might be useful, so do not lock it out. This change also fixes an oversight where the unchecked value is used to determine ForwardCancel.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-10 05:11:32 +09:00
109aaee659
internal/app: copy parts of config to state
...
This is less error-prone than passing the address to the entire hst.Config struct, and reduces the likelihood of accidentally clobbering hst.Config. This also improves ease of testing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-10 03:19:09 +09:00
22ee5ae151
internal/app: filter ops in implementation
...
This is cleaner and less error-prone, and should also result in negligibly less memory allocation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-10 02:23:34 +09:00
4246256d78
internal/app: hold config address in state
...
This can be removed eventually as it is barely used.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-10 01:21:01 +09:00
a941ac025f
container/init: unwrap descriptive fatal error
...
These errors are printed with a descriptive message prefixed to them, so it is more readable to expose the underlying errno.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-09 22:04:35 +09:00
87b5c30ef6
message: relocate from container
...
This package is quite useful. This change allows it to be imported without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-09 05:18:19 +09:00
df9b77b077
internal/app: do not encode config early
...
Finalise no longer clobbers hst.Config.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-09 04:38:54 +09:00
a40d182706
internal/app: build container state in shim
...
This significantly decreases ipc overhead.
Closes #3 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-08 22:30:40 +09:00
e5baaf416f
internal/app: check transmitted ops
...
This simulates params to shim and this is the last step before params to shim is merged.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-08 20:02:09 +09:00
ee6c471fe6
internal/app: relocate ops condition
...
This allows reuse and finer grained testing of fromConfig.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-08 19:39:00 +09:00
16bf3178d3
internal/app: relocate dynamic exported state
...
This allows reuse of the populateEarly method in test instrumentation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-08 18:34:17 +09:00
034c59a26a
internal/app: relocate late sys/params outcome
...
This will end up merged with another op after reordering. For now relocate it into its dedicated op for test instrumentation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-08 18:26:50 +09:00
5bf28901a4
cmd/hsu: check against setgid bit
...
The getgroups behaviour is already checked for, but it never hurts to be more careful in a setuid program.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-08 18:22:24 +09:00
9b507715d4
hst/dbus: validate interface strings
...
This is relocated to hst to validate early.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-08 04:57:22 +09:00
12ab7ea3b4
hst/fs: access ops through interface
...
This removes the final hakurei.app/container import from hst.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-07 23:59:48 +09:00
1f0226f7e0
container/check: relocate overlay escape
...
This is used in hst to format strings.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-07 23:56:19 +09:00
584ce3da68
container/bits: move bind bits
...
This allows referring to the bits without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-07 21:38:31 +09:00
5d18af0007
container/fhs: move pathname constants
...
This allows referencing FHS pathnames without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-07 21:29:16 +09:00
0e6c1a5026
container/check: move absolute pathname
...
This allows use of absolute pathname values without importing container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-07 20:57:58 +09:00
d23b4dc9e6
hst/dbus: move dbus config struct
...
This allows holding a xdg-dbus-proxy configuration without importing system/dbus.
It also makes more sense in the project structure since the config struct is part of the hst API however the rest of the implementation is not.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-07 19:03:51 +09:00
3ce63e95d7
container: move seccomp preset bits
...
This allows holding the bits without cgo.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-07 18:28:20 +09:00
2489766efe
hst/config: identity bounds check early
...
This makes sense to do here instead of in internal/app.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-07 17:58:28 +09:00
9e48d7f562
hst/config: move container fields from toplevel
...
This change also moves pd behaviour to cmd/hakurei, as this does not belong in the hst API.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-07 04:24:45 +09:00
f280994957
internal/app: check nscd socket for path hiding
...
This can seriously break things, and exposes extra host attack surface, so include it here.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-05 20:47:30 +09:00
ae7b343cde
hst: reword and move constants
...
These values are considered part of the stable, exported API, so move them to hst.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-05 17:40:32 +09:00
a63a372fe0
internal/app: merge static stub
...
These tests now serve as integration tests, and finer grained tests for each op will be added slowly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-05 17:15:14 +09:00
16f9001f5f
hst/config: update doc comments
...
Some information here are horribly out of date. This change updates and improves all doc comments.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-05 04:12:53 +09:00
80ad2e4e23
internal/app: do not offset base value
...
This value is applied to the shim, it is incorrect to offset the base value as well.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-05 03:59:52 +09:00
92b83bd599
internal/app: apply pd behaviour to outcomeState
...
This avoids needlessly clobbering hst.Config.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-05 03:53:23 +09:00
8ace214832
system/wayland: hang up security-context-v1 internally
...
This should have been an implementation detail and should not be up to the caller to close.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-05 03:25:13 +09:00
eb5ee4fece
internal/app: modularise outcome finalise
...
This is the initial effort of splitting up host and container side of finalisation for params to shim. The new layout also enables much finer grained unit testing of each step, as well as partition access to per-app state for each step.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-05 02:52:50 +09:00
9462af08f3
system/dbus: dump buffer internally
...
This should have been an implementation detail and should not be up to the caller to call it.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-04 20:31:14 +09:00
a5f0aa3f30
internal/app: declutter and merge small files
...
This should make internal/app easier to work with for the upcoming params to shim.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-03 16:59:29 +09:00
dd0bb0a391
internal/app: check username validation
...
This stuff should be hardcoded in libc, but check it anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-03 16:42:42 +09:00
d16da6da8c
system: enforce absolute paths
...
This is less error-prone, and is quite easy to integrate considering internal/app has already migrated to container.Absolute.
Closes #11 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-10-03 02:26:14 +09:00
e58181a930
internal/app/paths: defer extra formatting
...
This reduces payload size for params to shim.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-30 00:21:26 +09:00
71e70b7b5f
internal/app/paths: do not print messages
...
This change was missed while merging the rest of the logging changes.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-29 09:30:57 +09:00
afa1a8043e
helper/proc: raise FulfillmentTimeout in tests
...
This appears to be yet another source of spurious test failures.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-29 07:44:33 +09:00
1ba1cb8865
hst/config: remove seccomp bit fields
...
These serve little purpose and are not friendly for use from other languages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-29 07:07:16 +09:00
44ba7a5f02
hst/enablement: move bits from system
...
This is part of the hst API, should not be in the implementation package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-29 06:34:29 +09:00
dc467493d8
internal: remove hlog
...
This package has been fully replaced by container.Msg.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-29 06:21:04 +09:00
46cd3a28c8
container: remove global msg
...
This frees all container instances of side effects.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-29 06:11:47 +09:00
ad1bc6794f
release: 0.2.2
...
Unfortunately removal of internal/hlog brought about some changes that breaks API. This will likely be the last 0.2.x release.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-28 21:58:19 +09:00
e55822c62f
container/init: reduce verbose noise
...
This makes it possible to optionally omit the identifying verbose message, for when the Op implementation can provide a much more useful message in its case, using information not yet available to the String method.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-28 21:51:10 +09:00
802e6afa34
container/output: move global output to msg
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-27 19:55:37 +09:00
e906cae9ee
container/output: export suspendable writer
...
This is quite useful for other packages as well. This change prepares internal/hlog for removal.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-27 19:46:35 +09:00
ae2df2c450
internal: remove sys package
...
This package is replaced by container/stub. Remove and replace it with unexported implementation for the upcoming test suite rewrite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-25 13:51:54 +09:00
6e3f34f2ec
internal/app: merge finalise test cases
...
This cleans everything up a bit for the upcoming test suite rewrite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-25 12:11:02 +09:00
65a0bb9729
internal/sys/hsu: expose hsurc identifier
...
This maintains a compatible interface for now, to ease merging of the upcoming changes to internal/app.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-24 21:17:04 +09:00
afa7a0800d
cmd/hsu: return hsurc id
...
The uid format is stable, this value is what caller has to obtain through hsu.
Closes #14 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-24 21:10:13 +09:00
773253fdf5
test/sandbox: raise timeout
...
The integration vm is being very slow for some reason. This change should reduce spurious timeouts.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-24 19:41:59 +09:00
409ed172c8
internal/app: handle LookupGroup error
...
This could return errnos from the cgo calls.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-24 19:36:55 +09:00
1c4f593566
internal/app: unexport outcome, remove app struct
...
The App struct no longer does anything, and the outcome struct is entirely opaque.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-24 18:44:14 +09:00
b99c63337d
internal/app: do not return from shim start
...
The whole RunState ugliness and the other horrendous error handling conditions for internal/app come from an old design proposal for maintaining all app containers under the same daemon process for a user. The proposal was ultimately rejected but the implementation remained. It is removed here to alleviate internal/app from much of its ugliness and unreadability.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-24 13:37:38 +09:00
f09133a224
test: check init lingering timeout behaviour
...
This checks init timeout on lingering process after initial process termination.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-22 21:56:29 +09:00
16409b37a2
internal/app: compensate shim timeout
...
This catches cases where the shim has somehow locked up, so it should wait out the full shim WaitDelay as well.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-16 02:23:19 +09:00
a2a291791c
internal/sys: separate hsu uid cache
...
This begins the effort of the removal of the sys package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-15 02:30:47 +09:00
8690419c2d
hst: replace internal/app error
...
This turns out to still be quite useful across internal/app and its relatives. Perhaps a cleaner replacement for baseError.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-15 01:44:43 +09:00
1cdc6b4246
test/sandbox: create marker in /var/tmp
...
This prepares the test suite for private TMPDIR.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-14 16:45:17 +09:00
56aad8dc11
test/sandbox/tool: marker pathname from flag
...
Since this is going to be placed in a shared directory, it needs to be unique to the identity. Instead of trying to figure out identity from mountinfo, just have the test script pass hardcoded values.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-14 15:57:41 +09:00
83c4f8b767
test/sandbox: check extra writable paths
...
This is not always obvious from mountinfo.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-14 15:12:51 +09:00
d0ddd71934
test/sandbox: bind /var/tmp writable
...
This makes it possible to place markers with private tmpdir.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-14 14:59:53 +09:00
70e02090f7
nix: use slightly less ambiguous type
...
I had trouble getting Nix to merge json arrays properly, I am not sure that this helps.
At this point I have given up trying to understand Nix type system, and I am just trying to keep the Nix stuff going with extensive tests until it can be replaced by lkl for testing and planterette for general usage.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-14 14:45:14 +09:00
ca247b8037
internal/app: mount /dev/shm early
...
This avoids covering /dev/shm mounts from hst.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-14 01:49:42 +09:00
3f25c3f0af
container: initialise cmd early
...
This allows use of more cmd methods.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-13 20:01:33 +09:00
e271fa77aa
nix: update flake lock
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-13 12:07:57 +09:00
f876043844
internal/hlog: remove error wrapping
...
This was a stopgap solution that lasted for way too long. This finally removes it and prepares internal/app for some major changes.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-12 06:52:35 +09:00
6265aea73a
system: partial I inherit dispatcher
...
This enables I struct methods to be checked.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-11 02:02:31 +09:00
c8a0effe90
system/wayland: use syscall dispatcher
...
This enables wayland op methods to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-11 01:48:18 +09:00
8df01b71d4
system: remove test package
...
This prepares the Commit and Revert methods for testing via stub.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-10 23:50:22 +09:00
985c4dd2fc
system/xhost: wrap revert error correctly
...
This otherwise creates a confusing error message on a revert failure.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-08 04:17:39 +09:00
da2b9c01ce
system/tmpfiles: do not fail for smaller files
...
The limit is meant to be an upper bound. Handle EOF and print verbose message for it instead of failing.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-08 03:22:10 +09:00
323d132c40
system/mkdir: use syscall dispatcher
...
This enables mkdir op methods to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 22:30:08 +09:00
6cc2b406a4
system/link: use syscall dispatcher
...
This enables hardlink op methods to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 19:47:58 +09:00
fcd0f2ede7
system/output: pass through LinkError
...
This has similar formatting to PathError.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 17:41:06 +09:00
e68db7fbfc
system: unexport Op implementations
...
None of these are valid with their zero value, and the implementations assume they are created by the builder methods. They are by all means an implementation detail and exporting them makes no sense.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 16:16:03 +09:00
ac81cfbedc
system/dbus: print incomplete string in buffer
...
Not sure if this will ever be reached, but nice to have nonetheless.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 15:50:29 +09:00
05db06c87b
system/dbus: use syscall dispatcher
...
This allows dbus op methods and builder to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 14:25:19 +09:00
e603b688ca
system/dispatcher: expose test reporting to builder
...
This is currently unused but useful for builders with errors.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 12:59:33 +09:00
a9def08533
system/dbus: drop proxy output beyond threshold
...
This prevents xdg-dbus-proxy from running the priv process out of memory.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 02:56:21 +09:00
ecaf43358d
system/dbus: create context in subtest
...
This is causing a huge amount of spurious test failures due to the poor performance of the integration vm. This should finally put an end to the annoyance.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-05 05:15:40 +09:00
197fa65b8f
system/dbus: remove redundant proxy pairs
...
This is left over from before dbus.Final. Remove them now as they serve no purpose.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-05 02:07:56 +09:00
e81a45e849
container/dispatcher: optional stub wait4 signal association
...
This synchronises the wait4 return after the toplevel signal call in lowlastcap_signaled_cancel_forward_error.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-04 20:28:49 +09:00
3920acf8c2
container/stub: remove function call in handleExit
...
This gets inlined and does not cause problems usually but turns out -coverpkg uninlines it and breaks the recovery.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-04 19:39:12 +09:00
19630a9593
container/dispatcher: remove wait4 test log
...
Turns out the reporting methods are not safe for concurrent use, despite the claim in testing.T doc comment.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-04 05:30:57 +09:00
4051577d6b
container/stub: override goexit methods
...
FailNow, Fatal, Fatalf, SkipNow, Skip and Skipf must be called from the goroutine created by the test.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-04 04:51:49 +09:00
ddfb865e2d
system/dispatcher: wrap syscall helper functions
...
This allows tests to stub all kernel behaviour, like in the container package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-04 04:15:25 +09:00
024d2ff782
system: improve tests of the I struct
...
This cleans up for the test overhaul of this package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-03 02:16:10 +09:00
6f719bc3c1
system: update doc commands and remove mutex
...
The mutex is not really doing anything, none of these methods make sense when called concurrently anyway. The copylocks analysis is still satisfied by the noCopy struct.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-02 04:54:34 +09:00
1b5d20a39b
container/dispatcher: stub.Call initialisation helper function
...
This keeps composites analysis happy without making the test cases (too) bloated.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-02 04:44:08 +09:00
49600a6f46
container/stub: export stub helpers
...
These are very useful in many packages containing relatively large amount of code making calls to difficult or impossible to stub functions.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-31 23:11:25 +09:00
b489a3bba1
system/output: implement MessageError
...
This error is also formatted differently based on state.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-31 13:51:21 +09:00
780e3e5465
container/msg: optionally provide error messages
...
This makes handling of fatal errors a lot less squirmy.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-31 11:57:59 +09:00
712cfc06d7
container: wrap container init start errors
...
This helps indicate the exact origin and nature of the error. This eliminates generic WrapErr from container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 23:44:48 +09:00
f5abce9df5
system: wrap op errors
...
This passes more information allowing for better error handling. This eliminates generic WrapErr from system.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 22:49:12 +09:00
ddb003e39b
system/internal/xcb: refactor and clean up
...
This package still does not deserve to be out of internal, but at least it is less haunting now. I am still not handling the xcb error though, the struct is almost entirely undocumented and the implementation is unreadable. Not even going to try.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 20:02:18 +09:00
b12c290f12
system/wayland: improve error descriptions
...
A lot of these errors have very short and nondescript descriptions. These are only returned on incorrect API usage, but it makes sense to make them more descriptive anyway.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 16:51:40 +09:00
0122593312
system/acl: wrap libacl errors in PathError
...
This helps determine which libacl function the errno came from.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 13:19:15 +09:00
6aa431d57a
system/acl: update test log messages
...
Most of these were never updated after UpdatePerm was renamed to Update.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-30 12:55:49 +09:00
08eeafe817
container/mount: unwrap vfs decoder errors
...
These are now handled by init. This eliminates generic WrapErr from mount and procPaths.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 22:15:05 +09:00
d7c7c69a13
container/dispatcher: check simple test errors via reflect
...
Again, avoids the errors package concealing unexpected behaviours.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 22:12:21 +09:00
50972096cd
container/vfs: wrap decoder errors
...
This passes line information and handles strconv errors so it reads better.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 21:51:31 +09:00
905b9f9785
container/initoverlay: invalid argument type
...
This eliminates generic WrapErr from overlay.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 02:56:56 +09:00
1c7e634f09
container/dispatcher: check test errors via reflect
...
Using the errors package might conceal some incorrect behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 02:35:24 +09:00
8d472ebf2b
container/inittmpfs: unwrap out of bounds error
...
This eliminates generic WrapErr from tmpfs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 02:15:48 +09:00
4da6463135
container/init: unwrap path errors
...
These are also now handled by init properly, so wrapping them in self is meaningless and unreachable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 02:04:09 +09:00
eb3385d490
container/initsymlink: unwrap mount errors
...
The mount function now wraps its own errors in a much more descriptive type with proper message formatting. Wrapping them no longer makes any sense.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 01:46:54 +09:00
b8669338da
container/initsymlink: unwrap absolute error
...
This is now handled properly by the init.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 01:43:11 +09:00
f24dd4ab8c
container/init: handle unwrapped errors
...
This is much cleaner from both the return statement and the error handling.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 01:37:13 +09:00
a462341a0a
container: repeat and impossible state types
...
This moves repeated Op errors and impossible internal state errors off of msg.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 01:12:02 +09:00
84ad9791e2
container: wrap mount syscall errno
...
This is the first step to deprecating the generalised error wrapping error message pattern.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-29 01:06:12 +09:00
b14690aa77
internal/app: remove seal interface
...
This further cleans up the package for the restructure.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-28 01:07:51 +09:00
d0b6852cd7
internal/app: remove app interface
...
It is very clear at this point that there will not be multiple implementations of App, and the internal/app package will never move out of internal due to hsu.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-28 00:54:44 +09:00
da0459aca1
internal/app: update doc comments
...
A lot of these comments are quite old and have not been updated to reflect changes.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-28 00:45:57 +09:00
1be8de6f5c
internal/app: less strict username regex
...
Use the default value of NAME_REGEX from adduser. Should not hurt compatibility while being less strict.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-28 00:22:55 +09:00
0f41d96671
internal: move sysconf wrapper to app
...
This should not be used and is not useful in other packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-28 00:04:58 +09:00
92f510a647
cmd/hakurei/command: pd run dbus-verbose nil check
...
This otherwise dereferences a nil pointer when dbus-verbose is set and either session or system bus are nil.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-09-06 00:09:25 +09:00
acb6931f3e
app/seal: leave $DISPLAY as is on host abstract
...
This helps work around faulty software that misinterprets unix: DISPLAY string.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-27 20:42:03 +09:00
9d932d1039
release: 0.2.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-26 03:33:45 +09:00
9bc8532d56
container/initdev: mount tmpfs on shm for ro dev
...
Programs expect /dev/shm to be a writable tmpfs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-26 03:27:07 +09:00
07194c74cb
release: 0.2.0
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-26 02:23:59 +09:00
4cf694d2b3
hst: use hsu userid for share path suffix
...
The privileged user is identifier to hakurei through its hsu userid. Using the kernel uid here makes little sense and is a leftover design choice from before hsu was implemented.
Closes #7 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-26 02:16:33 +09:00
c9facb746b
hst/config: remove data field, rename dir to home
...
There is no reason to give the home directory special treatment, as this behaviour can be quite confusing. The home directory also does not necessarily require its own mount point, it could be provided by a parent or simply be ephemeral.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-26 00:56:10 +09:00
878b66022e
hst/fsbind: optional ensure source
...
This exposes the BindEnsure flag of BindMountOp.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-26 00:50:23 +09:00
2e0a4795f6
container/initbind: optional ensure host directory
...
This is used for ensuring persistent data directories specific to the container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-26 00:44:45 +09:00
c328b584c0
hst/fslink: improve string representation
...
This shortens the representation of most common use cases and generally improves readability.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 22:52:48 +09:00
9585b35d5b
hst/config: remove symlink field
...
Closes #6 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 22:23:54 +09:00
26cafe3e80
hst/fs: implement link fstype
...
Symlinks do not require special treatment, and doing this allows placing links in order.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 21:57:38 +09:00
125f150784
hst/fs: update doc comments
...
The Type method no longer exists on the interface. Update doc comments to reflect that.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 21:11:39 +09:00
0dcac55a0c
hst/config: remove container etc field
...
This no longer needs special treatment since it can be specified as a generic filesystem entry.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 19:24:33 +09:00
6d202d73b4
hst/fsbind: optional autoetc behaviour
...
This generalises the special field allowing any special behaviour to be matched from target.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 18:38:19 +09:00
1438096339
hst/config: handle filesystem entry targeting root
...
This allows any fstype supported by hst to be directly mounted on sysroot. A special case in internal/app applies the matching entry early and excludes it from path hiding.
Closes #5 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 17:52:57 +09:00
059164d4fa
hst/fsbind: optional autoroot behaviour
...
This allows autoroot to be configured via Filesystem.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 17:44:12 +09:00
8db906ee64
container/dispatcher: remove exit stub test log
...
Turns out testing.T does not like being called in defer.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 17:33:35 +09:00
cedfceded5
container/autoroot: remove prefix field
...
This field has been a noop for a long time. Remove it to prevent further confusion.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 03:39:20 +09:00
33d2dcce1b
container/initoverlay: internal bypass sysroot prefix
...
This is for supporting overlay mounts for autoroot.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-25 02:42:22 +09:00
2baa2d7063
container/init: measure init behaviour
...
This used to be entirely done via integration tests, with almost no hope of error injection and coverage profile. These tests significantly increase confidence of future work in this area.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-24 04:52:32 +09:00
0166833431
container/dispatcher: start goroutine in dispatcher
...
This allows instrumentation of calls from goroutine without relying on finalizers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-23 21:58:40 +09:00
b3da3da525
container/init: avoid multiple lastcap calls
...
This reduces the size of []kexpect in the test suite.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-23 11:09:11 +09:00
1b3902df78
container/dispatcher: instrument each goroutine individually
...
Scheduler nondeterminism cannot be accounted for, so do this instead.
There should not be any performance penalty as these calls are optimised out for direct.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-23 11:07:16 +09:00
ea1e3ebae9
container/params: pass fd instead of file
...
The file is very difficult to stub. Pass fd instead as it is the value that is actually useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-23 00:16:46 +09:00
1c692bfb79
container/init: call lockOSThread through dispatcher
...
This degrades test performance if not stubbed out.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-22 22:24:14 +09:00
141a18999f
container: move integration test helpers
...
With the new instrumentation it is now possible to run init code outside integration tests.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-22 22:07:19 +09:00
afe23600d2
container/path: use syscall dispatcher
...
This allows path and mount functions to be instrumented.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-22 22:02:21 +09:00
09d2844981
container/init: wrap syscall helper functions
...
This allows tests to stub all kernel behaviour, enabling measurement of all function call arguments and error injection.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-22 19:27:31 +09:00
d500d6e559
system/dbus: share host net ns for abstract
...
Host abstract unix sockets are only accessible when also in the init net ns.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-21 21:55:23 +09:00
5b73316ae0
container/syscall: doc comments from manpages
...
These are pulled straight from the manpages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-21 00:33:46 +09:00
5d8a2199b6
container/init: op interface valid method
...
Check ops early and eliminate duplicate checks.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-21 00:18:50 +09:00
a1482ecdd0
container/inittmpfs: check path equivalence by value
...
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 20:17:28 +09:00
a07f9ed84c
container/initsymlink: check path equivalence by value
...
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 20:03:02 +09:00
51304b03af
container/initremount: check path equivalence by value
...
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 19:55:51 +09:00
c6397b941f
container/initproc: check path equivalence by value
...
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 19:29:45 +09:00
d65e5f817a
container/initplace: check path equivalence by value
...
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 19:19:27 +09:00
696e593898
container/initoverlay: check path equivalence by value
...
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 17:33:15 +09:00
97ab24feef
container/init: use absolute compare method
...
More checks are also added.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 17:14:36 +09:00
31f0dd36df
absolute: efficient equivalence check method
...
This is more efficient and makes the call site cleaner.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 17:06:38 +09:00
9aec2f46fe
container/initdev: check path equivalence by value
...
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 02:55:45 +09:00
022cc26b2e
container/capability: check CAP_TO_INDEX and CAP_TO_MASK
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 02:45:00 +09:00
b4c018da8f
container/autoetc: do not bypass absolute check
...
This can now be done cleanly via path function wrappers.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 02:37:11 +09:00
66f52407d3
container/initmkdir: check path equivalence by value
...
Fixes regression introduced while integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 02:32:22 +09:00
e463faf649
container/initbind: check path equivalence by value
...
Same problem as autoroot, never updated the checks after integrating Absolute.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 02:22:04 +09:00
375acb476d
container/autoroot: check host path equivalence by value
...
This will never return true otherwise unless the equivalent paths happen to be interned by the caller.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 02:14:39 +09:00
c81c9a9d75
container/init: split setup ops into individual files
...
This significantly increases readability.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 01:28:31 +09:00
339e4080dc
container/ops: move Op type to init file
...
This helps with the eventual separation of all setup ops into individual files.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 01:11:24 +09:00
e0533aaa68
container/autoroot: filter dentry with empty name
...
This is unreachable, but nice to have just in case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 01:03:49 +09:00
13c7083bc0
container: ptrace protection via Yama LSM
...
This is only a nice to have feature as the init process has no additional privileges and the monitor process was never reachable anyway.
Closes #4 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-20 00:43:55 +09:00
6947ff04e0
system/dbus/proc: host abstract only when not binding
...
The test failure seems to be caused by an unrelated bug in xdg-dbus-proxy.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-19 23:39:14 +09:00
140fe21237
container/params: check setup/receive behaviour
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-18 22:30:34 +09:00
f52d2c7db6
container/path: check create and mountinfo helpers
...
These can quite easily be checked within the framework. The scanner fault injection might require updating at some point if the implementation changes.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-18 21:30:28 +09:00
3c9e547c4a
cmd/hpkg: add deprecation notice
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-18 17:00:27 +09:00
a3988c1a77
hst: rename net and abstract fields
...
This makes more sense and matches the container library.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-18 16:48:01 +09:00
5db0714072
container: optionally isolate host abstract UNIX domain sockets via landlock
2025-08-18 16:28:14 +09:00
69a4ab8105
container: move PR_SET_NO_NEW_PRIVS to parent
...
This allows some LSM setup in the parent.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-18 11:46:02 +09:00
22d577ab49
test/sandbox: do not discard stderr getting hash
...
This is the first hakurei run in the test, if the container outright fails to start this is often where it happens, so throwing away the output is very unhelpful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-18 11:36:13 +09:00
83a1c75f1a
app: set up acl on X11 socket
...
The socket is typically owned by the priv-user, and inaccessible by the target user, so just allowing access to the directory is not enough. This change fixes this oversight and add checks that will also be useful for merging security/hakurei#1 .
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-18 11:30:58 +09:00
0ac6e99818
container: start from locked thread
...
This allows setup that relies on per-thread state like securebits and landlock, from the parent side.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-17 17:42:22 +09:00
f35733810e
container: check output helper functions
...
The container test suite has always been somewhat inadequate due to the inability of coverage tooling to reach into containers. This has become an excuse for not testing non-container code as well, which lead to the general lack of confidence when working with container code. This change aims to be one of many to address that to some extent.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-17 02:59:37 +09:00
9c1a5d43ba
container: enforce nonrepeatable autoetc and autoroot
...
These keep track of some internal state, and they don't make sense to have multiple instances of anyway, so instead of dealing with that, just make them nonrepetable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-17 01:43:11 +09:00
8aa65f28c6
container: allow additional state between ops
...
This is useful for ops that need to be aware of previous instances of themselves.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-17 01:32:07 +09:00
f9edec7e41
hst: merge miscellaneous files
...
These structs were going to be bigger at some point. They turned out not to be.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-16 02:32:57 +09:00
305c600cf5
hst: move container type to config
...
Container state initialisation is no longer implemented in hst so splitting them no longer makes sense.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-16 02:28:36 +09:00
8dd3e1ee5d
hst/fs: rename method Target to Path
...
This allows adapter structs to use the same field names as Op structs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-16 02:06:41 +09:00
4ffeec3004
hst/enablement: editor friendly enablement adaptor
...
Having the bit field value here (in decimal, no less) is unfriendly to text editors. Use a bunch of booleans here to improve ease of use.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-15 05:16:51 +09:00
9ed3ba85ea
hst/fs: implement overlay fstype
...
This finally exposes overlay mounts in the high level hakurei API.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-15 04:00:55 +09:00
4433c993fa
nix: check config via hakurei
...
This is unfortunately the only feasible way of doing this in nix.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-15 03:27:54 +09:00
430991c39b
hst/fs: remove type method
...
Having a method that returns the canonical string representation of its type seemed like a much better idea for an implementation that never made it to staging. Remove it here and clean up marshal type assertions.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-15 00:39:02 +09:00
ba3227bf15
container: export overlay escape
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-14 23:44:11 +09:00
0e543a58b3
hst/fs: valid method on underlying interface
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-14 21:36:22 +09:00
c989e7785a
hst/info: include extra information
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-14 19:52:03 +09:00
332d90d6c7
container/path: remove unused path
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-14 05:00:09 +09:00
99ac96511b
hst/fs: interface filesystem config
...
This allows mount points to be represented by different underlying structs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-14 04:52:49 +09:00
e99d7affb0
container: use absolute for pathname
...
This is simultaneously more efficient and less error-prone. This change caused minor API changes in multiple other packages.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-11 04:56:42 +09:00
41ac2be965
container/absolute: wrap safe stdlib functions
...
These functions do not change the absoluteness of a pathname.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-10 03:11:10 +09:00
02271583fb
container: remove PATH lookup behaviour
...
This is way higher level than the container package and does not even work unless every path is mounted in the exact same location.
This behaviour causes nothing but confusion and problems,
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-09 19:08:54 +09:00
ef54b2cd08
container/absolute: early absolute pathname check
...
This is less error-prone, and allows pathname to be checked once.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-09 18:53:46 +09:00
82608164f6
container/params: remove confusingly named error
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-09 17:37:46 +09:00
edd6f2cfa9
container: document ambient capabilities
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-08 02:11:55 +09:00
acffa76812
container/ops: implement overlay op
...
There are significant limitations to using the overlay mount, and the implementation in the kernel is quite quirky. For now the Op is quite robust, however a higher level interface for it has not been decided yet.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-08 01:54:48 +09:00
8da76483e6
container/path: fix typo "paths"
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-08 01:32:48 +09:00
534c932906
container: test case runtime initialisation
...
This allows for more sophisticated test setup.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-08 01:03:35 +09:00
fee10fed4d
container: test bypass output buffer on verbose
...
This restores verbose behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-08 00:57:27 +09:00
a4f7e92e1c
test/interactive: helper scripts for tracing
...
The vm state is discarded often, and it is quite cumbersome to set everything up again when the shell history is gone.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-08 00:56:25 +09:00
f1a53d6116
container: raise CAP_DAC_OVERRIDE
...
This is required for upperdir and workdir checks in overlayfs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-08 00:43:19 +09:00
b353c3deea
nix: make src overlay writable
...
The lowerdir is in the nix store.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-07 18:07:19 +09:00
fde5f1ca64
container: buffer test output
...
This further reduces noise on test failure by only passing through output of the failed test.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-07 02:55:58 +09:00
4d0bdd84b5
container: test respect verbose flag
...
This reduces noise on test failure.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-07 02:50:00 +09:00
72a931a71a
nix: interactive nixos vm
...
This is useful for quickly spinning up an ephemeral hakurei environment for testing changes or reproducing vm test failures.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-07 02:46:04 +09:00
9a25542c6d
container/init: use mount string constants
...
These literals were missed when the constants were first defined.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-04 04:00:05 +09:00
c6be82bcf9
container/path: fhs path constants
...
This increases readability since this can help disambiguate absolute paths from similarly named path segments.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-03 21:16:45 +09:00
38245559dc
container/ops: mount dev readonly
...
There is usually no good reason to write to /dev. This however doesn't work in internal/app because FilesystemConfig supplied by ContainerConfig might add entries to /dev, so internal/app follows DevWritable with Remount instead.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-03 19:18:53 +09:00
7b416d47dc
container/ops: merge mqueue and dev Ops
...
There is no reason to mount mqueue anywhere else, and these Ops usually follow each other. This change merges them. This helps decrease IPC overhead and also enables mounting dev readonly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-03 19:13:46 +09:00
15170735ba
container/mount: move tmpfs sysroot prefixing to caller
...
The mountTmpfs helper is a relatively low level function that is not exposed as part of the API. Prefixing sysroot here not only introduces overhead but is also quite error-prone.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-03 18:06:41 +09:00
6a3886e9db
container/op: unexport bind resolved source field
...
This is used for symlink resolution and is only used internally.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-03 17:57:37 +09:00
ff66296378
container/mount: mount data escape helper function
...
For formatting user-supplied path strings into overlayfs mount data.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-03 17:46:14 +09:00
347a79df72
container: improve clone flags readability
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-02 18:19:44 +09:00
0f78864a67
container/mount: export mount string constants
...
This improves code readability and should also be useful for callers choosing to preserve CAP_SYS_ADMIN.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-02 17:20:09 +09:00
b32b1975a8
hst/container: remove cover
...
This was never useful, and is now completely replaced by regular FilesystemConfig being able to mount tmpfs.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-02 00:34:52 +09:00
2b1eaa62f1
update github notice
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-02 00:21:16 +09:00
f13dca184c
release: 0.1.3
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-02 00:02:54 +09:00
3b8a3d3b00
app: remount root readonly
...
This does nothing for security, but should help avoid hiding bugs of programs developed in a hakurei container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 23:56:28 +09:00
c5d24979f5
container/ops: expose remount as Op
...
This is useful for building a filesystem hierarchy then remounting it readonly.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 23:48:02 +09:00
1dc780bca7
container/mount: separate remount from bind
...
Remount turns out to be useful in other places.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 23:32:38 +09:00
ec33061c92
nix: remove nscd cover
...
This is a pd workaround that does nothing in the nixos module.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 22:04:58 +09:00
af0899de96
hst/container: mount tmpfs via magic src string
...
There's often good reason to mount tmpfs in the container.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 21:23:52 +09:00
547a2adaa4
container/mount: pass tmpfs flags
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 18:59:06 +09:00
c02948e155
cmd/hakurei: print autoroot configuration
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 04:29:01 +09:00
387b86bcdd
app: integrate container autoroot
...
Doing this instead of mounting directly on / because it's impossible to ensure a parent is available for every path hakurei wants to mount to. This situation is similar to autoetc hence the similar name, however a symlink mirror will not work in this case.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 04:21:54 +09:00
4e85643865
container: implement autoroot as setup op
...
This code is useful beyond just pd behaviour, and implementing it this way also reduces IPC overhead.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 04:04:36 +09:00
987981df73
test/sandbox: check pd behaviour
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 03:27:02 +09:00
f14e7255be
container/ops: use correct flags value in bind string
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-08-01 00:54:08 +09:00
a8a79a8664
cmd/hpkg: rename from planterette
...
Planterette is now developed in another repository, so rename this proof of concept to avoid confusion.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-31 23:57:11 +09:00
3ae0cec000
test: increase vm memory
...
This hopefully fixes the intermittent failures.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-31 22:08:01 +09:00
4e518f11d8
container/ops: autoetc implementation to separate file
...
This is not a general purpose setup Op. Separate it so it is easier to find.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-31 19:54:03 +09:00
cb513bb1cd
release: 0.1.2
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-29 03:11:33 +09:00
f7bd28118c
hst: configurable wait delay
...
This is useful for programs that take a long time to clean up.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-29 03:06:49 +09:00
940ee00ffe
container/init: configurable lingering process wait delay
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-29 02:38:17 +09:00
b43d104680
app: integrate interrupt forwarding
...
This significantly increases usability of command line tools running through hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-29 02:23:06 +09:00
ddf48a6c22
app/shim: implement signal handler outcome in Go
...
This needs to be done from the Go side eventually anyway to integrate the signal forwarding behaviour now supported by the container package.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-28 23:39:30 +09:00
a0f499e30a
app/shim: separate signal handler implementation
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-28 21:52:53 +09:00
d6b07f12ff
container: forward context cancellation
...
This allows container processes to exit gracefully.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-28 01:45:38 +09:00
65fe09caf9
container: check cancel signal delivery
...
This change also makes some parts of the test more robust.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-28 01:04:29 +09:00
a1e5f020f4
container: improve doc comments
...
Putting them on the builder methods is more useful.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-27 12:27:42 +09:00
bd3fa53a55
container: access test case by index in helper
...
This is more elegant and allows for much easier extension of the tests. Mountinfo is still serialised however due to libPaths nondeterminism.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-26 18:59:19 +09:00
625632c593
nix: update flake lock
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-26 18:57:54 +09:00
e71ae3b8c5
container: remove custom cmd initialisation
...
This part of the interface is very unintuitive and only used for testing, even in testing it is inelegant and can be done better.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-25 00:45:10 +09:00
9d7a19d162
container: use more reliable nonexistence
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-18 23:18:26 +09:00
6ba19a7ba5
release: 0.1.1
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-09 05:42:31 +09:00
749a2779f5
test/sandbox: add arm64 constants
...
Most of these are differences in qemu.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-09 05:36:35 +09:00
e574042d76
test/sandbox: verify seccomp on all test cases
...
This change also makes seccomp hashes cross-platform.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-09 04:21:35 +09:00
2b44493e8a
test/sandbox: guard on testtool tag
...
This tool should not show up when building hakurei normally.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-07 20:11:29 +09:00
c30dd4e630
test/sandbox/seccomp: remove uselib
...
This syscall is not wired on all platforms. This test barely does anything anyway and seccomp is covered by the privileged test instrumentation.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-07 15:28:55 +09:00
d90da1c8f5
container/seccomp: add arm64 constants
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-07 14:58:03 +09:00
5853d7700f
container/seccomp: move bpf hashes
...
Filter programs are different across platforms. This representation is also much more readable.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-07 14:41:47 +09:00
d5c7523726
container/init: fix prctl call
...
This is a very silly typo. Luckily has no effect due to an upper layer doing PR_SET_NO_NEW_PRIVS already.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-07 14:06:14 +09:00
ddfcc51b91
container: move capset implementation
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-07 13:47:13 +09:00
8ebedbd88a
container: move syscall constants
...
These aren't missing from all targets.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-07 13:23:01 +09:00
84e8142a2d
container/seccomp: move personality constants
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-07 12:44:32 +09:00
2c7b7ad845
container/seccomp: cross-platform sysnum cutoff
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-07 12:27:00 +09:00
72c2b66fc0
nix: cross-platform syscall wrapper
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-07 04:22:55 +09:00
356b42a406
container/init: use /proc/self as intermediate
...
Setting up via /tmp is okay, /proc/self/fd makes a lot more sense though for reasons described in the comment.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-06 02:14:35 +09:00
d9b6d48e7c
add miscellaneous badges
...
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-03 18:04:09 +09:00
087959e81b
app: remove split implementation
...
It is completely nonsensical and highly error-prone to have multiple implementations of this in the same build. This should be switched at compile time instead therefore the split packages are pointless.
Signed-off-by: Ophestra <cat@gensokyo.uk >
2025-07-03 04:36:59 +09:00