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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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