From 80b990205f99ea0b56a068e83042ba665134a939 Mon Sep 17 00:00:00 2001 From: sbwml Date: Sun, 2 Aug 2026 20:37:11 +0800 Subject: [PATCH] containerd: fix build failure due to missing NRI version file Signed-off-by: sbwml --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 652f822..87d257b 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,13 @@ endif # Reset golang-package.mk overrides so we can use the Makefile Build/Compile=$(call Build/Compile/Default) +# Fix build error caused by missing info/git file required by //go:embed in nri vendor dependency +define Build/Compile/Pre + mkdir -p $(PKG_BUILD_DIR)/$(MAKE_PATH)/vendor/github.com/containerd/nri/pkg/version/info + echo "v$(PKG_VERSION)" > $(PKG_BUILD_DIR)/$(MAKE_PATH)/vendor/github.com/containerd/nri/pkg/version/info/git +endef +Hooks/Compile/Pre += Build/Compile/Pre + define Package/containerd/install $(INSTALL_DIR) $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/{ctr,containerd,containerd-stress,containerd-shim-runc-v2} $(1)/usr/bin/