From af689427802fc05cc423e2ae053e254abefea166 Mon Sep 17 00:00:00 2001 From: Andrew Durbin Date: Tue, 25 Jun 2024 12:55:45 -0700 Subject: [PATCH] Enable DEV=y build support on HV=kubevirt Use correct build yml for pillar so that image is built with -dev suffix. Signed-off-by: Andrew Durbin --- Makefile | 5 +++-- pkg/pillar/build-kubevirt-dev.yml | 31 +++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 pkg/pillar/build-kubevirt-dev.yml diff --git a/Makefile b/Makefile index e9cf6c6fc3..6c7ef63ecf 100644 --- a/Makefile +++ b/Makefile @@ -1013,13 +1013,14 @@ endif # If DEV=y and file pkg/my_package/build-dev.yml exists, returns the path to that file. # If RSTATS=y and file pkg/my_package/build-rstats.yml exists, returns the path to that file. # If HV=kubevirt and file pkg/my_package/build-kubevirt.yml exists, returns the path to that file. -# Ortherwise returns pkg/my_package/build.yml. +# Otherwise returns pkg/my_package/build.yml. get_pkg_build_yml = $(if $(filter kubevirt,$(HV)), $(call get_pkg_build_kubevirt_yml,$1), \ $(if $(filter y,$(RSTATS)), $(call get_pkg_build_rstats_yml,$1), \ $(if $(filter y,$(DEV)), $(call get_pkg_build_dev_yml,$1), build.yml))) get_pkg_build_dev_yml = $(if $(wildcard pkg/$1/build-dev.yml),build-dev.yml,build.yml) get_pkg_build_rstats_yml = $(if $(wildcard pkg/$1/build-rstats.yml),build-rstats.yml,build.yml) -get_pkg_build_kubevirt_yml = $(if $(wildcard pkg/$1/build-kubevirt.yml),build-kubevirt.yml,build.yml) +get_pkg_build_kubevirt_yml = $(if $($(DEV),y),build-kubevirt-dev.yml, \ + $(if $(wildcard pkg/$1/build-kubevirt.yml),build-kubevirt.yml,build.yml)) eve-%: pkg/%/Dockerfile build-tools $(RESCAN_DEPS) $(QUIET): "$@: Begin: LINUXKIT_PKG_TARGET=$(LINUXKIT_PKG_TARGET)" diff --git a/pkg/pillar/build-kubevirt-dev.yml b/pkg/pillar/build-kubevirt-dev.yml new file mode 100644 index 0000000000..518aafafa9 --- /dev/null +++ b/pkg/pillar/build-kubevirt-dev.yml @@ -0,0 +1,31 @@ +# linuxkit build template +# +# Copyright (c) 2024 Zededa, Inc. +# SPDX-License-Identifier: Apache-2.0 + +--- +org: lfedge +image: eve-pillar-dev +config: + binds: + - /lib/modules:/lib/modules + - /dev:/dev + - /etc/resolv.conf:/etc/resolv.conf + - /run:/run + - /config:/config + - /:/hostfs + - /persist:/persist:rshared,rbind + - /usr/bin/containerd:/usr/bin/containerd + net: host + capabilities: + - all + pid: host + rootfsPropagation: shared + devices: + - path: all + type: a + security_opt: + - seccomp:unconfined +buildArgs: + - HV=kubevirt + - DEV=y