From 624e7c82f109cb32a2d674f3079719f0f6442073 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 9 Oct 2017 14:49:47 +0100 Subject: [PATCH] Convert most of tools/* to `linuxkit pkg build` tools/alpine and tools/guestfs are omitted since they do not currently use pkg/package.mk and do their own thing. Slightly hacky arrangements are made for these. Note that previously they were only recursed into for their default target (push) and that behaviour is retained. Signed-off-by: Ian Campbell --- tools/Makefile | 18 ++++++++++++------ tools/go-compile/Makefile | 5 ----- tools/go-compile/build.yml | 1 + tools/mkimage-dynamic-vhd/Makefile | 4 ---- tools/mkimage-dynamic-vhd/build.yml | 1 + tools/mkimage-gcp/Makefile | 4 ---- tools/mkimage-gcp/build.yml | 1 + tools/mkimage-iso-bios/Makefile | 5 ----- tools/mkimage-iso-bios/build.yml | 3 +++ tools/mkimage-iso-efi/Makefile | 5 ----- tools/mkimage-iso-efi/build.yml | 2 ++ tools/mkimage-vhd/Makefile | 4 ---- tools/mkimage-vhd/build.yml | 1 + tools/mkimage-vmdk/Makefile | 4 ---- tools/mkimage-vmdk/build.yml | 1 + tools/qemu/Makefile | 4 ---- tools/qemu/build.yml | 1 + 17 files changed, 23 insertions(+), 41 deletions(-) delete mode 100644 tools/go-compile/Makefile create mode 100644 tools/go-compile/build.yml delete mode 100644 tools/mkimage-dynamic-vhd/Makefile create mode 100644 tools/mkimage-dynamic-vhd/build.yml delete mode 100644 tools/mkimage-gcp/Makefile create mode 100644 tools/mkimage-gcp/build.yml delete mode 100644 tools/mkimage-iso-bios/Makefile create mode 100644 tools/mkimage-iso-bios/build.yml delete mode 100644 tools/mkimage-iso-efi/Makefile create mode 100644 tools/mkimage-iso-efi/build.yml delete mode 100644 tools/mkimage-vhd/Makefile create mode 100644 tools/mkimage-vhd/build.yml delete mode 100644 tools/mkimage-vmdk/Makefile create mode 100644 tools/mkimage-vmdk/build.yml delete mode 100644 tools/qemu/Makefile create mode 100644 tools/qemu/build.yml diff --git a/tools/Makefile b/tools/Makefile index 3fe596255..145f1d79c 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,19 +1,25 @@ -DIRS = $(shell find . -maxdepth 1 -mindepth 1 -type d) +DIRS = $(dir $(shell find . -maxdepth 2 -mindepth 2 -type f -name build.yml)) +# These have more complex builds which have not yet been ported to linuxkit pkg. +# No more entries should be added to this list. +# Note that these are only recursed on for the push target which was the historical behaviour. +MAKEDIRS = alpine guestfs + .PHONY: push forcepush tag forcetag show-tag clean push: - @set -e; for d in $(DIRS); do make -C "$$d" push; done + @set -e; for d in $(DIRS); do linuxkit pkg push "$$d"; done + @set -e; for d in $(MAKEDIRS); do make -C "$$d" push; done forcepush: - @set -e; for d in $(DIRS); do make -C "$$d" forcepush; done + @set -e; for d in $(DIRS); do linuxkit pkg push --force "$$d"; done tag: - @set -e; for d in $(DIRS); do make -C "$$d" tag; done + @set -e; for d in $(DIRS); do linuxkit pkg build "$$d"; done forcetag: - @set -e; for d in $(DIRS); do make -C "$$d" forcetag; done + @set -e; for d in $(DIRS); do linuxkit pkg build --force "$$d"; done show-tag: - @set -e; for d in $(DIRS); do make -C "$$d" show-tag; done + @set -e; for d in $(DIRS); do linuxkit pkg show-tag "$$d"; done clean: diff --git a/tools/go-compile/Makefile b/tools/go-compile/Makefile deleted file mode 100644 index 4d5e39964..000000000 --- a/tools/go-compile/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -IMAGE=go-compile -DEPS=compile.sh - -include ../../pkg/package.mk - diff --git a/tools/go-compile/build.yml b/tools/go-compile/build.yml new file mode 100644 index 000000000..56e7fdf8a --- /dev/null +++ b/tools/go-compile/build.yml @@ -0,0 +1 @@ +image: go-compile diff --git a/tools/mkimage-dynamic-vhd/Makefile b/tools/mkimage-dynamic-vhd/Makefile deleted file mode 100644 index a3646f26c..000000000 --- a/tools/mkimage-dynamic-vhd/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -IMAGE=mkimage-dynamic-vhd -DEPS=make-dynamic-vhd - -include ../../pkg/package.mk diff --git a/tools/mkimage-dynamic-vhd/build.yml b/tools/mkimage-dynamic-vhd/build.yml new file mode 100644 index 000000000..5fef466bf --- /dev/null +++ b/tools/mkimage-dynamic-vhd/build.yml @@ -0,0 +1 @@ +image: mkimage-dynamic-vhd diff --git a/tools/mkimage-gcp/Makefile b/tools/mkimage-gcp/Makefile deleted file mode 100644 index dfc5a3c7e..000000000 --- a/tools/mkimage-gcp/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -IMAGE=mkimage-gcp -DEPS=make-gcp - -include ../../pkg/package.mk diff --git a/tools/mkimage-gcp/build.yml b/tools/mkimage-gcp/build.yml new file mode 100644 index 000000000..29e878945 --- /dev/null +++ b/tools/mkimage-gcp/build.yml @@ -0,0 +1 @@ +image: mkimage-gcp diff --git a/tools/mkimage-iso-bios/Makefile b/tools/mkimage-iso-bios/Makefile deleted file mode 100644 index 9a920db2c..000000000 --- a/tools/mkimage-iso-bios/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -IMAGE=mkimage-iso-bios -DEPS=make-iso -ARCHES=x86_64 - -include ../../pkg/package.mk diff --git a/tools/mkimage-iso-bios/build.yml b/tools/mkimage-iso-bios/build.yml new file mode 100644 index 000000000..4dd32749e --- /dev/null +++ b/tools/mkimage-iso-bios/build.yml @@ -0,0 +1,3 @@ +image: mkimage-iso-bios +arches: + - amd64 diff --git a/tools/mkimage-iso-efi/Makefile b/tools/mkimage-iso-efi/Makefile deleted file mode 100644 index a3f906882..000000000 --- a/tools/mkimage-iso-efi/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -IMAGE=mkimage-iso-efi -DEPS=make-efi -NETWORK=1 - -include ../../pkg/package.mk diff --git a/tools/mkimage-iso-efi/build.yml b/tools/mkimage-iso-efi/build.yml new file mode 100644 index 000000000..1ea72881e --- /dev/null +++ b/tools/mkimage-iso-efi/build.yml @@ -0,0 +1,2 @@ +image: mkimage-iso-efi +network: true diff --git a/tools/mkimage-vhd/Makefile b/tools/mkimage-vhd/Makefile deleted file mode 100644 index 9b390de57..000000000 --- a/tools/mkimage-vhd/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -IMAGE=mkimage-vhd -DEPS=make-vhd - -include ../../pkg/package.mk diff --git a/tools/mkimage-vhd/build.yml b/tools/mkimage-vhd/build.yml new file mode 100644 index 000000000..8b00b4fda --- /dev/null +++ b/tools/mkimage-vhd/build.yml @@ -0,0 +1 @@ +image: mkimage-vhd diff --git a/tools/mkimage-vmdk/Makefile b/tools/mkimage-vmdk/Makefile deleted file mode 100644 index f2c2d71a0..000000000 --- a/tools/mkimage-vmdk/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -IMAGE=mkimage-vmdk -DEPS=make-vmdk - -include ../../pkg/package.mk diff --git a/tools/mkimage-vmdk/build.yml b/tools/mkimage-vmdk/build.yml new file mode 100644 index 000000000..cfad11d0b --- /dev/null +++ b/tools/mkimage-vmdk/build.yml @@ -0,0 +1 @@ +image: mkimage-vmdk diff --git a/tools/qemu/Makefile b/tools/qemu/Makefile deleted file mode 100644 index 438aaaba6..000000000 --- a/tools/qemu/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -IMAGE=qemu - -include ../../pkg/package.mk - diff --git a/tools/qemu/build.yml b/tools/qemu/build.yml new file mode 100644 index 000000000..26d4b5ac5 --- /dev/null +++ b/tools/qemu/build.yml @@ -0,0 +1 @@ +image: qemu