Commit Graph

32 Commits

Author SHA1 Message Date
W. Trevor King 8dbc2d1fff Makefile: Use 'git diff' to show gofmt changes
This makes fixing errors easier.  Before this commit, errors looked
like [1]:

  $ make gofmt
  !!! 'gofmt -s' needs to be run on the following files:
  ./lib/config.go
  make: *** [gofmt] Error 1

But that's not very helpful when your local gofmt thinks the file is
fine.  With this commit, errors will look like:

  $ make gofmt
  find . -name '*.go' ! -path './vendor/*' -exec gofmt -s -w {} \+
  git diff --exit-code
  diff --git a/lib/config.go b/lib/config.go
  index 1acca8c7..6a63b2b0 100644
  --- a/lib/config.go
  +++ b/lib/config.go
  @@ -2,7 +2,7 @@ package lib

   import (
          "bytes"
  -"io/ioutil"
  +       "io/ioutil"

          "github.com/BurntSushi/toml"
          "github.com/kubernetes-incubator/cri-o/oci"
  make: *** [Makefile:68: gofmt] Error 1

(or whatever, I just stuffed in a formatting error for demonstration
purposes).

Also remove the helper script in favor of direct Makefile calls,
because with Git handling difference reporting and exit status, this
becomes a simpler check.  find's -exec, !, and -path arguments are
specified in POSIX [2].

[1]: https://travis-ci.org/kubernetes-incubator/cri-o/jobs/331949394#L1075
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-22 16:47:09 -08:00
W. Trevor King 826298483a hack/libdm_installed: Add a test for libdevmapper.h
Avoid crashing 'make' with:

  No package 'devmapper' found

by disabling the devmapper driver when the library it requires is not
installed.  Also give the libdm_no_deferred_remove script a more
specific name to avoid confusion.

Signed-off-by: W. Trevor King <wking@tremily.us>
2018-01-19 11:43:24 -08:00
Wei Wei 3006a2159a drop crioctl source code
Signed-off-by: Wei Wei <weiwei.inf@gmail.com>
2017-11-29 21:07:50 +08:00
Antonio Murdaca 8ae0aee7e5
hack: validate tests for crioctl deprecation
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-11-13 16:55:45 +01:00
Daniel J Walsh 6835afaa54 Change buildtags based on installed environment.
Determine if selinux is available before building cri-o with support.
Don't add ostree support to crio or any tools other then kpod.
cri-o does not use ostree.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2017-10-19 17:34:24 +00:00
Mrunal Patel a643e533d8 Skip building btrfs support if library isn't installed
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-10-03 13:18:36 -07:00
Ryan Cole 1c820fb06f Fix bug in find-godeps
go list {{.Imports}} outputs imports as an array, and the leading
and trailing square brackets can get caught in the name of a package.
Add a pipe in the dependency command to remove the brackets

Signed-off-by: Ryan Cole <rcyoalne@gmail.com>
2017-07-19 16:49:22 -04:00
Dan Williams 95846211c9 build: find dependencies for Go executables
To ensure that changing a dependency source file actually triggers
a rebuild of the core binaries when you type 'make', find their
dependencies and add them to the makefile's target dependencies.

Signed-off-by: Dan Williams <dcbw@redhat.com>
2017-03-31 20:45:21 -05:00
Antonio Murdaca dfa93414c5 Merge pull request #352 from mrunalp/deps
Switch to github.com/golang/dep for vendoring
2017-02-02 18:32:44 +01:00
Mrunal Patel b1f3dc74e9 Remove hack/vendor.sh
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2017-01-31 16:46:57 -08:00
Nalin Dahyabhai 893593272f Use build tags for bin2img and copyimg
Use the same build tags for bin2img and copyimg that we use for ocid,
and improve detection of the case where we need to use the
"libdm_no_deferred_remove" tag.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-31 11:57:19 -05:00
Rajat Chopra c04040fa95 move ocicni from vendors to pkg/
Signed-off-by: Rajat Chopra <rchopra@redhat.com>
2017-01-19 17:45:54 -05:00
Nalin Dahyabhai caee4a99c9 Vendor containers/image and containers/storage
Vendor updated containers/image and containers/storage, along
with any new dependencies they drag in, and updated versions of other
dependencies that happen to get pulled in.

github.com/coreos/go-systemd/daemon/SdNotify() now takes a boolean to
control whether or not it unsets the NOTIFY_SOCKET variable from the
calling process's environment.  Adapt.

github.com/opencontainers/runtime-tools/generate/Generator.AddProcessEnv()
now takes the environment variable name and value as two arguments, not
one.  Adapt.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2017-01-18 10:21:59 -05:00
Jonathan Yu 9da2882d49
Update hack/vendor.sh to clone directly into vendor/ instead of vendor/src/
Signed-off-by: Jonathan Yu <jawnsy@redhat.com>
2017-01-17 11:19:25 -08:00
Antonio Murdaca 25a85afe1c
bump k8s@550f8be73aac92c7c23b1783d3db17f8660019f6
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-17 12:19:23 +01:00
Xianglin Gao 088c53579a Remove byName in cmd/server/main.go, since urfave/cli#544 has been in.
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2017-01-05 15:42:22 +08:00
Nalin Dahyabhai 9b88295f69 Update containers/storage and containers/image
Update the versions of containers/storage and containers/image, and add
new dependencies that they pull in.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-12-19 11:44:34 -05:00
Nalin Dahyabhai f893e38d6d Add build tags for integration tests
Add the necessary build tags and configuration so that integration tests
can properly build against device mapper and btrfs libraries.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
2016-12-19 11:44:32 -05:00
Crazykev 3fa48e54ff add gofmt verify in CI
Signed-off-by: Crazykev <crazykev@zju.edu.cn>
2016-12-15 14:15:57 +08:00
Antonio Murdaca 78ee03a8fc
add seccomp support
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-28 22:05:34 +01:00
Mrunal Patel b62a150151 Update to the latest upstream API
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-11-16 17:20:37 -08:00
Mrunal Patel b117dd863c Update to latest version of kubernetes CRI API
Signed-off-by: Mrunal Patel <mpatel@redhat.com>
2016-10-21 11:06:30 -04:00
Antonio Murdaca 7894fba5b5
vendor opencontainers/runc 3abefdff18bc201199c5dfd0e91e941cb4c61376
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-14 17:24:37 +02:00
Antonio Murdaca 93ba37d00b
vendor go-systemd
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-13 19:40:18 +02:00
Dan Walsh 09bed25074 Add support for sd_notify
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-10-13 09:45:31 -04:00
Aleksa Sarai 316e85f0b4
vendor: add BurntSushi/toml@v0.2.0
The tag points at bbd5bb678321a0d6e58f1099321dfa73391c1b6f.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-10-11 03:09:59 +11:00
Mrunal Patel 03d989da4f Update vendors to inclue golang.org/x/sys
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-09-27 11:34:45 -07:00
Mrunal Patel 4606f2a61a Fix the build for ocid to cri-o rename
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-09-26 16:55:12 -07:00
Antonio Murdaca ab05a4526b
vendor: bump k8s@5fe2495588425a6613e28a048d8cc7bcb7513c7f
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-26 10:07:46 +02:00
Antonio Murdaca a7d0fb6449
hack/vendor.sh: fix script
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-24 00:37:09 +02:00
Antonio Murdaca 569183030f
fix vendored deps
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-22 18:17:45 +02:00
Antonio Murdaca e269cb8b7e
new vendoring
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-22 18:17:45 +02:00