From: Peter Korsgaard <peter@korsgaard.com>
To: "Yann E. MORIN via buildroot" <buildroot@buildroot.org>
Cc: "José Luis Salvador Rufo" <salvador.joseluis@gmail.com>,
"Yann E. MORIN" <yann.morin.1998@free.fr>,
"Edgar Bonet" <bonet@grenoble.cnrs.fr>
Subject: Re: [Buildroot] [PATCH 1/1] support/scripts/check-merged: shift args processed by getopts
Date: Sun, 30 Nov 2025 18:06:26 +0100 [thread overview]
Message-ID: <87tsybh2lp.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <aSv3lJlD1bNlcRGs@landeda> (Yann E. MORIN via buildroot's message of "Sun, 30 Nov 2025 08:51:48 +0100")
>>>>> "Yann" == Yann E MORIN via buildroot <buildroot@buildroot.org> writes:
> José, All,
> On 2025-11-29 21:34 +0100, José Luis Salvador Rufo spake thusly:
>> Shift the arguments processed by getopts so that only the root directories
>> to check remain as arguments for the subsequent `for root; do` loop.
> The actual issue this triggers is that shecks in custom skeleton cause
> build failure:
> 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
> The skeleton in -u 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 -b 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 reason this was not caught earlier, is that the script was only
> tested against overlays, not custom skeletons. The difference between
> skeletons and overlays, is that the tests are strict for skeletons, and
> lax for overlays. Thus, with a custom skeleton, where the merged
> symlinks are missing, the tests go wrong and report am incorrect issue,
> while with overlays, the checks fails, but they are not critical for
> obverlays, so the script is silent and suceeds.
> I think a better commit log would be:
> support/scripts/check-merged: fix checking custom skeletons
> When using a custom skeleton where the merged symlinks ar emising,
> 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 793ebd5d2809 (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 directrory validity to all 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 directpries to validate, like is done for example in
> support/download/dl-wrapper.
> Fixes: 793ebd5d28095c8df45a0d183d273d8a84b3f0a4
> 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>
> Thank you José for reporting and fixing the issue! Thank you Edgar for
> giving a helping hand!
Committed with Yanns commit message (minus a few typos), thanks.
--
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2025-11-30 17:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-29 20:34 [Buildroot] [PATCH 1/1] support/scripts/check-merged: shift args processed by getopts José Luis Salvador Rufo
2025-11-30 7:51 ` Yann E. MORIN via buildroot
2025-11-30 17:06 ` Peter Korsgaard [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=87tsybh2lp.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=bonet@grenoble.cnrs.fr \
--cc=buildroot@buildroot.org \
--cc=salvador.joseluis@gmail.com \
--cc=yann.morin.1998@free.fr \
/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