aboutsummaryrefslogtreecommitdiffhomepage
path: root/container
AgeCommit message (Collapse)Author
2026-02-28container/std: rename seccomp typesOphestra
Aliases will be kept until 0.4. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-28container: use /proc/self/exe directlyOphestra
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-28container: improve documentationOphestra
This change removes inconsistencies collected over time in this package. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-26container: set scheduling policyOphestra
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-17container/initplace: return nil for createTemp error injectionOphestra
This matches os package behaviour, and avoids adding the cleanup. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-08container: ignore uninterpreted sourceOphestra
These can be set to anything by the distribution. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-08container: strip host-dependent opts in test casesOphestra
This change also improves plumbing for stripping options. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-02-08container: add riscv64 constantsOphestra
This target is unlikely to become viable any time soon. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-31container: fix host-dependent test casesOphestra
These are not fully controlled by hakurei and may change depending on host configuration. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-19internal/rosa: GNU make artifactOphestra
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-11container/check: return error backed by string typeOphestra
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-11container/check: intern absolute pathnamesOphestra
This improves performance in heavy users like internal/pkg. Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-01-11container/init: configure interface loOphestra
This enables loopback networking when owning the net namespace. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-27container: optionally allow orphanOphestra
This is required for the typical daemonise use case. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-14container: sync stubbed wait4 loop after notifyOphestra
This ensures consistent state observed by wait4 loop when running against stub. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-09container: load initial process started before syscallOphestra
This avoids a race between returning from syscall and checking the state. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08container/initdaemon: copy wstatus from wait4 loopOphestra
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-08container: spin instead of block on wait4 ECHILDOphestra
Blocking prevents further wait4 processing causing ops to never receive their signals. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08container: improve error message fallbackOphestra
This now falls back to message.Error if no other concrete type is matched. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08container: friendlier error message for op timing outOphestra
This includes the string for the failing op which helps with troubleshooting. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08container: make wait4 loop available to opsOphestra
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-08container: start daemons within containerOphestra
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-08container: pass context as setup stateOphestra
This is useful currently for daemon Op, but could be used for many other things. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-08container: call op method right before initial processOphestra
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-11-16.clang-format: increase indent widthOphestra
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-15.clang-format: do not limit line lengthOphestra
This hard limit destroys readability in some places. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-14treewide: migrate ldd callersOphestra
This discontinues use of the deprecated ldd.Exec function for #25. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-14container: provide usage exampleOphestra
This requires cgo so unfortunately will not run in the playground. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-14container/fhs: add constant for /dev/shm/Ophestra
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-13treewide: document linkname usesOphestra
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-12container: set FD_CLOEXEC on all open filesOphestra
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-11container/init: close setup pipe earlyOphestra
This prevents leaking the setup pipe. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-10container/init: close initial process files on terminationOphestra
This closes them during the adopt wait delay. This also keeps them alive. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-07container/std/seccomp: remove ineffectual typecastOphestra
This is no longer necessary since the return type changed. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-07container/seccomp/presets: add fields to literalsOphestra
This keeps composites analysis happy. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-07std: separate seccomp constantsOphestra
This avoids inadvertently using PNRs as syscall numbers. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-06container/std: syscall JSON adapterOphestra
This provides cross-platform JSON adapter for syscall number. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05container: add 386 constantsOphestra
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-05treewide: fit test untyped int literals in 32-bitOphestra
This enables hakurei test suite to run on 32-bit targets. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05container/std: relocate rule typesOphestra
This enables its use in hst for #15. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05container/seccomp: use native typesOphestra
This prepares NativeRule for relocation to std for #15. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05container/seccomp: alias libseccomp typesOphestra
This enables tests to refer to these types and check its size. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05std: relocate seccomp lookup tablesOphestra
This should enable resolving NativeRule in hst. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05container/seccomp/pnr: define pseudo syscallsOphestra
This eliminates the cgo dependency from syscall lookup. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-05std: rename from compOphestra
Seccomp lookup tables are going to be relocated here, and PNR constants. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-11-04hst/grp_pwd: specify new uid formatOphestra
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-03message: rename NewMsg to NewOphestra
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-10-31container/params: expose pipeOphestra
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-25container/executable: handle nil msgOphestra
This is useful in some tests. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-10-23container/init: do not suspend outputOphestra
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>