Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Update canonical repository.
Browse files Browse the repository at this point in the history
This can be merged after:
google/gvisor-website#77
  or
google/gvisor-website#78

PiperOrigin-RevId: 253132620
  • Loading branch information
amscanne authored and shentubot committed Jun 13, 2019
1 parent 0c86030 commit add40fd
Show file tree
Hide file tree
Showing 815 changed files with 2,977 additions and 2,947 deletions.
27 changes: 18 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module gvisor.googlesource.com/gvisor
module gvisor.dev/gvisor

go 1.12

Expand Down
19 changes: 19 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
2 changes: 1 addition & 1 deletion pkg/abi/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)
2 changes: 1 addition & 1 deletion pkg/abi/linux/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions pkg/abi/linux/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion pkg/abi/linux/netdevice.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/abi/linux/signal.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package linux

import (
"gvisor.googlesource.com/gvisor/pkg/bits"
"gvisor.dev/gvisor/pkg/bits"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/abi/linux/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion pkg/amutex/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/atomicbitops/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/binary/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/bits/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/bpf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/bpf/bpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pkg/bpf/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/bpf/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/bpf/interpreter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions pkg/bpf/interpreter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion pkg/bpf/program_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"math"

"gvisor.googlesource.com/gvisor/pkg/abi/linux"
"gvisor.dev/gvisor/pkg/abi/linux"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion pkg/bpf/program_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"fmt"
"testing"

"gvisor.googlesource.com/gvisor/pkg/abi/linux"
"gvisor.dev/gvisor/pkg/abi/linux"
)

