Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NFS mount for macOS 10.14 #217

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
os: osx
osx_image: xcode8.3
osx_image: xcode10.2

language: go
go:
- 1.8.x
- 1.12.x
- tip

env:
global:
- GO_BUILD_TAGS='lib9p qcow2'
- GO_BUILD_TAGS='lib9p'
- HOMEBREW_NO_AUTO_UPDATE=1
- MAKEFLAGS="-j$(sysctl -n hw.ncpu)"
- RELEASE_GO_VERSION=''
Expand All @@ -25,7 +25,7 @@ before_install:
# for ocaml-qcow
- brew install https://github.com/Homebrew/homebrew-core/raw/master/Formula/opam.rb
- brew install https://github.com/Homebrew/homebrew-core/raw/master/Formula/libev.rb
- opam --version && opam init && opam install uri qcow-format io-page.1.6.1 ocamlfind conf-libev
- opam --version && opam init --comp 4.05.0 && opam install uri qcow-format io-page.1.6.1 ocaml ocamlfind conf-libev
- eval `opam config env`

install:
Expand All @@ -44,16 +44,16 @@ before_deploy:
- sudo chown travis:staff bin/docker-machine-driver-xhyve
# add version suffix to binary if not stable Go version
- if [[ "$TRAVIS_GO_VERSION" == "tip" ]]; then
export RELEASE_GO_VERSION=_$TRAVIS_GO_VERSION && mv bin/docker-machine-driver-xhyve{,$RELEASE_GO_VERSION};
export RELEASE_GO_VERSION=_$TRAVIS_GO_VERSION && mv bin/docker-machine-driver-xhyve{,$RELEASE_GO_VERSION};
fi

deploy:
provider: releases
skip_cleanup: true
file_glob: true
file: 'bin/docker-machine-driver-xhyve*'
file: "bin/docker-machine-driver-xhyve*"
on:
repo: zchee/docker-machine-driver-xhyve
repo: machine-drivers/docker-machine-driver-xhyve
tags: true
api_key:
secure: ooncVJ4sSfcLiQ/0mNivrShRbUBcywocGd7mOhWp1MsyKdnAv7/In2qiyw4GD1x/AWyXOGWKGouDATeiP3kQ7jnIw7YoaNcbu/QeKD2xIODf4tYGXDf7AQUEwKnof5XBTIbU7oRgBe+NH1bN6iDh8XBgLqZPXFjaIQSq3gudM2/zJlzcrCdXAA8oKOJdsS4TR4/cCVMou3gV54mbkxmsr+F1BN3zKO7k1ZBv4BDYbkrN1RvBiEOXq7c+ab3ubd4L/AGxU1oou+0qRJMXF7jCyIq4zHrwl4iAQUd5AVKlZRFVWRF2RdGc7ExCA+ZGZZhhvpCmMsldiqjPWRPdcF4rCkaWk1RKhOL4VwSZUaXwVgEM4k9GRuKD0LVqkzPhvPG9DVpEA2rtnmkVtQ6/AttqkV6vDH5emL4zt6Mw4/Uphb0rdKrSYKbpE4NUpMikQXbzmXeEyXjhoNE9I7k8Dkh5CFnlS2VxVl/ECEOA4b2nKClGN+UhM7Z5Hkk/Sx/22mUFAnzwa/1x0gVyG8ONy8JdrbeEUnA03eeXIcvmAvfeyk6QkZMyHL1UGRm7VoN3y5uX30RHS6fDmhsE5CS2VE+TjbM6XppWwxaBueEzKwA5qtdfCiE+Wilttx4GS9bpa7FS8Efw1p/x69yZjzGNQhPC1mjCX3e3XFP35qF4+ZfP8aw=
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif
# Package settings

# Build package infomation
GITHUB_USER := zchee
GITHUB_USER := machine-drivers
TOP_PACKAGE_DIR := github.com/${GITHUB_USER}
PACKAGE := $(shell basename $(PWD))
OUTPUT := bin/docker-machine-driver-xhyve
Expand All @@ -41,8 +41,8 @@ MAIN_FILE := $(shell grep "func main\(\)" *.go -l)
# ----------------------------------------------------------------------------
# Define main commands

CC := $(shell xcrun -f clang)
LIBTOOL := $(shell xcrun -f libtool)
CC := xcrun --sdk macosx clang
LIBTOOL := xcrun --sdk macosx libtool
GO_CMD := $(shell which go)
GIT_CMD := $(shell which git)
DOCKER_CMD := $(shell which docker)
Expand Down Expand Up @@ -145,7 +145,7 @@ OCAML_LDLIBS := -L $(OCAML_WHERE) \
CGO_CFLAGS += -DHAVE_OCAML=1 -DHAVE_OCAML_QCOW=1 -DHAVE_OCAML=1 -I$(OCAML_WHERE)
CGO_LDFLAGS += $(OCAML_LDLIBS)
GO_BUILD_TAGS += qcow2
bin/docker-machine-driver-xhyve: vendor/github.com/zchee/libhyperkit/mirage_block_ocaml.o
bin/docker-machine-driver-xhyve: vendor/github.com/urbantrout/libhyperkit/mirage_block_ocaml.o
endif


