mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-04 08:26:42 +00:00
Re-run vendoring
Latest `vndr` has changed its algorithm a bit. It also pointed out that we were missing some things. Move the `vendor` directory up to the `linuxkit` command, else it gets confused by packages that have Go code in. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,2 +1,2 @@
|
||||
vendor/* linguist-vendored
|
||||
**/vendor/** linguist-vendored
|
||||
kernel/*.x linguist-language=text
|
||||
|
4
Makefile
4
Makefile
@@ -42,14 +42,14 @@ tmp_rtf_bin.tar: Makefile
|
||||
docker run --rm --log-driver=none -e http_proxy=$(http_proxy) -e https_proxy=$(https_proxy) $(CROSS) $(GO_COMPILE) --clone-path github.com/linuxkit/rtf --clone https://github.com/linuxkit/rtf.git --commit $(RTF_COMMIT) --package github.com/linuxkit/rtf --ldflags "-X $(RTF_CMD).GitCommit=$(RTF_COMMIT) -X $(RTF_CMD).Version=$(RTF_VERSION)" -o bin/rtf > $@
|
||||
|
||||
|
||||
LINUXKIT_DEPS=$(wildcard src/cmd/linuxkit/*.go) Makefile vendor.conf
|
||||
LINUXKIT_DEPS=$(wildcard src/cmd/linuxkit/*.go) Makefile src/cmd/linuxkit/vendor.conf
|
||||
bin/linuxkit: tmp_linuxkit_bin.tar
|
||||
tar xf $<
|
||||
rm $<
|
||||
touch $@
|
||||
|
||||
tmp_linuxkit_bin.tar: $(LINUXKIT_DEPS)
|
||||
tar cf - vendor -C src/cmd/linuxkit . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/linuxkit/linuxkit --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" -o bin/linuxkit > $@
|
||||
tar cf - -C src/cmd/linuxkit . | docker run --rm --net=none --log-driver=none -i $(CROSS) $(GO_COMPILE) --package github.com/linuxkit/linuxkit --ldflags "-X main.GitCommit=$(GIT_COMMIT) -X main.Version=$(VERSION)" -o bin/linuxkit > $@
|
||||
|
||||
.PHONY: test-cross
|
||||
test-cross:
|
||||
|
@@ -2,12 +2,12 @@ Vendoring
|
||||
=========
|
||||
|
||||
The Go code in this repo depends on a number of Go libraries.
|
||||
Theses are vendored in to the `vendor` directory using [`vndr`](https://github.com/lk4d4/vndr)
|
||||
These are vendored in to the `src/cmd/linuxkit/vendor` directory using [`vndr`](https://github.com/lk4d4/vndr)
|
||||
The `vendor.conf` file contains a list of the repositories and the git SHA or branch name that should be vendored
|
||||
|
||||
## Updating dependencies
|
||||
|
||||
Update `vendor.conf` with the dependency that you would like to add.
|
||||
Update `src/cmd/linuxkit/vendor.conf` with the dependency that you would like to add.
|
||||
Details of usage of the `vndr` tool and the format of `vendor.conf` can be found [here](https://github.com/LK4D4/vndr/blob/master/README.md)
|
||||
|
||||
Once done, you must run the `vndr` tool to add the necessary files to the `vendor` directory.
|
||||
@@ -19,8 +19,8 @@ To update all dependencies:
|
||||
|
||||
```
|
||||
docker run -it --rm \
|
||||
-v $(PWD):/go/src/github.com/docker/moby \
|
||||
-w /go/src/github.com/docker/moby \
|
||||
-v $(PWD):/go/src/github.com/linuxkit/linuxkit \
|
||||
-w /go/src/github.com/linuxkit/linuxkit/src/cmd/linuxkit \
|
||||
--entrypoint /go/bin/vndr \
|
||||
linuxkit/go-compile:f68574b165475cff908190e0f1e86cbbb1884f86
|
||||
```
|
||||
@@ -29,8 +29,8 @@ To update a single dependency:
|
||||
|
||||
```
|
||||
docker run -it --rm \
|
||||
-v $(PWD):/go/src/github.com/docker/moby \
|
||||
-w /go/src/github.com/docker/moby \
|
||||
-v $(PWD):/go/src/github.com/linuxkit/linuxkit \
|
||||
-w /go/src/github.com/linuxkit/linuxkit/src/cmd/linuxkit \
|
||||
--entrypoint /go/bin/vndr \
|
||||
linuxkit/go-compile:f68574b165475cff908190e0f1e86cbbb1884f86 \
|
||||
github.com/docker/docker
|
||||
@@ -47,11 +47,13 @@ go get -u github.com/LK4D4/vndr
|
||||
To update all dependencies:
|
||||
|
||||
```
|
||||
cd src/cmd/linuxkit
|
||||
vndr
|
||||
```
|
||||
|
||||
To update a single dependency:
|
||||
|
||||
```
|
||||
cd /src/cmd/linuxkit
|
||||
vndr github.com/docker/docker
|
||||
```
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user