aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/exec.go
AgeCommit message (Collapse)Author
13 hourspkg: move from internalHEADstagingmasterdevelopOphestra
Closes #43. Signed-off-by: Ophestra <cat@gensokyo.uk>
13 hoursinternal/pkg: remove arch snapshot APIOphestra
This function has no current users and has no good use case, so remove it before the API is made stable. Signed-off-by: Ophestra <cat@gensokyo.uk>
3 daysinternal/pkg: treat bare carriage return as end-of-line markerOphestra
This avoids having progress indicators mess up logging. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-30internal/pkg: optionally colour outputOphestra
This increases readability in some cases. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-09internal/pkg: loadavg target in container environmentOphestra
This exposes preferred loadavg target to the container initial process. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-09internal/pkg: consolidate cache attributesOphestra
This makes the interface stable. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-07-02internal/pkg: rename inputs methodOphestra
Inputs is more correct than dependencies in the current terminology. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-10cmd/mbf: migrate shell to enterOphestra
This reduces duplicate code. This change also adds resolv.conf to the container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-02internal/pkg: expose snapshot of binfmt entriesOphestra
This is otherwise not externally accessible. The resulting map can be safely mutated. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-12internal/pkg: rename measured exec typeOphestra
This type is no longer exclusive to KindExecNet. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-12internal/pkg: optionally measure exec artifactOphestra
Useful for verifying deterministic output without enabling network access. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-07internal/pkg: optionally register binfmtOphestra
This transparently supports curing foreign exec artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-06internal/pkg/exec: close early failure before waitOphestra
This avoids a deadlock on an early container failure. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-05internal/pkg: optionally suppress init verbosityOphestra
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-04-15internal/pkg: job count in container environmentOphestra
This exposes preferred job count to the container initial process. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-07internal/pkg: optional landlock LSMOphestra
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-03internal/pkg: per-cache SCHED_IDLEOphestra
This is cleaner than setting it globally, and is impossible to race. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-04-02internal/pkg: pick up $TERM if attaching stdinOphestra
This improves behaviour of some programs. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-30all: use filepathOphestra
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-26internal/pkg: enter exec containerOphestra
This enables much easier troubleshooting of failing cures. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-26internal/pkg: isolate container paramsOphestra
This enables exporting container params for interactive troubleshooting within the cure container. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17fhs: move from containerOphestra
This package is not container-specific. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17check: move from containerOphestra
This package is not container specific, and widely used across the project. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-17ext: isolate from container/stdOphestra
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-12container: expose priority and SCHED_OTHER policyOphestra
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-11container: move scheduler policy constants to stdOphestra
This avoids depending on cgo. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-09container: sched policy string representationOphestra
This also uses priority obtained via sched_get_priority_min, and improves bounds checking. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-06internal/pkg: move output buffer to readerOphestra
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-05internal/pkg: return writer after syncOphestra
This fixes a use-after-free. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-04internal/pkg: write per-artifact logsOphestra
This is currently only used by execArtifact. A later patch will add additional logging facilities. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-03-03internal/pkg: cancel on scanner errorOphestra
This avoids discarding output thus appearing unresponsive. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-26internal/pkg: set container scheduling policyOphestra
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-19internal/pkg: export layer promotionOphestra
This is a useful helper for external tooling. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-19internal/pkg: export seccomp presetsOphestra
This is useful for external tooling providing an execArtifact-like environment. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-16internal/pkg: allow devel syscallsOphestra
This is required by the GLib test suite, and possibly others. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-05internal/pkg: standardise artifact IROphestra
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-01-27internal/pkg: allow multiarchOphestra
The armv8l busybox binary release needs this to run correctly. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-27internal/pkg: exclusive artifactsOphestra
This alleviates scheduler overhead when curing many artifacts. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-25internal/pkg: expose underlying readerOphestra
This will be fully implemented in httpArtifact in a future commit. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-24internal/pkg: increase output buffer sizeOphestra
This avoids truncating unreasonably long lines from llvm. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-21internal/pkg: allow user namespace creationOphestra
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-19internal/pkg: make checksum available to cureOphestra
This enables deduplication by value as implemented in execArtifact. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-15internal/pkg: cache computed identifiersOphestra
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-12internal/pkg: exec prefix verbose outputOphestra
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-12internal/pkg: caller-supplied reporting name for execOphestra
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-11internal/pkg: exec with specific timeoutOphestra
This change also updates the documentation of NewExec. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-09internal/pkg: move dependency flooding to cacheOphestra
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-08internal/pkg: use short wait delayOphestra
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-08internal/pkg: use correct artifact countOphestra
This updates buffer sizes and counters to use correct total artifact count. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-08internal/pkg: place ephemeral upperdir in tmpOphestra
This enables the use of directories made writable this way as scratch space. Signed-off-by: Ophestra <cat@gensokyo.uk>