imagebuilder: copy apk keys with CONFIG_SIGNATURE_CHECK
authorChristian Marangi <ansuelsmth@gmail.com>
Thu, 24 Oct 2024 18:29:52 +0000 (20:29 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 28 Oct 2024 23:07:51 +0000 (00:07 +0100)
With CONFIG_SIGNATURE_CHECK enabled, copy keys following OPKG pattern.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/imagebuilder/Makefile

index ecc791b8e9b3473d1666f5ef2dc25b22cf8bbc48..d2c125ccf20c9e48370fc5754c13483296d6ca83 100644 (file)
@@ -82,13 +82,16 @@ else
                -exec $(CP) -t $(IB_LDIR)/ {} +
 endif
 
-ifneq ($(CONFIG_USE_APK),y)
 ifneq ($(CONFIG_SIGNATURE_CHECK),)
+ifneq ($(CONFIG_USE_APK),y)
        echo ''                                                        >> $(PKG_BUILD_DIR)/repositories.conf
        echo 'option check_signature'                                  >> $(PKG_BUILD_DIR)/repositories.conf
        $(INSTALL_DIR) $(PKG_BUILD_DIR)/keys
        $(CP) -L $(STAGING_DIR_ROOT)/etc/opkg/keys/ $(PKG_BUILD_DIR)/
        $(CP) -L $(STAGING_DIR_ROOT)/usr/sbin/opkg-key $(PKG_BUILD_DIR)/scripts/
+else
+       $(INSTALL_DIR) $(PKG_BUILD_DIR)/keys
+       $(CP) -L $(STAGING_DIR_ROOT)/etc/apk/keys/ $(PKG_BUILD_DIR)/
 endif
 endif