aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/outcome
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-11-13 01:22:47 +0900
committerOphestra <cat@gensokyo.uk>2025-11-13 01:22:47 +0900
commitbf5d10743f82ea438b1a05939f55d8b0027e98b9 (patch)
tree5d0294116c219ecce64af42adb2d17db8e6e116b /internal/outcome
parent4e7aab07d5b175345fdf3ea08868dab1e6d90126 (diff)
treewide: import internal/system
For #24. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/outcome')
-rw-r--r--internal/outcome/dispatcher.go2
-rw-r--r--internal/outcome/dispatcher_test.go2
-rw-r--r--internal/outcome/finalise.go2
-rw-r--r--internal/outcome/main_test.go6
-rw-r--r--internal/outcome/outcome.go4
-rw-r--r--internal/outcome/process.go2
-rw-r--r--internal/outcome/spcontainer.go6
-rw-r--r--internal/outcome/spcontainer_test.go6
-rw-r--r--internal/outcome/spdbus.go4
-rw-r--r--internal/outcome/spdbus_test.go6
-rw-r--r--internal/outcome/sppulse_test.go4
-rw-r--r--internal/outcome/spruntime.go4
-rw-r--r--internal/outcome/spruntime_test.go4
-rw-r--r--internal/outcome/sptmpdir.go4
-rw-r--r--internal/outcome/sptmpdir_test.go4
-rw-r--r--internal/outcome/spwayland.go10
-rw-r--r--internal/outcome/spwayland_test.go12
-rw-r--r--internal/outcome/spx11.go2
-rw-r--r--internal/outcome/spx11_test.go2
19 files changed, 43 insertions, 43 deletions
diff --git a/internal/outcome/dispatcher.go b/internal/outcome/dispatcher.go
index 3427a484..e2feb373 100644
--- a/internal/outcome/dispatcher.go
+++ b/internal/outcome/dispatcher.go
@@ -15,8 +15,8 @@ import (
"hakurei.app/container/seccomp"
"hakurei.app/container/std"
"hakurei.app/internal"
+ "hakurei.app/internal/system/dbus"
"hakurei.app/message"
- "hakurei.app/system/dbus"
)
// osFile represents [os.File].
diff --git a/internal/outcome/dispatcher_test.go b/internal/outcome/dispatcher_test.go
index 09754b94..58a23e03 100644
--- a/internal/outcome/dispatcher_test.go
+++ b/internal/outcome/dispatcher_test.go
@@ -24,8 +24,8 @@ import (
"hakurei.app/container/std"
"hakurei.app/container/stub"
"hakurei.app/hst"
+ "hakurei.app/internal/system"
"hakurei.app/message"
- "hakurei.app/system"
)
// call initialises a [stub.Call].
diff --git a/internal/outcome/finalise.go b/internal/outcome/finalise.go
index d8de9899..17007f07 100644
--- a/internal/outcome/finalise.go
+++ b/internal/outcome/finalise.go
@@ -8,8 +8,8 @@ import (
"os/user"
"hakurei.app/hst"
+ "hakurei.app/internal/system"
"hakurei.app/message"
- "hakurei.app/system"
)
func newWithMessage(msg string) error { return newWithMessageError(msg, os.ErrInvalid) }
diff --git a/internal/outcome/main_test.go b/internal/outcome/main_test.go
index e5b9af1e..ecc4ccc4 100644
--- a/internal/outcome/main_test.go
+++ b/internal/outcome/main_test.go
@@ -21,10 +21,10 @@ import (
"hakurei.app/container/seccomp"
"hakurei.app/container/std"
"hakurei.app/hst"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
+ "hakurei.app/internal/system/dbus"
"hakurei.app/message"
- "hakurei.app/system"
- "hakurei.app/system/acl"
- "hakurei.app/system/dbus"
)
func TestOutcomeMain(t *testing.T) {
diff --git a/internal/outcome/outcome.go b/internal/outcome/outcome.go
index 1af253ce..b137d4f3 100644
--- a/internal/outcome/outcome.go
+++ b/internal/outcome/outcome.go
@@ -10,9 +10,9 @@ import (
"hakurei.app/container/check"
"hakurei.app/hst"
"hakurei.app/internal/env"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
"hakurei.app/message"
- "hakurei.app/system"
- "hakurei.app/system/acl"
)
// envAllocSize is the initial size of the env map pre-allocated when the configured env map is nil.
diff --git a/internal/outcome/process.go b/internal/outcome/process.go
index 3aa4d0e2..537235fd 100644
--- a/internal/outcome/process.go
+++ b/internal/outcome/process.go
@@ -18,8 +18,8 @@ import (
"hakurei.app/hst"
"hakurei.app/internal"
"hakurei.app/internal/store"
+ "hakurei.app/internal/system"
"hakurei.app/message"
- "hakurei.app/system"
)
const (
diff --git a/internal/outcome/spcontainer.go b/internal/outcome/spcontainer.go
index a9eed191..a6eed75b 100644
--- a/internal/outcome/spcontainer.go
+++ b/internal/outcome/spcontainer.go
@@ -16,11 +16,11 @@ import (
"hakurei.app/container/seccomp"
"hakurei.app/container/std"
"hakurei.app/hst"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
+ "hakurei.app/internal/system/dbus"
"hakurei.app/internal/validate"
"hakurei.app/message"
- "hakurei.app/system"
- "hakurei.app/system/acl"
- "hakurei.app/system/dbus"
)
const varRunNscd = fhs.Var + "run/nscd"
diff --git a/internal/outcome/spcontainer_test.go b/internal/outcome/spcontainer_test.go
index 9a567e27..0334ac07 100644
--- a/internal/outcome/spcontainer_test.go
+++ b/internal/outcome/spcontainer_test.go
@@ -14,9 +14,9 @@ import (
"hakurei.app/container/std"
"hakurei.app/container/stub"
"hakurei.app/hst"
- "hakurei.app/system"
- "hakurei.app/system/acl"
- "hakurei.app/system/dbus"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
+ "hakurei.app/internal/system/dbus"
)
func TestSpParamsOp(t *testing.T) {
diff --git a/internal/outcome/spdbus.go b/internal/outcome/spdbus.go
index afb62ca0..c123135e 100644
--- a/internal/outcome/spdbus.go
+++ b/internal/outcome/spdbus.go
@@ -5,8 +5,8 @@ import (
"hakurei.app/container/fhs"
"hakurei.app/hst"
- "hakurei.app/system/acl"
- "hakurei.app/system/dbus"
+ "hakurei.app/internal/system/acl"
+ "hakurei.app/internal/system/dbus"
)
func init() { gob.Register(new(spDBusOp)) }
diff --git a/internal/outcome/spdbus_test.go b/internal/outcome/spdbus_test.go
index c0ea1d37..2e489c22 100644
--- a/internal/outcome/spdbus_test.go
+++ b/internal/outcome/spdbus_test.go
@@ -8,10 +8,10 @@ import (
"hakurei.app/container/stub"
"hakurei.app/hst"
"hakurei.app/internal/helper"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
+ "hakurei.app/internal/system/dbus"
"hakurei.app/message"
- "hakurei.app/system"
- "hakurei.app/system/acl"
- "hakurei.app/system/dbus"
)
func TestSpDBusOp(t *testing.T) {
diff --git a/internal/outcome/sppulse_test.go b/internal/outcome/sppulse_test.go
index 84a53a7e..e988ec08 100644
--- a/internal/outcome/sppulse_test.go
+++ b/internal/outcome/sppulse_test.go
@@ -11,8 +11,8 @@ import (
"hakurei.app/container/check"
"hakurei.app/container/stub"
"hakurei.app/hst"
- "hakurei.app/system"
- "hakurei.app/system/acl"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
)
func TestSpPulseOp(t *testing.T) {
diff --git a/internal/outcome/spruntime.go b/internal/outcome/spruntime.go
index cccc77ee..34c16341 100644
--- a/internal/outcome/spruntime.go
+++ b/internal/outcome/spruntime.go
@@ -7,8 +7,8 @@ import (
"hakurei.app/container/fhs"
"hakurei.app/container/std"
"hakurei.app/hst"
- "hakurei.app/system"
- "hakurei.app/system/acl"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
)
const (
diff --git a/internal/outcome/spruntime_test.go b/internal/outcome/spruntime_test.go
index 76215843..b05cc1d9 100644
--- a/internal/outcome/spruntime_test.go
+++ b/internal/outcome/spruntime_test.go
@@ -8,8 +8,8 @@ import (
"hakurei.app/container/std"
"hakurei.app/container/stub"
"hakurei.app/hst"
- "hakurei.app/system"
- "hakurei.app/system/acl"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
)
func TestSpRuntimeOp(t *testing.T) {
diff --git a/internal/outcome/sptmpdir.go b/internal/outcome/sptmpdir.go
index 013ceecb..dd675d67 100644
--- a/internal/outcome/sptmpdir.go
+++ b/internal/outcome/sptmpdir.go
@@ -7,8 +7,8 @@ import (
"hakurei.app/container/fhs"
"hakurei.app/container/std"
"hakurei.app/hst"
- "hakurei.app/system"
- "hakurei.app/system/acl"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
)
func init() { gob.Register(spTmpdirOp{}) }
diff --git a/internal/outcome/sptmpdir_test.go b/internal/outcome/sptmpdir_test.go
index a7d87b51..ccc8f3d3 100644
--- a/internal/outcome/sptmpdir_test.go
+++ b/internal/outcome/sptmpdir_test.go
@@ -8,8 +8,8 @@ import (
"hakurei.app/container/std"
"hakurei.app/container/stub"
"hakurei.app/hst"
- "hakurei.app/system"
- "hakurei.app/system/acl"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
)
func TestSpTmpdirOp(t *testing.T) {
diff --git a/internal/outcome/spwayland.go b/internal/outcome/spwayland.go
index 54119de6..a57c3c0a 100644
--- a/internal/outcome/spwayland.go
+++ b/internal/outcome/spwayland.go
@@ -5,8 +5,8 @@ import (
"hakurei.app/container/check"
"hakurei.app/hst"
- "hakurei.app/system/acl"
- "hakurei.app/system/wayland"
+ "hakurei.app/internal/system/acl"
+ "hakurei.app/internal/system/wayland"
)
func init() { gob.Register(new(spWaylandOp)) }
@@ -25,8 +25,8 @@ func (s *spWaylandOp) toSystem(state *outcomeStateSys) error {
// outer wayland socket (usually `/run/user/%d/wayland-%d`)
var socketPath *check.Absolute
- if name, ok := state.k.lookupEnv(wayland.WaylandDisplay); !ok {
- state.msg.Verbose(wayland.WaylandDisplay + " is not set, assuming " + wayland.FallbackName)
+ if name, ok := state.k.lookupEnv(wayland.Display); !ok {
+ state.msg.Verbose(wayland.Display + " is not set, assuming " + wayland.FallbackName)
socketPath = state.sc.RuntimePath.Append(wayland.FallbackName)
} else if a, err := check.NewAbs(name); err != nil {
socketPath = state.sc.RuntimePath.Append(name)
@@ -53,7 +53,7 @@ func (s *spWaylandOp) toSystem(state *outcomeStateSys) error {
func (s *spWaylandOp) toContainer(state *outcomeStateParams) error {
innerPath := state.runtimeDir.Append(wayland.FallbackName)
- state.env[wayland.WaylandDisplay] = wayland.FallbackName
+ state.env[wayland.Display] = wayland.FallbackName
if s.SocketPath == nil {
state.params.Bind(state.instancePath().Append("wayland"), innerPath, 0)
} else {
diff --git a/internal/outcome/spwayland_test.go b/internal/outcome/spwayland_test.go
index 281cb29b..3c99abd7 100644
--- a/internal/outcome/spwayland_test.go
+++ b/internal/outcome/spwayland_test.go
@@ -6,9 +6,9 @@ import (
"hakurei.app/container"
"hakurei.app/container/stub"
"hakurei.app/hst"
- "hakurei.app/system"
- "hakurei.app/system/acl"
- "hakurei.app/system/wayland"
+ "hakurei.app/internal/system"
+ "hakurei.app/internal/system/acl"
+ "hakurei.app/internal/system/wayland"
)
func TestSpWaylandOp(t *testing.T) {
@@ -47,7 +47,7 @@ func TestSpWaylandOp(t *testing.T) {
Ops: new(container.Ops).
Bind(m(wantInstancePrefix+"/wayland"), m("/run/user/1000/wayland-0"), 0),
}, paramsWantEnv(config, map[string]string{
- wayland.WaylandDisplay: wayland.FallbackName,
+ wayland.Display: wayland.FallbackName,
}, nil), nil},
{"success direct", func(isShim, _ bool) outcomeOp {
@@ -75,7 +75,7 @@ func TestSpWaylandOp(t *testing.T) {
Ops: new(container.Ops).
Bind(m("/proc/nonexistent/wayland"), m("/run/user/1000/wayland-0"), 0),
}, paramsWantEnv(config, map[string]string{
- wayland.WaylandDisplay: wayland.FallbackName,
+ wayland.Display: wayland.FallbackName,
}, nil), nil},
{"success", func(bool, bool) outcomeOp {
@@ -98,7 +98,7 @@ func TestSpWaylandOp(t *testing.T) {
Ops: new(container.Ops).
Bind(m(wantInstancePrefix+"/wayland"), m("/run/user/1000/wayland-0"), 0),
}, paramsWantEnv(config, map[string]string{
- wayland.WaylandDisplay: wayland.FallbackName,
+ wayland.Display: wayland.FallbackName,
}, nil), nil},
})
}
diff --git a/internal/outcome/spx11.go b/internal/outcome/spx11.go
index 506fa9ac..8fb7ab4f 100644
--- a/internal/outcome/spx11.go
+++ b/internal/outcome/spx11.go
@@ -11,7 +11,7 @@ import (
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/hst"
- "hakurei.app/system/acl"
+ "hakurei.app/internal/system/acl"
)
var absX11SocketDir = fhs.AbsTmp.Append(".X11-unix")
diff --git a/internal/outcome/spx11_test.go b/internal/outcome/spx11_test.go
index 85446a4d..794da6ad 100644
--- a/internal/outcome/spx11_test.go
+++ b/internal/outcome/spx11_test.go
@@ -7,7 +7,7 @@ import (
"hakurei.app/container"
"hakurei.app/container/stub"
"hakurei.app/hst"
- "hakurei.app/system/acl"
+ "hakurei.app/internal/system/acl"
)
func TestSpX11Op(t *testing.T) {