aboutsummaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)Author
2025-12-15release: 0.3.3v0.3.3Ophestra
Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-15test: check shim private dir cleanupOphestra
This asserts that no shim private dir was left behind after all containers terminate. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-15internal/outcome: expose pipewire via pipewire-pulseOphestra
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-15internal/outcome: look up pipewire-pulse pathOphestra
This is for setting up the pipewire-pulse container in shim, for #29. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-15internal/outcome: optional shim private dirOphestra
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-15hst: add direct hardware optionOphestra
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-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-14internal/pipewire: handle SecurityContext::Create errorOphestra
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-14internal/pipewire: SecurityContext as destructibleOphestra
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-14internal/pipewire: reorder context structOphestra
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-14internal/pipewire: implement Core::DestroyOphestra
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-14internal/pipewire: do not emit None for spa_dictOphestra
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-14internal/pipewire: implement Core::CreateObjectOphestra
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-14internal/pipewire: handle nil spa_dict correctlyOphestra
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-14internal/pipewire: unmarshal nil pointer correctlyOphestra
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-14internal/pipewire: return correct size for nil spa_dictOphestra
A nil spa_dict results in a None type value being sent over the wire. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-14internal/pipewire: move Core wrapper methods under CoreOphestra
These do not belong under Context, and is an early implementation limitation that carried over. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-13internal/pipewire: treat noAck violation as fatalOphestra
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-13internal/pipewire: implement Core::RemoveIdOphestra
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-12nix: update flake lockOphestra
NixOS 25.11 introduces a crash in cage and an intermittent crash in foot. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-11internal/pipewire: treat unknown opcode as fatalOphestra
Skipping events can cause local state to diverge from the server. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-11internal/pipewire: generic Core::Error handlingOphestra
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-11internal/pipewire: export Registry::DestroyOphestra
This handles the error returned by Sync. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-10internal/outcome: populate instance metadata for PipeWireOphestra
These have similar semantics to equivalent Wayland security-context-v1 fields. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-10internal/pipewire: cleaner error message for unsupported typeOphestra
The error string itself is descriptive enough, so use it as the error message directly. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-10internal/pipewire: implement Registry::DestroyOphestra
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-10internal/pipewire: implement Registry::GlobalRemoveOphestra
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-09release: 0.3.2v0.3.2Ophestra
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-09internal/pipewire: expose connection propsOphestra
Unused in hakurei but could be useful when the package is moved out of internal. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-09internal/pipewire: include remaining size in recvmsg wrapperOphestra
This otherwise truncates the received data by len(remaining) bytes. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-09internal/pipewire: reset per-roundtrip state once per callOphestra
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-09internal/pipewire: increment remote sequence after establishing boundsOphestra
This avoids incrementing it twice proceeding from a partial message. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-09internal/pipewire: do not clobber error parsing SCMsOphestra
The error is handled later, clobbering it here breaks error handling when SCMs are present. Signed-off-by: Ophestra <cat@gensokyo.uk>
2025-12-09Revert "internal/pipewire: work around remote sequence quirk"Ophestra
This reverts commit 564db6863b8e0e90cbf7210152c53124fddc1b4c.
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-08cmd/hakurei: exec instead of fork/exec from shellOphestra
There is no reason to keep the shell process around. 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-08test/interactive: add app with bad daemonOphestra
This is useful for testing daemon error handling behaviour. 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-08internal/pipewire: work around remote sequence quirkOphestra
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-08treewide: include PipeWire op and enforce PulseAudio checkOphestra
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-08hst: expose daemon as fs entryOphestra
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-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-08internal/outcome: integrate pipewire serverOphestra
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-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-12-08hst: check for insecure PulseAudio enablementOphestra
This is currently still a noop, but required for #26. Signed-off-by: Ophestra <cat@gensokyo.uk>