From: Daniel Golle Date: Wed, 19 Aug 2026 06:08:26 +0000 (+0100) Subject: oci-runtime-tools: build runtimetest statically X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=fe9a06c343ce1c8b265909b3720eec2153c10b4a;p=openwrt-packages.git oci-runtime-tools: build runtimetest statically runtimetest is copied into the validation bundle, whose rootfs carries a static busybox and no dynamic loader, so the dynamically linked binary the generic Go recipe produces fails to execute and every validation test that inspects the container from the inside aborts. Build that one command again as the static binary upstream's own runtimetest target produces. Upstream gets there by asking the external linker for a static link, while disabling cgo reaches the same result without fighting the -linkmode external that the generic Go recipe would otherwise impose. Signed-off-by: Daniel Golle --- diff --git a/utils/oci-runtime-tools/Makefile b/utils/oci-runtime-tools/Makefile index df640716f..d802e94f7 100644 --- a/utils/oci-runtime-tools/Makefile +++ b/utils/oci-runtime-tools/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=oci-runtime-tools PKG_VERSION:=1.3.0.20260316 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=Apache-2.0 PKG_LICENSE_FILES:=LICENSE @@ -82,6 +82,14 @@ endef define Build/Compile $(call GoPackage/Build/Compile) + $(GO_GENERAL_BUILD_CONFIG_VARS) \ + $(GO_PKG_BUILD_CONFIG_VARS) \ + GO_BUILD_PKG="$(GO_PKG)cmd/runtimetest" \ + $(GO_PKG_VARS) \ + CGO_ENABLED=0 \ + $(SHELL) $(GO_INCLUDE_DIR)golang-build.sh build \ + -v -buildvcs=false -trimpath -tags "netgo osusergo" \ + -ldflags "$(patsubst %,-X %,$(GO_PKG_LDFLAGS_X))" $(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR)) endef