From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Aaron Sierra <aaron@bubbl-tek.com>
Cc: Vincent Fazio <vfazio@xes-inc.com>, Andy Yan <andyshrk@163.com>,
buildroot <buildroot@buildroot.org>,
Andy Yan <andyshrk@gmail.com>
Subject: Re: [Buildroot] [PATCH v2 1/1] package: Add iotools package
Date: Fri, 18 Oct 2024 14:54:44 +0300 [thread overview]
Message-ID: <ZxJMhHEJmfHd5dyt@smile.fi.intel.com> (raw)
In-Reply-To: <ZxJL9O0KM7WP7b-d@smile.fi.intel.com>
On Fri, Oct 18, 2024 at 02:52:20PM +0300, Andy Shevchenko wrote:
> On Thu, Oct 17, 2024 at 10:45:23AM -0500, Aaron Sierra wrote:
> > > On Mon, Oct 14, 2024 at 05:55:46PM +0000, Vincent Fazio wrote:
> > > > Aaron, Andy,
> > > > > From: buildroot buildroot-bounces@buildroot.org> On Behalf Of Aaron
> > > > > Sierra
> > > > > Sent: Monday, October 14, 2024 12:01 PM
> > > > > ---- On Mon, 14 Oct 2024 10:38:22 -0500 Andy Shevchenko wrote ---
...
> > > > > 2. It would be nice if the package populated command symlinks in the target
> > > > > filesystem. That could be done in a number of way, like using an explicit list of
> > > > > commands maintained in the package Makefile (iotools.mk) or adding a host-
> > > > > build dependency and leveraging the --list-cmds output to get the list of
> > > > > embedded commands for linking.
> > > >
> > > > Caveat lector, I have not reviewed your patch or the sources in a while.
> > > >
> > > > WRT to this comment, I have this note from when we ported it:
> > > >
> > > > # we can't run make install because the symlink installation executes the binary
> > > > # which isn't guaranteed to work in cross-compile scenarios
> > > > define IOTOOLS_INSTALL_TARGET_CMDS
> > > > $(INSTALL) -D -m 0755 $(@D)/iotools $(TARGET_DIR)/usr/sbin/
> > > >
> > > > for link in $( IOTOOLS_LINKS); do \
> > > > ln -sf iotools $(TARGET_DIR)/usr/sbin/$link; \
> > > > done
> > > > endef
> > > >
> > > > We then earlier in the mk file define the tools per platform, akin to:
> > >
> > > I deliberately won't populate those links. The naming is so generic
> > > that it's a real chance to get a collision with all pain of splitting it
> > > in the configuration what links we create and what not and what to do
> > > with those that may collide.
> > >
> > > TL;DR: no, I don't think it's a good idea.
> >
> > For the benefit of the uninitiated, iotools operates similarly to Busybox,
> > expressing behavior either by:
> > 1. taking the command name from argv[0] (i.e. symlinks named for internal commands)
> > * This is the mechanism encouraged by the project's make install (i.e.
> > iotools --make-links)
> > 2. taking the command name from argv[1] (i.e. iotools [[command] [arguments]])
>
> There is a little nuance between two. When the Busybox is the *main(
> shell/coreutils/util-linux/etc provider it must populate the links, many of
> them (naming wise) are standardized by POSIX. In full opposition to the iotools
> with unpredictable consequences of the potential name clashing (esp. those that
> are called or/xor/and/etc.).
Worth to add that when Busybox is supplied *in the addition to* the main shell
it must NOT populate the links (for the very same reasoning: POSIX standardization).
> > I proposed populating the symlinks in the target filesystem to ensure the
> > subcommands are ready-to-use for people already familiar with the tool. It sounds
> > like you're advocating for #2 ("iotools_fallback") to be the primary mode of
> > operation for Buildroot users.
>
> Yes, I highly suggest not to go this way.
>
> > Can you point to documentation that Buildroot users can use to _know_ that the
> > second mode of operation is available and encouraged? I do not see any in the
> > help output or in the project README. Here is the current help output:
> >
> > $ ./iotools --help
> > usage: ./iotools COMMAND
> > COMMANDS:
> > --make-links
> > --clean-links
> > --list-cmds
> > -v --version
>
> Is it full output? Because to me it shows two screens of the listed commands.
> I do not see an issue here.
>
> > For the sake of usability, I think it's important to either improve utility and/or
> > project documentation or reconsider your stated position on symlink population.
>
> I am against populating the links.
>
> > Feel free to ask for help with either direction you choose.
--
With Best Regards,
Andy Shevchenko
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2024-10-18 11:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 17:55 [Buildroot] [PATCH v2 1/1] package: Add iotools package Vincent Fazio
2024-10-16 13:52 ` Andy Shevchenko
[not found] ` <1929b27b55e.1242e8abc627480.7414881916261699452@bubbl-tek.com>
2024-10-18 11:52 ` Andy Shevchenko
2024-10-18 11:54 ` Andy Shevchenko [this message]
2024-10-21 15:59 ` Aaron Sierra
2024-10-24 20:30 ` Aaron Sierra
2024-10-31 17:25 ` Andy Shevchenko
-- strict thread matches above, loose matches on Subject: below --
2024-09-27 18:34 Andy Shevchenko
2024-09-28 9:10 ` Andy Yan
2024-09-30 17:36 ` Andy Shevchenko
2024-10-14 15:38 ` Andy Shevchenko
2024-10-14 17:00 ` Aaron Sierra
2024-10-16 13:54 ` Andy Shevchenko
2024-10-26 12:47 ` Thomas Petazzoni via buildroot
2024-10-28 7:57 ` Andy Shevchenko
2024-10-28 8:26 ` Thomas Petazzoni via buildroot
2024-10-31 17:25 ` Andy Shevchenko
2024-10-31 17:33 ` Thomas Petazzoni via buildroot
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=ZxJMhHEJmfHd5dyt@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=aaron@bubbl-tek.com \
--cc=andyshrk@163.com \
--cc=andyshrk@gmail.com \
--cc=buildroot@buildroot.org \
--cc=vfazio@xes-inc.com \
/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