diff --git a/cmd/hakurei/command.go b/cmd/hakurei/command.go index e049cfc..e1f4c51 100644 --- a/cmd/hakurei/command.go +++ b/cmd/hakurei/command.go @@ -20,8 +20,8 @@ import ( "hakurei.app/internal" "hakurei.app/internal/env" "hakurei.app/internal/outcome" + "hakurei.app/internal/system/dbus" "hakurei.app/message" - "hakurei.app/system/dbus" ) //go:linkname optionalErrorUnwrap hakurei.app/container.optionalErrorUnwrap diff --git a/internal/outcome/dispatcher.go b/internal/outcome/dispatcher.go index 3427a48..e2feb37 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 09754b9..58a23e0 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 d8de989..17007f0 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 e5b9af1..ecc4ccc 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 1af253c..b137d4f 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 3aa4d0e..537235f 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 a9eed19..a6eed75 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 9a567e2..0334ac0 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 afb62ca..c123135 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 c0ea1d3..2e489c2 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 84a53a7..e988ec0 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 cccc77e..34c1634 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 7621584..b05cc1d 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 013ceec..dd675d6 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 a7d87b5..ccc8f3d 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 54119de..a57c3c0 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 281cb29..3c99abd 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 506fa9a..8fb7ab4 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 85446a4..794da6a 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) {