go1.20 and up has a `-C` flag to change to a directory before running commands
(see https://go.dev/cl/421436). Documentation is a bit hard to find, and doesn't
mention `go mod` subcommands, but can be found in the `go build` help;
go help build
...
The build flags are shared by the build, clean, get, install, list, run,
and test commands:
-C dir
Change to dir before running the command.
Any files named on the command line are interpreted after
changing directories.
If used, this flag must be the first one in the command line.
Update the Makefile to use this option where applicable, so that we can
skip some `cd` and sub-shells.
Also switch some assignments to use `:=` to evaluate them once.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
The `go list` command is vendor-aware, and doesn't include the vendor dir;
go list ./... | grep 'vendor'
# (no output)
For the API module, there's no need to grep for `integration` as it does
not have that sub-directory.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
It's more common for directory-paths to not have a trailing slash; strip
it so that we don't have some double slashes.
Before:
make protos
...
+ protos
(cd api && buf dep update)
(cd api && PATH="/go/src/github.com/containerd/containerd//bin:$PATH" buf generate)
After:
make protos
...
+ protos
(cd api && buf dep update)
(cd api && PATH="/go/src/github.com/containerd/containerd/bin:$PATH" buf generate)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
buf will generate the protobuf text file which can be used for viewing
all protobuf changes in one file and quickly diffing changes.
Signed-off-by: Derek McGowan <derek@mcg.dev>
This is needed so we can build the runc shim without grpc as a
transative dependency.
With this change the runc shim binary went from 14MB to 11MB.
The RSS from an idle shim went from about 17MB to 14MB (back around
where it was in in 1.7).
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Allow the api to stay at the same v1 go package name and keep using a
1.x version number. This indicates the API is still at 1.x and allows
sharing proto types with containerd 1.6 and 1.7 releases.
Signed-off-by: Derek McGowan <derek@mcg.dev>
Protobuf will automatically put the files generated for a v2 module into
a v2 directory. Move them to their correct location after running the
protobuild.
Signed-off-by: Derek McGowan <derek@mcg.dev>
The `cri-containerd-*.tar.gz` release bundles have been deprecated
since containerd v1.6.
These bundles are no longer created in the CI, however, the
corresponding Makefile targets are still kept, as they are still used by
external CIs.
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Distros usually like to install docs, so add a rule for that, so
dist maintainers don't need to care about the details.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Distros tend to change this to specific locations (eg. on MVCC installs),
therefore introduce a generic environment variable that's a common practise
since 30+ years and thus already well known and supported by distros.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Required for distros that wanna use their local version and
can't have some (possibly failing) git commands being run here.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
There still was one place that's calling the `go` command directly
instead of using the $(GO) variable.
Fixes: 9ea25634bd
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
There was a todo for the windows variant of dependency installation that
hinted at making an install-hcsshim.sh script, however Windows today doesn't
rely on a standalone OCI runtime binary that gets invoked by the shim. Rather,
container creation/management is all handled by the shim itself in-proc. Due to
this, `make` or `make binaries` basically fulfills that purpose as it
clones hcsshim and builds the shim along with containerd.
Signed-off-by: Danny Canter <danny@dcantah.dev>
While we need to support CRI v1alpha2, the implementation doesn't have
to be tied to gogo/protobuf.
Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>