[Buildroot] zless / zgrep

Arnout Vandecappelle arnout at rnout.be
Mon Sep 1 06:27:41 UTC 2025


  Hi Frank,

On 29/08/2025 19:50, Frank Wunderlich via buildroot wrote:
> Hi,
> 
> I had troubles getting zgrep and zless working in buildroot 2025.5.
> 
> See here:
> https://unix.stackexchange.com/questions/799248/buildroot-zgrep-zless-not-working

  The solutions given there are pretty good.

  For zless, there is not much we can do on the Buildroot side. Perhaps the 
zless script could be fixed upstream so that it uses the full path to less 
(which is set at build time through execprefix) instead of just calling "less" - 
that way the busybox applet is bypassed.

  For zgrep, adding GZIP_CONF_ENV += GREP=grep to gzip.mk sounds like a good 
approach. Would you be willing to send a patch [1] that does that? Ideally you 
should also create a runtime test that checks that zgrep is working.

  Regards,
  Arnout

[1] https://buildroot.org/downloads/manual/manual.html#submitting-patches



> My solution so far:
> BR2_PACKAGE_LESS=y
> And symlink for grep
> /usr/bin/grep -> /bin/grep
> 
> Maybe it is not ideal solution. In stackexchange there are posted more
> solutions i post here for discussion  and fixing.
> I hope this is fixed in next release :)
> 
> I guess some more users had this,but found no topic about before asking.
> regards Frank
> _______________________________________________
> buildroot mailing list
> buildroot at buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot



More information about the buildroot mailing list