]> git.99rst.org Git - openwrt-packages.git/commitdiff
oci-runtime-tools: install the test rootfs archives on x86
authorDaniel Golle <redacted>
Wed, 19 Aug 2026 06:08:49 +0000 (07:08 +0100)
committerDaniel Golle <redacted>
Sun, 23 Aug 2026 22:37:55 +0000 (23:37 +0100)
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 <redacted>
utils/oci-runtime-tools/Makefile

index d802e94f712a0b8b4b285df6d79b19ed39df639e..32a1ccab25aebd2ef7e966b7136e49601d645633 100644 (file)
@@ -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))
git clone https://git.99rst.org/PROJECT