On 17/06/2024 12.22, Ross Burton wrote: > On 17 Jun 2024, at 10:59, Rasmus Villemoes via lists.openembedded.org > <[email protected]> wrote: >> >> From: Rasmus Villemoes <[email protected]> >> >> It can be useful to have find and/or xargs by themselves without >> pulling in locate and its associated binaries updatedb and frcode. In >> my case, I just need xargs in an initramfs, which is a 42K binary; the >> other binaries add over 300K of dead weight. > > busybox has both find and xargs, why is that not satisfactory for a initramfs?
It might be, for this particular use case, and where I control everything. But, the problem with relying on busybox for anything is that there's no way to say "depend on busybox built with at least CONFIG_XARGS and CONFIG_FEATURE_XARGS_SUPPORT_QUOTES". So in order to make the recipe for my script correct, I'd rather just say "RDEPENDS += findutils-xargs" and know that I get something with the required features and semantics. I was bitten by precisely this; I tested whether my script would even work with busybox xargs on my host machine, was pleasantly surprised that it did, then tested on target and then realized that the busybox shipped with Ubuntu apparently has that feature flag set whereas poky's default busybox config does not. Apart from the size issue (which of course mostly matters in initramfs and other constrained environments), there's in general value in being able to not install binaries that are not needed [*], and apart from being provided by the same recipe, these binaries don't really have a lot in common. Yes, 'find -print0 | xargs -0' is a common and useful thing, but xargs and find can certainly be used by themselves. [*] Say, when some severe CVE is found in findutils-locate, it's nice to be able to say "not affected, that binary is not on any of our targets" despite findutils being in the sbom. Rasmus
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#200806): https://lists.openembedded.org/g/openembedded-core/message/200806 Mute This Topic: https://lists.openembedded.org/mt/106717870/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
