Skip to content

Instantly share code, notes, and snippets.

@akutz
Created February 22, 2017 19:00
Show Gist options
  • Save akutz/16c497828f568c6859a75a676dd3db0c to your computer and use it in GitHub Desktop.
Save akutz/16c497828f568c6859a75a676dd3db0c to your computer and use it in GitHub Desktop.
Building libStorage with Docker
[0]akutz@red:~$ git clone https://github.com/codedellemc/libstorage && make -C libstorage
Cloning into 'libstorage'...
remote: Counting objects: 5496, done.
remote: Compressing objects: 100% (92/92), done.
remote: Total 5496 (delta 39), reused 0 (delta 0), pack-reused 5398
Receiving objects: 100% (5496/5496), 1.97 MiB | 1.92 MiB/s, done.
Resolving deltas: 100% (2893/2893), done.
make: Entering directory '/home/akutz/libstorage'
make docker-build
make[1]: Entering directory '/home/akutz/libstorage'
docker exec -t build-libstorage env make -C /go/src/github.com/codedellemc/libstorage deps
make: Entering directory '/go/src/github.com/codedellemc/libstorage'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 608 0 608 0 0 1893 0 --:--:-- --:--:-- --:--:-- 1900
100 3690k 100 3690k 0 0 1602k 0 0:00:02 0:00:02 --:--:-- 2055k
/go/bin/glide install && touch glide.lock.d
[INFO] Downloading dependencies. Please wait...
[INFO] --> Fetching updates for github.com/akutz/gofig.
[INFO] --> Fetching updates for github.com/akutz/golf.
[INFO] --> Fetching updates for github.com/akutz/goof.
[INFO] --> Fetching updates for github.com/akutz/gotil.
[INFO] --> Fetching updates for github.com/appropriate/go-virtualboxclient.
[INFO] --> Fetching updates for github.com/asaskevich/govalidator.
[INFO] --> Fetching updates for github.com/aws/aws-sdk-go.
[INFO] --> Fetching updates for github.com/cesanta/ucl.
[INFO] --> Fetching updates for github.com/cesanta/validate-json.
[INFO] --> Fetching updates for github.com/codedellemc/goisilon.
[INFO] --> Fetching updates for github.com/codedellemc/goscaleio.
[INFO] --> Fetching updates for github.com/codedellemc/gournal.
[INFO] --> Fetching updates for github.com/davecgh/go-spew.
[INFO] --> Fetching updates for github.com/fsnotify/fsnotify.
[INFO] --> Fetching updates for github.com/go-ini/ini.
[INFO] --> Fetching updates for github.com/gorilla/context.
[INFO] --> Fetching updates for github.com/gorilla/mux.
[INFO] --> Fetching updates for github.com/hashicorp/hcl.
[INFO] --> Fetching updates for github.com/jmespath/go-jmespath.
[INFO] --> Fetching updates for github.com/jteeuwen/go-bindata.
[INFO] --> Fetching updates for github.com/kardianos/osext.
[INFO] --> Fetching updates for github.com/kr/fs.
[INFO] --> Fetching updates for github.com/magiconair/properties.
[INFO] --> Fetching updates for github.com/mitchellh/mapstructure.
[INFO] --> Fetching updates for github.com/pelletier/go-buffruneio.
[INFO] --> Fetching updates for github.com/pelletier/go-toml.
[INFO] --> Fetching updates for github.com/pkg/errors.
[INFO] --> Fetching updates for github.com/pkg/sftp.
[INFO] --> Fetching updates for github.com/pmezard/go-difflib.
[INFO] --> Fetching updates for github.com/rackspace/gophercloud.
[INFO] --> Fetching updates for github.com/Sirupsen/logrus.
[INFO] --> Fetching updates for github.com/spf13/afero.
[INFO] --> Fetching updates for github.com/spf13/cast.
[INFO] --> Fetching updates for github.com/spf13/jwalterweatherman.
[INFO] --> Fetching updates for github.com/spf13/pflag.
[INFO] --> Fetching updates for github.com/spf13/viper.
[INFO] --> Fetching updates for github.com/stretchr/testify.
[INFO] --> Fetching updates for golang.org/x/crypto.
[INFO] --> Fetching updates for golang.org/x/net.
[INFO] --> Fetching updates for golang.org/x/sys.
[INFO] --> Fetching updates for golang.org/x/text.
[INFO] --> Fetching updates for gopkg.in/yaml.v2.
[INFO] --> Fetching updates for gopkg.in/yaml.v1.
[INFO] Setting references.
[INFO] --> Setting version for github.com/asaskevich/govalidator to 7b3beb6df3c42abd3509abfc3bcacc0fbfb7c877.
[INFO] --> Setting version for github.com/aws/aws-sdk-go to 6627523f8671f323edb36dfc56cc0b47c810211f.
[INFO] --> Setting version for github.com/appropriate/go-virtualboxclient to e0978ab2ed407095400a69d5933958dd260058cd.
[INFO] --> Setting version for github.com/cesanta/ucl to 97c016fce90e6af1b14558563ac46852167e6a76.
[INFO] --> Setting version for github.com/cesanta/validate-json to 2f16017c76fc2403d143e93cea1e1b9526a01148.
[INFO] --> Setting version for github.com/gorilla/context to 08b5f424b9271eedf6f9f0ce86cb9396ed337a42.
[INFO] --> Setting version for github.com/fsnotify/fsnotify to fd9ec7deca8bf46ecd2a795baaacf2b3a9be1197.
[INFO] --> Setting version for github.com/codedellemc/goisilon to 2ea94fb4dd4f34507c9d67d8d2e35dcc0edb5f89.
[INFO] --> Setting version for github.com/davecgh/go-spew to 6d212800a42e8ab5c146b8ace3490ee17e5225f9.
[INFO] --> Setting version for github.com/jteeuwen/go-bindata to 1dd44b25b79c4d9060e582e90798e4d72537818c.
[INFO] --> Setting version for github.com/gorilla/mux to 757bef944d0f21880861c2dd9c871ca543023cba.
[INFO] --> Setting version for github.com/hashicorp/hcl to f74cf8281543a0797d7b4ab7d88e76e7ba125308.
[INFO] --> Setting version for github.com/akutz/gofig to 862741cad5edced279c57d1981e8e3e9fa54e8d5.
[INFO] --> Setting version for github.com/kardianos/osext to c2c54e542fb797ad986b31721e1baedf214ca413.
[INFO] --> Setting version for github.com/akutz/golf to e26bdd995cb746e431d42ea303ebe7622389d29f.
[INFO] --> Setting version for github.com/go-ini/ini to 6e4869b434bd001f6983749881c7ead3545887d8.
[INFO] --> Setting version for github.com/codedellemc/goscaleio to 485da3636bfcc8e70f74fe7bdc7cb25e5a6e4c4a.
[INFO] --> Setting version for github.com/jmespath/go-jmespath to bd40a432e4c76585ef6b72d3fd96fb9b6dc7b68d.
[INFO] --> Setting version for github.com/akutz/goof to ea06624ca980bae80c1b615b8417723436d235ab.
[INFO] --> Setting version for github.com/codedellemc/gournal to 4293aaf7e91602963a5777caef4b346e1cf21936.
[INFO] --> Setting version for github.com/kr/fs to 2788f0dbd16903de03cb8186e5c7d97b69ad387b.
[INFO] --> Setting version for github.com/pmezard/go-difflib to d8ed2627bdf02c080bf22230dbb337003b7aba2d.
[INFO] --> Setting version for github.com/Sirupsen/logrus to 5f376aa629ac60c3215cc368e674bd996093a01a.
[INFO] --> Setting version for github.com/mitchellh/mapstructure to f3009df150dadf309fdee4a54ed65c124afad715.
[INFO] --> Setting version for github.com/pelletier/go-buffruneio to df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d.
[INFO] --> Setting version for github.com/pelletier/go-toml to 45932ad32dfdd20826f5671da37a5f3ce9f26a8d.
[INFO] --> Setting version for github.com/akutz/gotil to 6fa2e80bd3ac40f15788cfc3d12ebba49a0add92.
[INFO] --> Setting version for github.com/pkg/errors to 248dadf4e9068a0b3e79f02ed0a610d935de5302.
[INFO] --> Setting version for github.com/magiconair/properties to 0723e352fa358f9322c938cc2dadda874e9151a9.
[INFO] --> Setting version for github.com/pkg/sftp to 4d0e916071f68db74f8a73926335f809396d6b42.
[INFO] --> Setting version for github.com/stretchr/testify to 976c720a22c8eb4eb6a0b4348ad85ad12491a506.
[INFO] --> Setting version for github.com/spf13/cast to 2580bc98dc0e62908119e4737030cc2fdfc45e4c.
[INFO] --> Setting version for github.com/spf13/pflag to 5ccb023bc27df288a957c5e994cd44fd19619465.
[INFO] --> Setting version for github.com/rackspace/gophercloud to 42196eaf5b93739d335921404bb7c5f2205fceb3.
[INFO] --> Setting version for github.com/spf13/afero to 52e4a6cfac46163658bd4f123c49b6ee7dc75f78.
[INFO] --> Setting version for gopkg.in/yaml.v2 to bc35f417f8a7664a73d46c9def2933417c03019f.
[INFO] --> Setting version for github.com/spf13/viper to 651d9d916abc3c3d6a91a12549495caba5edffd2.
[INFO] --> Setting version for github.com/spf13/jwalterweatherman to 33c24e77fb80341fe7130ee7c594256ff08ccc46.
[INFO] --> Setting version for golang.org/x/crypto to 9477e0b78b9ac3d0b03822fd95422e2fe07627cd.
[INFO] --> Setting version for golang.org/x/net to b336a971b799939dd16ae9b1df8334cb8b977c4d.
[INFO] --> Setting version for golang.org/x/text to a8b38433e35b65ba247bb267317037dee1b70cea.
[INFO] --> Setting version for golang.org/x/sys to 002cbb5f952456d0c50e0d2aff17ea5eca716979.
[INFO] --> Setting version for gopkg.in/yaml.v1 to 9f9df34309c04878acc86042b16630b0f696e1de.
GOOS=linux GOARCH=amd64 go install github.com/codedellemc/libstorage/vendor/github.com/jteeuwen/go-bindata/go-bindata
go get -u github.com/alecthomas/gometalinter
/go/bin/gometalinter --install --update && touch .gometalinter.tools.d
Installing:
staticcheck
errcheck
goimports
ineffassign
deadcode
dupl
gotype
lll
misspell
structcheck
aligncheck
gas
golint
gosimple
interfacer
unconvert
unused
varcheck
goconst
gocyclo
go get golang.org/x/tools/cmd/cover && touch .coverage.tools.d
make: Leaving directory '/go/src/github.com/codedellemc/libstorage'
docker exec -t build-libstorage \
env BUILD_TAGS="gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" GOOS=linux GOARCH=amd64 DOCKER=1 \
make -C /go/src/github.com/codedellemc/libstorage -j build
make: Entering directory '/go/src/github.com/codedellemc/libstorage'
make build-generated
make[1]: Entering directory '/go/src/github.com/codedellemc/libstorage'
make build-lsx
make[2]: Entering directory '/go/src/github.com/codedellemc/libstorage'
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/types
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/context
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/utils
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./imports/config
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./drivers/storage/vfs
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/registry
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/utils/config
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./drivers/storage/vfs/executor
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./imports/executors
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./cli/lsx
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./cli/lsx/lsx-linux
make[2]: Leaving directory '/go/src/github.com/codedellemc/libstorage'
make ./api/api_generated.go
make[2]: Entering directory '/go/src/github.com/codedellemc/libstorage'
echo generating api/api_generated.go
generating api/api_generated.go
make[2]: Leaving directory '/go/src/github.com/codedellemc/libstorage'
make[1]: Leaving directory '/go/src/github.com/codedellemc/libstorage'
make build-libstorage
make[1]: Entering directory '/go/src/github.com/codedellemc/libstorage'
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/utils/schema
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./drivers/storage/vfs/storage
/go/bin/go-bindata -md5checksum -pkg executors -prefix api/server/executors/bin -o api/server/executors/executors_generated.go api/server/executors/bin/...
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/utils/filters
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./drivers/integration/linux
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./drivers/os/linux
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/client
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./drivers/storage/vfs/client
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./drivers/os/darwin
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./drivers/storage/libstorage
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./imports/remote
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/executors
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/services
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./imports/local
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./client
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/httputils
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/handlers
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/router/executor
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/router/help
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/router/root
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/router/tasks
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/router/service
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/router/volume
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server/router/snapshot
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./imports/routers
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/server
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" .
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./api/tests
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./cli/lss
GOOS=linux GOARCH=amd64 go install -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" ./cli/lss/lss-linux
make[1]: Leaving directory '/go/src/github.com/codedellemc/libstorage'
make libstor-c libstor-s
make[1]: Entering directory '/go/src/github.com/codedellemc/libstorage'
go build -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" -buildmode=c-shared -o /go/pkg/linux_amd64/github.com/codedellemc/libstorage/c/libstor-c.so ./c/libstor-c
go build -tags "gofig libstorage_integration_driver_linux libstorage_storage_driver libstorage_storage_driver_vfs libstorage_storage_executor libstorage_storage_executor_vfs pflag" -buildmode=c-shared -o /go/pkg/linux_amd64/github.com/codedellemc/libstorage/c/libstor-s.so ./c/libstor-s
gcc -Wall -pedantic -std=c99 -I/usr/include -I/go/src/github.com/codedellemc/libstorage/c/libstor-c \
-I/go/pkg/linux_amd64/github.com/codedellemc/libstorage/c/ \
-L/go/pkg/linux_amd64/github.com/codedellemc/libstorage/c/ \
-o /go/bin/libstor-c \
./c/libstor-c.c \
-lstor-c
gcc -Wall -pedantic -std=c99 -I/usr/include -I/go/src/github.com/codedellemc/libstorage/c \
-I/go/pkg/linux_amd64/github.com/codedellemc/libstorage/c/ \
-L/go/pkg/linux_amd64/github.com/codedellemc/libstorage/c/ \
-o /go/bin/libstor-s \
./c/libstor-s.c \
-lstor-s
make[1]: Leaving directory '/go/src/github.com/codedellemc/libstorage'
make build-lss
make[1]: Entering directory '/go/src/github.com/codedellemc/libstorage'
make[1]: Nothing to be done for 'build-lss'.
make[1]: Leaving directory '/go/src/github.com/codedellemc/libstorage'
make: Leaving directory '/go/src/github.com/codedellemc/libstorage'
The lss-linux binary is 15MB and located at:
./lss-linux
The lsx-linux binary is 10MB and located at:
./lsx-linux
make[1]: Leaving directory '/home/akutz/libstorage'
make: Leaving directory '/home/akutz/libstorage'
[0]akutz@red:~$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment