Re: [RFC PATCH v3 1/3] scripts: add kconfirm

From: Nathan Chancellor

Date: Sun May 17 2026 - 05:28:54 EST


On Sun, May 17, 2026 at 08:28:16AM +0200, Miguel Ojeda wrote:
> On Sat, May 16, 2026 at 11:54 PM Julian Braha <julianbraha@xxxxxxxxx> wrote:
> >
> > +CARGO = cargo
>
> Question to Kbuild: would it hurt to hardcore `--offline` here?
>
> If someone within Make actually ever needs Cargo to fetch something,
> then they should be very explicit about it (in which case we could
> have another variable etc.).

No, I don't think so. I think there would need to be a very compelling
reason for connecting to the network during the build process. Although,
we would need to handle someone passing CARGO via the make command line
so that '--offline' does not get blown away.

> > - rust/libpin_init_internal.so rust/libpin_init_internal.dylib
> > + rust/libpin_init_internal.so rust/libpin_init_internal.dylib \
>
> Spurious change?

Maybe 'scripts/kconfirm' used to be here?

Another thing I just realized: scripts/kconfirm is going to mess with
shell autocompletion for some people, as scripts/kc<tab> will currently
always complete to scripts/kconfig. Not sure if that will be that big of
a deal but I know Linus has complained about that in the past.

> > +$(TARGET):
> > + $(CARGO) run --release --offline -p kconfirm-linux -- --linux-path $(srctree) --enable-arch $(SRCARCH) $(KCONFIRM_ARGS)
>
> This probably does not work in `O=` builds or in cases where the
> `srctree` is read-only (please see my other reply on the docs patch).

Yeah, it seems like this wants something like '--target-dir $(obj)' or
'--target-dir $(objtree)/scripts/kconfirm'? I don't find this to be
particularly readable either (I am more used to "build then run" as two
separate steps) but maybe that is because I am just not familiar with
Rust projects.

Cheers,
Nathan