func validate(p *ProgramBuilder, expected []linux.BPFInstruction) error {
Expand Down
2 changes: 1 addition & 1 deletion pkg/compressio/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package(licenses = ["notice"])
go_library(
name = "compressio",
srcs = ["compressio.go"],
importpath = "gvisor.googlesource.com/gvisor/pkg/compressio",
importpath = "gvisor.dev/gvisor/pkg/compressio",
visibility = ["//:sandbox"],
deps = ["//pkg/binary"],
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/compressio/compressio.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ import (
"runtime"
"sync"

"gvisor.googlesource.com/gvisor/pkg/binary"
"gvisor.dev/gvisor/pkg/binary"
)

var bufPool = sync.Pool{
Expand Down
2 changes: 1 addition & 1 deletion pkg/control/client/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go_library(
srcs = [
"client.go",
],
importpath = "gvisor.googlesource.com/gvisor/pkg/control/client",
importpath = "gvisor.dev/gvisor/pkg/control/client",
visibility = ["//:sandbox"],
deps = [
"//pkg/unet",
Expand Down
4 changes: 2 additions & 2 deletions pkg/control/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
package client

import (
"gvisor.googlesource.com/gvisor/pkg/unet"
"gvisor.googlesource.com/gvisor/pkg/urpc"
"gvisor.dev/gvisor/pkg/unet"
"gvisor.dev/gvisor/pkg/urpc"
)

// ConnectTo attempts to connect to the sandbox with the given address.
Expand Down
2 changes: 1 addition & 1 deletion pkg/control/server/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package(licenses = ["notice"])
go_library(
name = "server",
srcs = ["server.go"],
importpath = "gvisor.googlesource.com/gvisor/pkg/control/server",
importpath = "gvisor.dev/gvisor/pkg/control/server",
visibility = ["//:sandbox"],
deps = [
"//pkg/log",
Expand Down
6 changes: 3 additions & 3 deletions pkg/control/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ import (
"os"
"sync"

"gvisor.googlesource.com/gvisor/pkg/log"
"gvisor.googlesource.com/gvisor/pkg/unet"
"gvisor.googlesource.com/gvisor/pkg/urpc"
"gvisor.dev/gvisor/pkg/log"
"gvisor.dev/gvisor/pkg/unet"
"gvisor.dev/gvisor/pkg/urpc"
)

// curUID is the unix user ID of the user that the control server is running as.
Expand Down
2 changes: 1 addition & 1 deletion pkg/cpuid/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ go_library(
"cpu_amd64.s",
"cpuid.go",
],
importpath = "gvisor.googlesource.com/gvisor/pkg/cpuid",
importpath = "gvisor.dev/gvisor/pkg/cpuid",
visibility = ["//:sandbox"],
deps = ["//pkg/log"],
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/cpuid/cpuid.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"strconv"
"strings"

"gvisor.googlesource.com/gvisor/pkg/log"
"gvisor.dev/gvisor/pkg/log"
)

// Common references for CPUID leaves and bits:
Expand Down
4 changes: 2 additions & 2 deletions pkg/eventchannel/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ go_library(
srcs = [
"event.go",
],
importpath = "gvisor.googlesource.com/gvisor/pkg/eventchannel",
importpath = "gvisor.dev/gvisor/pkg/eventchannel",
visibility = ["//:sandbox"],
deps = [
":eventchannel_go_proto",
Expand All @@ -26,7 +26,7 @@ proto_library(

go_proto_library(
name = "eventchannel_go_proto",
importpath = "gvisor.googlesource.com/gvisor/pkg/eventchannel/eventchannel_go_proto",
importpath = "gvisor.dev/gvisor/pkg/eventchannel/eventchannel_go_proto",
proto = ":eventchannel_proto",
visibility = ["//:sandbox"],
)
6 changes: 3 additions & 3 deletions pkg/eventchannel/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import (

"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
pb "gvisor.googlesource.com/gvisor/pkg/eventchannel/eventchannel_go_proto"
"gvisor.googlesource.com/gvisor/pkg/log"
"gvisor.googlesource.com/gvisor/pkg/unet"
pb "gvisor.dev/gvisor/pkg/eventchannel/eventchannel_go_proto"
"gvisor.dev/gvisor/pkg/log"
"gvisor.dev/gvisor/pkg/unet"
)

// Emitter emits a proto message.
Expand Down
2 changes: 1 addition & 1 deletion pkg/fd/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package(licenses = ["notice"])
go_library(
name = "fd",
srcs = ["fd.go"],
importpath = "gvisor.googlesource.com/gvisor/pkg/fd",
importpath = "gvisor.dev/gvisor/pkg/fd",
visibility = ["//visibility:public"],
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/fdnotifier/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ go_library(
"fdnotifier.go",
"poll_unsafe.go",
],
importpath = "gvisor.googlesource.com/gvisor/pkg/fdnotifier",
importpath = "gvisor.dev/gvisor/pkg/fdnotifier",
visibility = ["//:sandbox"],
deps = ["//pkg/waiter"],
)
2 changes: 1 addition & 1 deletion pkg/fdnotifier/fdnotifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"sync"
"syscall"

"gvisor.googlesource.com/gvisor/pkg/waiter"
"gvisor.dev/gvisor/pkg/waiter"
)

type fdInfo struct {
Expand Down
2 changes: 1 addition & 1 deletion pkg/fdnotifier/poll_unsafe.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"syscall"
"unsafe"

"gvisor.googlesource.com/gvisor/pkg/waiter"
"gvisor.dev/gvisor/pkg/waiter"
)

// NonBlockingPoll polls the given FD in non-blocking fashion. It is used just
Expand Down
2 changes: 1 addition & 1 deletion pkg/gate/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ go_library(
srcs = [
"gate.go",
],
importpath = "gvisor.googlesource.com/gvisor/pkg/gate",
importpath = "gvisor.dev/gvisor/pkg/gate",
visibility = ["//visibility:public"],
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/gate/gate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"testing"
"time"

"gvisor.googlesource.com/gvisor/pkg/gate"
"gvisor.dev/gvisor/pkg/gate"
)

func TestBasicEnter(t *testing.T) {
Expand Down
Loading

0 comments on commit add40fd

Please sign in to comment.