[openwrt/openwrt] imagebuilder: actually support IB from buildbot
LEDE Commits
lede-commits at lists.infradead.org
Mon Oct 28 16:08:23 PDT 2024
ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a8d17c21e4e8f089f229361c43f1b219cb8f2a96
commit a8d17c21e4e8f089f229361c43f1b219cb8f2a96
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Thu Oct 24 20:36:43 2024 +0200
imagebuilder: actually support IB from buildbot
ImageBuilder compiled by buildbot doesn't have any package in the
packages directory. Package needs to be downloaded instead.
This works by calling update to the package manage to download the
remove index and download the file.
Fix missing support for this with APK, by configuring the
--repositories-file option and calling the APK update.
Also move the apk add --initdb to package_index.
If CONFIG_SIGNATURE_CHECK is not enabled, the signature is not checked.
Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
target/imagebuilder/files/Makefile | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 024002666a..3b1502cf57 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -95,8 +95,9 @@ OPKG:=$(call opkg,$(TARGET_DIR)) \
--lists-dir $(LISTS_DIR)
APK:=$(call apk,$(TARGET_DIR)) \
- --cache-dir $(DL_DIR) \
- --allow-untrusted
+ --repositories-file $(TOPDIR)/repositories \
+ $(if $(CONFIG_SIGNATURE_CHECK),,--allow-untrusted) \
+ --cache-dir $(DL_DIR)
include $(INCLUDE_DIR)/target.mk
@@ -177,7 +178,10 @@ ifeq ($(CONFIG_USE_APK),)
) >/dev/null 2>/dev/null
$(OPKG) update >&2 || true
else
- (cd $(PACKAGE_DIR); $(APK) mkndx --output packages.adb *.apk) >&2
+ $(APK) add --initdb
+ (cd $(PACKAGE_DIR); $(APK) mkndx \
+ --allow-untrusted --output packages.adb *.apk) >/dev/null 2>/dev/null || true
+ $(APK) update >&2 || true
endif
package_reload:
@@ -220,7 +224,7 @@ ifeq ($(CONFIG_USE_APK),)
$(OPKG) install $(firstword $(wildcard $(LINUX_DIR)/kernel_*.ipk $(PACKAGE_DIR)/kernel_*.ipk))
$(OPKG) install $(BUILD_PACKAGES)
else
- $(APK) add --initdb --no-scripts $(firstword $(wildcard $(LINUX_DIR)/libc-*.apk $(PACKAGE_DIR)/libc_*.apk))
+ $(APK) add --no-scripts $(firstword $(wildcard $(LINUX_DIR)/libc-*.apk $(PACKAGE_DIR)/libc_*.apk))
$(APK) add --no-scripts $(firstword $(wildcard $(LINUX_DIR)/kernel-*.apk $(PACKAGE_DIR)/kernel_*.apk))
$(APK) add --no-scripts $(BUILD_PACKAGES)
endif
More information about the lede-commits
mailing list