Expand Down Expand Up @@ -175,8 +175,8 @@ default: build

build: bin/docker-machine-driver-xhyve

vendor/github.com/zchee/libhyperkit/mirage_block_ocaml.o:
$(VERBOSE) $(GO_CMD) generate $(GO_BUILD_FLAG) $(GO_VERBOSE) ./vendor/github.com/zchee/libhyperkit
vendor/github.com/urbantrout/libhyperkit/mirage_block_ocaml.o:
$(VERBOSE) $(GO_CMD) generate $(GO_BUILD_FLAG) $(GO_VERBOSE) ./vendor/github.com/urbantrout/libhyperkit

bin/docker-machine-driver-xhyve:
$(VERBOSE) test -d bin || mkdir -p bin;
Expand Down Expand Up @@ -221,7 +221,7 @@ docker-build-nocache:


clean: clean-lib9p
@${RM} -r ./bin ./vendor/github.com/zchee/libhyperkit/*.cmi ./vendor/github.com/zchee/libhyperkit/*.cmx ./vendor/github.com/zchee/libhyperkit/*.syso
@${RM} -r ./bin ./vendor/github.com/urbantrout/libhyperkit/*.cmi ./vendor/github.com/urbantrout/libhyperkit/*.cmx ./vendor/github.com/urbantrout/libhyperkit/*.syso


run: driver-run
Expand Down
8 changes: 4 additions & 4 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 22 additions & 21 deletions glide.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
package: github.com/zchee/docker-machine-driver-xhyve
package: github.com/machine-drivers/docker-machine-driver-xhyve
import:
- package: github.com/docker/machine
version: v0.11.0
subpackages:
- libmachine/drivers
- libmachine/drivers/plugin
- libmachine/log
- libmachine/mcnflag
- libmachine/mcnutils
- libmachine/ssh
- libmachine/state
- package: github.com/johanneswuerbach/nfsexports
- package: github.com/mitchellh/go-ps
- package: github.com/zchee/go-qcow2
- package: github.com/zchee/libhyperkit
- package: github.com/jceel/lib9p
version: 7be3e0b914fbb2d2ecfe2984d02bacfd8e762eae
- package: github.com/docker/machine
version: v0.11.0
subpackages:
- libmachine/drivers
- libmachine/drivers/plugin
- libmachine/log
- libmachine/mcnflag
- libmachine/mcnutils
- libmachine/ssh
- libmachine/state
- package: github.com/johanneswuerbach/nfsexports
- package: github.com/mitchellh/go-ps
- package: github.com/zchee/go-qcow2
- package: github.com/urbantrout/libhyperkit
version: 0504b2483743da67ddc056c5c48b2a26d34dce39
- package: github.com/jceel/lib9p
version: 7be3e0b914fbb2d2ecfe2984d02bacfd8e762eae
testImport:
- package: github.com/stretchr/testify
version: v1.1.4
subpackages:
- assert
- package: github.com/stretchr/testify
version: v1.1.4
subpackages:
- assert
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/docker/machine/libmachine/drivers/plugin"
"github.com/docker/machine/libmachine/ssh"
"github.com/zchee/docker-machine-driver-xhyve/xhyve"
hyperkit "github.com/zchee/libhyperkit"
"github.com/machine-drivers/docker-machine-driver-xhyve/xhyve"
hyperkit "github.com/urbantrout/libhyperkit"
)

func main() {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions xhyve/xhyve.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ import (
"github.com/docker/machine/libmachine/state"
"github.com/johanneswuerbach/nfsexports"
ps "github.com/mitchellh/go-ps"
"github.com/zchee/docker-machine-driver-xhyve/b2d"
"github.com/zchee/docker-machine-driver-xhyve/vmnet"
"github.com/machine-drivers/docker-machine-driver-xhyve/b2d"
"github.com/machine-drivers/docker-machine-driver-xhyve/vmnet"
qcow2 "github.com/zchee/go-qcow2"
)

Expand Down Expand Up @@ -1044,7 +1044,7 @@ func (d *Driver) setupNFSShare() error {

root := path.Clean(d.NFSSharesRoot)
mountCommands += fmt.Sprintf("sudo mkdir -p %s/%s\\n", root, share)
mountCommands += fmt.Sprintf("sudo mount -t nfs -o noacl,async %s:%s %s/%s\\n", hostIP, share, root, share)
mountCommands += fmt.Sprintf("sudo mount -t nfs -o noacl,async$( [ -n "$(sw_vers | grep 10.14)" ] && echo ",nfsvers=3 ") %s:%s %s/%s\\n", hostIP, share, root, share)
}

if err := nfsexports.ReloadDaemon(); err != nil {
Expand Down