1
0
forked from rosa/hakurei

check: move from container

This package is not container specific, and widely used across the project.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-17 15:35:58 +09:00
parent e9a72490db
commit 6d015a949e
103 changed files with 103 additions and 103 deletions

View File

@@ -11,12 +11,12 @@ import (
"testing"
_ "unsafe" // for go:linkname
. "hakurei.app/container/check"
. "hakurei.app/check"
)
// unsafeAbs returns check.Absolute on any string value.
//
//go:linkname unsafeAbs hakurei.app/container/check.unsafeAbs
//go:linkname unsafeAbs hakurei.app/check.unsafeAbs
func unsafeAbs(pathname string) *Absolute
func TestAbsoluteError(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package check_test
import (
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
)
func TestEscapeOverlayDataSegment(t *testing.T) {

View File

@@ -13,8 +13,8 @@ import (
"time"
_ "unsafe" // for go:linkname
"hakurei.app/check"
"hakurei.app/command"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/ext"
"hakurei.app/hst"

View File

@@ -6,7 +6,7 @@ import (
"testing"
"time"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/store"
"hakurei.app/message"

View File

@@ -7,7 +7,7 @@ import (
"testing"
"time"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/store"
"hakurei.app/message"

View File

@@ -18,9 +18,9 @@ import (
"time"
"unique"
"hakurei.app/check"
"hakurei.app/command"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"

View File

@@ -31,8 +31,8 @@ import (
"syscall"
"unsafe"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/std"
"hakurei.app/hst"

View File

@@ -6,7 +6,7 @@ import (
"reflect"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
)
func TestParseOpts(t *testing.T) {

View File

@@ -4,7 +4,7 @@ import (
"encoding/gob"
"fmt"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
)

View File

@@ -5,7 +5,7 @@ import (
"os"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
)

View File

@@ -4,7 +4,7 @@ import (
"encoding/gob"
"fmt"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
"hakurei.app/message"
)

View File

@@ -5,7 +5,7 @@ import (
"os"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/std"
"hakurei.app/container/stub"
"hakurei.app/message"

View File

@@ -16,7 +16,7 @@ import (
. "syscall"
"time"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"

View File

@@ -18,9 +18,9 @@ import (
"testing"
"time"
"hakurei.app/check"
"hakurei.app/command"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"

View File

@@ -5,7 +5,7 @@ import (
"os"
"syscall"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/message"
"hakurei.app/vfs"
)

View File

@@ -8,7 +8,7 @@ import (
"syscall"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
"hakurei.app/vfs"
)

View File

@@ -3,14 +3,14 @@ package fhs
import (
_ "unsafe" // for go:linkname
"hakurei.app/container/check"
"hakurei.app/check"
)
/* constants in this file bypass abs check, be extremely careful when changing them! */
// unsafeAbs returns check.Absolute on any string value.
//
//go:linkname unsafeAbs hakurei.app/container/check.unsafeAbs
//go:linkname unsafeAbs hakurei.app/check.unsafeAbs
func unsafeAbs(pathname string) *check.Absolute
var (

View File

@@ -7,7 +7,7 @@ import (
"testing"
"time"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"
"hakurei.app/container/stub"

View File

@@ -6,7 +6,7 @@ import (
"os"
"syscall"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/std"
)

View File

@@ -6,7 +6,7 @@ import (
"syscall"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/std"
"hakurei.app/container/stub"
)

View File

@@ -12,7 +12,7 @@ import (
"syscall"
"time"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
)

View File

@@ -4,7 +4,7 @@ import (
"os"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
"hakurei.app/message"
)

View File

@@ -6,7 +6,7 @@ import (
"path"
. "syscall"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
)

View File

@@ -4,7 +4,7 @@ import (
"os"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
)

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"os"
"hakurei.app/container/check"
"hakurei.app/check"
)
func init() { gob.Register(new(MkdirOp)) }

View File

@@ -4,7 +4,7 @@ import (
"os"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
)

View File

@@ -6,7 +6,7 @@ import (
"slices"
"strings"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
)

View File

@@ -5,7 +5,7 @@ import (
"os"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
)

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"syscall"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
)

View File

@@ -4,7 +4,7 @@ import (
"os"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
)

View File

@@ -5,7 +5,7 @@ import (
"fmt"
. "syscall"
"hakurei.app/container/check"
"hakurei.app/check"
)
func init() { gob.Register(new(MountProcOp)) }

View File

@@ -4,7 +4,7 @@ import (
"os"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
)

View File

@@ -4,7 +4,7 @@ import (
"encoding/gob"
"fmt"
"hakurei.app/container/check"
"hakurei.app/check"
)
func init() { gob.Register(new(RemountOp)) }

View File

@@ -4,7 +4,7 @@ import (
"syscall"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
)

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"path"
"hakurei.app/container/check"
"hakurei.app/check"
)
func init() { gob.Register(new(SymlinkOp)) }

View File

@@ -4,7 +4,7 @@ import (
"os"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
)

View File

@@ -8,7 +8,7 @@ import (
"strconv"
. "syscall"
"hakurei.app/container/check"
"hakurei.app/check"
)
func init() { gob.Register(new(MountTmpfsOp)) }

View File

@@ -5,7 +5,7 @@ import (
"syscall"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
)

View File

@@ -10,7 +10,7 @@ import (
"testing"
"unsafe"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/vfs"
)

View File

@@ -5,7 +5,7 @@ import (
"strconv"
"strings"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/ext"
)

View File

@@ -6,7 +6,7 @@ import (
"syscall"
"time"
"hakurei.app/container/check"
"hakurei.app/check"
)
// PrivateTmp is a private writable path in a hakurei container.

View File

@@ -7,7 +7,7 @@ import (
"os"
"reflect"
"hakurei.app/container/check"
"hakurei.app/check"
)
// FilesystemConfig is an abstract representation of a mount point.

View File

@@ -9,8 +9,8 @@ import (
"syscall"
"testing"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/hst"
)

View File

@@ -4,7 +4,7 @@ import (
"encoding/gob"
"strings"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
"hakurei.app/container/std"
)

View File

@@ -3,7 +3,7 @@ package hst
import (
"encoding/gob"
"hakurei.app/container/check"
"hakurei.app/check"
)
func init() { gob.Register(new(FSDaemon)) }

View File

@@ -5,7 +5,7 @@ import (
"os"
"strings"
"hakurei.app/container/check"
"hakurei.app/check"
)
func init() { gob.Register(new(FSEphemeral)) }

View File

@@ -4,7 +4,7 @@ import (
"encoding/gob"
"path"
"hakurei.app/container/check"
"hakurei.app/check"
)
func init() { gob.Register(new(FSLink)) }

View File

@@ -4,7 +4,7 @@ import (
"encoding/gob"
"strings"
"hakurei.app/container/check"
"hakurei.app/check"
)
func init() { gob.Register(new(FSOverlay)) }

View File

@@ -3,8 +3,8 @@ package hst_test
import (
"testing"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/hst"
)

View File

@@ -7,7 +7,7 @@ import (
"net"
"os"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
)

View File

@@ -8,8 +8,8 @@ import (
"strconv"
"syscall"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"
"hakurei.app/internal/helper"

2
internal/env/env.go vendored
View File

@@ -6,7 +6,7 @@ import (
"os"
"strconv"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
)

View File

@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/stub"
"hakurei.app/hst"

View File

@@ -9,8 +9,8 @@ import (
"slices"
"sync"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/internal/helper/proc"
"hakurei.app/message"
)

View File

@@ -6,8 +6,8 @@ import (
"os"
"testing"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/internal/helper"
)

View File

@@ -3,7 +3,7 @@ package info
import (
"log"
"hakurei.app/container/check"
"hakurei.app/check"
)
// Absolute paths to the Hakurei installation.

View File

@@ -4,7 +4,7 @@ import (
"reflect"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
)
func TestMustCheckPath(t *testing.T) {

View File

@@ -10,8 +10,8 @@ import (
"os/user"
"path/filepath"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"
"hakurei.app/internal/dbus"

View File

@@ -18,8 +18,8 @@ import (
"time"
"unsafe"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"
"hakurei.app/container/stub"

View File

@@ -7,8 +7,8 @@ import (
"maps"
"strconv"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/hst"
"hakurei.app/internal/acl"
"hakurei.app/internal/env"

View File

@@ -12,8 +12,8 @@ import (
"syscall"
"time"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/hst"
"hakurei.app/internal/info"

View File

@@ -15,8 +15,8 @@ import (
"testing"
"time"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"

View File

@@ -13,8 +13,8 @@ import (
"syscall"
"time"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"

View File

@@ -10,8 +10,8 @@ import (
"strconv"
"syscall"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"

View File

@@ -7,8 +7,8 @@ import (
"syscall"
"testing"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"

View File

@@ -3,7 +3,7 @@ package outcome
import (
"encoding/gob"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/pipewire"
)

View File

@@ -10,7 +10,7 @@ import (
"strconv"
"syscall"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/message"
)

View File

@@ -7,8 +7,8 @@ import (
"syscall"
"testing"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/stub"
"hakurei.app/hst"
"hakurei.app/internal/acl"

View File

@@ -3,7 +3,7 @@ package outcome
import (
"encoding/gob"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
"hakurei.app/container/std"
"hakurei.app/hst"

View File

@@ -3,7 +3,7 @@ package outcome
import (
"encoding/gob"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
"hakurei.app/container/std"
"hakurei.app/hst"

View File

@@ -3,7 +3,7 @@ package outcome
import (
"encoding/gob"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/acl"
"hakurei.app/internal/wayland"

View File

@@ -8,7 +8,7 @@ import (
"strconv"
"strings"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
"hakurei.app/hst"
"hakurei.app/internal/acl"

View File

@@ -11,7 +11,7 @@ import (
"path/filepath"
"syscall"
"hakurei.app/container/check"
"hakurei.app/check"
)
// FlatEntry is a directory entry to be encoded for [Flatten].

View File

@@ -15,8 +15,8 @@ import (
"time"
"unique"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"

View File

@@ -13,7 +13,7 @@ import (
"testing"
"unique"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
"hakurei.app/hst"
"hakurei.app/internal/pkg"

View File

@@ -3,7 +3,7 @@ package pkg_test
import (
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/internal/pkg"
)

View File

@@ -6,7 +6,7 @@ import (
"reflect"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/internal/pkg"
)

View File

@@ -10,7 +10,7 @@ import (
"unique"
"unsafe"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/internal/pkg"
)

View File

@@ -27,7 +27,7 @@ import (
"unique"
"unsafe"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/internal/info"
"hakurei.app/internal/lockedfile"
"hakurei.app/message"

View File

@@ -21,8 +21,8 @@ import (
"unique"
"unsafe"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/stub"
"hakurei.app/internal/pkg"

View File

@@ -12,7 +12,7 @@ import (
"testing"
"testing/fstest"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
"hakurei.app/internal/pkg"
)

View File

@@ -12,7 +12,7 @@ import (
"slices"
"strings"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/fhs"
"hakurei.app/vfs"
)

View File

@@ -9,8 +9,8 @@ import (
"syscall"
"testing"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/internal/pkg"
"hakurei.app/internal/rosa"
"hakurei.app/message"

View File

@@ -8,7 +8,7 @@ import (
"strconv"
"sync"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/lockedfile"
)

View File

@@ -12,7 +12,7 @@ import (
"testing"
_ "unsafe" // for go:linkname
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
"hakurei.app/hst"
"hakurei.app/internal/store"

View File

@@ -10,7 +10,7 @@ import (
"sync"
"syscall"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/lockedfile"
)

View File

@@ -14,7 +14,7 @@ import (
"time"
_ "unsafe" // for go:linkname
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/store"
)

View File

@@ -6,7 +6,7 @@ import (
"os"
"slices"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/acl"
)

View File

@@ -6,7 +6,7 @@ import (
"log"
"os"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/acl"
"hakurei.app/internal/dbus"

View File

@@ -9,7 +9,7 @@ import (
"testing"
"unsafe"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
"hakurei.app/hst"
"hakurei.app/internal/acl"

View File

@@ -3,7 +3,7 @@ package system
import (
"fmt"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
)

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"os"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
)

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"io"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/acl"
"hakurei.app/internal/pipewire"

View File

@@ -8,7 +8,7 @@ import (
"strconv"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/container/stub"
"hakurei.app/hst"
"hakurei.app/internal/xcb"

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"io"
"hakurei.app/container/check"
"hakurei.app/check"
"hakurei.app/hst"
"hakurei.app/internal/acl"
)

View File

@@ -5,7 +5,7 @@ import (
"os"
"syscall"
"hakurei.app/container/check"
"hakurei.app/check"
)
// SecurityContext holds resources associated with a Wayland security_context.

View File

@@ -8,7 +8,7 @@ import (
"syscall"
"testing"
"hakurei.app/container/check"
"hakurei.app/check"
)
func TestSecurityContextClose(t *testing.T) {

View File

@@ -9,8 +9,8 @@ import (
"os/exec"
"time"
"hakurei.app/check"
"hakurei.app/container"
"hakurei.app/container/check"
"hakurei.app/container/fhs"
"hakurei.app/container/seccomp"
"hakurei.app/container/std"

Some files were not shown because too many files have changed in this diff Show More