Cmnt: [PATCH] UBUNTU: SAUCE: override KERNELRELEASE instead of KERNELVERSION

Emil Renner Berthing emil.renner.berthing at canonical.com
Mon Dec 4 11:19:35 UTC 2023


Emil Renner Berthing wrote:
> Masahiro Yamada wrote:
> > It is wrong to override KERNELVERSION, as doing so does not ensure
> > the expected KERNELRELEASE. KERNELRELEASE is the essential part and
> > must agree with debian/control because it results in the 'uname -r'
> > in the compiled kernel.
> >
> > scripts/setlocalversion may append additional strings depending on
> > CONFIG options and localversion* files. For example, if there exists
> > 'localversion' file in the top directory, scripts/setlocalversion
> > will append a string written in it. This must not happen.
> >
> > Debian kernel [1] and the upstream kernel [2] correctly override
> > KERNELRELEASE.
> >
> > Let's fix Ubuntu kernel now.
> >
> > [1]: https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.5.10-1/debian/rules.real#L141
> > [2]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/scripts/package/debian/rules?id=v6.7-rc3#n18
> >
> > Signed-off-by: Masahiro Yamada <masahiro.yamada at canonical.com>
>
> Acked-by: Emil Renner Berthing <emil.renner.berthing at canonical.com>

On second thought. I think the subject should be

UBUNTU: [Packaging] override KERNELRELEASE instead of KERNELVERSION

..and not SAUCE.

/Emil

>
> > ---
> >
> >  debian/rules.d/0-common-vars.mk | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk
> > index d62a9b063241..2ac46b6433c5 100644
> > --- a/debian/rules.d/0-common-vars.mk
> > +++ b/debian/rules.d/0-common-vars.mk
> > @@ -238,10 +238,9 @@ kmake = make ARCH=$(build_arch) \
> >  	CROSS_COMPILE=$(CROSS_COMPILE) \
> >  	HOSTCC=$(HOSTCC) \
> >  	CC=$(CROSS_COMPILE)$(gcc) \
> > -	KERNELVERSION=$(abi_release)-$(target_flavour) \
> > +	KERNELRELEASE=$(abi_release)-$(target_flavour) \
> >  	CONFIG_DEBUG_SECTION_MISMATCH=y \
> >  	KBUILD_BUILD_VERSION="$(uploadnum)" \
> > -	LOCALVERSION= localver-extra= \
> >  	CFLAGS_MODULE="-DPKG_ABI=$(abinum)" \
> >  	PYTHON=$(PYTHON)
> >  ifneq ($(LOCAL_ENV_CC),)
> > --
> > 2.40.1
> >
> >
> > --
> > kernel-team mailing list
> > kernel-team at lists.ubuntu.com
> > https://lists.ubuntu.com/mailman/listinfo/kernel-team
>
>



More information about the kernel-team mailing list