From e753ef940bf9a3fe3bc12d12b814b0f71fd84632 Mon Sep 17 00:00:00 2001 From: Michal Opala Date: Fri, 24 Jan 2025 13:10:21 +0100 Subject: [PATCH] M #-: Various fixes for 6.10.0-3 (#20) - Update one-apps submodule to latest master - Bump version to 6.10.0-3 - Use common.pkr.hcl instead of plugins.pkr.hcl - Use alma8 image from local one-apps in service_example - Add various makefile fixes --- apps-code/community-apps/Makefile | 16 ++++++++-------- apps-code/community-apps/Makefile.config | 6 +++--- .../community-apps/packer/capone/common.pkr.hcl | 1 + .../community-apps/packer/capone/plugins.pkr.hcl | 1 - .../packer/service_Lithops/common.pkr.hcl | 1 + .../packer/service_Lithops/plugins.pkr.hcl | 1 - .../packer/service_UERANSIM/common.pkr.hcl | 1 + .../packer/service_UERANSIM/plugins.pkr.hcl | 1 - .../packer/service_example/common.pkr.hcl | 1 + .../packer/service_example/example.pkr.hcl | 2 +- apps-code/one-apps | 2 +- 11 files changed, 17 insertions(+), 16 deletions(-) create mode 120000 apps-code/community-apps/packer/capone/common.pkr.hcl delete mode 120000 apps-code/community-apps/packer/capone/plugins.pkr.hcl create mode 120000 apps-code/community-apps/packer/service_Lithops/common.pkr.hcl delete mode 120000 apps-code/community-apps/packer/service_Lithops/plugins.pkr.hcl create mode 120000 apps-code/community-apps/packer/service_UERANSIM/common.pkr.hcl delete mode 120000 apps-code/community-apps/packer/service_UERANSIM/plugins.pkr.hcl create mode 120000 apps-code/community-apps/packer/service_example/common.pkr.hcl diff --git a/apps-code/community-apps/Makefile b/apps-code/community-apps/Makefile index a818ae3..63d7d15 100644 --- a/apps-code/community-apps/Makefile +++ b/apps-code/community-apps/Makefile @@ -5,23 +5,23 @@ include Makefile.config -include Makefile.local # services -services: $(patsubst %,packer-%,$(SERVICES)) +services: $(SERVICES:%=packer-%) # allow individual services targets (e.g., "make service_Lithops") $(SERVICES): %: packer-% # aliases + dependency -packer-%: ${DIR_EXPORT}/%.qcow2 - @${INFO} "Packer ${*} done" +packer-%: $(DIR_EXPORT)/%.qcow2 + @$(INFO) 'Packer $* done' # run packer build for given distro or service -${DIR_EXPORT}/%.qcow2: - $(eval DISTRO_NAME := $(shell echo ${*} | sed 's/[0-9].*//')) - $(eval DISTRO_VER := $(shell echo ${*} | sed 's/^.[^0-9]*\(.*\)/\1/')) - packer/build.sh "${DISTRO_NAME}" "${DISTRO_VER}" ${@} +$(DIR_EXPORT)/%.qcow2: + $(eval DISTRO_NAME := $(shell echo $* | sed 's/[0-9].*//')) + $(eval DISTRO_VER := $(shell echo $* | sed 's/^.[^0-9]*\(.*\)/\1/')) + packer/build.sh '$(DISTRO_NAME)' '$(DISTRO_VER)' $@ clean: - -rm -rf ${DIR_EXPORT}/* + -if [ -d '$(DIR_EXPORT)' ]; then rm -rf $(DIR_EXPORT)/*; fi help: @echo 'Usage examples:' diff --git a/apps-code/community-apps/Makefile.config b/apps-code/community-apps/Makefile.config index f9e8a2a..5f265ca 100644 --- a/apps-code/community-apps/Makefile.config +++ b/apps-code/community-apps/Makefile.config @@ -1,6 +1,6 @@ # context version definition VERSION := 6.10.0 -RELEASE := 2 +RELEASE := 3 # log VERBOSE := 1 @@ -15,10 +15,10 @@ SERVICES := service_Lithops service_UERANSIM capone131 service_example DIR_ONEAPPS := ../one-apps DIR_BUILD := build DIR_EXPORT := export -$(shell mkdir -p ${DIR_BUILD} ${DIR_EXPORT}) +$(shell mkdir -p $(DIR_BUILD) $(DIR_EXPORT)) # don't delete exported -.SECONDARY: $(patsubst %,$(DIR_EXPORT)/%.qcow2,$(SERVICES)) +.SECONDARY: $(SERVICES:%=$(DIR_EXPORT)/%.qcow2) # logging func INFO=sh -c 'if [ $(VERBOSE) = 1 ]; then echo [INFO] $$1; fi' INFO diff --git a/apps-code/community-apps/packer/capone/common.pkr.hcl b/apps-code/community-apps/packer/capone/common.pkr.hcl new file mode 120000 index 0000000..3b9ee73 --- /dev/null +++ b/apps-code/community-apps/packer/capone/common.pkr.hcl @@ -0,0 +1 @@ +../../../one-apps/packer/common.pkr.hcl \ No newline at end of file diff --git a/apps-code/community-apps/packer/capone/plugins.pkr.hcl b/apps-code/community-apps/packer/capone/plugins.pkr.hcl deleted file mode 120000 index e19157b..0000000 --- a/apps-code/community-apps/packer/capone/plugins.pkr.hcl +++ /dev/null @@ -1 +0,0 @@ -../../../one-apps/packer/plugins.pkr.hcl \ No newline at end of file diff --git a/apps-code/community-apps/packer/service_Lithops/common.pkr.hcl b/apps-code/community-apps/packer/service_Lithops/common.pkr.hcl new file mode 120000 index 0000000..3b9ee73 --- /dev/null +++ b/apps-code/community-apps/packer/service_Lithops/common.pkr.hcl @@ -0,0 +1 @@ +../../../one-apps/packer/common.pkr.hcl \ No newline at end of file diff --git a/apps-code/community-apps/packer/service_Lithops/plugins.pkr.hcl b/apps-code/community-apps/packer/service_Lithops/plugins.pkr.hcl deleted file mode 120000 index e19157b..0000000 --- a/apps-code/community-apps/packer/service_Lithops/plugins.pkr.hcl +++ /dev/null @@ -1 +0,0 @@ -../../../one-apps/packer/plugins.pkr.hcl \ No newline at end of file diff --git a/apps-code/community-apps/packer/service_UERANSIM/common.pkr.hcl b/apps-code/community-apps/packer/service_UERANSIM/common.pkr.hcl new file mode 120000 index 0000000..3b9ee73 --- /dev/null +++ b/apps-code/community-apps/packer/service_UERANSIM/common.pkr.hcl @@ -0,0 +1 @@ +../../../one-apps/packer/common.pkr.hcl \ No newline at end of file diff --git a/apps-code/community-apps/packer/service_UERANSIM/plugins.pkr.hcl b/apps-code/community-apps/packer/service_UERANSIM/plugins.pkr.hcl deleted file mode 120000 index e19157b..0000000 --- a/apps-code/community-apps/packer/service_UERANSIM/plugins.pkr.hcl +++ /dev/null @@ -1 +0,0 @@ -../../../one-apps/packer/plugins.pkr.hcl \ No newline at end of file diff --git a/apps-code/community-apps/packer/service_example/common.pkr.hcl b/apps-code/community-apps/packer/service_example/common.pkr.hcl new file mode 120000 index 0000000..3b9ee73 --- /dev/null +++ b/apps-code/community-apps/packer/service_example/common.pkr.hcl @@ -0,0 +1 @@ +../../../one-apps/packer/common.pkr.hcl \ No newline at end of file diff --git a/apps-code/community-apps/packer/service_example/example.pkr.hcl b/apps-code/community-apps/packer/service_example/example.pkr.hcl index 6acd55f..d655e39 100644 --- a/apps-code/community-apps/packer/service_example/example.pkr.hcl +++ b/apps-code/community-apps/packer/service_example/example.pkr.hcl @@ -21,7 +21,7 @@ source "qemu" "example" { memory = 2048 accelerator = "kvm" - iso_url = "export/alma8.qcow2" + iso_url = "../one-apps/export/alma8.qcow2" iso_checksum = "none" headless = var.headless diff --git a/apps-code/one-apps b/apps-code/one-apps index ff7bcb6..8005f76 160000 --- a/apps-code/one-apps +++ b/apps-code/one-apps @@ -1 +1 @@ -Subproject commit ff7bcb6b8fedde6c25ae97f885628e2c5338c270 +Subproject commit 8005f76443c6c6e9606f50f5bbae6a46175e1cf9