José Luis Salvador Rufo 92da94bf21 support/scripts/check-merged: fix checking custom skeletons
When using a custom skeleton where the merged symlinks are missing,
the build fails with errors like:

    support/scripts/check-merged -t skeleton -u -b /usr/src/simplek8s/rootfs-skeleton
    The skeleton in -t is not properly setup:
    - /usr/bin should exist, be a directory, and not be a symlink
    - /usr/lib should exist, be a directory, and not be a symlink
    The skeleton in skeleton is not properly setup:
    - /usr/bin should exist, be a directory, and not be a symlink
    - /usr/lib should exist, be a directory, and not be a symlink
    [...]

Commit 793ebd5d28 (support/scripts/check-merged: use getopts instead of
getopt) intoduced a flawed use of getopts: unlike getopt, getopts does not
conume the positional arguments.  This causes the check for directory
validity to also check each option as if they were directories.

For overlays, this is transparently ignored, because the checks are only lax
for overlays (missing symlinks are OK).

However, for skeletons, the checks are strict.  Because of that, a missing
symlink is considered an error, when it should be considered as being OK.

The fix is to actually consume the positional args to only keep the list of
directories to validate, like is done for example in
support/download/dl-wrapper.

Fixes: 793ebd5d28
Reviewed-by: Yann E. MORIN <yann.morin.1998@free.fr>
Acked-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Edgar Bonet <bonet@grenoble.cnrs.fr>
Signed-off-by: José Luis Salvador Rufo <salvador.joseluis@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2025-11-30 18:05:33 +01:00
2025-01-15 21:30:31 +01:00
2025-11-20 23:02:45 +01:00

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on OFTC IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches
Description
Buildroot repository for the Raspberry Pi
Readme 127 MiB
Languages
Makefile 63.4%
Python 17.8%
C 8.7%
Shell 6%
PHP 1.4%
Other 2.3%