summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Marangi2024-10-24 18:25:06 +0000
committerChristian Marangi2024-10-28 23:07:51 +0000
commit23e27d21d532ffd3535810a6c8da2c70354bf78b (patch)
treee47b56163c13fdae68d2f9455e30ff2c672bf459
parent5667b380cd30eeaeb39f0445bcb62b704f2c3223 (diff)
downloadopenwrt-23e27d21d532ffd3535810a6c8da2c70354bf78b.tar.gz
build: detach apk repository handling from rootfs.mk
To better support imagebuilder declaring --repositories-file on calling apk macro, detach this and --repository from rootfs.mk macro and move it to package Makefile and image.mk where they are used to permit a more generic usage. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
-rw-r--r--include/image.mk7
-rw-r--r--include/rootfs.mk4
-rw-r--r--package/Makefile4
3 files changed, 9 insertions, 6 deletions
diff --git a/include/image.mk b/include/image.mk
index fdd2ee9ef2..4c53247eda 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -280,7 +280,8 @@ endef
define Image/Manifest
$(if $(CONFIG_USE_APK), \
- $(call apk,$(TARGET_DIR_ORIG)) list --quiet --manifest --no-network | sort | sed 's/ / - /' > \
+ $(call apk,$(TARGET_DIR_ORIG)) list --quiet --manifest --no-network \
+ --repositories-file /dev/zero | sort | sed 's/ / - /' > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest, \
$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest \
@@ -333,7 +334,9 @@ opkg_target = \
$(call opkg,$(mkfs_cur_target_dir)) \
-f $(mkfs_cur_target_dir).conf
-apk_target = $(call apk,$(mkfs_cur_target_dir)) --no-scripts
+apk_target = \
+ $(call apk,$(mkfs_cur_target_dir)) --no-scripts \
+ --repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb
target-dir-%: FORCE
diff --git a/include/rootfs.mk b/include/rootfs.mk
index 554dd48460..c409e442b5 100644
--- a/include/rootfs.mk
+++ b/include/rootfs.mk
@@ -47,12 +47,10 @@ apk = \
IPKG_INSTROOT=$(1) \
$(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk \
--root $(1) \
- --repositories-file /dev/zero \
--keys-dir $(TOPDIR) \
--no-cache \
--no-logfile \
- --preserve-env \
- --repository file://$(PACKAGE_DIR_ALL)/packages.adb
+ --preserve-env
TARGET_DIR_ORIG := $(TARGET_ROOTFS_DIR)/root.orig-$(BOARD)
diff --git a/package/Makefile b/package/Makefile
index 9de36b13c9..70897271ac 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -98,7 +98,9 @@ $(curdir)/install: $(TMP_DIR)/.build $(curdir)/merge $(curdir)/merge-index
ifneq ($(CONFIG_USE_APK),)
$(file >$(TMP_DIR)/apk_install_list,\
$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg))))
- $(call apk,$(TARGET_DIR)) add --initdb --no-scripts --arch $(ARCH_PACKAGES) $$(cat $(TMP_DIR)/apk_install_list)
+ $(call apk,$(TARGET_DIR)) add --initdb --no-scripts --arch $(ARCH_PACKAGES) \
+ --repositories-file /dev/zero --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
+ $$(cat $(TMP_DIR)/apk_install_list)
else
$(file >$(TMP_DIR)/opkg_install_list,\
$(call opkg_package_files,\