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