penguin/monok8s

k8s image for Mono Gateway Dev Kit

commit 7b31a1dec3f95ae27d461fe872f94b204c545bf8231272d8697dabf93ed788f8

author斟酌 鵬兄 <tgckpg@gmail.com>
date2026-04-27T16:57:23Z
subjectRemoved build dependency on jq
commit 7b31a1dec3f95ae27d461fe872f94b204c545bf8231272d8697dabf93ed788f8
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2026-04-27T16:57:23Z

    Removed build dependency on jq
---
 alpine/build-rootfs.sh |  4 ++--
 makefile               | 18 +++++++++++++++---
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/alpine/build-rootfs.sh b/alpine/build-rootfs.sh
index 734efa6..a882d44 100755
--- a/alpine/build-rootfs.sh
+++ b/alpine/build-rootfs.sh
@@ -119,6 +119,8 @@ mkdir -p "$FAKE_DEV" "$MNT_ROOTFS_IMG" "$MNT_DATA"
 
 echo "##################################################### Packaging RootFS $(du -sh "$ROOTFS" | awk '{print $1}')"
 
+ensure_loop_ready
+
 ###############################################################################
 # 1. Build reusable rootfs ext4 image once
 ###############################################################################
@@ -199,8 +201,6 @@ sgdisk -o "$IMG" \
   -n 3:0:+2560M   -t 3:8300 -c 3:rootfsB \
   -n 4:0:0        -t 4:8300 -c 4:data
 
-ensure_loop_ready
-
 losetup -D
 LOOP=$(losetup --find --show -P "$IMG")
 /sync-loop.sh "$LOOP"
diff --git a/makefile b/makefile
index fbf17da..1d67d50 100644
--- a/makefile
+++ b/makefile
@@ -148,7 +148,11 @@ $(BUILD_BASE_STAMP): $(BUILD_BASE_DEPS) | $(OUT_DIR)
 		--build-arg APT_PROXY=$(APT_PROXY) \
 		--build-arg TAG=$(TAG) \
 		-t $(DOCKER_IMAGE_ROOT)/build-base:$(TAG) .
-	@iid=$$(docker image inspect monok8s/build-base:$(TAG) | jq -r '.[].Id' | cut -d':' -f2 | cut -c -8); \
+	@iid=$$(docker image inspect \
+		--format '{{.Id}}' \
+		$(DOCKER_IMAGE_ROOT)/build-base:$(TAG) \
+		| cut -d':' -f2 \
+		| cut -c -8); \
 	docker tag monok8s/build-base:$(TAG) monok8s/build-base:$$iid; \
 	touch $@
 
@@ -181,7 +185,11 @@ $(CLITOOLS_BIN): $(CLITOOLS_SRCS)
 	$(MAKE) -C clitools build-agent
 
 vpp: $(BUILD_BASE_STAMP) $(VPP_TAR) $(DPDK_TAR) $(FMLIB_TAR) $(FMC_TAR) $(NXP_TAR)
-	@build_base_tag=$$(docker image inspect $(DOCKER_IMAGE_ROOT)/build-base:$(TAG) | jq -r '.[0].Id' | cut -d':' -f2 | cut -c -8); \
+	@build_base_tag=$$(docker image inspect \
+		--format '{{.Id}}' \
+		$(DOCKER_IMAGE_ROOT)/build-base:$(TAG) \
+		| cut -d':' -f2 \
+		| cut -c -8); \
 	@mkdir -p $(OUT_DIR)/vpp
 	docker build \
 		-f docker/vpp.Dockerfile \
@@ -220,7 +228,11 @@ $(BOARD_ITB): $(ITB_DEPS) | $(OUT_DIR)
 	test -f $@
 
 $(RELEASE_IMAGE): $(RELEASE_DEPS) $(DOWNLOAD_PACKAGES_STAMP) | $(OUT_DIR)
-	@build_base_tag=$$(docker image inspect $(DOCKER_IMAGE_ROOT)/build-base:$(TAG) | jq -r '.[0].Id' | cut -d':' -f2 | cut -c -8); \
+	@build_base_tag=$$(docker image inspect \
+		--format '{{.Id}}' \
+		$(DOCKER_IMAGE_ROOT)/build-base:$(TAG) \
+		| cut -d':' -f2 \
+		| cut -c -8); \
 	docker build \
 		-f docker/alpine.Dockerfile \
 		--no-cache \