Skip to content

Commit

Permalink
image: fix image generation within ImageBuilder
Browse files Browse the repository at this point in the history
Changes introduced in commit d604a07 ("build: add CycloneDX SBOM
JSON support") broke ImageBuilder:

  Cannot open '/openwrt-imagebuilder-ath79-generic.Linux-x86_64/tmp/.packageinfo': No such file or directory

So lets fix it by wrapping the BOM generation behind condition of IB
feature check.

Fixes: openwrt#13881
Fixes: d604a07 ("build: add CycloneDX SBOM JSON support")
Signed-off-by: Petr Štetiar <[email protected]>
(cherry picked from commit c4259a6)
  • Loading branch information
ynezz committed Nov 6, 2023
1 parent 7c43ced commit cfadbc0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,13 @@ endef
define Image/Manifest
$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
ifndef IB
$(if $(CONFIG_JSON_CYCLONEDX_SBOM), \
$(SCRIPT_DIR)/package-metadata.pl imgcyclonedxsbom \
$(TMP_DIR)/.packageinfo \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).bom.cdx.json)
endif
endef

define Image/gzip-ext4-padded-squashfs
Expand Down

0 comments on commit cfadbc0

Please sign in to comment.