From: Daniel Golle Date: Wed, 19 Aug 2026 06:08:49 +0000 (+0100) Subject: oci-runtime-tools: install the test rootfs archives on x86 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=a2d0bdddd4a92a15341d1a62febff1b8957a8f45;p=openwrt-packages.git oci-runtime-tools: install the test rootfs archives on x86 The install recipe guarded both archives with CONFIG_x86, a symbol OpenWrt never defines: the target symbol is CONFIG_TARGET_x86 and the architecture symbols are CONFIG_i386 and CONFIG_x86_64. No archive was therefore packaged and every validation test stopped at "rootfs-amd64.tar.gz: Cannot open". Key each archive off the architecture symbol that matches it, i686 included, so the package's own architecture guard and the archive it installs cannot disagree. The choice moves out of the install recipe, since a conditional inside a define has to start at the beginning of the line to be a directive at all, which leaves no way to indent it as the packaging guidelines ask for. Signed-off-by: Daniel Golle --- diff --git a/utils/oci-runtime-tools/Makefile b/utils/oci-runtime-tools/Makefile index d802e94f7..32a1ccab2 100644 --- a/utils/oci-runtime-tools/Makefile +++ b/utils/oci-runtime-tools/Makefile @@ -24,6 +24,19 @@ GO_PKG_LDFLAGS_X:=main.gitCommit=$(PKG_SOURCE_VERSION) main.version=$(PKG_SOURCE BUSYBOX_STATIC_VERSION:=1.31.0 +ifdef CONFIG_i386 + ROOTFS_ARCHIVE:=rootfs-386.tar.gz +endif +ifdef CONFIG_i686 + ROOTFS_ARCHIVE:=rootfs-386.tar.gz +endif +ifdef CONFIG_x86_64 + ROOTFS_ARCHIVE:=rootfs-amd64.tar.gz +endif +ifdef CONFIG_aarch64 + ROOTFS_ARCHIVE:=rootfs-arm64.tar.gz +endif + include $(INCLUDE_DIR)/package.mk include ../../lang/golang/golang-package.mk @@ -106,15 +119,7 @@ define Package/oci-runtime-tests/install $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$${testbin} \ $(1)/usr/libexec/oci-runtime-test/$$$${testbin}.t ; \ done ) -ifdef CONFIG_x86 - $(INSTALL_DATA) $(PKG_BUILD_DIR)/rootfs-386.tar.gz $(1)/usr/libexec/oci-runtime-test -ifdef CONFIG_x86_64 - $(INSTALL_DATA) $(PKG_BUILD_DIR)/rootfs-amd64.tar.gz $(1)/usr/libexec/oci-runtime-test -endif -endif -ifdef CONFIG_aarch64 - $(INSTALL_DATA) $(PKG_BUILD_DIR)/rootfs-arm64.tar.gz $(1)/usr/libexec/oci-runtime-test -endif + $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ROOTFS_ARCHIVE) $(1)/usr/libexec/oci-runtime-test endef $(eval $(call GoBinPackage,oci-runtime-tools))