On Thu, Feb 05, 2026 at 12:27:25PM -0500, Joe Lawrence wrote:
> On Wed, Feb 04, 2026 at 10:35:07AM -0800, Josh Poimboeuf wrote:
> > On Tue, Feb 03, 2026 at 09:51:38PM -0500, Joe Lawrence wrote:
> > > My initial thought was that I'd only be interested in knowing about
> > > patch offset/fuzz during the validation phase. And in the interest of
> > > clarifying some of the output messages, it would be nice to know the
> > > patch it was referring to, so how about a follow up patch
> > > pretty-formatting with some indentation like:
> > >
> > > Validating patch(es)
> > > cmdline-string.patch
> > > patching file fs/proc/cmdline.c
> > > Hunk #1 succeeded at 7 (offset 1 line).
> > > Fixing patch(es)
> > > Building patched kernel
> > > Copying patched object files
> > > Diffing objects
> > > vmlinux.o: changed function: override_release
> > > vmlinux.o: changed function: cmdline_proc_show
> > > Building patch module: livepatch-cmdline-string.ko
> > > SUCCESS
> > >
> > > That said, Song suggested using --silent across the board, so maybe
> > > tie that into the existing --verbose option?
> >
> > Hm. Currently we go to considerable effort to make klp-build's output
> > as concise as possible, which is good. On the other hand, it might be
> > important to know the patch has fuzz.
> >
>
> To keep it succinct, the script could check for offset/fuzz and only
> report it, including the "patching file ..." part, if there is any.
Maybe? Only if it's not too complicated.
> > I'm thinking I would agree that maybe it should be verbose when
> > validating patches and silent elsewhere. And the pretty formatting is a
> > nice upgrade to that.
> >
>
> In the past I've used a little function like:
>
> indent() {
> local num="${1:-0}"
> sed "s/^/$(printf '%*s' "$num" '')/"
> }
>
> so I could just pipe in echo or command output like: `./cmd | indent 2`.
> Good enough or maybe you have one?
Sounds good, it probably needs a "return true" at the end of the function.
> > We might also consider indenting the outputs of the other steps. For
> > example:
> >
> > Building patched kernel
> > vmlinux.o: some warning
> > Copying patched object files
> > Diffing objects
> > vmlinux.o: changed function: override_release
> > vmlinux.o: changed function: cmdline_proc_show
> >
> > Or alternatively, print the step names in ASCII bold or something.
> >
>
> While I do kinda like the recent color coded output from the compilers,
> I don't know if I'm ready for a full-color livepatch build experience :D
>
> I wouldn't be against it, but my vote leans towards the indentation
> since it leaves prettier log files, even if the color codes are filtered
> out. Then again, the color scheme bikeshedding we could look forward
> to!
:-)
--
Josh