[CRIU] [PATCH 01/10] phaul: use full paths for modules
Andrei Vagin
avagin at openvz.org
Wed Oct 18 02:59:12 MSK 2017
From: Andrei Vagin <avagin at virtuozzo.com>
It is a general practice in golang and "go get" works in this case.
Signed-off-by: Andrei Vagin <avagin at virtuozzo.com>
---
lib/go/src/criu/main.go | 5 +++--
phaul/Makefile | 2 +-
phaul/src/phaul/api.go | 2 +-
phaul/src/phaul/client.go | 7 ++++---
phaul/src/phaul/server.go | 5 +++--
phaul/src/phaul/stats.go | 5 +++--
phaul/src/test/main.go | 9 +++++----
7 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/lib/go/src/criu/main.go b/lib/go/src/criu/main.go
index 90866ea18..13e63b10a 100644
--- a/lib/go/src/criu/main.go
+++ b/lib/go/src/criu/main.go
@@ -3,12 +3,13 @@ package criu
import (
"errors"
"fmt"
- "github.com/golang/protobuf/proto"
"os"
"os/exec"
- "rpc"
"strconv"
"syscall"
+
+ "github.com/golang/protobuf/proto"
+ "github.com/checkpoint-restore/criu/lib/go/src/rpc"
)
type Criu struct {
diff --git a/phaul/Makefile b/phaul/Makefile
index 7e83ba2e1..d504062a3 100644
--- a/phaul/Makefile
+++ b/phaul/Makefile
@@ -1,7 +1,7 @@
all: test piggie
test: stats
- GOPATH=$(shell pwd):$(shell pwd)/../lib/go/:/usr/share/gocode go build -o test test
+ go build -o test test
stats:
mkdir -p src/stats/
diff --git a/phaul/src/phaul/api.go b/phaul/src/phaul/api.go
index 6093a123f..76f0081ca 100644
--- a/phaul/src/phaul/api.go
+++ b/phaul/src/phaul/api.go
@@ -1,7 +1,7 @@
package phaul
import (
- "criu"
+ "github.com/checkpoint-restore/criu/lib/go/src/criu"
)
/*
diff --git a/phaul/src/phaul/client.go b/phaul/src/phaul/client.go
index 06fb8216f..64beea7be 100644
--- a/phaul/src/phaul/client.go
+++ b/phaul/src/phaul/client.go
@@ -1,11 +1,12 @@
package phaul
import (
- "criu"
"fmt"
+
"github.com/golang/protobuf/proto"
- "rpc"
- "stats"
+ "github.com/checkpoint-restore/criu/lib/go/src/criu"
+ "github.com/checkpoint-restore/criu/lib/go/src/rpc"
+ "github.com/checkpoint-restore/criu/phaul/src/stats"
)
const minPagesWritten uint64 = 64
diff --git a/phaul/src/phaul/server.go b/phaul/src/phaul/server.go
index 8992ee967..4b79dde51 100644
--- a/phaul/src/phaul/server.go
+++ b/phaul/src/phaul/server.go
@@ -1,10 +1,11 @@
package phaul
import (
- "criu"
"fmt"
+
"github.com/golang/protobuf/proto"
- "rpc"
+ "github.com/checkpoint-restore/criu/lib/go/src/criu"
+ "github.com/checkpoint-restore/criu/lib/go/src/rpc"
)
type PhaulServer struct {
diff --git a/phaul/src/phaul/stats.go b/phaul/src/phaul/stats.go
index 77eb3466c..af70f2acb 100644
--- a/phaul/src/phaul/stats.go
+++ b/phaul/src/phaul/stats.go
@@ -1,9 +1,10 @@
package phaul
import (
- "github.com/golang/protobuf/proto"
"os"
- "stats"
+
+ "github.com/golang/protobuf/proto"
+ "github.com/checkpoint-restore/criu/phaul/src/stats"
)
/* FIXME: report stats from CriuResp */
diff --git a/phaul/src/test/main.go b/phaul/src/test/main.go
index 0e853df7d..9f5282d4e 100644
--- a/phaul/src/test/main.go
+++ b/phaul/src/test/main.go
@@ -1,15 +1,16 @@
package main
import (
- "criu"
"fmt"
- "github.com/golang/protobuf/proto"
"os"
- "phaul"
- "rpc"
"strconv"
"strings"
"syscall"
+
+ "github.com/golang/protobuf/proto"
+ "github.com/checkpoint-restore/criu/lib/go/src/criu"
+ "github.com/checkpoint-restore/criu/lib/go/src/rpc"
+ "github.com/checkpoint-restore/criu/phaul/src/phaul"
)
type testLocal struct {
--
2.13.3
More information about the CRIU
mailing list