public inbox for buildroot@busybox.net
 help / color / mirror / Atom feed
From: Julien Olivain via buildroot <buildroot@buildroot.org>
To: Thomas Perale <thomas.perale@mind.be>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [v2, PATCH] Makefile: add 'show-info-all'
Date: Sat, 28 Mar 2026 21:51:59 +0100	[thread overview]
Message-ID: <e4307dd2c0354b5ca69b1403a3ebe98a@free.fr> (raw)
In-Reply-To: <20260311131529.120513-1-thomas.perale@mind.be>

Hi Thomas,

Thanks for the patch.

This new "show-info-all" should be documented in the
"make help" target, in the misc section:
https://gitlab.com/buildroot.org/buildroot/-/blob/2026.02/Makefile?ref_type=tags#L1204
saying it will show all packages available in Buildroot (not only
the selected ones). And possibly also in the manual:
https://gitlab.com/buildroot.org/buildroot/-/blob/2026.02/docs/manual/common-usage.adoc
in which you can say it is intended for Buildroot maintenance (sbom, 
cve, ...).

On 11/03/2026 14:15, Thomas Perale via buildroot wrote:
> The maintainance and testing workflow sometimes requires to output a
> list of every existing packages on Buildroot:
> 
> - Generating an SBOM of the whole Buildroot tree for
>   security.buildroot.org
> - List every sources for every packages for source.buildroot.org
> 
> The previous solution relied on `make allyesconfig` but always ran into
> conflicts that needed manual resolution. Also some packages would not 
> be
> present because they are archicture dependant.
> 
> To avoid having to manually modify the 'show-info' command this commit
> adds the 'show-info-all' command. It accesses the PACKAGES_ALL variable
> with all the packages present on Buildroot independently of the
> archicture or any config entries.
> 
> It forces the `BR2_HAVE_DOT_CONFIG` variable to be set to force the
> reading of the packages mk files.
> 
> Signed-off-by: Thomas Perale <thomas.perale@mind.be>
> ---
> 
> v1 --> v2: removed TARGETS_ROOTFS and recursive dependencies. It
>   introduced "host-" package with no name that introduced an empty
>   entry when generating an sbom when `make show-info-all` is ran 
> without
>   defconfig.
>   Checked the diff between the previous version and the new one and
>   except the empty entry nothing is changed by just iterating over
>   PACKAGES_ALL.
> 
>  Makefile | 22 ++++++++++++++++++++--
>  1 file changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index f51155b0ed..bd037cc834 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -126,7 +126,7 @@ noconfig_targets := menuconfig nconfig gconfig 
> xconfig config oldconfig randconf
>  	defconfig %_defconfig allyesconfig allnoconfig alldefconfig 
> syncconfig release \
>  	randpackageconfig allyespackageconfig allnopackageconfig \
>  	print-version olddefconfig distclean manual manual-% check-package \
> -	check-package-external
> +	check-package-external show-info-all
> 
>  # Some global targets do not trigger a build, but are used to collect
>  # metadata, or do various checks. When such targets are triggered,
> @@ -142,7 +142,7 @@ nobuild_targets := source %-source \
>  	clean distclean help show-targets graph-depends \
>  	%-graph-depends %-show-depends %-show-version \
>  	graph-build graph-size list-defconfigs \
> -	savedefconfig update-defconfig printvars show-vars
> +	savedefconfig update-defconfig printvars show-vars show-info-all
>  ifeq ($(MAKECMDGOALS),)
>  BR_BUILDING = y
>  else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),)
> @@ -236,6 +236,13 @@ BR2_CONFIG = $(CONFIG_DIR)/.config
>  ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
>  -include $(BR2_CONFIG)
>  endif
> +# show-info-all needs to access the PACKAGES_ALL variable. This 
> variable
> +# contains a reference to every packages present in Buildroot.
> +# Since the 'show-info-all' command might be used without actually 
> having a
> +# dotconfig this condition is forced to be set true.
> +ifeq ($(MAKECMDGOALS),show-info-all)
> +BR2_HAVE_DOT_CONFIG = y
> +endif
> 
>  ifeq ($(BR2_PER_PACKAGE_DIRECTORIES),)
>  # Disable top-level parallel build if per-package directories is not
> @@ -941,6 +948,17 @@ show-info:
>  		) \
>  	)
> 
> +.PHONY: show-info-all
> +show-info-all:

On my Fedora 43 system, running "make show-info-all" with this patch
shows the errors:

support/dependencies/check-host-cmake.sh: line 35: [: cmake: integer 
expected
support/dependencies/check-host-cmake.sh: line 38: [: cmake: integer 
expected

but the expected output is generated after.

When running in the reference docker image, it works as expected:
utils/docker-run make show-info-all

For some reasons, on Fedora 43, the script is called with:

support/dependencies/check-host-cmake.sh cmake cmake3

It should be called with $(BR2_CMAKE_VERSION_MIN).
See:
https://gitlab.com/buildroot.org/buildroot/-/blob/2026.02/support/dependencies/check-host-cmake.mk#L11

for example:
support/dependencies/check-host-cmake.sh 3.18 cmake cmake

I believe in your case of show-info-all, those dependencies checks
should not be called at all.

> +	@:
> +	$(info $(call clean-json, \
> +			{ $(foreach p, \
> +				$(sort $(PACKAGES_ALL)), \
> +				$(call json-info,$(call UPPERCASE,$(p)))$(comma) \
> +			) } \
> +		) \
> +	)
> +
>  .PHONY: pkg-stats
>  pkg-stats:
>  	@cd "$(CONFIG_DIR)" ; \
> --
> 2.53.0

Could you add the small documentation description and improve
the srcipt to avoid the errors, please?

Best regards,

Julien.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      reply	other threads:[~2026-03-28 20:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 13:15 [Buildroot] [v2, PATCH] Makefile: add 'show-info-all' Thomas Perale via buildroot
2026-03-28 20:51 ` Julien Olivain via buildroot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4307dd2c0354b5ca69b1403a3ebe98a@free.fr \
    --to=buildroot@buildroot.org \
    --cc=ju.o@free.fr \
    --cc=thomas.perale@mind.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox