build: fix including busybox, procd and apk/opkg in imagebuilder

Since the image builder pulls package lists from metadata directly,
add procd and busybox as depdendencies to base-files.
As for the package manager itself, since it can be disabled it needs
to be added directly in the image builder makefile

Fixes: 44598c233d ("build: remove broken dependency of metadata on toplevel .config variables")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau 2024-11-13 07:04:31 +01:00
parent f84187035e
commit 4c65359af4
4 changed files with 10 additions and 6 deletions

View File

@ -39,7 +39,11 @@ endif
define Package/base-files define Package/base-files
SECTION:=base SECTION:=base
CATEGORY:=Base system CATEGORY:=Base system
DEPENDS:=+netifd +libc +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:openwrt-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool DEPENDS:= \
+netifd +libc +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:openwrt-keyring \
+NAND_SUPPORT:ubi-utils +fstools +fwtool \
+SELINUX:procd-selinux +!SELINUX:procd +SECCOMP:procd-seccomp \
+SELINUX:busybox-selinux +!SELINUX:busybox
TITLE:=Base filesystem for OpenWrt TITLE:=Base filesystem for OpenWrt
URL:=http://openwrt.org/ URL:=http://openwrt.org/
VERSION:=$(PKG_RELEASE)~$(lastword $(subst -, ,$(REVISION))) VERSION:=$(PKG_RELEASE)~$(lastword $(subst -, ,$(REVISION)))

View File

@ -50,7 +50,6 @@ define Package/procd
$(call Package/procd/Default) $(call Package/procd/Default)
VARIANT:=default VARIANT:=default
CONFLICTS:=procd-selinux CONFLICTS:=procd-selinux
DEFAULT:=y if !SELINUX
endef endef
define Package/procd-selinux define Package/procd-selinux
@ -59,7 +58,6 @@ define Package/procd-selinux
TITLE += with SELinux support TITLE += with SELinux support
PROVIDES:=procd PROVIDES:=procd
VARIANT:=selinux VARIANT:=selinux
DEFAULT:=y if SELINUX
endef endef
define Package/procd-ujail define Package/procd-ujail
@ -75,7 +73,6 @@ define Package/procd-seccomp
CATEGORY:=Base system CATEGORY:=Base system
DEPENDS:=@SECCOMP +libubox +libblobmsg-json DEPENDS:=@SECCOMP +libubox +libblobmsg-json
TITLE:=OpenWrt process seccomp helper + utrace TITLE:=OpenWrt process seccomp helper + utrace
DEFAULT:=y if SECCOMP
endef endef
define Package/uxc define Package/uxc

View File

@ -56,7 +56,6 @@ define Package/busybox
$(call Package/busybox/Default) $(call Package/busybox/Default)
CONFLICTS:=busybox-selinux CONFLICTS:=busybox-selinux
VARIANT:=default VARIANT:=default
DEFAULT:=y if !SELINUX
endef endef
define Package/busybox-selinux define Package/busybox-selinux
@ -65,7 +64,6 @@ define Package/busybox-selinux
DEPENDS += +libselinux DEPENDS += +libselinux
VARIANT:=selinux VARIANT:=selinux
PROVIDES:=busybox PROVIDES:=busybox
DEFAULT:=y if SELINUX
endef endef
define Package/busybox/description define Package/busybox/description

View File

@ -138,6 +138,11 @@ _call_info: FORCE
echo 'Available Profiles:' echo 'Available Profiles:'
echo; $(PROFILE_LIST) echo; $(PROFILE_LIST)
ifneq ($(CONFIG_USE_APK),)
DEFAULT_PACKAGES += apk-mbedtls
else
DEFAULT_PACKAGES += opkg
endif
BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel) BUILD_PACKAGES:=$(sort $(DEFAULT_PACKAGES) $($(USER_PROFILE)_PACKAGES) kernel)
# "-pkgname" in the package list means remove "pkgname" from the package list # "-pkgname" in the package list means remove "pkgname" from the package list
BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES)) BUILD_PACKAGES:=$(filter-out $(filter -%,$(BUILD_PACKAGES)) $(patsubst -%,%,$(filter -%,$(BUILD_PACKAGES))),$(BUILD_PACKAGES))