Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cmd/objgitd/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import (
"strings"
"time"

"github.com/Xe/kefka/command/registry"
"github.com/Xe/kefka/command/registry/coreutils"
"github.com/Xe/kefka/command/registry/uutils"
"github.com/Xe/kefka/command/registry/wasmprog"
"github.com/go-git/go-billy/v6"
"github.com/go-git/go-billy/v6/memfs"
"github.com/go-git/go-billy/v6/util"
Expand All @@ -27,10 +31,6 @@ import (
"mvdan.cc/sh/v3/expand"
"mvdan.cc/sh/v3/interp"
"mvdan.cc/sh/v3/syntax"
"tangled.org/xeiaso.net/kefka/command/registry"
"tangled.org/xeiaso.net/kefka/command/registry/coreutils"
"tangled.org/xeiaso.net/kefka/command/registry/uutils"
"tangled.org/xeiaso.net/kefka/command/registry/wasmprog"
)

// receivePackHook names the hook that a push runs, and so its script at
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The script is read from the tree of the pushed commit. A branch therefore
carries its own hook.

The script runs in a **kefka** virtual shell
(`tangled.org/xeiaso.net/kefka`). kefka is _not_ an OS sandbox. It is an
(`github.com/Xe/kefka`). kefka is _not_ an OS sandbox. It is an
`mvdan.cc/sh` interpreter wired to a `billy.Filesystem`, plus a fixed registry
of Go coreutils, WASM programs, and WASM-backed uutils.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.26.3

require (
github.com/Xe/erofs v0.8.0
github.com/Xe/kefka v0.1.2
github.com/aws/aws-sdk-go-v2 v1.41.7
github.com/aws/aws-sdk-go-v2/service/s3 v1.102.0
github.com/aws/smithy-go v1.26.0
Expand All @@ -19,7 +20,6 @@ require (
golang.org/x/sync v0.20.0
golang.org/x/term v0.43.0
mvdan.cc/sh/v3 v3.13.1
tangled.org/xeiaso.net/kefka v0.0.8
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ github.com/ProtonMail/go-crypto v1.4.1 h1:9RfcZHqEQUvP8RzecWEUafnZVtEvrBVL9BiF67
github.com/ProtonMail/go-crypto v1.4.1/go.mod h1:e1OaTyu5SYVrO9gKOEhTc+5UcXtTUa+P3uLudwcgPqo=
github.com/Xe/erofs v0.8.0 h1:OSD900oSKFP91cM+RyCTXW0FyamjtpwA5jTGLEeyxuw=
github.com/Xe/erofs v0.8.0/go.mod h1:GGxvJkCKU4yKfJ+Trap2xC8iN0HGuTUEsD5oz+olLJI=
github.com/Xe/kefka v0.1.2 h1:/kMg+glM3w01AulP20PNszIntNtoNmFd3bHsbFLICl8=
github.com/Xe/kefka v0.1.2/go.mod h1:22dif/zXQZvScR1WPA8ZERvyREtx/cScRlxNs7o55V8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8=
github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
Expand Down Expand Up @@ -170,5 +172,3 @@ honnef.co/go/tools v0.7.0 h1:w6WUp1VbkqPEgLz4rkBzH/CSU6HkoqNLp6GstyTx3lU=
honnef.co/go/tools v0.7.0/go.mod h1:pm29oPxeP3P82ISxZDgIYeOaf9ta6Pi0EWvCFoLG2vc=
mvdan.cc/sh/v3 v3.13.1 h1:DP3TfgZhDkT7lerUdnp6PTGKyxxzz6T+cOlY/xEvfWk=
mvdan.cc/sh/v3 v3.13.1/go.mod h1:lXJ8SexMvEVcHCoDvAGLZgFJ9Wsm2sulmoNEXGhYZD0=
tangled.org/xeiaso.net/kefka v0.0.8 h1:RbiOJn+b+zxa4gNVkW1mSIBj0Qjbcji2eo7wdBf5Gu8=
tangled.org/xeiaso.net/kefka v0.0.8/go.mod h1:h2ZITASpfUqC6PzLUfYTTO9AKPAft45UvCyxe/LAN2k=
8 changes: 4 additions & 4 deletions internal/kefkash/kefkash.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Package kefkash wires a billy.Filesystem into an mvdan.cc/sh interpreter the
// way the kefka virtual shell does. The handler constructors are vendored from
// kefka's internal/billysh (tangled.org/xeiaso.net/kefka), which is not
// importable because it lives under internal/. They depend only on kefka's
// public command/registry package.
// kefka's internal/billysh (github.com/Xe/kefka), which is not importable
// because it lives under internal/. They depend only on kefka's public
// command/registry package.
//
// One deliberate deviation from upstream: FsysOpenHandler permits write opens
// and delegates them to the filesystem's OpenFile. objgit hands the sandbox a
Expand All @@ -19,9 +19,9 @@ import (
"io/fs"
"os"

"github.com/Xe/kefka/command/registry"
"github.com/go-git/go-billy/v6"
"mvdan.cc/sh/v3/interp"
"tangled.org/xeiaso.net/kefka/command/registry"
)

// FsysStatHandler resolves stat calls against fsys, honouring followSymlinks
Expand Down
Loading