[openwrt/openwrt] base-files: correctly split install-key function for APK
LEDE Commits
lede-commits at lists.infradead.org
Fri May 17 13:35:54 PDT 2024
ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a96354bcfb0ad1c0deccbfdb3264c149447d474b
commit a96354bcfb0ad1c0deccbfdb3264c149447d474b
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri May 17 23:32:00 2024 +0300
base-files: correctly split install-key function for APK
The function incorrectly tried to APK keys even if there were none.
Correctly separate it into its own `ifdef` section.
Signed-off-by: Paul Spooren <mail at aparcar.org>
Link: https://github.com/openwrt/openwrt/pull/15519
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
package/base-files/Makefile | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/package/base-files/Makefile b/package/base-files/Makefile
index c42e2d9dd4..0aa7ecd854 100644
--- a/package/base-files/Makefile
+++ b/package/base-files/Makefile
@@ -122,6 +122,13 @@ ifneq ($(CONFIG_USE_APK),)
$(STAGING_DIR_HOST)/bin/openssl ecparam -name prime256v1 -genkey -noout -out $(BUILD_KEY_APK_SEC); \
$(STAGING_DIR_HOST)/bin/openssl ec -in $(BUILD_KEY_APK_SEC) -pubout > $(BUILD_KEY_APK_PUB)
endef
+
+ifndef CONFIG_BUILDBOT
+ define Package/base-files/install-key
+ mkdir -p $(1)/etc/apk/keys
+ $(CP) $(BUILD_KEY_APK_PUB) $(1)/etc/apk/keys/
+ endef
+endif
else
ifdef CONFIG_SIGNED_PACKAGES
define Build/Configure
@@ -137,10 +144,6 @@ ifndef CONFIG_BUILDBOT
define Package/base-files/install-key
mkdir -p $(1)/etc/opkg/keys
$(CP) $(BUILD_KEY).pub $(1)/etc/opkg/keys/`$(STAGING_DIR_HOST)/bin/usign -F -p $(BUILD_KEY).pub`
-
- mkdir -p $(1)/etc/apk/keys
- $(CP) $(BUILD_KEY_APK_PUB) $(1)/etc/apk/keys/
-
endef
endif
endif
More information about the lede-commits
mailing list