mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Update canonical repository.
This can be merged after: https://github.com/google/gvisor-website/pull/77 or https://github.com/google/gvisor-website/pull/78 PiperOrigin-RevId: 253132620
This commit is contained in:
@@ -53,15 +53,6 @@ Make sure the following dependencies are installed:
|
||||
* [Docker version 17.09.0 or greater][docker]
|
||||
* Gold linker (e.g. `binutils-gold` package on Ubuntu)
|
||||
|
||||
### Getting the source
|
||||
|
||||
Clone the repository:
|
||||
|
||||
```
|
||||
git clone https://gvisor.googlesource.com/gvisor gvisor
|
||||
cd gvisor
|
||||
```
|
||||
|
||||
### Building
|
||||
|
||||
Build and install the `runsc` binary:
|
||||
@@ -116,6 +107,24 @@ Then invoke bazel with the following flags:
|
||||
You can also add those flags to your local ~/.bazelrc to avoid needing to
|
||||
specify them each time on the command line.
|
||||
|
||||
### Using `go get`
|
||||
|
||||
This project uses [bazel][bazel] to build and manage dependencies. A synthetic
|
||||
`go` branch is maintained that is compatible with standard `go` tooling for
|
||||
convenience.
|
||||
|
||||
For example, to build `runsc` directly from this branch:
|
||||
|
||||
```
|
||||
echo "module runsc" > go.mod
|
||||
GO111MODULE=on go get gvisor.dev/gvisor/runsc@go
|
||||
CGO_ENABLED=0 GO111MODULE=on go install gvisor.dev/gvisor/runsc
|
||||
```
|
||||
|
||||
Note that this branch is supported in a best effort capacity, and direct
|
||||
development on this branch is not supported. Development should occur on the
|
||||
`master` branch, which is then reflected into the `go` branch.
|
||||
|
||||
## Community & Governance
|
||||
|
||||
The governance model is documented in our [community][community] repository.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module gvisor.googlesource.com/gvisor
|
||||
module gvisor.dev/gvisor
|
||||
|
||||
go 1.12
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
github.com/cenkalti/backoff v0.0.0-20190506075156-2146c9339422/go.mod h1:b6Nc7NRH5C4aCISLry0tLnTjcuTEvoiqcWDdsU0sOGM=
|
||||
github.com/gofrs/flock v0.6.1-0.20180915234121-886344bea079/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
|
||||
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
|
||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
||||
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
|
||||
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
|
||||
github.com/google/subcommands v0.0.0-20190508160503-636abe8753b8/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk=
|
||||
github.com/google/uuid v0.0.0-20171129191014-dec09d789f3d/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/opencontainers/runtime-spec v0.1.2-0.20171211145439-b2d941ef6a78/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
|
||||
github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww=
|
||||
github.com/vishvananda/netlink v1.0.1-0.20190318003149-adb577d4a45e/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk=
|
||||
github.com/vishvananda/netns v0.0.0-20171111001504-be1fbeda1936/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
||||
+1
-1
@@ -9,6 +9,6 @@ go_library(
|
||||
"abi_linux.go",
|
||||
"flag.go",
|
||||
],
|
||||
importpath = "gvisor.googlesource.com/gvisor/pkg/abi",
|
||||
importpath = "gvisor.dev/gvisor/pkg/abi",
|
||||
visibility = ["//:sandbox"],
|
||||
)
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ go_library(
|
||||
"utsname.go",
|
||||
"wait.go",
|
||||
],
|
||||
importpath = "gvisor.googlesource.com/gvisor/pkg/abi/linux",
|
||||
importpath = "gvisor.dev/gvisor/pkg/abi/linux",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//pkg/abi",
|
||||
|
||||
@@ -18,8 +18,8 @@ import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"gvisor.googlesource.com/gvisor/pkg/abi"
|
||||
"gvisor.googlesource.com/gvisor/pkg/binary"
|
||||
"gvisor.dev/gvisor/pkg/abi"
|
||||
"gvisor.dev/gvisor/pkg/binary"
|
||||
)
|
||||
|
||||
// Constants for open(2).
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package linux
|
||||
|
||||
import "gvisor.googlesource.com/gvisor/pkg/binary"
|
||||
import "gvisor.dev/gvisor/pkg/binary"
|
||||
|
||||
const (
|
||||
// IFNAMSIZ is the size of the name field for IFReq.
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
package linux
|
||||
|
||||
import (
|
||||
"gvisor.googlesource.com/gvisor/pkg/bits"
|
||||
"gvisor.dev/gvisor/pkg/bits"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package linux
|
||||
|
||||
import "gvisor.googlesource.com/gvisor/pkg/binary"
|
||||
import "gvisor.dev/gvisor/pkg/binary"
|
||||
|
||||
// Address families, from linux/socket.h.
|
||||
const (
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ package(licenses = ["notice"])
|
||||
go_library(
|
||||
name = "amutex",
|
||||
srcs = ["amutex.go"],
|
||||
importpath = "gvisor.googlesource.com/gvisor/pkg/amutex",
|
||||
importpath = "gvisor.dev/gvisor/pkg/amutex",
|
||||
visibility = ["//:sandbox"],
|
||||
)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ go_library(
|
||||
"atomic_bitops_amd64.s",
|
||||
"atomic_bitops_common.go",
|
||||
],
|
||||
importpath = "gvisor.googlesource.com/gvisor/pkg/atomicbitops",
|
||||
importpath = "gvisor.dev/gvisor/pkg/atomicbitops",
|
||||
visibility = ["//:sandbox"],
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ package(licenses = ["notice"])
|
||||
go_library(
|
||||
name = "binary",
|
||||
srcs = ["binary.go"],
|
||||
importpath = "gvisor.googlesource.com/gvisor/pkg/binary",
|
||||
importpath = "gvisor.dev/gvisor/pkg/binary",
|
||||
visibility = ["//:sandbox"],
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ go_library(
|
||||
"uint64_arch_amd64_asm.s",
|
||||
"uint64_arch_generic.go",
|
||||
],
|
||||
importpath = "gvisor.googlesource.com/gvisor/pkg/bits",
|
||||
importpath = "gvisor.dev/gvisor/pkg/bits",
|
||||
visibility = ["//:sandbox"],
|
||||
)
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ go_library(
|
||||
"interpreter.go",
|
||||
"program_builder.go",
|
||||
],
|
||||
importpath = "gvisor.googlesource.com/gvisor/pkg/bpf",
|
||||
importpath = "gvisor.dev/gvisor/pkg/bpf",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = ["//pkg/abi/linux"],
|
||||
)
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
// https://www.freebsd.org/cgi/man.cgi?bpf(4)
|
||||
package bpf
|
||||
|
||||
import "gvisor.googlesource.com/gvisor/pkg/abi/linux"
|
||||
import "gvisor.dev/gvisor/pkg/abi/linux"
|
||||
|
||||
const (
|
||||
// MaxInstructions is the maximum number of instructions in a BPF program,
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
|
||||
"gvisor.googlesource.com/gvisor/pkg/abi/linux"
|
||||
"gvisor.dev/gvisor/pkg/abi/linux"
|
||||
)
|
||||
|
||||
// DecodeProgram translates an array of BPF instructions into text format.
|
||||
|
||||
@@ -17,7 +17,7 @@ package bpf
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gvisor.googlesource.com/gvisor/pkg/abi/linux"
|
||||
"gvisor.dev/gvisor/pkg/abi/linux"
|
||||
)
|
||||
|
||||
func TestDecode(t *testing.T) {
|
||||
|
||||
@@ -17,7 +17,7 @@ package bpf
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"gvisor.googlesource.com/gvisor/pkg/abi/linux"
|
||||
"gvisor.dev/gvisor/pkg/abi/linux"
|
||||
)
|
||||
|
||||
// Possible values for ProgramError.Code.
|
||||
|
||||
@@ -17,8 +17,8 @@ package bpf
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gvisor.googlesource.com/gvisor/pkg/abi/linux"
|
||||
"gvisor.googlesource.com/gvisor/pkg/binary"
|
||||
"gvisor.dev/gvisor/pkg/abi/linux"
|
||||
"gvisor.dev/gvisor/pkg/binary"
|
||||
)
|
||||
|
||||
func TestCompilationErrors(t *testing.T) {
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
"gvisor.googlesource.com/gvisor/pkg/abi/linux"
|
||||
"gvisor.dev/gvisor/pkg/abi/linux"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user